/* ── Dict Page: Design aligned with main site ──────────── */
body.dict-page {
    background:
        radial-gradient(circle at top, rgba(108, 92, 231, 0.12), transparent 32%),
        linear-gradient(180deg, #0a0a0f 0%, #12121a 42%, #171e2b 100%);
    color: #e8e6f0;
}

.dict-home-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

/* ── Hero: search-centered ─────────────────────────────── */
.dict-view {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.dict-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 0 28px;
}

/* ── Search box: match main site ───────────────────────── */
.dict-search-box {
    display: flex;
    align-items: center;
    max-width: 640px;
    width: 100%;
    background: rgba(18, 18, 26, 0.7);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 16px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(108, 92, 231, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dict-search-box:focus-within {
    border-color: rgba(108, 92, 231, 0.55);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12), 0 8px 32px rgba(108, 92, 231, 0.12);
}

.dict-search-icon {
    font-size: 18px;
    padding: 0 12px;
    opacity: 0.5;
}

.dict-search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #e8e6f0;
    font-size: 16px;
    padding: 12px 0;
    min-width: 0;
    font-family: 'Noto Serif SC', serif;
}

.dict-search-box input::placeholder {
    color: rgba(232, 230, 240, 0.4);
}

.dict-search-box button {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dict-search-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.35);
}

.dict-search-box button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Empty state suggestions ───────────────────────────── */
.dict-empty {
    padding-top: 16px;
    text-align: center;
}

.dict-suggestions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dict-suggestion {
    border: 1px solid rgba(108, 92, 231, 0.2);
    background: rgba(108, 92, 231, 0.06);
    color: #e8e6f0;
    border-radius: 999px;
    padding: 9px 16px;
    font-family: 'Noto Serif SC', serif;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dict-suggestion:hover {
    transform: translateY(-1px);
    border-color: rgba(108, 92, 231, 0.5);
    background: rgba(108, 92, 231, 0.12);
}

/* ── Mode Switch ───────────────────────────────────────── */
.dict-mode-switch {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.dict-mode-btn {
    border: 1px solid rgba(108, 92, 231, 0.2);
    background: rgba(108, 92, 231, 0.05);
    color: rgba(232, 230, 240, 0.8);
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dict-mode-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(108, 92, 231, 0.48);
    background: rgba(108, 92, 231, 0.12);
}

.dict-mode-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.82), rgba(162, 155, 254, 0.82));
    border-color: rgba(162, 155, 254, 0.55);
}

/* ── Results Layout ────────────────────────────────────── */
.dict-results {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.dict-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
}

.dict-side-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.dict-panel,
.dict-chat {
    background: rgba(18, 18, 26, 0.65);
    border: 1px solid rgba(108, 92, 231, 0.12);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(18px);
    border-radius: 20px;
    overflow: hidden;
}

.dict-panel-head,
.dict-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px 14px;
    border-bottom: 1px solid rgba(108, 92, 231, 0.1);
}

.dict-panel-head h2,
.dict-chat-head h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 20px;
    margin: 0;
}

.dict-count {
    min-width: 36px;
    text-align: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(108, 92, 231, 0.14);
    color: #a29bfe;
    font-weight: 700;
    font-size: 13px;
}

.dict-panel-body {
    padding: 8px 24px 18px;
    max-height: 640px;
    overflow-y: auto;
}

.dict-side-stack .dict-panel-body {
    max-height: 360px;
}

/* Scrollable gaokao results */
.dict-panel-body-wide {
    max-height: 640px;
    overflow-y: auto;
}

/* ── Cards ─────────────────────────────────────────────── */
.dict-card,
.dict-entry-card,
.dict-gk-card {
    border-bottom: 1px solid rgba(108, 92, 231, 0.08);
    padding: 18px 0;
}

.dict-card:last-child,
.dict-entry-card:last-child,
.dict-gk-card:last-child {
    border-bottom: none;
}

.dict-card-meta,
.dict-gk-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 10px;
    color: rgba(232, 230, 240, 0.58);
    font-size: 13px;
}

.dict-card-title {
    color: #a29bfe;
    font-weight: 600;
}

.dict-card-text,
.dict-entry-text,
.dict-gk-text,
.dict-chat-message.assistant .dict-chat-bubble {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.9;
}

.dict-card-text,
.dict-gk-text {
    color: rgba(232, 230, 240, 0.88);
}

.dict-card-actions,
.dict-entry-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dict-action-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(108, 92, 231, 0.2);
    background: rgba(108, 92, 231, 0.06);
    color: #a29bfe;
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.dict-action-link:hover {
    border-color: rgba(108, 92, 231, 0.5);
    background: rgba(108, 92, 231, 0.12);
}

