/* ============================================================
   体育記録帳（カルーセル式） v2.0.0
   固定ヘッダー + 全画面ステージ + 右下ツールバー構成
   ブランドカラー: 白ベース / 紺 #1e3a5f / 金 #d4af37
   ============================================================ */

.gym-abc-root {
    /* 修正: 全画面アプリ化（Cocoonテーマのレイアウトから独立させる） */
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: #f4f6f9 !important;
    font-family: "BIZ UDGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: #1e3a5f;
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.gym-abc-root *,
.gym-abc-root *::before,
.gym-abc-root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.gym-abc-root button {
    font-family: inherit !important;
    cursor: pointer !important;
    border: none !important;
    background: none !important;
    color: inherit !important;
}

.gym-abc-root input,
.gym-abc-root select,
.gym-abc-root textarea {
    font-family: inherit !important;
    font-size: 16px !important;
    color: #1e3a5f !important;
    border: 2px solid #d7dde6 !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    background: #fff !important;
    width: 100% !important;
}

.gym-abc-root input:focus,
.gym-abc-root select:focus,
.gym-abc-root textarea:focus {
    outline: none !important;
    border-color: #d4af37 !important;
}

.gym-hidden-input {
    display: none !important;
}
/* ============ 共通ボタン ============ */
.gym-abc-root .gym-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    padding: 13px 22px !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}
.gym-abc-root .gym-btn:active {
    transform: scale(0.97) !important;
}
.gym-abc-root .gym-btn-primary {
    background: #1e3a5f !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(30, 58, 95, 0.25) !important;
}
.gym-abc-root .gym-btn-primary:hover {
    background: #27496f !important;
}
.gym-abc-root .gym-btn-ghost {
    background: #fff !important;
    color: #1e3a5f !important;
    border: 2px solid #d7dde6 !important;
}
.gym-abc-root .gym-btn-ghost:hover {
    border-color: #1e3a5f !important;
}
.gym-abc-root .gym-btn-danger-ghost {
    background: #fff !important;
    color: #b04040 !important;
    border: 2px solid #ecd3d3 !important;
    font-size: 15px !important;
}
.gym-abc-root .gym-btn-danger-ghost:hover {
    border-color: #b04040 !important;
}

/* ============ セットアップ（一本道ステップ） ============ */
.gym-setup {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f4f6f9 0%, #e9edf4 100%);
    padding: 20px;
    overflow-y: auto;
    z-index: 20;
}

.gym-setup.active {
    display: flex;
}

.gym-setup-card {
    background: #fff;
    border-radius: 20px;
    border-top: 6px solid #d4af37;
    box-shadow: 0 10px 40px rgba(30, 58, 95, 0.15);
    width: 100%;
    max-width: 460px;
    padding: 28px 26px 26px;
}

.gym-setup-brand {
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #1e3a5f;
}

.gym-setup-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 20px;
}
.gym-abc-root .gym-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #d7dde6 !important;
    transition: background 0.2s !important;
}
.gym-abc-root .gym-dot.active {
    background: #d4af37 !important;
}

.gym-setup-step {
    display: none;
}

.gym-setup-step.active {
    display: block;
}

.gym-setup-heading {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #1e3a5f;
}

.gym-setup-note {
    font-size: 13px;
    color: #6b7a8d;
    margin-bottom: 8px;
}

.gym-setup-textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.8;
}

.gym-field-row {
    display: flex;
    gap: 10px;
}

.gym-field {
    flex: 1;
    min-width: 0;
}

.gym-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #6b7a8d;
    margin-bottom: 5px;
}

.gym-setup-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.gym-setup-actions .gym-btn {
    flex: 1;
}

.gym-details {
    margin-top: 14px;
    border: 2px solid #eef1f6;
    border-radius: 10px;
    padding: 10px 12px;
}

.gym-details summary {
    font-size: 14px;
    font-weight: 700;
    color: #6b7a8d;
    cursor: pointer;
    user-select: none;
}

