/* =============================================================
   achv.me - common.css
   Unified light theme design system
   All public pages should load this file before page-specific CSS.
   ============================================================= */

/* --- CSS Custom Properties --- */
:root {
    /* Brand */
    --achv-primary: #e60200;
    --achv-primary-hover: #c70200;
    --achv-primary-light: #fef2f2;
    --achv-secondary: #1d4ed8;
    --achv-secondary-hover: #1e40af;
    --achv-secondary-light: #eff6ff;

    /* Surfaces */
    --achv-bg: #ffffff;
    --achv-surface: #f8fafc;
    --achv-border: #e2e8f0;
    --achv-border-hover: #cbd5e1;

    /* Text */
    --achv-text: #1e293b;
    --achv-text-secondary: #64748b;
    --achv-text-muted: #94a3b8;

    /* Semantic */
    --achv-success: #16a34a;
    --achv-danger: #dc2626;
    --achv-warning: #d97706;

    /* Surfaces (extended) */
    --achv-surface-alt: #f1f5f9;
    --achv-surface-dim: #f9fafb;

    /* Semantic (extended) */
    --achv-success-light: #d1fae5;
    --achv-success-dark: #065f46;
    --achv-danger-light: #fee2e2;
    --achv-danger-dark: #991b1b;
    --achv-warning-light: #fef3c7;
    --achv-warning-dark: #92400e;
    --achv-info: #6b7280;

    /* Input */
    --achv-input-padding: 8px 12px;
    --achv-focus-ring: 0 0 0 3px rgba(29, 78, 216, 0.1);

    /* Shadows */
    --achv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --achv-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --achv-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);

    /* Radius */
    --achv-radius: 8px;
    --achv-radius-sm: 4px;
    --achv-radius-lg: 12px;

    /* Spacing (8px grid) */
    --achv-sp-1: 4px;
    --achv-sp-2: 8px;
    --achv-sp-3: 12px;
    --achv-sp-4: 16px;
    --achv-sp-5: 20px;
    --achv-sp-6: 24px;
    --achv-sp-8: 32px;
    --achv-sp-10: 40px;

    /* Typography */
    --achv-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    --achv-font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
}

/* --- Legacy Button Aliases (→ .achv-btn 규격을 그대로 쓴다) ---
   규격은 아래 .achv-btn 한 곳에만 적는다. 여기에 값을 다시 적으면 둘이 갈라진다. */

.achv-btn-primary {
    background: var(--achv-primary);
    color: #fff;
}
.achv-btn-primary:hover {
    background: var(--achv-primary-hover);
    color: #fff;
    text-decoration: none;
}

.achv-btn-secondary {
    background: transparent;
    color: var(--achv-secondary);
    border-color: var(--achv-secondary);
}
.achv-btn-secondary:hover {
    background: var(--achv-secondary);
    color: #fff;
    text-decoration: none;
}
/* =============================================================
   BEM Button System (.achv-btn)
   ============================================================= */
.achv-btn,
.achv-btn-primary,
.achv-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 20px;
    /* 색 modifier 가 없는 버튼도 버튼으로 보이게 한다 — 예전엔 배경·테두리가
       투명해 글자만 떠 있었다 (저장 버튼 5곳). */
    background: #fff;
    color: var(--achv-text);
    border: 1px solid var(--achv-border);
    border-radius: var(--achv-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.achv-btn:hover,
.achv-btn-primary:hover,
.achv-btn-secondary:hover { text-decoration: none; }

.achv-btn:hover { border-color: var(--achv-border-hover); background: var(--achv-surface); }

.achv-btn:focus-visible,
.achv-btn-primary:focus-visible,
.achv-btn-secondary:focus-visible {
    outline: 2px solid var(--achv-secondary);
    outline-offset: 2px;
}

.achv-btn--primary {
    background: var(--achv-primary);
    color: #fff;
    border-color: var(--achv-primary);
}
.achv-btn--primary:hover {
    background: var(--achv-primary-hover);
    border-color: var(--achv-primary-hover);
    color: #fff;
}

.achv-btn--secondary {
    background: transparent;
    color: var(--achv-secondary);
    border-color: var(--achv-secondary);
}
.achv-btn--secondary:hover {
    background: var(--achv-secondary);
    color: #fff;
}

.achv-btn--danger {
    background: var(--achv-danger);
    color: #fff;
    border-color: var(--achv-danger);
}
.achv-btn--danger:hover {
    background: #b91c1c;
    color: #fff;
}

.achv-btn--warning {
    background: var(--achv-warning);
    color: #fff;
    border-color: var(--achv-warning);
}
.achv-btn--warning:hover {
    background: #b45309;
    color: #fff;
}

.achv-btn--ghost {
    background: transparent;
    color: var(--achv-text-secondary);
    border-color: var(--achv-border);
}
.achv-btn--ghost:hover {
    background: var(--achv-surface);
    color: var(--achv-text);
    border-color: var(--achv-border-hover);
}

.achv-btn--sm {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 14px;
}

.achv-btn--full {
    width: 100%;
}

.achv-btn:disabled,
.achv-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.achv-btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.achv-btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: achv-spin 0.6s linear infinite;
}

.achv-btn--secondary.achv-btn--loading::after,
.achv-btn--ghost.achv-btn--loading::after {
    border-color: rgba(29, 78, 216, 0.2);
    border-top-color: var(--achv-secondary);
}

@keyframes achv-spin {
    to { transform: rotate(360deg); }
}

/* =============================================================
   Admin Page Commons (.achv-admin__*)
   ============================================================= */
.achv-admin__subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--achv-text);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--achv-border);
}

/* 한 단계 아래 소제목 — 예전엔 클래스 없는 <h4> 라 테마 기본값으로 렌더됐다 */
.achv-admin__subtitle--sub {
    font-size: 16px;
    font-weight: 600;
    color: var(--achv-text);
    margin: 20px 0 8px;
    padding: 0;
    border: 0;
}

