:root {
            --page-bg: #090d16;
            --panel: rgba(20, 28, 44, .92);
            --panel-soft: rgba(255, 255, 255, .045);
            --line: rgba(255, 255, 255, .1);
            --text: #f7f9ff;
            --muted: #9ca8bd;
            --accent: #ffcc4d;
            --accent-2: #ff8a5b;
            --gok: #ffcf4a;
            --gov: #7fc7ff;
            --danger: #ff7691;
        }

        * { box-sizing: border-box; }

        body {
            margin: 0;
            color: var(--text);
            background:
                radial-gradient(circle at 10% 0%, rgba(255, 176, 66, .14), transparent 28rem),
                radial-gradient(circle at 90% 10%, rgba(72, 137, 255, .12), transparent 30rem),
                var(--page-bg);
            font-family: Pretendard, "Noto Sans KR", Arial, sans-serif;
        }

        .roster-page {
            width: min(1180px, calc(100% - 28px));
            margin: 0 auto;
            padding: 34px 0 70px;
        }

        .hero {
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 24px;
            padding: 28px 30px;
            border: 1px solid var(--line);
            border-radius: 24px;
            background: linear-gradient(135deg, rgba(31, 40, 60, .96), rgba(15, 21, 34, .96));
            box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
        }

        .hero::after {
            content: "";
            position: absolute;
            right: -80px;
            bottom: -130px;
            width: 340px;
            height: 340px;
            border-radius: 50%;
            background: rgba(255, 198, 71, .09);
        }

        .eyebrow {
            margin: 0 0 7px;
            color: var(--accent);
            font-size: 13px;
            font-weight: 800;
            letter-spacing: .16em;
        }

        h1 {
            margin: 0;
            font-size: clamp(28px, 5vw, 46px);
            letter-spacing: -.04em;
        }

        .hero-copy {
            position: relative;
            z-index: 1;
        }

        .hero-copy p:last-child {
            margin: 10px 0 0;
            color: var(--muted);
        }

        .hero-logo {
            position: relative;
            z-index: 1;
            width: min(220px, 32vw);
            height: auto;
            object-fit: contain;
            filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .25));
        }

        .summary {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 12px;
            margin: 18px 0;
        }

        .summary-card {
            padding: 18px 20px;
            border: 1px solid var(--line);
            border-radius: 17px;
            background: var(--panel);
        }

        .summary-label {
            color: var(--muted);
            font-size: 13px;
        }

        .summary-value {
            display: block;
            margin-top: 4px;
            font-size: 25px;
            font-weight: 850;
        }

        .toolbar {
            position: sticky;
            top: 10px;
            z-index: 20;
            display: grid;
            grid-template-columns: minmax(160px, 1fr) auto auto auto auto;
            gap: 10px;
            padding: 12px;
            margin-bottom: 14px;
            border: 1px solid var(--line);
            border-radius: 18px;
            background: rgba(13, 18, 29, .88);
            backdrop-filter: blur(14px);
        }

        .control {
            min-height: 44px;
            padding: 0 14px;
            border: 1px solid var(--line);
            border-radius: 12px;
            color: var(--text);
            background: rgba(255, 255, 255, .06);
            font: inherit;
            outline: none;
        }

        .control:focus {
            border-color: rgba(255, 204, 77, .7);
            box-shadow: 0 0 0 3px rgba(255, 204, 77, .11);
        }

        select.control option {
            color: #111827;
            background: #fff;
        }

        .toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 0 14px;
            border: 1px solid var(--line);
            border-radius: 12px;
            color: var(--muted);
            background: rgba(255, 255, 255, .04);
            cursor: pointer;
            white-space: nowrap;
        }

        .toggle input { accent-color: var(--accent); }

        .download-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 44px;
            padding: 0 16px;
            border: 1px solid rgba(255, 204, 77, .42);
            border-radius: 12px;
            color: #2b2107;
            background: linear-gradient(135deg, var(--accent), #ffae4a);
            font: inherit;
            font-weight: 850;
            text-decoration: none;
            white-space: nowrap;
            transition: transform .16s ease, filter .16s ease;
        }

        .download-button:hover {
            filter: brightness(1.06);
            transform: translateY(-1px);
        }

        .table-shell {
            overflow-x: auto;
            border: 1px solid var(--line);
            border-radius: 20px;
            background: var(--panel);
            box-shadow: 0 18px 50px rgba(0, 0, 0, .2);
        }

        .roster-table {
            width: 100%;
            border-collapse: collapse;
        }

        .roster-table th {
            padding: 14px 12px;
            color: var(--muted);
            background: rgba(255, 255, 255, .045);
            font-size: 12px;
            font-weight: 750;
            text-align: left;
            letter-spacing: .03em;
        }

        .roster-table td {
            padding: 14px 12px;
            border-top: 1px solid rgba(255, 255, 255, .065);
            vertical-align: middle;
        }

        .roster-table tbody tr {
            transition: background .16s ease, transform .16s ease;
        }

        .roster-table tbody tr:hover {
            background: rgba(255, 255, 255, .045);
        }

        .rank-cell {
            width: 65px;
            color: var(--muted);
            font-weight: 800;
            text-align: center !important;
        }

        .player-name {
            font-weight: 800;
            word-break: break-word;
        }

        .player-id {
            display: block;
            margin-top: 3px;
            color: var(--muted);
            font-size: 11px;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            min-height: 25px;
            padding: 3px 9px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 800;
        }

        .badge-gok { color: #332400; background: var(--gok); }
        .badge-gov { color: #06253d; background: var(--gov); }
        .badge-other { color: #d6dbea; background: rgba(255, 255, 255, .11); }
        .badge-sub { color: #3d0714; background: var(--danger); }

        .number {
            font-variant-numeric: tabular-nums;
            font-weight: 700;
        }

        .empty {
            display: none;
            padding: 50px 20px;
            color: var(--muted);
            text-align: center;
        }

        .result-count {
            margin: 0 3px 10px;
            color: var(--muted);
            font-size: 13px;
        }

        .roster-table .troop { text-align: center; white-space: nowrap; }
        .troop-settings { margin: 0 0 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
        .troop-settings summary { cursor: pointer; color: var(--accent); }
        .troop-settings p { color: var(--muted); font-size: 13px; }
        .troop-inputs { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0; }
        .troop-inputs fieldset { margin: 0; border: 1px solid var(--line); border-radius: 10px; }
        .troop-inputs input { width: 80px; padding: 0 8px; }
        .troop-settings button { cursor: pointer; }
        #troopSettingsStatus { margin-left: 10px; color: var(--muted); }
        @media (max-width: 760px) {
            .roster-page { width: min(100% - 18px, 1180px); padding-top: 12px; }
            .hero { padding: 22px 20px; border-radius: 19px; }
            .hero-logo { width: 120px; }
            .summary { grid-template-columns: repeat(3, 1fr); gap: 7px; }
            .summary-card { padding: 14px 12px; }
            .summary-value { font-size: 20px; }
            .toolbar { grid-template-columns: 1fr 1fr; top: 5px; }
            .toolbar .search { grid-column: 1 / -1; }
            .toggle { justify-content: center; }
            .hide-mobile { display: none; }
            .roster-table th, .roster-table td { padding: 12px 8px; }
            .rank-cell { width: 44px; }
        }

        @media (max-width: 480px) {
            .hero-logo { display: none; }
            .summary-label { font-size: 11px; }
            .toolbar { grid-template-columns: 1fr; }
            .toolbar .search { grid-column: auto; }
            .hide-small { display: none; }
        }