/* ── Dictionary Entry ──────────────────────────────────── */
.dict-entry-top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.dict-entry-headword {
    font-family: 'Noto Serif SC', serif;
    font-size: 34px;
    font-weight: 700;
}

.dict-entry-trad,
.dict-entry-pinyin {
    color: rgba(232, 230, 240, 0.58);
}

.dict-entry-source {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(108, 92, 231, 0.08);
    color: rgba(232, 230, 240, 0.72);
    font-size: 12px;
}

.dict-entry-source.changyong {
    color: #74b9ff;
}

.dict-entry-source.xuci {
    color: #a29bfe;
}

.dict-entry-source.ciyuan {
    color: #ffeaa7;
}

.dict-entry-source.moe-revised {
    color: #81ecec;
}

.dict-page-entry {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dict-moe-intro,
.dict-moe-entry {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dict-moe-intro-text,
.dict-moe-text {
    color: rgba(232, 230, 240, 0.9);
}

.dict-moe-text p {
    margin: 0 0 12px;
}

.dict-moe-text p:last-child {
    margin-bottom: 0;
}

.dict-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: rgba(232, 230, 240, 0.58);
    font-size: 13px;
}

.dict-verified {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(78, 181, 124, 0.14);
    color: #b5f4cb;
    font-size: 12px;
    font-weight: 600;
}

.dict-verified.is-soft {
    background: rgba(108, 92, 231, 0.12);
    color: #a29bfe;
}

/* ── Thumbnails ────────────────────────────────────────── */
.dict-thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dict-thumb {
    padding: 0;
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(18, 18, 26, 0.4);
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.dict-thumb:hover {
    border-color: rgba(108, 92, 231, 0.4);
}

.dict-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

/* ── Chat ──────────────────────────────────────────────── */
.dict-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 24px 8px;
    max-height: 520px;
    overflow: auto;
}

.dict-chat-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dict-chat-message.user {
    align-items: flex-end;
}

.dict-chat-role {
    font-size: 12px;
    color: rgba(232, 230, 240, 0.54);
}

.dict-chat-bubble {
    max-width: min(860px, 100%);
    border-radius: 16px;
    padding: 12px 16px;
    background: rgba(108, 92, 231, 0.06);
    color: #e8e6f0;
    white-space: pre-wrap;
    line-height: 1.8;
}

.dict-chat-message.user .dict-chat-bubble {
    background: rgba(108, 92, 231, 0.16);
}

.dict-chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 24px 18px;
}

.dict-chat-compose textarea {
    flex: 1;
    width: 100%;
    border: 1px solid rgba(108, 92, 231, 0.18);
    background: rgba(18, 18, 26, 0.62);
    color: #e8e6f0;
    border-radius: 14px;
    padding: 10px 14px;
    outline: none;
    resize: vertical;
    min-height: 44px;
    max-height: 160px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dict-chat-compose textarea:focus {
    border-color: rgba(108, 92, 231, 0.55);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.dict-chat-compose button {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dict-chat-compose button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.dict-chat-compose button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dict-chat-copy {
    height: 36px;
    padding: 0 14px;
    background: rgba(108, 92, 231, 0.08);
    color: #a29bfe;
    border: 1px solid rgba(108, 92, 231, 0.18);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s ease;
}

.dict-chat-copy:hover {
    background: rgba(108, 92, 231, 0.16);
}

.dict-count[hidden],
.dict-exam-coverage[hidden],
.dict-exam-stats[hidden] {
    display: none !important;
}

/* ── Exam Mode ─────────────────────────────────────────── */
.dict-exam-meta {
    display: none;
}

.dict-exam-coverage,
.dict-exam-stats,
.dict-exam-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dict-exam-chip,
.dict-exam-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.14);
    color: rgba(232, 230, 240, 0.76);
    font-size: 12px;
}

.dict-exam-chip.scope-beijing {
    color: #f8cb6a;
    border-color: rgba(248, 203, 106, 0.28);
    background: rgba(248, 203, 106, 0.08);
}

.dict-exam-chip.scope-national {
    color: #81d3ff;
    border-color: rgba(129, 211, 255, 0.24);
    background: rgba(129, 211, 255, 0.08);
}

.dict-exam-shell {
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    gap: 20px;
    padding: 18px 24px 24px;
}

.dict-exam-list,
.dict-exam-detail {
    min-width: 0;
}

.dict-exam-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 720px;
    overflow-y: auto;
    padding-right: 4px;
}