.achv-admin__subtitle:first-child {
    margin-top: 0;
}

.achv-admin__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 16px;
}

.achv-admin__table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--achv-surface);
    border-bottom: 2px solid var(--achv-border);
    font-weight: 600;
    color: var(--achv-text-secondary);
    font-size: 14px;
}

.achv-admin__table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--achv-border);
    vertical-align: middle;
}

.achv-admin__table tr:hover td {
    background: var(--achv-surface);
}

.achv-admin__empty {
    text-align: center;
    color: var(--achv-text-muted);
    padding: 24px 0;
    font-size: 14px;
}

.achv-admin__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.achv-admin__badge--pending {
    background: var(--achv-warning-light);
    color: var(--achv-warning-dark);
}

.achv-admin__badge--approved {
    background: var(--achv-success-light);
    color: var(--achv-success-dark);
}

.achv-admin__badge--rejected {
    background: var(--achv-danger-light);
    color: var(--achv-danger-dark);
}

/* 중립 상태 — 예정·비활성처럼 좋고 나쁨이 없는 값 */
.achv-admin__badge--muted {
    background: var(--achv-surface-alt);
    color: var(--achv-text-secondary);
}

.achv-admin__badge--owner {
    background: var(--achv-primary-light);
    color: var(--achv-primary);
}

/* --- Danger Zone --- */
.achv-admin__danger-zone {
    margin-top: 32px;
    padding: 20px;
    border: 1px solid var(--achv-danger);
    border-radius: var(--achv-radius);
    background: #fef2f2;
}

.achv-admin__danger-zone h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--achv-danger);
    margin: 0 0 12px;
}

.achv-admin__danger-zone .achv-admin__warning {
    font-size: 14px;
    color: var(--achv-danger-dark);
    margin-bottom: 8px;
}

.achv-admin__danger-zone ul {
    font-size: 13px;
    color: var(--achv-text-secondary);
    margin: 0 0 0 20px;
    padding: 0;
}

/* =============================================================
   Form System (.achv-form__*)
   ============================================================= */
.achv-form__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.achv-form__row label {
    font-size: 13px;
    font-weight: 500;
    color: var(--achv-text-secondary);
}

/* 입력·선택 규격 정본 — 관리 폼(.achv-admin-league__form · .achv-admin-team__form)도
   여기로 모았다. 예전엔 파일마다 input[type=…] 목록을 따로 적어, 목록에서 빠진
   tel·email 칸만 테마 기본값(16px)으로 렌더돼 같은 줄에서 글자 크기가 달랐다. */
.achv-form__input,
.achv-select-native,
.achv-admin-league__form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]),
.achv-admin-league__form select,
.achv-admin-league__form textarea,
.achv-admin-team__form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]),
.achv-admin-team__form select,
.achv-admin-team__form textarea {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--achv-border);
    border-radius: var(--achv-radius);
    font-size: 14px;
    line-height: 1.5;
    color: var(--achv-text);
    background: var(--achv-bg);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.achv-form__input:focus-visible,
.achv-select-native:focus-visible,
.achv-admin-league__form input:focus-visible,
.achv-admin-league__form select:focus-visible,
.achv-admin-league__form textarea:focus-visible,
.achv-admin-team__form input:focus-visible,
.achv-admin-team__form select:focus-visible,
.achv-admin-team__form textarea:focus-visible {
    outline: none;
    border-color: var(--achv-secondary);
    box-shadow: var(--achv-focus-ring);
}

.achv-form__input:hover:not(:disabled),
.achv-select-native:hover:not(:disabled),
.achv-admin-league__form select:hover:not(:disabled),
.achv-admin-team__form select:hover:not(:disabled) {
    border-color: var(--achv-border-hover);
}

.achv-form__input:disabled,
.achv-admin-league__form select:disabled,
.achv-admin-team__form select:disabled {
    background: var(--achv-surface-alt);
    color: var(--achv-text-muted);
    cursor: not-allowed;
}

.achv-form__input--sm {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 14px;
}

/* Select — 브라우저 기본 화살표를 끄고 같은 화살표를 쓴다.
   요소는 <select> 그대로라 모바일에서는 기본 선택기가 뜬다. */
select.achv-form__input,
.achv-admin-league__form select,
.achv-admin-team__form select,
.achv-select-native {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    cursor: pointer;
}

/* 클래스가 없는 <select> 도 같은 모양이 되게 한다 — achv 페이지 안에서만 걸린다.
   화살표 자리를 비우려면 padding-right 가 필요해 위 규칙을 그대로 잇는다. */
.achv-select-native--sm {
    min-height: 32px;
    padding: 4px 28px 4px 10px;
    font-size: 14px;
}

.achv-form__actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

@media (max-width: 640px) {
    .achv-admin__table {
        font-size: 14px;
    }

    .achv-admin__table th,
    .achv-admin__table td {
        padding: 6px 8px;
    }

    .achv-btn--sm {
        padding: 4px 8px;
        font-size: 14px;
    }
}