.gym-details-body {
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ============ メイン画面 ============ */
.gym-main {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
}

.gym-main.active {
    display: flex;
}

/* --- 固定ヘッダー --- */
.gym-header {
    flex-shrink: 0;
    height: 54px;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
}

.gym-header-title {
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-right: auto;
    white-space: nowrap;
}
.gym-abc-root .gym-chip {
    display: inline-flex !important;
    align-items: center !important;
    height: 34px !important;
    padding: 0 14px !important;
    border-radius: 17px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}
.gym-abc-root .gym-chip-sport {
    background: #d4af37 !important;
    color: #1e3a5f !important;
    transition: background 0.12s !important;
}
.gym-abc-root .gym-chip-sport::after {
    content: "▾" !important;
    margin-left: 6px !important;
    font-size: 11px !important;
}
.gym-abc-root .gym-chip-sport:active {
    background: #b8941f !important;
}
.gym-abc-root .gym-chip-lap {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

/* --- ステージ --- */
.gym-stage {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px 12px 12px;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}

/* --- カルーセル --- */
.gym-carousel-wrapper {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.gym-carousel-wrapper::-webkit-scrollbar {
    height: 4px;
}

.gym-carousel-wrapper::-webkit-scrollbar-thumb {
    background: #d7dde6;
    border-radius: 2px;
}
.gym-abc-root .gym-student-card {
    flex-shrink: 0 !important;
    scroll-snap-align: center !important;
    width: 108px !important;
    background: #fff !important;
    border: 2px solid #d7dde6 !important;
    border-radius: 12px !important;
    padding: 8px 6px !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s !important;
}
.gym-abc-root .gym-student-card.active {
    border-color: #d4af37 !important;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.35) !important;
    transform: translateY(-2px) !important;
}
.gym-abc-root .gym-student-card.completed {
    background: #f2f6fb !important;
    border-color: #b9c7d8 !important;
}
.gym-abc-root .gym-student-card.skipped {
    background: #f5f5f5 !important;
    opacity: 0.65 !important;
}

.gym-card-no {
    font-size: 11px;
    color: #6b7a8d;
    font-weight: 700;
}

.gym-card-name {
    font-size: 14px;
    font-weight: 800;
    color: #1e3a5f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gym-card-lap {
    font-size: 11px;
    color: #b8941f;
    font-weight: 700;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- 入力エリア --- */
.gym-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.gym-student-header {
    flex-shrink: 0;
    text-align: center;
    padding: 4px 0 2px;
}

.gym-group-switch {
    display: inline-flex;
    background: #e9edf4;
    border-radius: 16px;
    padding: 3px;
    gap: 2px;
    margin-bottom: 6px;
}
.gym-abc-root .gym-group-btn {
    border-radius: 13px !important;
    padding: 5px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #6b7a8d !important;
    transition: background 0.15s, color 0.15s !important;
}
.gym-abc-root .gym-group-btn.active {
    background: #1e3a5f !important;
    color: #fff !important;
}

.gym-student-name {
    font-size: clamp(22px, 4.5vw, 30px);
    font-weight: 800;
    color: #1e3a5f;
}

.gym-student-sub {
    display: flex;
    justify-content: center;
    gap: 14px;
    font-size: 13px;
    color: #6b7a8d;
    font-weight: 700;
    min-height: 20px;
}

.gym-previous-record {
    color: #b8941f;
}

/* ============ 技カード + 成績選択 ============ */
.gym-skills-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
}

.gym-skillcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.gym-abc-root .gym-skill-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border: 2px solid #d7dde6 !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    text-align: left !important;
    transition: border-color 0.12s, box-shadow 0.12s, transform 0.1s;
}

.gym-skill-card:active {
    transform: scale(0.98);
}

.gym-skill-card-name {
    font-size: 15px;
    font-weight: 800;
    color: #1e3a5f;
    line-height: 1.3;
}

.gym-skill-card-grade {
    flex-shrink: 0;
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #b9c7d8;
    background: #f4f6f9;
    margin-left: 10px;
}

.gym-skill-card.has-grade {
    border-color: #d4af37;
}

.gym-skill-card.grade-a .gym-skill-card-grade {
    background: #1e3a5f;
    color: #fff;
}

.gym-skill-card.grade-b .gym-skill-card-grade {
    background: #4a7098;
    color: #fff;
}

.gym-skill-card.grade-c .gym-skill-card-grade {
    background: #8fa0b3;
    color: #fff;
}

.gym-skill-card.grade-correct .gym-skill-card-grade {
    background: #1e3a5f;
    color: #fff;
}

.gym-skill-card.grade-incorrect .gym-skill-card-grade {
    background: #8fa0b3;
    color: #fff;
}

.gym-skill-card.grade-absent .gym-skill-card-grade {
    background: #f5f5f5;
    color: #b04040;
}

/* --- ボタンエリア（次の児童へ） --- */
.gym-button-area {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 10px 0 4px;
}
.gym-abc-root .gym-btn-confirm {
    min-width: 200px !important;
    font-size: 20px !important;
    padding: 15px 30px !important;
}

/* --- 名簿未登録 --- */
.gym-empty {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #f4f6f9;
    z-index: 5;
}

.gym-empty.active {
    display: flex;
}

.gym-empty-text {
    font-size: 17px;
    font-weight: 700;
    color: #6b7a8d;
}

/* --- 完了画面 --- */
.gym-complete-screen {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #f4f6f9;
    z-index: 6;
}

.gym-complete-screen.active {
    display: flex;
}

.gym-complete-text {
    font-size: 28px;
    font-weight: 800;
    color: #1e3a5f;
}

.gym-complete-text::before {
    content: "";
    display: block;
    width: 56px;
    height: 6px;
    background: #d4af37;
    border-radius: 3px;
    margin: 0 auto 14px;
}

.gym-complete-subtext {
    font-size: 15px;
    color: #6b7a8d;
    font-weight: 700;
}

/* ============ 右下ツールバー ============ */
.gym-toolbar {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}
.gym-abc-root .gym-tool-btn {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2px solid #d7dde6 !important;
    font-size: 21px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(30, 58, 95, 0.15) !important;
    transition: transform 0.12s, border-color 0.12s !important;
}
.gym-abc-root .gym-tool-btn:hover {
    border-color: #d4af37 !important;
}
.gym-abc-root .gym-tool-btn:active {
    transform: scale(0.94) !important;
}

/* ============ オーバーレイ共通 ============ */
.gym-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(30, 58, 95, 0.45);
    padding: 18px;
    z-index: 30;
}

.gym-overlay.active {
    display: flex;
}

.gym-overlay-panel {
    background: #fff;
    border-radius: 18px;
    border-top: 6px solid #d4af37;
    width: 100%;
    max-width: 620px;
    max-height: 92%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 44px rgba(30, 58, 95, 0.3);
    overflow: hidden;
}

.gym-overlay-narrow {
    max-width: 420px;
}

.gym-overlay-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 10px;
}