.dict-exam-item {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(108, 92, 231, 0.14);
    background: rgba(18, 18, 26, 0.42);
    border-radius: 16px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.dict-exam-item:hover {
    transform: translateY(-1px);
    border-color: rgba(108, 92, 231, 0.42);
    background: rgba(108, 92, 231, 0.09);
}

.dict-exam-item.active {
    border-color: rgba(162, 155, 254, 0.55);
    background: rgba(108, 92, 231, 0.14);
}

.dict-exam-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dict-exam-headword {
    font-family: 'Noto Serif SC', serif;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.dict-exam-total {
    color: #a29bfe;
    font-size: 13px;
    font-weight: 700;
}

.dict-exam-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(108, 92, 231, 0.12);
    overflow: hidden;
    margin-bottom: 10px;
}

.dict-exam-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6c5ce7, #74b9ff);
}

.dict-exam-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(232, 230, 240, 0.62);
    font-size: 12px;
}

.dict-exam-item-glosses {
    margin-top: 10px;
    color: rgba(232, 230, 240, 0.82);
    font-size: 13px;
    line-height: 1.7;
}

.dict-exam-detail {
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 18px;
    background: rgba(18, 18, 26, 0.42);
    padding: 18px 20px;
    min-height: 280px;
    scroll-margin-top: 88px;
}

.dict-exam-detail-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dict-exam-detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dict-exam-detail-headword {
    font-family: 'Noto Serif SC', serif;
    font-size: 40px;
    font-weight: 700;
    color: #fff;
}

.dict-exam-detail-subtitle {
    color: rgba(232, 230, 240, 0.58);
    font-size: 13px;
}

.dict-exam-detail-section + .dict-exam-detail-section {
    margin-top: 18px;
}

.dict-exam-detail-title {
    margin: 0 0 10px;
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
}

.dict-exam-detail-text {
    white-space: pre-wrap;
    font-family: 'Noto Serif SC', serif;
    line-height: 1.85;
    color: rgba(232, 230, 240, 0.9);
    font-size: 14px;
}

.dict-exam-detail-disclosure {
    margin-top: 12px;
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 14px;
    background: rgba(108, 92, 231, 0.04);
    overflow: hidden;
}

.dict-exam-detail-disclosure summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    font-size: 13px;
    color: rgba(232, 230, 240, 0.82);
}

.dict-exam-detail-disclosure summary::-webkit-details-marker {
    display: none;
}

.dict-exam-detail-disclosure[open] summary {
    border-bottom: 1px solid rgba(108, 92, 231, 0.1);
}

.dict-exam-detail-disclosure .dict-exam-detail-text {
    padding: 12px 14px 14px;
    font-size: 13px;
}

.dict-exam-year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.dict-exam-year-item {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(108, 92, 231, 0.1);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(108, 92, 231, 0.05);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.dict-exam-year-item:hover {
    transform: translateY(-1px);
    border-color: rgba(108, 92, 231, 0.32);
}

.dict-exam-year-item.active {
    border-color: rgba(162, 155, 254, 0.55);
    background: rgba(108, 92, 231, 0.16);
}

.dict-exam-year-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: rgba(232, 230, 240, 0.68);
}

.dict-exam-year-bar {
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(108, 92, 231, 0.12);
}

.dict-exam-year-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00b894, #74b9ff);
}

.dict-exam-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.dict-exam-usage-card {
    border: 1px solid rgba(108, 92, 231, 0.1);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.08), rgba(108, 92, 231, 0.04));
}

.dict-exam-usage-head {
    margin-bottom: 12px;
}

.dict-exam-usage-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.dict-exam-usage-summary {
    margin-top: 6px;
    color: rgba(232, 230, 240, 0.72);
    line-height: 1.7;
    font-size: 13px;
}

.dict-exam-sense-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dict-exam-sense {
    border-left: 2px solid rgba(116, 185, 255, 0.5);
    padding-left: 10px;
}

.dict-exam-sense-label {
    font-family: 'Noto Serif SC', serif;
    color: rgba(255, 255, 255, 0.94);
    line-height: 1.6;
}

.dict-exam-sense-summary {
    margin-top: 4px;
    color: rgba(232, 230, 240, 0.68);
    line-height: 1.7;
    font-size: 13px;
}

.dict-exam-mindmap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.dict-exam-mindmap-root {
    align-self: flex-start;
    padding: 8px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.22), rgba(116, 185, 255, 0.2));
    color: #fff;
    font-family: 'Noto Serif SC', serif;
    font-size: 22px;
    font-weight: 700;
}

.dict-exam-mindmap-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.dict-exam-mindmap-branch {
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 16px;
    padding: 14px;
    background: rgba(18, 18, 26, 0.36);
}

.dict-exam-mindmap-node {
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.6;
}

.dict-exam-mindmap-node.level-1 {
    background: rgba(108, 92, 231, 0.18);
    color: #fff;
    font-family: 'Noto Serif SC', serif;
    font-size: 17px;
    font-weight: 600;
}