/* --- Calendar (리그/팀 공용) --- */
.achv-cal__nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--achv-sp-3); }
.achv-cal__nav-btn { font-size: 19px; text-decoration: none; color: var(--achv-text); padding: 4px 8px; }
.achv-cal__nav-btn:hover { color: var(--achv-primary); }
.achv-cal__nav-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--achv-text); }
.achv-cal__ical { text-align: right; margin-bottom: var(--achv-sp-2); }
.achv-cal__ical a { font-size: 13px; color: var(--achv-text-muted); text-decoration: none; }
.achv-cal__ical a:hover { color: var(--achv-secondary); }
.achv-cal__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--achv-border); border-radius: var(--achv-radius); }
.achv-cal__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.achv-cal__table th { padding: 8px 4px; text-align: center; font-size: 14px; font-weight: 600; color: var(--achv-text-muted); background: var(--achv-surface); border-bottom: 1px solid var(--achv-border); }
.achv-cal__th--sun { color: var(--achv-primary); }
.achv-cal__th--sat { color: var(--achv-secondary); }
.achv-cal__cell { padding: 4px; border: 1px solid var(--achv-border); vertical-align: top; height: 72px; }
.achv-cal__cell--empty { background: var(--achv-surface); }
.achv-cal__cell--today { background: #eff6ff; }
.achv-cal__cell--has-game { background: #fefce8; }
.achv-cal__cell--today.achv-cal__cell--has-game { background: #dbeafe; }
.achv-cal__day { display: block; font-size: 13px; font-weight: 600; color: var(--achv-text); margin-bottom: 2px; }
.achv-cal__day--sun { color: var(--achv-primary); }
.achv-cal__day--sat { color: var(--achv-secondary); }
.achv-cal__game { display: block; font-size: 13px; line-height: 1.3; margin-top: 2px; text-decoration: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 1px 2px; border-radius: 2px; }
.achv-cal__game:hover { text-decoration: none; opacity: 0.8; }
.achv-cal__game--done { color: var(--achv-success); }
.achv-cal__game--live { color: var(--achv-danger); font-weight: 700; }
.achv-cal__game--scheduled { color: var(--achv-text-muted); }

/* --- My Ranking Highlight --- */
.achv-ranking__row--me {
    background: #eff6ff !important;
    border-left: 3px solid var(--achv-secondary);
}

.achv-ranking__row--me td {
    font-weight: 600;
}

.achv-ranking__row--me td:first-child {
    color: var(--achv-secondary);
}

table tfoot .achv-ranking__row--me {
    border-top: 2px solid var(--achv-border);
    background: #eef2ff !important;
}

/* --- Search Form --- *//* --- Pagination --- */
.achv-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: var(--achv-sp-5);
}

.achv-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--achv-border);
    border-radius: var(--achv-radius-sm);
    text-decoration: none;
    color: var(--achv-text);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.achv-pagination__item:hover {
    background: var(--achv-surface);
    border-color: var(--achv-border-hover);
    text-decoration: none;
}

.achv-pagination__item--active {
    background: var(--achv-primary);
    color: #fff;
    border-color: var(--achv-primary);
}

.achv-pagination__item--active:hover {
    background: var(--achv-primary-hover);
    border-color: var(--achv-primary-hover);
}

/* --- Badge --- *//* --- Season Select --- *//* --- Empty State --- *//* --- Section Title --- */
/* --- Numeric cells --- */
.achv-num {
    font-variant-numeric: tabular-nums;
}

/* --- Admin Forms (shared) --- *//* --- Admin Page Layout --- */
.achv-admin {
    max-width: 1024px;
    margin: 0 auto;
    padding: var(--achv-sp-4);
}

.achv-admin__header {
    margin-bottom: var(--achv-sp-5);
}

.achv-admin__header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--achv-text);
    margin: 0 0 var(--achv-sp-3);
}

.achv-admin__tabs {
    display: flex;
    gap: 0;
}