.gym-overlay-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gym-overlay-head h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1e3a5f;
}
.gym-abc-root .gym-close-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: #eef1f6 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #6b7a8d !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.12s !important;
}
.gym-abc-root .gym-close-btn:hover {
    background: #d7dde6 !important;
}

.gym-overlay-body {
    overflow-y: auto;
    padding: 4px 20px 20px;
    -webkit-overflow-scrolling: touch;
}

.gym-overlay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

/* --- 欠席・見学 選択オーバーレイ --- */
.gym-skip-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 6px 20px 20px;
}
.gym-abc-root .gym-skip-choice {
    width: 100% !important;
    font-size: 17px !important;
    padding: 15px 20px !important;
}

/* --- 種目グリッド --- */
.gym-sport-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 6px 20px 20px;
}
.gym-abc-root .gym-sport-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    background: #f4f6f9 !important;
    border: 2px solid #d7dde6 !important;
    border-radius: 12px !important;
    padding: 14px 8px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #1e3a5f !important;
    transition: border-color 0.12s, background 0.12s, transform 0.12s !important;
}
.gym-abc-root .gym-sport-btn:active {
    transform: scale(0.97) !important;
}
.gym-abc-root .gym-sport-btn.active {
    background: #1e3a5f !important;
    border-color: #1e3a5f !important;
    color: #fff !important;
}
.gym-sport-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}
.gym-sport-btn.active .gym-sport-icon .spg-body,
.gym-sport-btn.active .gym-sport-icon .spg-accent {
    stroke: #fff;
}
.gym-sport-btn.active .gym-sport-icon .spg-head,
.gym-sport-btn.active .gym-sport-icon .spg-solid {
    fill: #fff;
}

/* SVGスプライト定義（画面には出さないが、<use>から同一ドキュメント内で参照する） */
.gym-icon-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- 記録一覧 --- */
.gym-table-scroll {
    overflow-x: auto;
    border: 2px solid #eef1f6;
    border-radius: 10px;
}

.gym-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    white-space: nowrap;
}

.gym-data-table th {
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    padding: 8px 12px;
    text-align: left;
    position: sticky;
    top: 0;
}

.gym-data-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #eef1f6;
}

.gym-data-table tr:nth-child(even) td {
    background: #f8fafc;
}

.gym-table-empty {
    text-align: center;
    color: #6b7a8d;
    padding: 20px;
    font-size: 14px;
}

/* --- 設定オーバーレイ内 --- */
.gym-settings-section {
    padding: 14px 0;
    border-bottom: 2px solid #eef1f6;
}

.gym-settings-section:last-child {
    border-bottom: none;
}

.gym-settings-section h3 {
    font-size: 15px;
    font-weight: 800;
    color: #1e3a5f;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 4px solid #d4af37;
}

