* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background-color: var(--sc-surface);
            color: var(--sc-ink);
            font-family: var(--font-ui);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            overflow-x: hidden;
            overflow-y: auto;
            zoom: 0.88;
        }

        .container {
            max-width: 1400px;
            width: 100%;
            min-height: 100vh;
            padding: calc(2rem + 50px) 3rem 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 3rem;
        }

        .left-panel {
            flex: 0 0 auto;
            width: 450px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .right-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

                                                        .topic-window {
            width: 100%;
            min-width: 0;
            margin-top: 75px;
            height: 390px;
            position: relative;
            overflow: hidden;
            -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
            box-shadow: inset 0 20px 30px -20px rgba(0,0,0,0.06), inset 0 -20px 30px -20px rgba(0,0,0,0.06);
        }

        /* --- Slot Lever Handle --- */
        .slot-handle {
            width: 60px;
            flex-shrink: 0;
            position: relative;
            overflow: visible;
        }

                                                                                                                                                                                                                                                .reel-strip {
            position: absolute;
            width: 100%;
            left: 0;
            top: 0;
            will-change: transform;
        }

        .reel-item {
            width: 100%;
            height: 130px;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            font-family: var(--font-label);
            font-size: 5rem;
            line-height: 1.15;
            color: var(--sc-ink);
            padding: 0 1rem;
            user-select: none;
            overflow-wrap: break-word;
            word-wrap: break-word;
        }

        .reel-center-line {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80%;
            height: 130px;
            border-top: 1px solid rgba(47, 44, 40, 0.08);
            border-bottom: 1px solid rgba(47, 44, 40, 0.08);
            pointer-events: none;
            z-index: 2;
        }

        .reel-strip.settled .reel-item {
            opacity: 0.3;
            transform: scale(1);
            transition: opacity 0.4s ease, transform 0.4s ease;
        }

        .reel-strip.settled .reel-item.landed {
            opacity: 1;
            transform: scale(1.6);
            transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
            z-index: 5;
            position: relative;
        }

                        .container {
            animation: fadeIn 0.8s ease forwards;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Tablet portrait: vertical layout with spin button */
        @media (max-width: 1024px) and (orientation: portrait) {
                        body {
                overflow-y: auto;
                justify-content: flex-start;
                zoom: 0.9;
            }
            .container {
                flex-direction: column;
                padding: 2rem;
                padding-top: 0.5rem;
                gap: 1.5rem;
                min-height: auto;
            }
            .left-panel { flex: 0 0 auto; width: auto; align-items: center; text-align: center; }
            .right-panel { width: 100%; margin-top: 0; }
                                                                        .reel-item { font-size: 2rem; height: 100px; }
            .topic-window { height: 300px; min-width: 0; margin-top: 0; }
            .reel-center-line { height: 100px; }
            .reel-strip.settled .reel-item.landed { transform: scale(1.5); }
                                                                                }

        /* Phone: vertical layout */
        @media (max-width: 768px) {
                        body {
                overflow-y: auto;
                justify-content: flex-start;
                zoom: 0.9;
            }
            .container {
                flex-direction: column;
                padding: 2rem;
                padding-top: 0.5rem;
                gap: 0.5rem;
                min-height: auto;
            }
            .left-panel { flex: 0 0 auto; width: auto; align-items: center; text-align: center; padding-top: 20px; }
            .right-panel { width: 100%; }
                                                                        .reel-item { font-size: 2.6rem; height: 120px; }
            .topic-window { height: 360px; min-width: 0; margin-top: 0; }
            .reel-center-line { height: 120px; }
            .reel-strip.settled .reel-item.landed { transform: scale(1.5); }
                                                                                }

        @media (max-width: 480px) {
            .container { padding: 1rem 1rem 2rem; gap: 0.5rem; padding-top: 0.5rem; }
                                                            .reel-item { font-size: 2rem; height: 100px; padding: 0 0.5rem; }
            .topic-window { height: 300px; margin-top: 0; }
            .reel-center-line { height: 100px; }
            .reel-strip.settled .reel-item.landed { transform: scale(1.2); }
                                                                                }
        /* --- Dropdown Row (language + difficulty) --- */
        .dropdown-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            align-self: center;
            margin-bottom: 0.5rem;
            z-index: 20;
            transform: translateX(-38px) translateY(20px);
        }

        /* --- Language Dropdown --- */
        .lang-dropdown {
            position: relative;
            display: inline-block;
        }

        /* --- Difficulty Dropdown --- */
        .diff-dropdown {
            position: relative;
            display: inline-block;
        }

        .lang-trigger {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 0.6rem 1.5rem;
            font-family: var(--font-ui);
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--sc-ink);
            background: transparent;
            border: 1.5px solid rgba(47, 44, 40, 0.25);
            border-radius: 20px;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease;
            user-select: none;
        }

        .lang-trigger:hover {
            border-color: rgba(47, 44, 40, 0.5);
            background: rgba(47, 44, 40, 0.04);
        }

        .lang-trigger .lang-flag {
            font-size: 1.3rem;
            line-height: 1;
        }

        .lang-trigger .lang-chevron {
            font-size: 0.6rem;
            transition: transform 0.2s ease;
        }

        .lang-dropdown.open .lang-trigger .lang-chevron {
            transform: rotate(180deg);
        }

        .lang-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 50%;
            min-width: 180px;
            max-height: 360px;
            overflow-y: auto;
            background: var(--sc-surface);
            border: 1.5px solid rgba(47, 44, 40, 0.15);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(47, 44, 40, 0.12);
            padding: 0.35rem 0;
            opacity: 0;
            visibility: hidden;
            transform: translateX(-50%) translateY(-4px);
            transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
            z-index: 10;
        }

        .lang-dropdown.open .lang-menu {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .lang-option {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 0.5rem 1rem;
            font-family: var(--font-ui);
            font-size: 0.85rem;
            font-weight: 400;
            color: var(--sc-ink);
            background: none;
            border: none;
            cursor: pointer;
            transition: background 0.15s ease;
            text-align: left;
        }

        .lang-option:hover {
            background: rgba(47, 44, 40, 0.06);
        }

        .lang-option .lang-flag {
            font-size: 1.1rem;
            line-height: 1;
        }

        .lang-option .lang-check {
            margin-left: auto;
            font-size: 0.75rem;
            opacity: 0;
            color: var(--sc-ink);
        }

        .lang-option.selected .lang-check {
            opacity: 1;
        }

                        .diff-trigger .diff-icon {
            font-size: 1.1rem;
            line-height: 1;
        }

        .diff-trigger .diff-chevron {
            font-size: 0.6rem;
            transition: transform 0.2s ease;
        }

        .diff-dropdown.open .diff-trigger .diff-chevron {
            transform: rotate(180deg);
        }

        .diff-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 50%;
            min-width: 180px;
            background: var(--sc-surface);
            border: 1.5px solid rgba(47, 44, 40, 0.15);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(47, 44, 40, 0.12);
            padding: 0.35rem 0;
            opacity: 0;
            visibility: hidden;
            transform: translateX(-50%) translateY(-4px);
            transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
            z-index: 10;
        }

        .diff-dropdown.open .diff-menu {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .diff-option {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 0.5rem 1rem;
            font-family: var(--font-ui);
            font-size: 0.85rem;
            font-weight: 400;
            color: var(--sc-ink);
            background: none;
            border: none;
            cursor: pointer;
            transition: background 0.15s ease;
            text-align: left;
        }

        .diff-option:hover {
            background: rgba(47, 44, 40, 0.06);
        }

        .diff-option .diff-icon {
            font-size: 1.1rem;
            line-height: 1;
        }

        .diff-option .diff-check {
            margin-left: auto;
            font-size: 0.75rem;
            opacity: 0;
            color: var(--sc-ink);
        }

        .diff-option.selected .diff-check {
            opacity: 1;
        }

        .dropdown-row {
            flex-wrap: nowrap;
            justify-content: center;
        }

        .lang-dropdown, .diff-dropdown, .cat-dropdown {
            flex-shrink: 1;
            min-width: 0;
        }

        .cat-dropdown {
            position: relative;
        }

        .cat-dropdown.disabled {
            opacity: 0.35;
            pointer-events: none;
        }

                        .cat-trigger .cat-icon {
            font-size: 1.1rem;
            line-height: 1;
        }

        .cat-trigger .cat-chevron {
            font-size: 0.6rem;
            transition: transform 0.2s ease;
        }

        .cat-dropdown.open .cat-trigger .cat-chevron {
            transform: rotate(180deg);
        }

        .cat-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 50%;
            min-width: 220px;
            max-height: 320px;
            overflow-y: auto;
            background: var(--sc-surface);
            border: 1.5px solid rgba(47, 44, 40, 0.15);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(47, 44, 40, 0.12);
            padding: 0.35rem 0;
            opacity: 0;
            visibility: hidden;
            transform: translateX(-50%) translateY(-4px);
            transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
            z-index: 10;
        }

        .cat-dropdown.open .cat-menu {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .cat-option {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 0.5rem 1rem;
            font-family: var(--font-ui);
            font-size: 0.85rem;
            font-weight: 400;
            color: var(--sc-ink);
            background: none;
            border: none;
            cursor: pointer;
            transition: background 0.15s ease;
            text-align: left;
        }

        .cat-option:hover {
            background: rgba(47, 44, 40, 0.06);
        }

        .cat-option .cat-icon {
            font-size: 1.1rem;
            line-height: 1;
        }

        .cat-option .cat-check {
            margin-left: auto;
            font-size: 0.75rem;
            opacity: 0;
            color: var(--sc-ink);
        }

        .cat-option.selected .cat-check {
            opacity: 1;
        }

        /* 菜单选项一律单行：Libre Franklin 比原来的 Poppins 窄，但 "Random Difficulty"
           在 180px 的菜单里依然会折成两行，把选项高度从 34px 顶到 50px。 */
        .diff-option, .cat-option, .lang-option {
            white-space: nowrap;
        }

        /* 窄屏：菜单改挂到下拉开整行上居中。
           触发器本身是 position:relative，菜单以它为中心 translateX(-50%) 展开 —— 分类触发器
           靠右时菜单右沿会正好压在视口边上（实测 right=399/399），贴边看不出圆角还容易被裁。
           挂到 .dropdown-row（本来就带 transform，是合法的包含块）后两个菜单共用一条中线。 */
        @media (max-width: 700px) {
            .dropdown-row { position: relative; }
            .diff-dropdown, .cat-dropdown, .lang-dropdown { position: static; }
            .diff-menu, .cat-menu, .lang-menu {
                left: 50%;
                right: auto;
                width: max-content;
                min-width: 0;
                max-width: min(calc(100vw - 3rem), 340px);
            }
        }

        /* fitMenu() 判定下方放不下时挂这个类，把菜单翻到触发器上方 */
        .diff-menu.is-up, .cat-menu.is-up, .lang-menu.is-up {
            top: auto;
            bottom: calc(100% + 6px);
        }

        /* CJK and non-Latin font overrides */
        .lang-zh .reel-item {
            font-family: var(--font-label);
        }
        .lang-ja .reel-item {
            font-family: var(--font-label);
        }
        .lang-ko .reel-item {
            font-family: var(--font-label);
        }
        .lang-ar .reel-item,
        .lang-ur .reel-item {
            font-family: var(--font-label);
            direction: rtl;
        }
        .lang-th .reel-item {
            font-family: var(--font-label);
        }

        @media (max-width: 1024px) and (orientation: portrait) {
            .dropdown-row { align-self: center; transform: none; margin-top: 20px; }
        }

        @media (max-width: 768px) {
            .dropdown-row { align-self: center; transform: none; margin-top: 20px; gap: 0.35rem; }
            .lang-trigger { padding: 0.45rem 0.9rem; font-size: 0.95rem; gap: 4px; }
                                }

        @media (max-width: 480px) {
            .dropdown-row { align-self: center; transform: none; margin-top: 20px; gap: 0.25rem; }
            .lang-trigger, .diff-trigger, .cat-trigger {
                padding: 0.35rem 0.55rem; font-size: 0.8rem; gap: 3px;
                white-space: nowrap; overflow: hidden;
            }
            .lang-trigger .lang-flag { font-size: 0.95rem; }
            .diff-trigger .diff-icon { font-size: 0.85rem; }
            .cat-trigger .cat-icon { font-size: 0.85rem; }
            .lang-trigger .lang-chevron, .diff-trigger .diff-chevron, .cat-trigger .cat-chevron { font-size: 0.45rem; }
        }

        /* --- Tab Bar --- */
        .tab-bar {
            position: fixed;
            top: 1rem;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 0.5rem;
            padding: 5px;
            background: rgba(47, 44, 40, 0.08);
            border-radius: 50px;
            z-index: 15;
            max-width: calc(100vw - 1.5rem);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }

                .tab-btn {
            position: relative;
            padding: 0.6rem 1.8rem;
            font-family: var(--font-ui);
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--sc-ink);
            background: transparent;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
            white-space: nowrap;
        }

        .tab-btn:hover {
            background: rgba(47, 44, 40, 0.06);
        }

        .tab-btn.active {
            background: var(--sc-surface);
            box-shadow: 0 2px 6px rgba(47, 44, 40, 0.14);
            color: var(--sc-ink);
        }

                /* --- Framework Buttons --- */
        .framework-buttons {
            display: none;
            flex-direction: column;
            gap: 0.6rem;
            width: 100%;
            max-width: 340px;
            margin-top: 15px;
        }

                        @keyframes fwPopIn {
            0%   { transform: scale(0.92); opacity: 0.5; }
            50%  { transform: scale(1.04); }
            100% { transform: scale(1); opacity: 1; }
        }

                                                                                /* --- Example Button & Popup --- */
        .example-btn {
            display: none;
            width: auto;
            padding: 0.5rem 1.4rem;
            margin: 0.5rem auto 0;
            background: var(--sc-ink);
            color: var(--sc-surface);
            border: none;
            border-radius: 999px;
            font-family: var(--font-ui);
            font-size: 0.85rem;
            cursor: pointer;
            transition: opacity 0.2s;
        }
                        @keyframes exampleBtnIn {
            0%   { opacity: 0; transform: scale(0.6); }
            100% { opacity: 1; transform: scale(1); }
        }

                                                                                        /* --- Topics Mode Spacing --- */
        .subtitle-img-topics {
            margin-top: -0.5rem;
        }

        /* --- Interview Mode Visibility 已随 interview 模式下线（2026-11-17） --- */

        /* --- Vocabulary Mode Visibility --- */
        .title-img-vocabulary              { display: none; }
                .vocab-definition                  { display: none; }        .mode-vocabulary .title-img-topics   { display: none; }
        .mode-vocabulary .title-img-vocabulary { display: block; }
        .mode-vocabulary .subtitle-img-topics  { display: none; }
        .mode-vocabulary .subtitle-img-vocabulary { display: block; }
        .mode-vocabulary .lang-dropdown      { display: none; }
        .mode-vocabulary .diff-dropdown      { display: none; }
        /* 词汇主题有 13 项，比研究/随机题的分类多；下拉给足高度，移动端仍按视口收 */
        .mode-vocabulary .cat-menu           { max-height: min(70vh, 460px); }
        @media (max-width: 700px) {
            .mode-vocabulary .cat-menu       { max-height: 320px; }
        }
        .mode-vocabulary .framework-buttons  { display: none; }
                /* --- Deep Research Mode Visibility --- */
        .title-img-research                  { display: none; margin-bottom: 0; }
                .mode-research .title-img-topics     { display: none; }
        .mode-research .title-img-vocabulary { display: none; }
        .mode-research .title-img-research   { display: block; }
        .mode-research .subtitle-img-topics     { display: none; }
        .mode-research .subtitle-img-vocabulary { display: none; }
        .mode-research .subtitle-img-research   { display: block; }
        .mode-research .lang-dropdown         { display: none; }
        .mode-research .diff-dropdown         { display: none; }
        .mode-research .framework-buttons     { display: none; }

        /* --- Vocabulary Definition Card --- */
        .vocab-definition {
            width: 100%;
            max-width: 400px;
            background: transparent;
            border: 1.5px solid rgba(47, 44, 40, 0.25);
            border-radius: 16px;
            padding: 1.4rem 1.6rem;
            margin-top: 1rem;
            box-shadow: none;
        }
        .vocab-definition.visible {
            display: block;
            animation: fwPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        .vocab-word-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.15rem;
        }
        .vocab-word {
            font-family: var(--font-label);
            font-weight: 800;
            font-size: 1.8rem;
            color: var(--sc-ink);
        }
        .vocab-speak-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border: 1.5px solid rgba(47, 44, 40, 0.25);
            border-radius: 50%;
            background: transparent;
            color: var(--sc-ink);
            cursor: pointer;
            transition: background 0.15s ease, border-color 0.15s ease;
            flex-shrink: 0;
        }
        .vocab-speak-btn:hover {
            background: rgba(47, 44, 40, 0.08);
            border-color: rgba(47, 44, 40, 0.5);
        }
        .vocab-speak-btn:active {
            transform: scale(0.9);
        }
        .vocab-pos {
            font-family: var(--font-ui);
            font-size: 0.85rem;
            font-style: italic;
            color: rgba(47, 44, 40, 0.5);
            margin-bottom: 0.6rem;
        }
        .vocab-def {
            font-family: var(--font-ui);
            font-size: 1rem;
            line-height: 1.5;
            color: var(--sc-ink);
            margin-bottom: 1rem;
        }
        .vocab-example-label {
            font-family: var(--font-ui);
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--sc-ink);
            margin-bottom: 0.3rem;
        }
        .vocab-example {
            font-family: var(--font-ui);
            font-size: 0.88rem;
            font-style: italic;
            line-height: 1.6;
            color: rgba(47, 44, 40, 0.75);
            margin-bottom: 1rem;
        }
        .vocab-angle-label {
            font-family: var(--font-ui);
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--sc-yellow);
            margin-bottom: 0.3rem;
        }
        .vocab-angle {
            font-family: var(--font-ui);
            font-size: 0.88rem;
            line-height: 1.6;
            color: rgba(47, 44, 40, 0.8);
        }

        @media (max-width: 480px) {
            .vocab-definition { padding: 1rem 1.2rem; }
            .vocab-word { font-size: 1.4rem; }
            .vocab-def { font-size: 0.9rem; }
            .vocab-angle { font-size: 0.82rem; }
        }

        /* --- Tab Bar Responsive --- */
        @media (max-width: 768px) {
            .tab-btn { padding: 0.5rem 1.2rem; font-size: 0.92rem; }
                    }
        @media (max-width: 480px) {
            .tab-btn { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
                                            }

.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;
        }

/* 2026-11-15 P0：题库仅保留英文，语言下拉下线（数据文件已删） */
.lang-dropdown { display: none !important; }