.achv-admin__tab {
    padding: 10px 8px;
    text-decoration: none;
    color: var(--achv-text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid var(--achv-border);
    transition: color 0.15s ease, border-color 0.15s ease;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.achv-admin__tab:hover {
    color: var(--achv-text);
    text-decoration: none;
}

.achv-admin__tab--active {
    color: var(--achv-primary);
    border-bottom-color: var(--achv-primary);
    font-weight: 600;
}

/* --- Responsive: Small Mobile (360px target) --- */
@media (max-width: 480px) {

    /* Buttons: 44px minimum touch target */
    .achv-btn-primary,
    .achv-btn-secondary {
        min-height: 44px;
        padding: 10px 16px;
        width: 100%;
    }

    /* Pagination: bigger touch targets */
    .achv-pagination__item {
        min-width: 40px;
        height: 40px;
    }

    /* Admin tabs touch targets */
    .achv-admin__tab {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 10px var(--achv-sp-3);
    }
}



/* =============================================================
   Select Search — 검색 가능한 커스텀 드롭다운
   ============================================================= */
.achv-select-search {
    position: relative;
    display: inline-block;
}
.achv-select-search__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--achv-border, #d1d5db);
    border-radius: 6px;
    background: #fff;
    color: var(--achv-text, #1f2937);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
    text-align: left;
}
.achv-select-search__btn::after {
    content: '▾';
    margin-left: auto;
    font-size: 14px;
    color: var(--achv-text-muted, #9ca3af);
}
.achv-select-search__btn:hover {
    border-color: var(--achv-secondary, #1d4ed8);
}
.achv-select-search__panel {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    max-height: 320px;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--achv-border, #d1d5db);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 100;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.achv-select-search__input {
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid var(--achv-border, #e5e7eb);
    font-size: 14px;
    outline: none;
    background: #fafafa;
    color: var(--achv-text, #1f2937);
}
.achv-select-search__input::placeholder { color: var(--achv-text-muted, #9ca3af); }
.achv-select-search__list {
    overflow-y: auto;
    max-height: 260px;
    padding: 4px 0;
}
.achv-select-search__group-label {
    padding: 6px 12px 2px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--achv-text-muted, #9ca3af);
}
.achv-select-search__item {
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--achv-text, #1f2937);
}
.achv-select-search__item:hover {
    background: var(--achv-bg-hover, #f3f4f6);
}
.achv-select-search__item--active {
    background: rgba(29,78,216,0.08);
    color: var(--achv-secondary, #1d4ed8);
    font-weight: 600;
}
.achv-select-search__item--all {
    color: var(--achv-text-muted, #6b7280);
    font-style: italic;
}

/* 다크 테마 (경기기록 페이지) */
.achv-game-record .achv-select-search__btn {
    background: var(--achv-gr-surface, #1e293b);
    border-color: var(--achv-gr-border, #334155);
    color: var(--achv-gr-text, #e2e8f0);
}
.achv-game-record .achv-select-search__btn::after { color: var(--achv-gr-text-dim, #94a3b8); }
.achv-game-record .achv-select-search__panel {
    background: var(--achv-gr-surface, #1e293b);
    border-color: var(--achv-gr-border, #334155);
}
.achv-game-record .achv-select-search__input {
    background: var(--achv-gr-bg, #0f172a);
    border-color: var(--achv-gr-border, #334155);
    color: var(--achv-gr-text, #e2e8f0);
}
.achv-game-record .achv-select-search__group-label { color: var(--achv-gr-text-dim, #94a3b8); }
.achv-game-record .achv-select-search__item { color: var(--achv-gr-text, #e2e8f0); }
.achv-game-record .achv-select-search__item:hover { background: rgba(255,255,255,0.05); }
.achv-game-record .achv-select-search__item--active { background: rgba(59,130,246,0.15); color: var(--achv-gr-accent, #3b82f6); }
.achv-game-record .achv-select-search__item--all { color: var(--achv-gr-text-dim, #94a3b8); }

/* =============================================================
   Admin — Image Upload/Delete (league_manage, team_manage 공용)
   ============================================================= */
/* 로고와 대표 이미지를 한 줄에 둔다. 두 미리보기의 높이를 같게 맞춰야
   아래의 업로드 버튼도 같은 줄에 선다 — 예전엔 88px 과 100px 이라 12px 어긋났다. */
.achv-admin-images {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    margin-top: 20px;
}

.achv-admin-images__item {
    min-width: 0;
}

.achv-admin-images__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--achv-text);
    margin-bottom: 6px;
}

.achv-admin-images__preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--achv-radius);
    border: 1px solid var(--achv-border);
    background: var(--achv-surface);
    overflow: hidden;
    margin-bottom: 8px;
}

.achv-admin-images__preview--logo {
    width: 120px;
    height: 120px;
}

.achv-admin-images__preview--cover {
    width: 100%;
    height: 120px;
}

.achv-admin-images__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 로고는 잘라내지 않는다 — 가로로 긴 엠블럼이 양옆으로 잘리고 있었다 */
.achv-admin-images__preview--logo img {
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
}

.achv-admin-images__preview:hover img {
    opacity: 0.85;
}

.achv-admin-images__empty {
    font-size: 13px;
    color: var(--achv-text-muted);
}

.achv-admin-images__delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: 2px solid #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.achv-admin-images__preview:hover .achv-admin-images__delete {
    opacity: 1;
}

/* 업로드·변경 — .achv-btn--sm 과 같은 규격 */
.achv-admin-images__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 32px;
    padding: 4px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--achv-secondary);
    background: var(--achv-bg);
    border: 1px solid var(--achv-secondary);
    border-radius: var(--achv-radius);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.achv-admin-images__btn:focus-within {
    outline: 2px solid var(--achv-secondary);
    outline-offset: 2px;
}

.achv-admin-images__btn:hover {
    background: var(--achv-secondary);
    color: #fff;
}

@media (max-width: 480px) {
    .achv-admin-images {
        grid-template-columns: minmax(0, 1fr);
    }

    .achv-admin-images__preview--logo {
        width: 96px;
        height: 96px;
    }

    .achv-admin-images__btn {
        min-height: 40px;
    }

    /* 손가락에는 hover 가 없다 — 삭제 버튼을 늘 보이게 둔다 */
    .achv-admin-images__delete {
        opacity: 1;
    }
}

/* =============================================================
   Team Gallery Cards
   ============================================================= */
.achv-team-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.achv-team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--achv-bg);
    border: 1px solid var(--achv-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--achv-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.achv-team-card:hover {
    border-color: var(--achv-primary);
    box-shadow: 0 2px 8px rgba(230, 2, 0, 0.1);
}

.achv-team-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.achv-team-card__logo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--achv-surface);
    border: 1px solid var(--achv-border);
    font-size: 24px;
    font-weight: 700;
    color: var(--achv-text-secondary);
}

.achv-team-card__name {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.achv-team-card__meta {
    font-size: 13px;
    color: var(--achv-text-muted);
    text-align: center;
}

/* --- Teams page --- */

.achv-teams__filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* 목록 페이지 우상단 액션 (리그 생성 / 팀 생성 버튼) */
.achv-list-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

/* ============================================================
   리그/팀 생성 페이지 — 카드 + hero + dropzone
   ============================================================ */
.achv-create-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--achv-sp-3);
}
.achv-create-page__hero {
    background: linear-gradient(135deg, var(--achv-primary, #e60200) 0%, #b30000 100%);
    color: #fff;
    border-radius: var(--achv-radius);
    padding: 28px 24px 32px;
    margin: 20px 0 -32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(230, 2, 0, 0.18);
}
.achv-create-page__hero::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.achv-create-page__hero-inner {
    position: relative;
    z-index: 1;
}
.achv-create-page__back {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.15s;
}
.achv-create-page__back:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.achv-create-page__title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
    letter-spacing: -0.02em;
}
.achv-create-page__lead {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    line-height: 1.5;
}

/* 본 카드 — 폼 본체 */
.achv-create-card {
    background: var(--achv-bg, #fff);
    border-radius: var(--achv-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 28px;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

/* 섹션 — 이미지 영역, 기본 정보 등 */
.achv-create-section + .achv-create-section {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--achv-border, #e5e7eb);
}
.achv-create-section__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--achv-text, #111);
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.achv-create-section__title::before {
    content: '';
    display: inline-block;
    width: 3px; height: 14px;
    background: var(--achv-primary, #e60200);
    margin-right: 8px;
    vertical-align: -2px;
    border-radius: 2px;
}
.achv-create-section__hint {
    margin: 0 0 16px;
    color: var(--achv-muted, #6b7280);
    font-size: 13px;
    line-height: 1.5;
    padding-left: 11px;
}

/* 이미지 dropzone */
.achv-create-images {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 480px) {
    .achv-create-images { grid-template-columns: 1fr; }
}
.achv-create-images__slot {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.achv-create-images__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--achv-text, #111);
}
.achv-create-images__drop {
    display: block;
    cursor: pointer;
    border-radius: var(--achv-radius);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.achv-create-images__drop:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.achv-create-images__preview {
    border: 2px dashed var(--achv-border, #d1d5db);
    background: #fafafa;
    border-radius: var(--achv-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
}
.achv-create-images__drop:hover .achv-create-images__preview {
    border-color: var(--achv-primary, #e60200);
    background: #fff5f5;
}
.achv-create-images__preview--logo {
    width: 120px; height: 120px;
}
.achv-create-images__preview--cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 140px;
}
.achv-create-images__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.achv-create-images__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--achv-muted, #9ca3af);
    font-size: 13px;
    font-weight: 500;
}
.achv-create-images__icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--achv-muted, #9ca3af);
    line-height: 1;
}
.achv-create-images__drop:hover .achv-create-images__icon {
    border-color: var(--achv-primary, #e60200);
    color: var(--achv-primary, #e60200);
}
.achv-create-images__clear {
    background: none;
    border: none;
    padding: 4px 0;
    font-size: 13px;
    color: var(--achv-muted, #6b7280);
    cursor: pointer;
    text-align: left;
    align-self: flex-start;
}
.achv-create-images__clear:hover {
    color: var(--achv-primary, #e60200);
    text-decoration: underline;
}

/* 폼 그리드 — 지역 + 설립일 두 단 */
.achv-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 480px) {
    .achv-create-grid { grid-template-columns: 1fr; }
}
.achv-create-card .achv-form__group {
    margin-bottom: 16px;
}
.achv-create-card .achv-form__group:last-child {
    margin-bottom: 0;
}
.achv-create-card .achv-form__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--achv-text, #111);
    margin-bottom: 6px;
}
.achv-create-card .achv-form__input {
    width: 100%;
    height: 42px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--achv-border, #d1d5db);
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.4;
    background: #fff;
    color: var(--achv-text, #111);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.achv-create-card .achv-form__input:focus {
    outline: none;
    border-color: var(--achv-primary, #e60200);
    box-shadow: 0 0 0 3px rgba(230, 2, 0, 0.12);
}
/* select — 화살표는 공통 규칙(select.achv-form__input)이 그린다. 여기서는 자리만 넓힌다. */
.achv-create-card select.achv-form__input {
    padding-right: 36px;
    background-position: right 12px center;
}
/* date input — native picker indicator 위치 정렬, height 통일 */
.achv-create-card input[type="date"].achv-form__input {
    padding-right: 8px;  /* native indicator 가 우측에 충분한 공간 */
}
.achv-create-card input[type="date"].achv-form__input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    margin-right: 2px;
}
.achv-create-card input[type="date"].achv-form__input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.achv-create-card textarea.achv-form__input {
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    min-height: 96px;
    -webkit-appearance: none;
    appearance: none;
}
.achv-form__hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--achv-muted, #9ca3af);
}
.achv-form__hint-inline {
    font-weight: 400;
    font-size: 13px;
    color: var(--achv-muted, #9ca3af);
    margin-left: 4px;
}

/* 액션 — 우측 정렬 */
.achv-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--achv-border, #e5e7eb);
}
@media (max-width: 480px) {
    .achv-create-actions {
        flex-direction: column-reverse;
    }
    .achv-create-actions .achv-btn { width: 100%; }
}

.achv-teams__search {
    display: flex;
    gap: 8px;
}
.achv-teams__search > input[type="text"] {
    flex: 1 1 0;
    min-width: 0;
}
.achv-teams__search > .achv-btn { flex: none; }

.achv-teams__regions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.achv-teams__region {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 999px;
    border: 1px solid var(--achv-border);
    color: var(--achv-text-secondary);
    text-decoration: none;
    transition: all 0.15s;
}

.achv-teams__region:hover {
    border-color: var(--achv-primary);
    color: var(--achv-primary);
}

.achv-teams__region--active {
    background: var(--achv-primary);
    border-color: var(--achv-primary);
    color: #fff;
}

.achv-teams__empty {
    text-align: center;
    color: var(--achv-text-muted);
    padding: 40px 0;
}

@media (max-width: 480px) {
    .achv-team-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .achv-team-card {
        padding: 16px 8px;
    }

    .achv-team-card__logo {
        width: 48px;
        height: 48px;
    }
}

/* =============================================================
   Toast Notifications
   ============================================================= */
.achv-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.achv-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    min-width: 280px;
    max-width: 400px;
    border-radius: var(--achv-radius);
    box-shadow: var(--achv-shadow-md);
    font-size: 14px;
    color: #fff;
    pointer-events: auto;
    animation: achv-toast-in 0.25s ease;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.achv-toast--removing {
    opacity: 0;
    transform: translateX(100%);
}

.achv-toast--success { background: var(--achv-success); }
.achv-toast--error { background: var(--achv-danger); }
.achv-toast--warning { background: var(--achv-warning); }
.achv-toast--info { background: var(--achv-secondary); }

.achv-toast__close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
}

.achv-toast__close:hover { opacity: 1; }

@keyframes achv-toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* =============================================================
   Modal Dialog
   ============================================================= */
.achv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: achv-modal-fade-in 0.2s ease;
}

.achv-modal {
    background: var(--achv-bg, #fff);
    border-radius: var(--achv-radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
}

.achv-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--achv-border);
}

.achv-modal__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.achv-modal__close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--achv-text-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.achv-modal__close:hover { color: var(--achv-text); }

.achv-modal__body {
    padding: 20px;
}

.achv-modal__body p {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--achv-text);
    white-space: pre-line;      /* 메시지의 줄바꿈(\n)을 살린다 — 팀 해체 거부의 경기 목록 등 */
}

.achv-modal__input {
    width: 100%;
    padding: var(--achv-input-padding, 8px 12px);
    border: 1px solid var(--achv-border);
    border-radius: var(--achv-radius-sm);
    font-size: 14px;
    box-sizing: border-box;
}

.achv-modal__input:focus-visible {
    outline: none;
    border-color: var(--achv-secondary);
    box-shadow: var(--achv-focus-ring);
}

.achv-modal__footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--achv-border);
}

/* 폼을 담는 모달 — 확인 문구보다 넓어야 칸이 두 줄로 접히지 않는다 (#703 시즌 추가·수정) */
.achv-modal--form { max-width: 560px; }

.achv-modal--form .achv-admin-league__form { max-width: none; }

/* 목록 위 동작 줄 — 「＋ 추가」 버튼 자리 */
.achv-admin__toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 12px;
}

@keyframes achv-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =============================================================
   Accessibility
   ============================================================= */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.achv-select-search__item--highlight {
    background: var(--achv-surface-alt);
}

/* =============================================================
   Pagination (extended)
   ============================================================= */
.achv-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--achv-text-muted);
    font-size: 14px;
}

@media (max-width: 480px) {
    .achv-toast-container {
        top: auto;
        bottom: 16px;
        left: 16px;
        right: 16px;
    }
    .achv-toast {
        min-width: 0;
        max-width: none;
    }
    .achv-modal {
        max-width: none;
    }
}

/* =============================================================
   Member Home — 마이페이지 야구 기록
   ============================================================= */
.achv-home-section { margin-bottom: 24px; }
.achv-home-section h3 { font-size: 15px; font-weight: 700; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--achv-primary, #e60200); color: var(--achv-text, #1f2937); }
.achv-home-profile { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.achv-home-profile__chip { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--achv-surface-dim, #f9fafb); border: 1px solid var(--achv-border, #e5e7eb); border-radius: 20px; font-size: 13px; }
.achv-home-profile__chip span { font-size: 12px; color: var(--achv-text-muted, #9ca3af); font-weight: 600; }
.achv-home-profile__chip b { color: var(--achv-text, #1f2937); }
.achv-home-team { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; background: var(--achv-surface-dim, #f3f4f6); border: 1px solid var(--achv-border, #e5e7eb); font-size: 13px; margin: 0 4px 4px 0; color: var(--achv-text, #1f2937); text-decoration: none; transition: border-color 0.15s; }
.achv-home-team:hover { border-color: var(--achv-secondary, #1d4ed8); text-decoration: none; }
.achv-home-team__season { font-size: 13px; color: var(--achv-text-muted, #9ca3af); }
.achv-home-team__num { font-weight: 700; color: var(--achv-primary, #e60200); }
.achv-home-gc { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.achv-home-gc__card { flex: 1; min-width: 140px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--achv-border, #e5e7eb); }
.achv-home-gc__card--season { background: var(--achv-surface-dim, #f9fafb); }
.achv-home-gc__card--career { background: var(--achv-warning-light, #fffbeb); border-color: #fde68a; }
.achv-home-gc__title { font-size: 13px; color: var(--achv-text-muted, #9ca3af); font-weight: 600; margin-bottom: 4px; }
.achv-home-gc__stats { display: flex; gap: 14px; }
.achv-home-gc__num { font-size: 20px; font-weight: 800; color: var(--achv-text, #1f2937); }
.achv-home-gc__label { font-size: 13px; color: var(--achv-info, #6b7280); }
.achv-home-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.achv-home-table th, .achv-home-table td { padding: 7px 8px; text-align: center; border-bottom: 1px solid var(--achv-border, #e5e7eb); }
.achv-home-table th { background: var(--achv-surface-dim, #f9fafb); font-weight: 600; color: #374151; font-size: 14px; position: sticky; top: 0; white-space: nowrap; }
.achv-home-table tbody tr:hover { background: var(--achv-surface-alt, #f1f5f9); }
.achv-home-table td:first-child, .achv-home-table th:first-child { text-align: left; }
.achv-home-table .achv-home-td--accent { font-weight: 700; color: var(--achv-primary, #e60200); }
.achv-home-table .achv-home-td--bold { font-weight: 700; }
.achv-home-table .achv-home-td--win { font-weight: 700; color: var(--achv-success, #16a34a); }
.achv-home-table .achv-home-td--rate { background: var(--achv-surface-dim, #f9fafb); }
.achv-home-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--achv-border, #e5e7eb); border-radius: 10px; }
.achv-home-career { background: var(--achv-warning-light, #fffbeb); border-radius: 10px; padding: 12px; border: 1px solid #fde68a; }
.achv-home-career th { background: #fde68a; }
.achv-home-career .achv-home-td--accent { color: #b45309; }
.achv-home-section__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--achv-primary, #e60200); }
.achv-home-section__header h3 { margin: 0; padding: 0; border: none; font-size: 15px; font-weight: 700; color: var(--achv-text, #1f2937); }
.achv-home-year-select { padding: 4px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; color: #374151; background: #fff; cursor: pointer; }
.achv-home-year-select:focus-visible { outline: none; border-color: var(--achv-secondary, #1d4ed8); box-shadow: var(--achv-focus-ring, 0 0 0 2px rgba(29,78,216,0.1)); }
.achv-home-recent { display: flex; flex-direction: column; gap: 6px; }
.achv-home-recent__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--achv-border, #e5e7eb); border-radius: 6px; text-decoration: none; color: inherit; transition: border-color 0.15s ease; }
.achv-home-recent__item:hover { border-color: var(--achv-primary, #e60200); text-decoration: none; }
.achv-home-recent__date { min-width: 65px; font-size: 13px; color: var(--achv-text-muted, #9ca3af); white-space: nowrap; }
.achv-home-recent__teams { flex: 1; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.achv-home-recent__score { color: var(--achv-primary, #e60200); margin: 0 4px; font-weight: 700; }
.achv-home-recent__result { min-width: 80px; text-align: right; font-size: 13px; color: var(--achv-text-muted, #9ca3af); }

/* 그누보드 콘텐츠 페이지 기본 제목 숨김 — achv 페이지는 자체 헤더 사용 */
#container_title { display: none; }

/* --- 아치브 관리 허브 (/manage) --- */
.achv-site-manage__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.achv-site-manage__card {
    display: block;
    padding: 16px;
    border: 1px solid var(--achv-border, #e5e7eb);
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.achv-site-manage__card:hover {
    border-color: var(--achv-primary, #e60200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.achv-site-manage__title {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}
.achv-site-manage__badge {
    padding: 1px 7px;
    border-radius: 3px;
    background: var(--achv-primary, #e60200);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}
.achv-site-manage__desc {
    display: block;
    font-size: 13px;
    line-height: 1.6;
    color: var(--achv-text-secondary, #6b7280);
}

/* --- 아치브 관리 > 리그·팀 전체 목록 (/manage/leagues · /manage/teams) --- */
.achv-site-list__back {
    margin: 0 0 8px;
    font-size: 13px;
}
.achv-site-list__back a {
    color: var(--achv-text-secondary, #6b7280);
    text-decoration: none;
}
.achv-site-list__back a:hover { color: var(--achv-primary, #e60200); }

.achv-site-list__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin: 16px 0 12px;
}
.achv-site-list__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.achv-site-list__field--actions {
    flex-direction: row;
    gap: 6px;
}
.achv-site-list__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--achv-text-secondary, #6b7280);
}
/* 폼 입력 16px — iOS 확대 방지 (디자인 시스템 규칙) */
.achv-site-list__filters .achv-form__input {
    font-size: 16px;
    min-width: 200px;
}
.achv-site-list__filters select.achv-form__input { min-width: 110px; }

.achv-site-list__count {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
}

/* 좁은 화면에서 표가 넘칠 때 표만 가로로 굴린다 (본문은 넘치지 않게) */
.achv-site-list__scroll { overflow-x: auto; }
.achv-site-list__table { min-width: 720px; }
.achv-site-list__num { text-align: right; white-space: nowrap; }
.achv-site-list__go { white-space: nowrap; }
.achv-site-list__go .achv-btn + .achv-btn { margin-left: 4px; }
.achv-site-list__name { font-weight: 600; }
.achv-site-list__id {
    margin-left: 5px;
    font-size: 13px;
    color: var(--achv-text-muted, #9ca3af);
}

/* ------------------------------------------------------------
   집계 범위 탭 (정규시즌 / 플레이오프)
   팀 페이지 기록 탭에서 쓴다. 리그 페이지는 같은 역할을
   .achv-league-subtabs 가 이미 맡고 있어 거기선 쓰지 않는다.
   ------------------------------------------------------------ */
.achv-scope-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: 0 0 var(--achv-sp-3, 16px) 0;
    padding: 4px 0;
    border-bottom: 1px solid var(--achv-border, #e2e8f0);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.achv-scope-tabs::-webkit-scrollbar { display: none; }
.achv-scope-tabs__item {
    padding: 6px 14px;
    font-size: 14px;
    color: var(--achv-text-secondary, #64748b);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.achv-scope-tabs__item:hover {
    background: rgba(230, 2, 0, 0.06);
    color: var(--achv-text, #0f172a);
    text-decoration: none;
}
.achv-scope-tabs__item--active {
    color: #fff;
    background: var(--achv-primary, #e60200);
    font-weight: 600;
}

/* 관리할 리그·팀 고르기 (/league/manage · /team/manage, #361) */
.achv-manage-chooser { max-width: 640px; margin: 24px auto; padding: 0 12px; }
.achv-manage-chooser__title { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.achv-manage-chooser__list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.achv-manage-chooser__link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; }
.achv-manage-chooser__link:hover { border-color: var(--achv-primary, #e60200); }
.achv-manage-chooser__logo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.achv-manage-chooser__logo--empty { display: inline-flex; align-items: center; justify-content: center; background: #f3f4f6; color: #6b7280; font-weight: 700; }
.achv-manage-chooser__name { font-weight: 700; flex: 1; }
.achv-manage-chooser__meta { font-size: 13px; color: #6b7280; }
.achv-manage-chooser__item--inactive .achv-manage-chooser__link { opacity: 0.7; }
.achv-manage-chooser__create { margin: 8px 0 0; }

/* =============================================================
   모바일 공통 — 터치 타깃 44px · iOS 확대 방지 16px
   (화면별 CSS 가 아니라 여기 한 곳에서 정한다)
   ============================================================= */
@media (max-width: 640px) {
    .achv-btn,
    .achv-btn-primary,
    .achv-btn-secondary,
    .achv-admin-league__form button[type="submit"],
    .achv-admin-team__form button[type="submit"] {
        min-height: 44px;
    }

    .achv-btn--sm {
        min-height: 36px;
    }

    .achv-form__input,
    .achv-select-native,
    .achv-admin-league__form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .achv-admin-league__form select,
    .achv-admin-league__form textarea,
    .achv-admin-team__form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    .achv-admin-team__form select,
    .achv-admin-team__form textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .achv-form__input--sm,
    .achv-select-native--sm {
        min-height: 40px;
        font-size: 16px;
    }
}

/* =============================================================
   탭 — 클래스 이름은 화면마다 다르지만 규격은 하나다
   (1단 = 밑줄 3px · 2단 = 채움 pill · 3단 = 테두리 pill)
   포커스 표시는 어느 탭에도 없었다. 키보드로 훑을 때 지금 어디인지 알 수 없다.
   ============================================================= */
.achv-admin__tab:focus-visible,
.achv-league-tabs__item:focus-visible,
.achv-team-tabs__item:focus-visible,
.achv-player-tabs__item:focus-visible,
.achv-ranking__tab:focus-visible,
.achv-community__tab:focus-visible,
.achv-league-subtabs__item:focus-visible,
.achv-league-itemtabs__item:focus-visible,
.achv-scope-tabs__item:focus-visible,
.achv-sb-tab:focus-visible,
.achv-sb-team-tab:focus-visible {
    outline: 2px solid var(--achv-secondary);
    outline-offset: -2px;
    border-radius: var(--achv-radius-sm);
}

/* 2단·3단 탭 — 터치 타깃 */
.achv-league-subtabs__item,
.achv-scope-tabs__item,
.achv-league-itemtabs__item {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
}

@media (max-width: 640px) {
    .achv-league-subtabs__item,
    .achv-scope-tabs__item,
    .achv-league-itemtabs__item {
        min-height: 36px;
    }
}

/* =============================================================
   표 공통 — 스크롤 래퍼 · 숫자 칸 · 말줄임
   표마다 클래스가 달라 규격은 각 파일에 남기고, 여기서는 어느 표에나 붙일 수 있는
   유틸만 둔다. 래퍼가 없으면 모바일에서 표가 화면 밖으로 나가 잘린다.
   ============================================================= */
.achv-tablescroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 좁은 화면에서 칸이 글자 단위로 줄바꿈되면(«원 정 1») 행 높이가 몇 배로 뛴다.
   래퍼 안에서는 줄을 바꾸지 않고 가로로 스크롤한다. */
.achv-tablescroll th,
.achv-tablescroll td {
    white-space: nowrap;
}

/* 숫자 칸 — 오른쪽 정렬 + 자릿수 고정 폭. 자릿수가 흔들리면 세로로 읽기 어렵다. */
.achv-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
}

/* =============================================================
   빈 상태 · 로딩 · 안내 박스
   ============================================================= */
/* 목록·표가 비었을 때. 쓰는 곳마다 <p> 를 맨몸으로 쓰고 있어 모양이 달랐다. */
.achv-empty,
.achv-admin__empty {
    text-align: center;
    color: var(--achv-text-muted);
    padding: 24px 16px;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.achv-empty__action {
    display: block;
    margin-top: 10px;
}

/* 불러오는 중 — 응답 전 빈 칸만 남던 자리에 쓴다 */
.achv-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    color: var(--achv-text-secondary);
    font-size: 14px;
}

.achv-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--achv-border);
    border-top-color: var(--achv-primary);
    border-radius: 50%;
    animation: achv-spin 0.7s linear infinite;
}

@keyframes achv-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .achv-loading::before { animation-duration: 2.4s; }
}

/* 안내 박스 — league.php·team.php 가 쓰고 있는데 정의가 아예 없었다 */
.achv-notice {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--achv-border);
    border-left: 3px solid var(--achv-text-muted);
    border-radius: var(--achv-radius-sm);
    background: var(--achv-surface);
    color: var(--achv-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.achv-notice--warning {
    border-color: var(--achv-warning-light);
    border-left-color: var(--achv-warning);
    background: var(--achv-warning-light);
    color: var(--achv-warning-dark);
}

.achv-notice--danger {
    border-color: var(--achv-danger-light);
    border-left-color: var(--achv-danger);
    background: var(--achv-danger-light);
    color: var(--achv-danger-dark);
}

/* 관리 화면 설명 문구 — 예전엔 league-manage.css 에만 있어 그 파일을 싣지 않는
   팀 관리·사이트 관리 화면에서는 아무 스타일도 걸리지 않았다. */
.achv-admin__hint {
    margin: 10px 0 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--achv-text-secondary);
}

/* =============================================================
   필터 바 — 시즌·부·조 같은 목록 필터를 한 줄에 둔다
   (AchvFilterPanel 이 목록 영역만 다시 그린다)
   ============================================================= */
.achv-filterbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}

.achv-filterbar__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.achv-filterbar__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--achv-text-secondary);
}

.achv-filterbar select {
    min-width: 140px;
    max-width: 100%;
}

/* 다시 그리는 동안 — 내용이 사라지지 않게 흐리게만 둔다 */
.achv-panel--loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

@media (max-width: 480px) {
    .achv-filterbar {
        flex-direction: column;
        align-items: stretch;
    }

    .achv-filterbar select {
        width: 100%;
    }
}

/* =============================================================
   추천 라인업 바 (#697) — 라인업 제출 · 기록원 편집기 · 팀 관리가 함께 쓴다
   ⚠ px 단위. 테마가 html{font-size:14px} 이라 rem 은 0.875배로 축소된다.
   ============================================================= */
.achv-la-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}
.achv-la-note {
    font-size: 12px;
    color: var(--achv-text-secondary);
}
.achv-la-bar:empty { display: none; }

@media (max-width: 640px) {
    .achv-la-bar > .achv-btn { width: 100%; }
}

/* DH 체크박스 — 추천 라인업 바·필터바 안에서 쓴다 (#697).
   ⚠ 테마 rb.css/form.css:3 이 모든 체크박스를 display:none 으로 숨긴다. 진짜 컨트롤을 쓰려면
     position·display·appearance 를 되돌려야 한다 — width/height 만 주면 아무것도 안 보인다. */
.achv-la-dh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}
.achv-la-dh input[type="checkbox"] {
    position: static;
    display: inline-block;
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 16px;
    height: 16px;
    margin: 0;
    opacity: 1;
}