.gym-mode-toggle {
    display: inline-flex;
    background: #e9edf4;
    border-radius: 14px;
    padding: 3px;
    gap: 2px;
    margin-bottom: 10px;
}
.gym-abc-root .gym-mode-btn {
    border-radius: 11px !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #6b7a8d !important;
}
.gym-abc-root .gym-mode-btn.active {
    background: #1e3a5f !important;
    color: #fff !important;
}

.gym-input-area {
    display: none;
}

.gym-input-area.active {
    display: block;
}

.gym-input-area textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 10px;
    line-height: 1.8;
}

.gym-add-row {
    display: flex;
    gap: 8px;
}

.gym-add-row input {
    flex: 1;
}

.gym-add-row .gym-btn {
    flex-shrink: 0;
}

.gym-student-list {
    max-height: 260px;
    overflow-y: auto;
    border: 2px solid #eef1f6;
    border-radius: 10px;
    margin-bottom: 10px;
}

.gym-student-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-bottom: 1px solid #eef1f6;
}

.gym-student-item:last-child {
    border-bottom: none;
}

.gym-student-item-no {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: #6b7a8d;
    width: 44px;
}

.gym-student-item-name {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gym-abc-root .gym-student-gender {
    width: 64px !important;
    flex-shrink: 0 !important;
    padding: 5px 6px !important;
    font-size: 14px !important;
}
.gym-abc-root .gym-item-delete {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #b04040 !important;
    border: 1px solid #ecd3d3 !important;
    border-radius: 8px !important;
    padding: 5px 10px !important;
}
.gym-abc-root .gym-item-delete:hover {
    border-color: #b04040 !important;
}

.gym-list-empty {
    text-align: center;
    color: #6b7a8d;
    padding: 16px;
    font-size: 14px;
}

.gym-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gym-data-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gym-data-label {
    font-size: 13px;
    font-weight: 700;
    color: #6b7a8d;
}

.gym-hint-text {
    font-size: 12px;
    color: #6b7a8d;
    margin-top: 10px;
    flex-basis: 100%;
}

/* ============ レスポンシブ ============ */
@media (max-width: 480px) {
    .gym-header-title {
        font-size: 15px;
    }

    .gym-skillcards-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .gym-abc-root .gym-btn-confirm {
        min-width: 150px !important;
    }

    .gym-data-grid {
        grid-template-columns: 1fr;
    }

    .gym-field-row {
        flex-direction: column;
    }
}

/* ============ 設定: 技の選択・追加 ============ */
.gym-sport-skills {
    margin-bottom: 20px;
}

.gym-sport-skills:last-child {
    margin-bottom: 0;
}

.gym-sport-skills h4 {
    font-size: 14px;
    font-weight: 800;
    color: #1e3a5f;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gym-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.gym-skill-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    background: #f4f6f9;
    border: 2px solid #d7dde6;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
    transition: border-color 0.15s, background 0.15s;
}

.gym-skill-checkbox-label:hover {
    border-color: #d4af37;
}

.gym-skill-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #1e3a5f;
    flex-shrink: 0;
}

.gym-skill-checkbox-label.gym-skill-custom {
    background: #fffcf0;
    border-color: #ecd68f;
}

.gym-select-all-btn {
    padding: 6px 14px;
    background: #fff;
    color: #1e3a5f;
    border: 2px solid #1e3a5f;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    margin-left: auto;
}

.gym-select-all-btn:hover {
    background: #1e3a5f;
    color: #fff;
}

.gym-custom-skill-row {
    display: flex;
    gap: 8px;
}

.gym-custom-skill-input {
    flex: 1;
}

.gym-btn-add-skill {
    padding: 10px 16px;
    background: #1e3a5f;
    color: #fff;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
}

.gym-skill-delete-btn {
    margin-left: auto;
    color: #b04040;
    font-size: 15px;
    font-weight: 800;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.7;
    flex-shrink: 0;
}

.gym-skill-delete-btn:hover {
    opacity: 1;
}

/* ============ フリック方向インジケーター（隠し設定用） ============ */
.gym-flick-indicator {
    position: fixed;
    z-index: 9999;
    transform: translate(-50%, -140%);
    background: rgba(30, 58, 95, 0.9);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    white-space: nowrap;
}

.gym-flick-indicator.active {
    opacity: 1;
}

/* ============ 表示/非表示トグル用ユーティリティ ============ */
/* 修正: JSがボタン等を style.display で隠しても、
   Cocoon対策で .gym-btn に付けた display:inline-flex !important に
   負けて消えなかったため、専用クラスで確実に隠せるようにする。
   （このルールをファイル末尾に置き、.gym-btn 系より後勝ちさせる） */
.gym-abc-root .gym-hidden {
    display: none !important;
}