.dict-exam-mindmap-node.level-2 {
    background: rgba(116, 185, 255, 0.1);
    color: rgba(232, 230, 240, 0.88);
    font-size: 13px;
}

.dict-exam-mindmap-summary {
    margin-top: 6px;
    color: rgba(232, 230, 240, 0.62);
    font-size: 12px;
    line-height: 1.65;
}

.dict-exam-mindmap-leaves {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.dict-exam-evidence-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dict-exam-evidence {
    border: 1px solid rgba(108, 92, 231, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    background: rgba(108, 92, 231, 0.05);
}

.dict-exam-question-card {
    border: 1px solid rgba(108, 92, 231, 0.14);
    border-radius: 16px;
    padding: 14px;
    background: rgba(108, 92, 231, 0.06);
}

.dict-exam-question-text {
    white-space: pre-wrap;
    font-family: 'Noto Serif SC', serif;
    line-height: 1.8;
    color: rgba(232, 230, 240, 0.9);
}

.dict-exam-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.dict-exam-resource-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dict-exam-resource-card .dict-entry-headword {
    font-size: 28px;
}

.dict-exam-media {
    padding: 0;
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(18, 18, 26, 0.4);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease;
}

.dict-exam-media:hover {
    transform: translateY(-1px);
    border-color: rgba(108, 92, 231, 0.4);
}

.dict-exam-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.dict-exam-evidence-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: rgba(232, 230, 240, 0.58);
    font-size: 12px;
}

.dict-exam-evidence-text {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.8;
    color: rgba(232, 230, 240, 0.88);
}

/* ── Page Modal ────────────────────────────────────────── */
.page-modal {
    position: fixed;
    inset: 0;
    background: rgba(3, 5, 10, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1200;
}

.page-modal.hidden,
.hidden {
    display: none !important;
}

.page-modal-inner {
    width: min(1120px, 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.page-modal img {
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 16px;
    background: rgba(18, 18, 26, 0.4);
}

.page-modal-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.page-modal-title {
    flex: 1 1 100%;
    color: #fff;
    font-weight: 700;
}

.page-modal-toolbar button {
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.18s ease;
}

.page-modal-toolbar button:hover {
    transform: translateY(-1px);
}

.page-modal-toolbar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.page-modal-meta {
    color: #e8e6f0;
}

.page-modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

/* ── Utility ───────────────────────────────────────────── */
.dict-loading,
.dict-empty-line {
    color: rgba(232, 230, 240, 0.62);
    padding: 18px 0;
}

mark {
    background: rgba(108, 92, 231, 0.22);
    color: #c9c3ff;
    padding: 0 2px;
    border-radius: 4px;
}

/* ── Scrollbar ─────────────────────────────────────────── */
.dict-panel-body::-webkit-scrollbar,
.dict-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.dict-panel-body::-webkit-scrollbar-thumb,
.dict-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.25);
    border-radius: 2px;
}

.dict-panel-body::-webkit-scrollbar-track,
.dict-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE: TABLET (≤960px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .dict-columns {
        grid-template-columns: 1fr;
    }

    .dict-exam-shell {
        grid-template-columns: 1fr;
    }

    .dict-exam-list {
        max-height: none;
    }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE: MOBILE (≤640px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .dict-view {
        padding: 0 14px 40px;
    }

    .dict-hero {
        padding-top: 20px;
    }

    .dict-search-box {
        max-width: 100%;
    }

    .dict-search-box input {
        font-size: 15px;
    }

    .dict-panel-head,
    .dict-chat-head {
        padding: 14px 16px 12px;
    }

    .dict-panel-head h2,
    .dict-chat-head h2 {
        font-size: 17px;
    }

    .dict-panel-body,
    .dict-chat-messages {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dict-panel-body,
    .dict-panel-body-wide {
        max-height: 480px;
    }

    .dict-chat-compose {
        padding: 10px 16px 14px;
    }

    .dict-thumb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dict-entry-headword {
        font-size: 28px;
    }

    .dict-mode-switch {
        justify-content: flex-start;
    }

    .dict-mode-btn {
        padding-left: 14px;
        padding-right: 14px;
    }

    .dict-exam-meta {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dict-exam-shell {
        padding: 14px 16px 18px;
    }

    .dict-exam-item {
        padding: 12px 14px;
    }

    .dict-exam-headword {
        font-size: 24px;
    }

    .dict-exam-detail {
        padding: 14px 16px;
    }

    .dict-exam-detail-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dict-exam-detail-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dict-exam-detail-headword {
        font-size: 32px;
    }

    /* Bottom nav safe area */
    body.dict-page {
        padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    }
}
