:root {
    --ink: #17201d;
    --forest: #16372f;
    --forest-2: #245647;
    --paper: #f7f1e4;
    --paper-deep: #eee3ce;
    --white: #fffdfa;
    --red: #c64132;
    --red-dark: #9f2e24;
    --gold: #d7a934;
    --jade: #67a18b;
    --muted: #616862;
    --line: #d9d2c3;
    --shadow: 0 18px 50px rgba(26, 31, 26, .12);
    --serif: "Noto Serif TC", "Noto Serif SC", "Songti TC", "Songti SC", serif;
    --sans: "Noto Sans TC", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); letter-spacing: 0; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(198, 65, 50, .35); outline-offset: 3px; }
[hidden] { display: none !important; }
.top-stripe { height: 4px; background: linear-gradient(90deg, var(--red) 0 36%, var(--gold) 36% 48%, var(--forest) 48%); }
.site-header { height: 74px; padding: 0 clamp(20px, 4vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 24px; position: sticky; top: 0; z-index: 50; background: rgba(247, 241, 228, .94); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(41, 50, 45, .12); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand-seal, .auth-seal { width: 42px; height: 42px; display: grid; place-items: center; background: var(--red); color: #fff4df; font-family: var(--serif); font-size: 24px; font-weight: 900; border: 2px solid #e3b9a8; box-shadow: inset 0 0 0 2px var(--red); }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 900; }
.brand-name strong { color: var(--red); }
.desktop-nav { display: flex; height: 100%; }
.nav-link { border: 0; background: none; padding: 0 20px; cursor: pointer; position: relative; font-weight: 700; color: #5c625e; }
.nav-link::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: 0; height: 3px; background: var(--red); transform: scaleX(0); transition: transform .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; border-radius: 4px; }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.profile-button { min-height: 42px; border: 0; background: var(--forest); color: white; display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 4px; font-weight: 700; cursor: pointer; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; background: var(--gold); color: var(--forest); font-family: var(--serif); font-weight: 900; }
.xp-pill { height: 36px; padding: 0 11px; background: #efe5c9; color: #5d4815; display: flex; align-items: center; gap: 6px; font-weight: 800; border: 1px solid #dfcea0; border-radius: 4px; font-size: 13px; }
.xp-spark { color: #bd7e12; }
.view { display: none; min-height: calc(100vh - 78px); }
.view.active { display: block; animation: viewIn .32s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.game-view.active { animation: gameViewIn .24s ease both; }
@keyframes gameViewIn { from { opacity: 0; } to { opacity: 1; } }
.game-hero { min-height: clamp(590px, calc(100vh - 130px), 680px); position: relative; display: flex; align-items: center; overflow: hidden; background: var(--forest); color: white; }
.hero-art { position: absolute; inset: 0; background-image: url('../img/examination-hall.jpg'); background-image: image-set(url('../img/examination-hall.webp') type('image/webp'), url('../img/examination-hall.jpg') type('image/jpeg')); background-size: cover; background-position: 62% center; filter: saturate(.78) contrast(1.04); transform: scale(1.015); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 39, 34, .97) 0%, rgba(16, 39, 34, .91) 33%, rgba(16, 39, 34, .38) 68%, rgba(16, 39, 34, .12) 100%), linear-gradient(0deg, rgba(15, 29, 26, .5), transparent 55%); }
.hero-copy { width: min(650px, 55vw); margin-left: clamp(24px, 8vw, 140px); position: relative; z-index: 2; padding: 60px 0 100px; }
.eyebrow, .kicker, .small-label { text-transform: uppercase; font-size: 12px; font-weight: 900; color: var(--red); letter-spacing: 0; }
.eyebrow { color: #f0d58c; display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; background: #e9664e; border-radius: 50%; box-shadow: 0 0 0 5px rgba(233,102,78,.16); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(233,102,78,0); } }
.hero-copy h1 { margin: 13px 0 18px; font-family: var(--serif); font-size: 92px; line-height: .94; letter-spacing: 0; }
.hero-copy h1 em { color: #f0c45c; font-style: normal; font-size: .56em; vertical-align: top; margin-left: 6px; }
.hero-lead { max-width: 570px; margin: 0; color: rgba(255,255,255,.82); font-size: 20px; line-height: 1.8; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 33px; }
.hero-access-note { margin: 12px 0 0; color: rgba(255,255,255,.82); font-size: 11px; font-weight: 700; }
.primary-button, .outline-button { min-height: 48px; border: 0; padding: 0 22px; border-radius: 4px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; background: var(--red); color: white; font-weight: 900; cursor: pointer; box-shadow: 0 8px 20px rgba(159, 46, 36, .18); transition: transform .15s, background .15s; }
.primary-button:hover { background: var(--red-dark); transform: translateY(-2px); }
.primary-button.light { background: #fff7e8; color: var(--forest); box-shadow: 0 12px 30px rgba(0,0,0,.24); }
.primary-button.light:hover { background: white; }
.primary-button svg { width: 18px; fill: currentColor; stroke: currentColor; }
.primary-button.wide { width: 100%; }
.primary-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.text-button { border: 0; padding: 8px 0; background: none; color: var(--forest); font-weight: 800; cursor: pointer; }
.text-button span { margin-left: 6px; transition: margin .2s; }
.text-button:hover span { margin-left: 10px; }
.text-button.light { color: white; }
.hero-stats { display: flex; gap: 28px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.62); font-size: 12px; }
.hero-stats strong { color: white; font-size: 14px; }
.today-card { position: absolute; right: clamp(22px, 5vw, 90px); bottom: 40px; z-index: 3; background: rgba(248,242,228,.94); color: var(--ink); padding: 18px 20px; width: min(360px, 32vw); display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 0; border-left: 4px solid var(--red); box-shadow: var(--shadow); backdrop-filter: blur(12px); text-align: left; cursor: pointer; transition: background .18s, box-shadow .18s, transform .18s; }
.today-card:hover { background: #fffaf0; box-shadow: 0 22px 56px rgba(26,31,26,.2); transform: translateY(-3px); }
.today-card:active { transform: translateY(-1px); }
.today-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.today-card strong { font-family: var(--serif); font-size: 21px; }
.today-card small { color: var(--muted); }
.prediction-ring { width: 60px; height: 60px; border: 5px solid var(--gold); border-left-color: #e6ddc4; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: 0 0 auto; }
.prediction-ring span { font-weight: 900; line-height: 1; }
.prediction-ring small { font-size: 9px; }
.dashboard-band, .content-view { max-width: 1280px; margin: 0 auto; padding: 78px clamp(20px, 4vw, 56px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.section-heading h2, .trend-copy h2 { font-family: var(--serif); font-size: 38px; margin: 7px 0 0; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr) minmax(240px, .8fr); gap: 18px; }
.mission-feature, .streak-panel, .rank-teaser { border: 1px solid var(--line); background: rgba(255,253,250,.62); padding: 28px; border-radius: 6px; }
.mission-feature { background: var(--white); box-shadow: 0 12px 30px rgba(37,36,30,.07); }
.mission-topline { display: flex; justify-content: space-between; }
.category-tag, .time-tag, .skill-row span { font-size: 11px; font-weight: 800; }
.category-tag { color: var(--red); background: #f5dcd4; padding: 5px 8px; }
.time-tag { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.time-tag svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.time-tag i { font-style: normal; }
.mission-feature h3 { font-family: var(--serif); font-size: 32px; margin: 20px 0 9px; }
.mission-feature > p { color: var(--muted); line-height: 1.75; margin: 0; }
.skill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.skill-row span { padding: 5px 9px; border: 1px solid var(--line); color: #535a55; }
.mission-footer { border-top: 1px solid #e7e0d5; margin-top: 25px; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.difficulty { display: flex; align-items: center; gap: 4px; }
.difficulty i { width: 16px; height: 5px; background: var(--red); }
.difficulty i.off { background: #ddd4c4; }
.difficulty span { margin-left: 7px; font-size: 11px; color: var(--muted); }
.round-action { width: 44px; height: 44px; border: 0; background: var(--forest); color: white; cursor: pointer; border-radius: 50%; font-size: 20px; }
.streak-panel { background: var(--forest); color: white; display: grid; align-content: start; }
.streak-icon { width: 50px; height: 50px; display: grid; place-items: center; background: var(--red); font-family: var(--serif); font-weight: 900; font-size: 20px; margin-bottom: 15px; }
.streak-panel > div:nth-child(2) { display: flex; flex-direction: column; }
.streak-panel > div span { font-size: 12px; color: rgba(255,255,255,.6); }
.streak-panel strong { font-family: var(--serif); font-size: 30px; }
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 20px; }
.week-dots span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.48) !important; font-size: 9px !important; }
.week-dots span.done { background: var(--gold); color: var(--forest) !important; border-color: var(--gold); font-weight: 900; }
.streak-panel p { font-size: 11px; line-height: 1.6; color: rgba(255,255,255,.6); align-self: end; margin: 22px 0 0; }
.rank-teaser .small-label { color: var(--muted); }
.mini-rank { display: grid; grid-template-columns: 20px 34px 1fr; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid #e4dccd; }
.mini-rank b { font-family: var(--serif); color: var(--muted); }
.mini-avatar { width: 32px; height: 32px; display: grid; place-items: center; color: white; font-family: var(--serif); font-weight: 900; }
.mini-avatar.red { background: var(--red); }.mini-avatar.jade { background: var(--jade); }.mini-avatar.gold { background: var(--gold); color: var(--ink); }
.mini-rank p { margin: 0; font-size: 13px; font-weight: 800; display: flex; flex-direction: column; }
.mini-rank small { font-size: 10px; font-weight: 600; color: var(--muted); }
.mini-rank.current { background: #f5ead0; padding-left: 8px; padding-right: 8px; }.mini-rank em { display: inline-block; width: fit-content; margin-top: 2px; color: var(--red); font-size: 9px; font-style: normal; }
.rank-teaser .text-button { margin-top: 10px; font-size: 12px; }
.trend-band { background: #dfd2bb; padding: 64px max(7vw, calc((100vw - 1168px)/2)); display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
.trend-copy p { line-height: 1.8; color: #5d625e; }
.trend-evidence { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,253,250,.5); border: 1px solid rgba(43,49,44,.13); }
.trend-evidence > div { padding: 25px; display: flex; align-items: center; gap: 14px; }
.trend-evidence > div + div { border-left: 1px solid rgba(43,49,44,.13); }
.trend-evidence strong { color: var(--red); font-family: var(--serif); font-size: 24px; }
.trend-evidence span { font-size: 12px; line-height: 1.6; font-weight: 700; }
.trend-evidence a { grid-column: 1 / -1; padding: 13px 24px; border-top: 1px solid rgba(43,49,44,.13); color: var(--forest); font-size: 11px; font-weight: 800; text-decoration: none; }
.content-view { padding-top: 62px; }
.page-title-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 38px; }
.page-title-row h1 { font-family: var(--serif); font-size: 64px; margin: 5px 0; line-height: 1.1; }
.page-title-row p { color: var(--muted); margin: 0; }
.segmented { display: flex; border: 1px solid var(--line); padding: 3px; background: #eee5d4; border-radius: 5px; }
.segmented button, .auth-tabs button { border: 0; background: transparent; padding: 9px 16px; cursor: pointer; font-size: 12px; font-weight: 800; border-radius: 3px; }
.segmented button.active, .auth-tabs button.active { background: var(--white); box-shadow: 0 2px 8px rgba(32,33,28,.08); color: var(--red); }
.library-tools { display: grid; grid-template-columns: minmax(260px, 1fr) auto 140px; gap: 12px; align-items: end; margin-bottom: 22px; padding: 18px; background: #e8decb; border-top: 3px solid var(--forest); }
.library-heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-top: 16px; border-top: 1px solid #c8baa3; }
.detail-filter-field { min-width: 0; position: relative; display: grid; gap: 7px; }
.detail-filter-label { display: flex; align-items: center; gap: 7px; color: #53615a; font-size: 10px; font-weight: 900; }
.detail-filter-label::before { content: ""; width: 5px; height: 5px; flex: 0 0 auto; background: var(--red); }
.detail-filter-field::after { content: ""; width: 7px; height: 7px; position: absolute; right: 15px; bottom: 18px; border-right: 2px solid var(--forest); border-bottom: 2px solid var(--forest); transform: rotate(45deg); pointer-events: none; }
.detail-filters select { appearance: none; -webkit-appearance: none; min-width: 0; width: 100%; height: 46px; border: 1px solid #c5b9a5; border-left: 3px solid #a8aa9f; background: rgba(255,253,250,.82); padding: 0 42px 0 13px; border-radius: 2px; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 12px rgba(38,42,35,.05); transition: background .16s, border-color .16s, box-shadow .16s; }
.detail-filters select:hover { background: var(--white); border-color: #7f9288; }
.detail-filters select:focus { outline: 3px solid rgba(198,65,50,.18); outline-offset: 1px; border-color: var(--red); background: var(--white); box-shadow: 0 6px 16px rgba(38,42,35,.08); }
.detail-filters select.has-value { border-left-color: var(--red); background: #fff9ed; color: #8f2d25; }
.search-field { display: grid; gap: 6px; font-size: 10px; font-weight: 900; color: var(--muted); }
.search-field input { width: 100%; height: 45px; border: 1px solid #c9beac; background: var(--white); padding: 0 13px; border-radius: 3px; }
.favorite-filter { height: 45px; min-height: 45px; }
.favorite-filter.active { background: var(--forest); color: white; }
.library-count { display: flex; align-items: baseline; justify-content: end; gap: 7px; padding-bottom: 7px; }
.library-count strong { font-family: var(--serif); font-size: 30px; color: var(--red); }
.library-count span { font-size: 10px; color: var(--muted); }
.passage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.passage-card { background: var(--white); border: 1px solid var(--line); padding: 26px; border-radius: 6px; min-height: 360px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.passage-card::before { content: attr(data-era); position: absolute; right: 13px; top: 5px; font-family: var(--serif); color: rgba(24,53,46,.06); font-size: 92px; font-weight: 900; }
.passage-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.passage-card-top { display: flex; justify-content: space-between; position: relative; }
.card-tools { display: flex; gap: 9px; align-items: start; }
.card-favorite { width: 31px; height: 31px; border: 1px solid #d7cbb8; background: #faf5eb; color: var(--muted); font-size: 17px; cursor: pointer; border-radius: 3px; line-height: 1; }
.card-favorite.active { color: var(--red); border-color: #d6a098; background: #f4ddd8; }
.passage-card h2 { font-family: var(--serif); font-size: 29px; margin: 26px 0 5px; position: relative; }
.passage-card .source { color: var(--red); font-size: 12px; font-weight: 700; }
.passage-card .hook { line-height: 1.7; color: var(--muted); font-size: 14px; flex: 1; }
.heat { font-size: 11px; color: #77672e; font-weight: 800; }
.heat-bar { height: 5px; background: #e6ddc9; margin-top: 6px; width: 90px; }
.heat-bar i { display: block; height: 100%; background: var(--gold); }
.card-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #e8e1d4; padding-top: 18px; margin-top: 20px; }
.card-progress { margin-top: 14px; font-size: 10px; color: var(--forest); font-weight: 800; }
.card-bottom span { color: var(--muted); font-size: 11px; }
.source-note { margin-top: 28px; border-left: 3px solid var(--gold); padding: 15px 18px; background: rgba(255,253,250,.45); }
.library-empty { grid-column: 1 / -1; min-height: 220px; border: 1px dashed #c9bdab; display: grid; place-content: center; text-align: center; gap: 5px; color: var(--muted); }
.library-empty strong { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.source-note strong { font-family: var(--serif); }
.source-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.rank-season { border-left: 3px solid var(--red); padding-left: 15px; display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.rank-season strong { color: var(--ink); font-size: 15px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; max-width: 780px; margin: 20px auto 35px; }
.rank-empty { grid-column: 1 / -1; min-height: 150px; display: grid; place-items: center; border: 1px dashed #c9bdab; color: var(--muted); text-align: center; padding: 20px; }
.podium-person { background: var(--white); border: 1px solid var(--line); min-height: 150px; padding: 22px; text-align: center; border-top: 5px solid #b6ad98; }
.podium-person.first { min-height: 185px; border-top-color: var(--gold); }
.podium-person.second { order: -1; }
.podium-person.third { border-top-color: #a96b51; }
.podium-person .place { font-family: var(--serif); font-size: 30px; color: var(--red); }
.podium-person strong { display: block; font-family: var(--serif); font-size: 18px; }
.podium-person small { color: var(--muted); }
.leaderboard-table { background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rank-row { display: grid; grid-template-columns: 60px 1fr 100px 120px 100px; align-items: center; padding: 15px 22px; border-bottom: 1px solid #ebe4d8; font-size: 13px; }
.rank-row.header { background: #e8decb; font-size: 10px; color: var(--muted); font-weight: 900; text-transform: uppercase; }
.rank-row:last-child { border: 0; }
.rank-row .rank-number { font-family: var(--serif); font-weight: 900; font-size: 18px; }
.rank-name { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.rank-name > span { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }.rank-name small { padding: 2px 5px; background: #e8decb; color: var(--muted); font-size: 8px; }.rank-row.current { background: #fff8e8; box-shadow: inset 3px 0 var(--gold); }
.rank-name .mini-avatar { border-radius: 50%; }
.rank-xp { font-weight: 900; color: var(--red); }
.loading-line { padding: 28px; color: var(--muted); text-align: center; }
.empty-state { text-align: center; border: 1px dashed #c9bdab; padding: 65px 20px; background: rgba(255,253,250,.35); }
.empty-seal { width: 64px; height: 64px; margin: auto; display: grid; place-items: center; background: var(--forest); color: white; font-family: var(--serif); font-size: 32px; }
.empty-state h2 { font-family: var(--serif); margin-bottom: 4px; }.empty-state p { color: var(--muted); }.empty-state button { margin-top: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--forest); color: white; }
.metric-grid > div { padding: 24px; border-right: 1px solid rgba(255,255,255,.12); }
.metric-grid span { display: block; font-size: 11px; color: rgba(255,255,255,.58); }
.metric-grid strong { font-family: var(--serif); font-size: 36px; }.metric-grid small { margin-left: 4px; color: rgba(255,255,255,.55); }
.training-overview, .seven-day-plan { padding: 32px 0; border-bottom: 1px solid var(--line); }
.overview-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.overview-heading h2 { font-family: var(--serif); font-size: 27px; margin: 5px 0 0; }
.overview-heading p { color: var(--muted); font-size: 11px; margin: 0; }
.skill-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 30px; }
.skill-stat { min-width: 0; padding: 14px 0; border-top: 1px solid #e0d7c8; font-size: 11px; }
.skill-stat header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skill-stat header strong { color: var(--forest); font: 900 16px var(--serif); }
.skill-stat header span { color: var(--red); font-size: 10px; font-weight: 900; white-space: nowrap; }
.skill-stat .ability-meter { height: 7px; margin: 10px 0 7px; background: #ded4c3; overflow: hidden; }
.skill-stat .ability-meter i { display: block; height: 100%; background: var(--jade); }
.skill-stat p, .skill-stat small { display: block; margin: 0; color: var(--muted); line-height: 1.55; }
.skill-stat small { margin-top: 3px; }
.skill-stat.status-untested .ability-meter i { width: 0 !important; }
.skill-stat.status-untested header span { color: var(--muted); }
.training-plan-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.plan-mode-control { display: inline-grid; grid-template-columns: 1fr 1fr; border: 1px solid #cfc4b2; }
.plan-mode-control button { min-width: 70px; min-height: 34px; border: 0; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.plan-mode-control button.active { background: var(--forest); color: white; }
.plan-progress-row { display: flex; gap: 18px; padding: 10px 0; color: var(--forest); font-size: 12px; font-weight: 900; }
.plan-completion-note { margin: 0 0 8px; padding: 10px 12px; border-left: 3px solid var(--gold); background: #f8f1de; color: #4c514b; font-size: 12px; }
.due-review-list { display: flex; flex-wrap: wrap; gap: 8px; }
.due-review-list:empty { display: none; }
.due-review-list button { min-height: 38px; border: 1px solid #c9bda9; background: #fffdfa; color: var(--forest); padding: 7px 10px; text-align: left; cursor: pointer; }
.due-review-list button span, .due-review-list button strong { display: block; font-size: 11px; }
.review-task-dialog { width: min(720px, calc(100% - 28px)); max-height: 88vh; }
.review-task-dialog > h3 { margin: 18px 0; font: 900 22px/1.5 var(--serif); }
.advanced-training { margin: 28px 0 34px; padding: 30px 0; border-top: 2px solid var(--forest); border-bottom: 1px solid var(--line); }
.advanced-training-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.advanced-training-list article { min-width: 0; background: var(--paper); padding: 22px; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px 14px; align-items: start; }
.advanced-training-list article > div { min-width: 0; }
.advanced-training-list strong { font: 900 17px/1.45 var(--serif); }
.advanced-training-list p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.advanced-training-list button { grid-column: 1/-1; width: 100%; }
.tool-dialog { width: min(920px,calc(100vw - 28px)); max-height: calc(100svh - 28px); overflow: auto; padding: 38px; background: var(--paper); border-top: 5px solid var(--forest); }
.tool-dialog::backdrop { background: rgba(10,26,22,.76); backdrop-filter: blur(5px); }
.tool-dialog > h2 { margin: 6px 42px 22px 0; font: 900 30px/1.35 var(--serif); }
.tool-dialog label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 900; }
.tool-dialog input,.tool-dialog select,.tool-dialog textarea { width: 100%; min-height: 44px; border: 1px solid #cfc4b2; background: var(--white); padding: 10px 12px; color: var(--ink); }
.tool-dialog textarea { min-height: 120px; resize: vertical; }
.mock-paper-summary { display: grid; gap: 18px; }
.mock-paper-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.mock-paper-meta span { padding: 6px 9px; background: #e4ece7; color: var(--forest); font-size: 11px; font-weight: 900; }
.mock-paper-passages { display: grid; gap: 8px; }
.mock-paper-passages div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mock-evidence-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--gold); background: #eee6d5; color: #4f5752; font-size: 11px; line-height: 1.65; }
.mock-toolbar { position: sticky; top: -38px; z-index: 4; display: flex; justify-content: space-between; align-items: center; margin: 0 -38px 20px; padding: 14px 38px; background: var(--forest); color: white; }
.mock-toolbar span { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.mock-passage { padding: 24px 0; border-bottom: 2px solid var(--line); }
.mock-passage > h3 { font: 900 24px/1.4 var(--serif); }
.mock-original { max-height: 280px; overflow: auto; padding: 18px; background: #f4eddf; font: 600 17px/1.9 var(--serif); white-space: pre-wrap; }
.mock-question { min-width: 0; margin: 0; padding: 22px 0; border: 0; border-top: 1px solid var(--line); }
.mock-question > legend { width: 100%; margin-bottom: 12px; padding: 0; color: var(--ink); font-weight: 900; line-height: 1.65; }
.mock-options { display: grid; gap: 8px; }
.mock-options label { grid-template-columns: 22px minmax(0,1fr); align-items: start; padding: 11px 12px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 13px; font-weight: 600; }
.mock-options input { width: 16px; min-height: 16px; margin: 2px 0 0; padding: 0; }
.mock-result-head { padding: 22px; background: var(--forest); color: white; text-align: center; }
.mock-result-head strong { display: block; font: 900 44px/1 var(--serif); }
.mock-analysis { display: grid; gap: 10px; margin-top: 18px; }
.mock-analysis article { padding: 16px; border-left: 4px solid var(--red); background: var(--white); }
.mock-analysis article.correct { border-left-color: var(--jade); }
.study-room-dialog { width: min(1080px,calc(100vw - 28px)); padding: 34px 38px 38px; }
.room-dialog-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 0 44px 22px 0; }
.room-dialog-heading h2 { margin: 5px 0 0; font: 900 34px/1.2 var(--serif); }
.room-privacy-mark,.room-private-badge { padding: 6px 9px; border: 1px solid #b9c9c1; background: #e4ece8; color: var(--forest); font-size: 10px; font-weight: 900; }
.room-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-bottom: 22px; border-top: 3px solid var(--forest); background: var(--line); }
.room-actions form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; padding: 16px; background: #eee5d4; }
.room-actions button svg,.room-share-invite svg,.room-detail-back svg,.weekly-share-panel button svg,#shareWeeklyReport svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.room-workbench { min-height: 470px; display: grid; grid-template-columns: 250px minmax(0,1fr); border: 1px solid var(--line); background: var(--white); }
.room-directory { min-width: 0; padding: 18px 14px; border-right: 1px solid var(--line); background: #f0e7d8; }
.room-directory-heading,.room-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.room-directory-heading { padding: 0 5px 12px; font-size: 12px; }
.room-directory-heading span { min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; background: var(--forest); color: white; font-size: 10px; font-weight: 900; }
.room-list { display: grid; gap: 7px; }
.room-list button { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 13px 11px; border: 1px solid #d4c7b4; border-left: 3px solid transparent; background: rgba(255,253,250,.8); text-align: left; cursor: pointer; transition: border-color .16s, background .16s; }
.room-list button:hover { border-color: #83998f; background: var(--white); }
.room-list button.active { border-left-color: var(--red); background: var(--white); box-shadow: 0 5px 16px rgba(32,38,31,.07); }
.room-list button span { min-width: 0; }
.room-list button strong,.room-list button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-list button strong { font-size: 12px; }
.room-list button small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.room-list button b { color: var(--forest); font-size: 10px; font-variant-numeric: tabular-nums; }
.room-detail { min-width: 0; padding: 24px 28px 28px; }
.room-detail-back { display: none; align-items: center; gap: 4px; margin: -4px 0 14px; padding: 4px 0; border: 0; background: transparent; color: var(--forest); font-size: 11px; font-weight: 900; cursor: pointer; }
.room-detail-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--forest); }
.room-detail-head > div { min-width: 0; }
.room-detail-head span { color: var(--muted); font-size: 10px; font-weight: 800; }
.room-detail-head h3 { margin: 4px 0 0; overflow-wrap: anywhere; font: 900 25px/1.35 var(--serif); }
.room-detail-head .room-private-badge { flex: 0 0 auto; color: var(--forest); }
.room-overview { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 14px 0; background: var(--line); }
.room-overview div { padding: 12px 14px; background: #faf6ed; }
.room-overview span,.room-overview strong { display: block; }
.room-overview span { color: var(--muted); font-size: 9px; }
.room-overview strong { margin-top: 2px; font: 900 22px/1.2 var(--serif); }
.room-invite-band { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 15px 16px; border-left: 4px solid var(--gold); background: #eee6d5; }
.room-code-line { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) 94px; gap: 18px; align-items: center; }
.room-code-line span { display: block; color: var(--muted); font-size: 10px; }
.room-code-line strong { display: block; margin-top: 3px; font: 900 27px/1.3 var(--serif); font-variant-numeric: tabular-nums; }
.room-code-line .text-button { padding: 4px 0 0; font-size: 10px; }
#studyRoomQr { width: 88px; height: 88px; background: white; padding: 5px; border: 1px solid var(--line); }
#studyRoomQr img,#studyRoomQr canvas { width: 100%!important; height: 100%!important; }
.room-share-invite { min-height: 42px; padding: 0 14px; box-shadow: none; }
#studyRoomInviteFallback { grid-column: 1/-1; margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.room-section-heading { margin: 23px 0 8px; }
.room-section-heading span { color: var(--muted); font-size: 9px; font-weight: 900; }
.room-section-heading h4 { margin: 2px 0 0; font: 900 17px/1.4 var(--serif); }
#studyRoomAssignments { display: grid; }
.room-assignment { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.room-assignment-copy { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 9px; align-items: center; }
.room-assignment-copy strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.room-assignment-copy small { grid-column: 2; color: var(--muted); font-size: 10px; }
.room-assignment-kind,.room-assignment-state { width: fit-content; padding: 4px 6px; font-size: 9px; font-weight: 900; }
.room-assignment-kind { background: #e6ded0; color: #59605c; }
.room-assignment-state.done { background: #dcebe5; color: #28634f; }
.room-assignment-state.due { background: #f0ddd9; color: #8e2d26; }
.room-assignment .outline-button { min-height: 39px; padding: 0 13px; box-shadow: none; }
.room-publish-band { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; margin: 24px -28px 0; padding: 17px 28px 20px; border-top: 3px solid var(--forest); background: #eee5d4; }
.room-publish-band .room-section-heading { grid-column: 1/-1; margin: 0; }
.room-publish-band > div:last-child { display: flex; gap: 8px; }
.room-publish-band button { min-height: 44px; padding: 0 14px; white-space: nowrap; }
.room-owner-summary { margin: 20px 0 0; padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--jade); background: #f7f3e9; }
.room-owner-summary h4 { margin: 0 0 10px; font: 900 16px/1.4 var(--serif); }
.room-owner-summary-grid { display: grid; gap: 7px; }
.room-owner-summary-grid div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 10px; }
.room-owner-summary-grid span { color: var(--muted); }
.room-detail-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.room-detail-actions > div { display: flex; gap: 8px; }
.room-detail-actions .outline-button { min-height: 40px; padding: 0 13px; box-shadow: none; }
.room-consent-control { margin-right: auto; display: grid!important; grid-template-columns: 18px minmax(0,1fr)!important; align-items: start!important; gap: 9px!important; cursor: pointer; }
.room-consent-control input { width: 17px!important; min-height: 17px!important; margin: 2px 0 0; padding: 0; }
.room-consent-control strong,.room-consent-control small { display: block; }
.room-consent-control strong { color: var(--ink); font-size: 11px; }
.room-consent-control small { max-width: 42ch; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.5; }
.room-detail-placeholder { display: grid; align-content: center; justify-items: center; gap: 5px; min-width: 0; padding: 40px; color: var(--muted); text-align: center; }
.room-detail-placeholder strong { color: var(--ink); font: 900 20px/1.4 var(--serif); }
.room-detail-placeholder span { font-size: 11px; }
.weekly-share-panel { margin-top: 14px; padding: 16px; border-top: 3px solid var(--forest); background: #eee5d4; }
.weekly-share-panel > span { color: var(--muted); font-size: 9px; font-weight: 900; }
.weekly-share-panel p { margin: 6px 0 14px; white-space: pre-wrap; line-height: 1.65; font-size: 12px; }
.weekly-share-panel > div { display: flex; flex-wrap: wrap; gap: 7px; }
.weekly-share-panel button { min-height: 40px; padding: 0 13px; box-shadow: none; }
.weekly-report-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); margin-bottom: 22px; }
.weekly-report-metrics div { background: var(--white); padding: 18px; }
.weekly-report-metrics span { display: block; color: var(--muted); font-size: 10px; }
.weekly-report-metrics strong { font: 900 28px/1.3 var(--serif); }
.weekly-report-section { padding: 18px 0; border-top: 1px solid var(--line); }
.weekly-report-section h3 { font: 900 18px/1.4 var(--serif); }
.issue-report-button { margin-top: 10px; }
.plan-day.completed { opacity: .68; }
.plan-day { min-width: 0; display: grid; grid-template-columns: 58px minmax(0,1fr) 40px; gap: 13px; align-items: center; padding: 16px 0; border-top: 1px solid #e0d7c8; }
.plan-day-number { color: var(--red); font-size: 10px; font-weight: 900; }
.plan-day strong, .plan-day small { display: block; }
.plan-day strong { font: 900 16px/1.4 var(--serif); }
.plan-day small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.plan-day p { margin: 5px 0 0; color: #4f5b55; font-size: 10px; line-height: 1.55; }
.plan-day .round-action { width: 38px; height: 38px; }
.log-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; margin-top: 20px; }
.history-panel, .profile-panel { background: var(--white); border: 1px solid var(--line); padding: 26px; }
.history-panel h2, .profile-panel h2 { font-family: var(--serif); margin-top: 0; }
.history-item { display: grid; grid-template-columns: 1fr 80px 90px; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid #eae3d7; }
.history-item:is(button) { width: 100%; margin: 0; background: transparent; border: 0; border-bottom: 1px solid #eae3d7; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.history-item:is(button):hover { background: #f8f3e9; }
.history-item strong { display: block; }.history-item small { color: var(--muted); }.history-score { font-family: var(--serif); font-weight: 900; }.history-xp { color: var(--red); font-weight: 800; }
.revision-note { display: block; margin: 6px 0 10px; color: var(--muted); font-size: 12px; }
.history-detail-dialog { width: min(820px, calc(100% - 28px)); max-height: min(86vh, 900px); }
.history-detail-list { display: grid; gap: 12px; }
.profile-panel { text-align: center; }.big-avatar { width: 76px; height: 76px; background: var(--red); color: white; margin: 0 auto 12px; display: grid; place-items: center; font-family: var(--serif); font-size: 34px; }.profile-panel h2 { margin-bottom: 2px; }.profile-panel > p { color: var(--muted); font-size: 12px; margin-top: 0; }
.profile-name-form { margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line); text-align: left; }
.profile-name-form > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 900; }
.profile-name-form > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
.profile-name-form input { min-width: 0; height: 40px; border: 1px solid #cfc4b2; background: var(--white); padding: 0 10px; color: var(--ink); }
.profile-name-form button { min-height: 40px; padding: 0 12px; }
.profile-name-form small { display: block; min-height: 16px; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.level-track { text-align: left; margin: 25px 0; }.level-track > span, .level-track small { font-size: 11px; font-weight: 800; color: var(--muted); }.level-track > div { height: 7px; background: #e7dece; margin: 8px 0; }.level-track i { display: block; height: 100%; background: var(--gold); }
.outline-button { background: transparent; color: var(--forest); border: 1px solid var(--forest); box-shadow: none; }.outline-button.danger { color: var(--red); border-color: #dcb2aa; width: 100%; }.outline-button:hover { background: rgba(22,55,47,.06); }
.journal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.journal-section { border-top: 4px solid var(--forest); padding-top: 20px; min-width: 0; }
.journal-section.wrong-section { grid-column: 1 / -1; border-top-color: var(--red); }
.journal-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.journal-heading h2 { font-family: var(--serif); margin: 0; font-size: 24px; }
.journal-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.section-mark { width: 42px; height: 42px; display: grid; place-items: center; background: var(--forest); color: white; font-family: var(--serif); font-weight: 900; }
.wrong-section .section-mark { background: var(--red); }
.achievement-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.achievement { min-height: 72px; border: 1px solid #d8cebd; padding: 10px; display: flex; gap: 9px; align-items: center; opacity: .48; filter: grayscale(1); }
.achievement.unlocked { background: #f5ead0; border-color: #d8bd72; opacity: 1; filter: none; }
.achievement > span { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #c9c0af; color: white; font-family: var(--serif); }
.achievement.unlocked > span { background: var(--red); }
.achievement strong, .achievement small { display: block; }
.achievement strong { font-family: var(--serif); font-size: 13px; }
.achievement small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.collection-list, .word-list { display: grid; gap: 7px; }
.collection-item, .word-item { width: 100%; border: 1px solid #d8cebd; background: var(--white); min-height: 58px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; border-radius: 3px; }
.collection-item:hover, .word-item:hover { border-color: var(--jade); }
.collection-item strong, .collection-item small { display: block; }
.collection-item small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.collection-item i, .word-item i { font-style: normal; color: var(--red); }
.word-item { display: grid; grid-template-columns: 48px 1fr 16px; gap: 8px; }
.word-item strong { font-family: var(--serif); color: var(--red); }
.word-item span { font-size: 11px; color: var(--muted); }
.wrong-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wrong-item { border: 1px solid #d8cebd; background: var(--white); padding: 16px; }
.wrong-item > span { font-size: 9px; color: var(--red); font-weight: 900; }
.wrong-item > strong { display: block; font-family: var(--serif); margin: 6px 0; }
.wrong-item p { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 0; }
.wrong-item .text-button { font-size: 10px; }
.inline-empty { min-height: 72px; border: 1px dashed #cbbfac; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 11px; padding: 15px; }
.game-view { background: #e7dcc7; }
.game-topbar { height: 74px; background: var(--forest); color: white; display: grid; grid-template-columns: 50px 1fr 100px; align-items: center; gap: 22px; padding: 0 max(22px, calc((100vw - 1160px)/2)); position: sticky; top: 74px; z-index: 30; }
.back-button { border-color: rgba(255,255,255,.25); color: white; font-size: 20px; }
.game-progress { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 14px; font-size: 11px; font-weight: 800; }.game-progress > div { height: 6px; background: rgba(255,255,255,.15); }.game-progress i { display: block; width: 12%; height: 100%; background: var(--gold); transition: width .35s; }
.game-timer { display: flex; justify-content: end; align-items: center; gap: 7px; font-weight: 900; font-variant-numeric: tabular-nums; }.game-timer svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.game-shell { max-width: 940px; margin: 0 auto; padding: 48px 20px 90px; }
.game-shell.quiz-mode { max-width: 1280px; display: grid; grid-template-columns: minmax(0, .92fr) minmax(430px, 1.08fr); gap: 18px; align-items: start; }
.reading-panel, .quiz-panel { background: var(--white); border: 1px solid #d3c7b4; padding: clamp(25px, 5vw, 58px); box-shadow: 0 20px 60px rgba(37,36,28,.12); position: relative; }
.quiz-mode .reading-panel, .quiz-mode .quiz-panel { padding: 34px; }.quiz-mode .reading-panel { position: sticky; top: 166px; max-height: calc(100vh - 190px); overflow: auto; }.quiz-mode .note-drawer, .quiz-mode .game-mode-picker, .quiz-mode #beginQuizButton, .quiz-mode .reading-actions, .quiz-mode .selected-mode-banner { display: none; }.quiz-mode .reading-heading { padding-bottom: 14px; }.quiz-mode .reading-heading h1 { font-size: 32px; }.quiz-mode .classical-text { font-size: 18px; line-height: 2; padding-bottom: 16px; }
.reading-panel::before { content: ""; position: absolute; inset: 11px; border: 1px solid #e8dfd0; pointer-events: none; }
.quiz-mode .reading-panel::before { display: none; }
.quiz-mode .reading-panel { box-shadow: inset 0 0 0 1px #e8dfd0, 0 20px 60px rgba(37,36,28,.12); }
.reading-panel > * { position: relative; }
.reading-heading { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }.reading-heading span, .reading-heading p { font-size: 11px; color: var(--muted); }.reading-heading h1 { font-family: var(--serif); font-size: 54px; margin: 4px 0; }.reading-heading p { margin: 0; color: var(--red); font-weight: 700; }.prediction-badge { align-self: start; padding: 7px 10px; border: 1px solid #d8c48f; background: #f4ead0; color: #705a21 !important; font-weight: 800; }
.game-study-preview { margin: 18px 0 0; padding: 13px 15px; border-left: 3px solid var(--gold); background: #f1e8d8; color: #5f6560; font-size: 13px; line-height: 1.8; }
.reading-actions { display: flex; align-items: start; gap: 8px; }
.favorite-button { color: var(--muted); background: #faf5eb; font-size: 21px; }
.favorite-button.active { color: var(--red); background: #f3ddd7; border-color: #d7a198; }
.classical-text { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 2.2; padding: 22px 0; }
.glossary-strip { border-top: 1px solid var(--line); padding: 22px 0; display: grid; grid-template-columns: 80px 1fr; gap: 14px; align-items: start; }.glossary-strip > strong { font-size: 12px; color: var(--red); }.glossary-strip > div { display: flex; flex-wrap: wrap; gap: 8px; }.glossary-chip { border: 1px solid #d7cbb8; background: #f5edde; padding: 6px 9px; font-size: 12px; cursor: pointer; color: var(--ink); border-radius: 3px; }.glossary-chip:hover { border-color: var(--jade); }.glossary-chip.saved { background: #e1eee7; border-color: #8bb5a5; }.glossary-chip b { color: var(--red); margin-right: 5px; }.glossary-chip i { font-style: normal; margin-left: 8px; color: var(--forest); font-weight: 900; }
.translation-drawer { margin: 0 0 25px; background: #f1e8d8; border-left: 3px solid var(--gold); padding: 12px 16px; }.translation-drawer summary { cursor: pointer; font-weight: 800; font-size: 12px; }.translation-open-label { display: none; }.translation-drawer[open] .translation-closed-label { display: none; }.translation-drawer[open] .translation-open-label { display: inline; }.full-translation { white-space: pre-line; line-height: 1.9; color: #5f6560; font-size: 14px; padding: 14px 0 4px; }
.quiz-status { display: flex; justify-content: space-between; align-items: center; }.question-count { color: var(--muted); font-size: 12px; font-weight: 800; }.combo { color: var(--red); background: #f3dcd6; padding: 5px 9px; font-size: 11px; font-weight: 900; }.skill-badge { display: inline-block; margin-top: 34px; color: var(--forest); font-size: 11px; font-weight: 900; }.quiz-panel h2 { font-family: var(--serif); font-size: 34px; line-height: 1.5; margin: 8px 0 25px; scroll-margin-top: 170px; }
.options-list { display: grid; gap: 10px; }.option-button { min-height: 58px; border: 1px solid #d7cebe; background: #fbf8f1; padding: 12px 16px; text-align: left; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 8px 12px; border-radius: 4px; transition: border .15s, background .15s, transform .15s; }.option-button:hover { border-color: var(--jade); transform: translateX(3px); }.option-button.selected { border: 2px solid var(--forest); background: #e5eee8; padding: 11px 15px; }.option-button.correct { border-color: #3d8066; background: #dff0e7; }.option-button.wrong { border-color: var(--red); background: #f7dfdb; }.option-letter { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #cfc5b4; font-family: var(--serif); font-weight: 900; }.option-button.selected .option-letter { background: var(--forest); color: white; border-color: var(--forest); }.option-copy { min-width: 0; line-height: 1.55; }.option-state-label { grid-column: 2; justify-self: start; padding: 2px 7px; background: var(--forest); color: white; font-size: 9px; font-weight: 900; }.option-button.wrong .option-state-label { background: var(--red); }
.option-button.first-attempt { border-color: #b28729; background: #f8efd8; }.option-button.first-attempt .option-letter { border-color: #b28729; color: #725711; }.option-button.assisted-choice { box-shadow: inset 4px 0 #c0942d; }.option-state-label.first-label,.option-button.wrong .option-state-label.first-label { background: #8a6717; }.option-state-label.retry-label { background: #a67819; }.option-state-label.correct-label { background: #36745c; }
.text-answer-field { display: grid; gap: 9px; padding: 18px; border: 1px solid #d7cebe; background: #fbf8f1; border-radius: 4px; }.text-answer-field > span { color: var(--forest); font-size: 12px; font-weight: 900; }.text-answer-field input { width: 100%; min-height: 58px; border: 2px solid #c9bda9; background: #fff; padding: 12px 15px; color: var(--ink); font: 700 18px/1.5 var(--sans); border-radius: 3px; }.text-answer-field input:focus { outline: 3px solid rgba(37,92,73,.16); border-color: var(--forest); }.text-answer-field input.correct { border-color: #3d8066; background: #e6f2eb; }.text-answer-field input.wrong { border-color: var(--red); background: #fae8e4; }.text-answer-field input.assisted { border-color: #b28729; background: #fbf1d9; }.text-answer-field small { color: var(--muted); line-height: 1.55; }
.answer-feedback { margin-top: 18px; padding: 16px; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; background: #e0eee7; border-left: 3px solid #3d8066; }.answer-feedback.wrong { background: #f6dfda; border-left-color: var(--red); }.answer-feedback.hint-only { background: #f4ead2; border-left-color: #aa7a18; }.feedback-icon { width: 40px; height: 40px; display: grid; place-items: center; background: #3d8066; color: white; font-weight: 900; }.answer-feedback.wrong .feedback-icon { background: var(--red); }.answer-feedback.hint-only .feedback-icon { background: #aa7a18; }.answer-feedback strong { font-family: var(--serif); }.feedback-details { margin-top: 9px; display: grid; gap: 10px; }.feedback-details section { border-top: 1px solid rgba(40,55,48,.14); padding-top: 9px; }.feedback-details section > b { display: block; color: var(--forest); font-size: 10px; }.feedback-details p, .feedback-details blockquote { margin: 4px 0 0; font-size: 12px; line-height: 1.7; color: #4e5752; }.feedback-details blockquote { padding-left: 10px; border-left: 2px solid var(--gold); font-family: var(--serif); }.answer-pair { display: grid; gap: 3px; font-size: 11px; }.answer-pair span { color: #5a625e; }.answer-pair b { color: var(--ink); }.quiz-actions { margin-top: 22px; display: flex; gap: 9px; }.quiz-actions .wide { flex: 1; }
.answer-feedback.assisted { background: #f6ebcd; border-left-color: #a67819; }.answer-feedback.assisted .feedback-icon { background: #a67819; }.answer-history-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; }.answer-history-summary i { color: #9b7627; font-style: normal; font-weight: 900; }
.exam-question-map { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }.exam-question-map button { width: 30px; height: 30px; border: 1px solid #c9bfaf; background: #f8f3e9; color: var(--muted); font-size: 10px; font-weight: 900; }.exam-question-map button.answered { background: #dcebe3; border-color: #76a18f; color: var(--forest); }.exam-question-map button.current { outline: 2px solid var(--red); outline-offset: 1px; }
dialog { border: 0; padding: 0; color: var(--ink); box-shadow: 0 30px 90px rgba(8,20,17,.38); border-radius: 6px; }.auth-dialog { width: min(440px, calc(100vw - 28px)); padding: 36px; background: var(--paper); }.auth-dialog::backdrop, .result-dialog::backdrop { background: rgba(10,26,22,.72); backdrop-filter: blur(5px); }.dialog-close { position: absolute; top: 12px; right: 12px; font-size: 22px; border: 0; }.auth-seal { margin-bottom: 25px; }.auth-dialog h2 { font-family: var(--serif); font-size: 32px; margin: 4px 0; }.auth-dialog > p { font-size: 11px; color: var(--muted); }.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #e7ddca; padding: 3px; margin: 22px 0; }.auth-dialog label { display: grid; gap: 7px; font-size: 11px; font-weight: 800; margin: 13px 0; }.auth-dialog input { width: 100%; min-height: 46px; background: var(--white); border: 1px solid #cfc4b2; border-radius: 3px; padding: 0 13px; }.auth-dialog input:focus { border-color: var(--forest); }.form-error { padding: 10px; background: #f1d7d1; color: #8d2921; font-size: 12px; margin: 10px 0; }
.auth-name-field { margin: 13px 0; }
.auth-name-field > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.auth-name-field label { margin: 0; }
.auth-name-field button { border: 0; background: transparent; color: var(--red); font-size: 10px; font-weight: 900; cursor: pointer; }
.result-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100svh - 32px); padding: 48px 38px 36px; background: var(--paper); text-align: center; overflow-x: hidden; overflow-y: auto; }.result-dialog > * { position: relative; }.result-rays { position: absolute; width: 380px; height: 380px; left: 50%; top: -265px; transform: translateX(-50%); border: 50px dotted rgba(215,169,52,.25); border-radius: 50%; }.result-stamp { width: 82px; height: 82px; margin: 0 auto 17px; display: grid; place-items: center; background: var(--red); color: white; font-family: var(--serif); font-weight: 900; font-size: 23px; border-radius: 50%; border: 4px double #f1c9bb; transform: rotate(-7deg); }.result-dialog h2 { font-family: var(--serif); font-size: 30px; margin: 7px 0; }.score-display strong { font-family: var(--serif); font-size: 72px; color: var(--red); }.score-display span { font-size: 22px; color: var(--muted); }.score-display i { font-style: normal; }.result-dialog > p { color: var(--muted); line-height: 1.7; }.reward-row { display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0; border: 1px solid var(--line); }.reward-row > div { padding: 15px; }.reward-row > div + div { border-left: 1px solid var(--line); }.reward-row span { display: block; font-size: 10px; color: var(--muted); }.reward-row strong { font-family: var(--serif); }.reward-row i { font-style: normal; }.result-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }.result-review-toggle { width: 100%; min-height: 42px; border: 1px solid var(--forest); background: transparent; color: var(--forest); font-weight: 900; cursor: pointer; margin-bottom: 14px; }.result-review { display: grid; gap: 12px; margin: 0 0 18px; text-align: left; }.result-review-item { padding: 18px; background: #f8f3e9; border-left: 4px solid var(--red); }.result-review-item.correct { border-left-color: #3d8066; }.result-review-item header { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); }.result-review-item header strong { color: var(--red); }.result-review-item.correct header strong { color: var(--forest); }.result-review-item h3 { margin: 8px 0 12px; font-family: var(--serif); font-size: 17px; line-height: 1.5; }.retry-note { display: inline-block; margin-bottom: 8px; padding: 3px 7px; background: #efe0b8; color: #6b5317; font-size: 9px; font-weight: 900; }
.result-review-item.assisted { border-left-color: #a67819; background: #faf3df; }.result-review-item.assisted header strong { color: #886313; }
.result-diagnostic { margin: 20px 0; padding: 18px; border-top: 3px solid var(--forest); background: #edf1eb; text-align: left; }
.result-diagnostic > strong { display: block; font: 900 17px/1.55 var(--serif); color: var(--forest); }
.result-diagnostic > div { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 10px; margin-top: 11px; align-items: start; }
.result-diagnostic span { color: var(--red); font-size: 10px; font-weight: 900; }
.result-diagnostic p { margin: 0; color: #46534d; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.guest-result-cta { margin: 0 0 18px; padding: 20px; border: 1px solid #c9b77e; background: #f3e6bd; text-align: left; }
.guest-result-cta > strong, .guest-result-cta > p { display: block; }
.guest-result-cta > strong { margin-top: 5px; font: 900 19px/1.45 var(--serif); }
.guest-result-cta > p { margin: 7px 0 14px; color: #5d543d; font-size: 11px; line-height: 1.65; }
.guest-result-cta button { width: 100%; min-height: 46px; }
.exam-submit-dialog { width: min(520px, calc(100vw - 28px)); padding: 34px; background: var(--paper); }.exam-submit-dialog::backdrop { background: rgba(10,26,22,.72); }.exam-submit-dialog h2 { font-family: var(--serif); font-size: 28px; margin: 8px 0; }.exam-submit-dialog > p { color: var(--muted); line-height: 1.7; }.exam-submit-map { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin: 20px 0; }.exam-submit-map button { min-height: 52px; border: 1px solid #c9bfaf; background: #f7f0e4; font-weight: 900; }.exam-submit-map button.answered { background: #dcebe3; border-color: #76a18f; }.exam-submit-map button.unanswered { background: #f5dfd9; border-color: #c9897d; color: var(--red); }.exam-submit-map small { display: block; font-size: 8px; margin-top: 2px; }.exam-submit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.exam-submit-actions button { min-height: 46px; }
.toast { position: fixed; z-index: 100; inset: auto auto 28px 50%; margin: 0; border: 0; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: white; padding: 12px 18px; border-radius: 4px; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }
footer { min-height: 64px; padding: 18px clamp(20px, 4vw, 72px); display: flex; justify-content: space-between; gap: 25px; align-items: center; background: #122a24; color: rgba(255,255,255,.5); font-size: 10px; }

/* Core experience layer */
body::selection { background: #efd58e; color: var(--ink); }
.mission-feature, .streak-panel, .rank-teaser { transition: transform .2s ease, box-shadow .2s ease; }
.mission-feature:hover, .streak-panel:hover, .rank-teaser:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(37,36,30,.1); }
.master-arena { background: #102b25; color: white; padding: 58px max(6vw, calc((100vw - 1168px)/2)); display: grid; grid-template-columns: minmax(0,1.4fr) minmax(220px,.7fr) minmax(200px,.6fr); gap: 42px; align-items: center; border-top: 5px solid var(--gold); }
.master-arena .kicker { color: #efc85d; }
.master-arena h2 { font-family: var(--serif); font-size: 42px; margin: 6px 0 10px; }
.master-arena-copy p { max-width: 620px; color: rgba(255,255,255,.68); line-height: 1.8; }
.master-actions { display: flex; gap: 10px; margin-top: 24px; }
.master-arena .outline-button { color: white; border-color: rgba(255,255,255,.35); }
.master-progress, .daily-goal { border-left: 1px solid rgba(255,255,255,.16); padding-left: 28px; }
.master-progress > span, .daily-goal > span { display: block; color: rgba(255,255,255,.58); font-size: 11px; font-weight: 800; }
.master-progress strong, .daily-goal strong { display: block; margin: 7px 0 14px; font-family: var(--serif); font-size: 30px; }
.master-progress strong i { color: #efc85d; font-style: normal; }
.master-progress > div { height: 7px; background: rgba(255,255,255,.13); }
.master-progress > div i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .5s ease; }
.master-progress small, .daily-goal small { display: block; margin-top: 10px; color: rgba(255,255,255,.5); line-height: 1.5; }
.goal-pips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.goal-pips i { height: 8px; background: rgba(255,255,255,.14); }
.goal-pips i.done { background: var(--gold); }
.library-toggle-row { display: flex; gap: 7px; }
.tier-segmented { flex-wrap: wrap; }
.tier-segmented button:last-child.active { background: var(--forest); color: #f4ce6a; }
.category-tag.tier-2 { background: #e4eee8; color: #27614d; }
.category-tag.tier-3 { background: #e8e3d6; color: #665737; }
.category-tag.tier-4 { background: #f3dfd7; color: #99382d; }
.category-tag.tier-5 { background: #17372f; color: #f0cb69; }
.category-tag.tier-6 { background: #2b1214; color: #f3c85f; border-color: #8d3a31; }
.hell-arena { background: #241214; border-top-color: #c2943c; }
.hell-arena .master-progress > div > i { background: #d4a641; }
.hell-podium { box-shadow: inset 0 4px #8f2925; }
.hell-rank-row .rank-xp { color: #8f2925; }
.passage-card .round-action { transition: transform .2s, background .2s; }
.passage-card:hover .round-action { transform: rotate(-8deg) scale(1.08); background: var(--red); }
.collection-list, .word-list, .note-list { display: grid; gap: 7px; }
.note-item { width: 100%; border: 1px solid #d8cebd; background: var(--white); padding: 12px 14px; text-align: left; cursor: pointer; display: grid; gap: 4px; }
.note-item strong { font-family: var(--serif); }
.note-item span { color: var(--muted); font-size: 10px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-item:hover { border-color: var(--jade); }
.font-controls { display: flex; gap: 4px; }
.font-controls .icon-button { font-size: 11px; font-weight: 900; background: #faf5eb; }
.note-drawer { margin: 0 0 18px; border: 1px solid var(--line); background: #fbf8f1; padding: 12px 16px; }
.note-drawer summary { cursor: pointer; font-size: 12px; font-weight: 800; }
.note-drawer textarea { width: 100%; min-height: 110px; margin-top: 12px; resize: vertical; border: 1px solid #cfc5b4; background: white; color: var(--ink); padding: 12px; line-height: 1.7; }
.note-drawer > div { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.note-drawer small { color: var(--muted); }
.note-drawer .outline-button { min-height: 38px; }
.game-mode-picker { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 20px 0; padding: 15px; background: #e4eee8; border-left: 3px solid var(--forest); }
.game-mode-picker > div:first-child { display: grid; gap: 3px; }
.game-mode-picker strong { font-family: var(--serif); }
.game-mode-picker small { color: var(--muted); font-size: 10px; }
.exam-mode .glossary-strip, .exam-mode .translation-drawer, .exam-mode .note-drawer { display: none; }
.selected-mode-banner { display: grid; gap: 3px; margin: 20px 0; padding: 15px; background: #e4eee8; border-left: 3px solid var(--forest); }.selected-mode-banner strong { font-family: var(--serif); }.selected-mode-banner small { color: var(--muted); font-size: 10px; }
.exam-mode .selected-mode-banner { background: #f4e4d9; border-left-color: var(--red); }
.mode-dialog { width: min(650px, calc(100vw - 26px)); padding: 38px; background: var(--paper); border-top: 5px solid var(--gold); }.mode-dialog::backdrop { background: rgba(10,26,22,.76); backdrop-filter: blur(6px); }.mode-dialog h2 { font-family: var(--serif); font-size: 32px; margin: 5px 0; }.mode-dialog > p { color: var(--muted); margin: 0 0 22px; }.mode-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.mode-choice-grid button { min-height: 180px; border: 1px solid var(--line); background: var(--white); padding: 22px; cursor: pointer; text-align: left; display: grid; align-content: center; gap: 7px; transition: transform .18s,border .18s,box-shadow .18s; }.mode-choice-grid button:hover { transform: translateY(-4px); border-color: var(--jade); box-shadow: var(--shadow); }.mode-choice-grid button:last-child { background: var(--forest); color: white; border-color: var(--forest); }.mode-choice-grid button > span { width: 42px; height: 42px; display: grid; place-items: center; background: var(--red); color: white; font-family: var(--serif); font-size: 22px; }.mode-choice-grid strong { font-family: var(--serif); font-size: 22px; }.mode-choice-grid small { color: var(--muted); line-height: 1.55; }.mode-choice-grid button:last-child small { color: rgba(255,255,255,.62); }
.result-actions { flex-wrap: wrap; gap: 8px; }
.result-actions button { min-height: 42px; padding-left: 14px; padding-right: 14px; }
.auth-dialog { border-top: 5px solid var(--red); }
.auth-dialog input:focus { box-shadow: 0 0 0 3px rgba(103,161,139,.14); }
.result-card-dialog { width: min(960px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 30px; background: #f4ecdc; overflow: auto; }
.result-card-dialog::backdrop { background: rgba(10,26,22,.78); backdrop-filter: blur(6px); }
.card-dialog-heading { padding-right: 42px; }
.card-dialog-heading h2 { font-family: var(--serif); font-size: 30px; margin: 4px 0 20px; }
.result-share-layout { display: grid; grid-template-columns: minmax(300px,.82fr) minmax(330px,1.18fr); gap: 30px; align-items: center; }
.result-card-preview { background: #102b25; padding: 8px; box-shadow: 0 18px 42px rgba(17,31,26,.24); }
.result-card-preview img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; background: #102b25; }
.result-share-tools { min-width: 0; display: grid; gap: 18px; }
.share-copy-panel { padding: 18px 0; border-top: 2px solid var(--forest); border-bottom: 1px solid #cfc4b2; }
.share-copy-panel > span { color: var(--red); font-size: 11px; font-weight: 900; }
.share-copy-panel p { margin: 10px 0 0; color: #39433e; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.share-primary-actions, .card-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.card-dialog-actions { padding-top: 16px; border-top: 1px solid #d3c9b7; }
.result-card-dialog svg, .share-result-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.result-card-dialog .outline-button { box-shadow: none; }
.qr-generator { position: fixed; left: -9999px; top: 0; width: 180px; height: 180px; background: white; padding: 8px; }

/* Version 2.5 retention and responsive layer */
.hero-random { width: auto; padding: 0 17px; color: white; border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); box-shadow: none; font-size: 12px; white-space: nowrap; }
.hero-random svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.hero-random:hover { background: rgba(255,255,255,.16); }
.social-band { padding: 68px max(4vw,calc((100vw - 1168px)/2)); background: #e5ece8; border-top: 1px solid #c7d4ce; border-bottom: 1px solid #bdccc5; }
.social-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.social-heading h2 { margin: 6px 0; font: 900 38px/1.2 var(--serif); }
.social-heading p { margin: 0; color: #56655e; font-size: 13px; }
.social-feed { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.feed-item { min-width: 0; padding: 20px; display: grid; grid-template-columns: 43px 1fr auto; gap: 12px; background: var(--white); border: 1px solid #c7d2cc; border-top: 3px solid var(--jade); box-shadow: 0 10px 25px rgba(32,53,45,.06); }
.feed-avatar { width: 43px; height: 43px; display: grid; place-items: center; background: #306b59; color: white; font: 900 20px var(--serif); }
.feed-copy { min-width: 0; }
.feed-copy > div { display: flex; flex-direction: column; }
.feed-copy strong { font-size: 13px; }
.feed-copy span,.feed-copy small { color: var(--muted); font-size: 9px; }
.feed-copy p { margin: 8px 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 900 16px var(--serif); }
.feed-score { text-align: right; display: flex; flex-direction: column; }
.feed-score strong { color: var(--red); font: 900 28px var(--serif); }
.feed-score strong i { color: var(--muted); font-size: 12px; font-style: normal; }
.feed-score span { color: var(--muted); font-size: 9px; }
.feed-actions { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid #e5e9e5; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ink-button { min-height: 36px; padding: 0 10px 0 5px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d4c6b0; background: #f7f0e3; cursor: pointer; }
.ink-button > span { width: 25px; height: 25px; display: grid; place-items: center; background: var(--forest); color: white; font: 900 13px var(--serif); }
.ink-button b,.ink-button i { font-size: 10px; font-style: normal; }
.ink-button i { color: var(--red); }
.ink-button.active { border-color: var(--jade); background: #e1eee8; }
.ink-button:disabled { cursor: default; opacity: .62; }
.feed-empty { grid-column: 1 / -1; min-height: 130px; padding: 25px; display: grid; place-content: center; gap: 5px; text-align: center; border: 1px dashed #9aafa5; color: #58685f; }
.feed-empty strong { color: var(--forest); font: 900 20px var(--serif); }
.profile-ink { margin: 18px 0; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; background: #e2eee8; border-left: 3px solid var(--jade); }
.profile-ink span { color: var(--muted); font-size: 10px; font-weight: 800; }
.profile-ink strong { color: var(--forest); font-family: var(--serif); }
.profile-ink i { color: var(--red); font-style: normal; }
.privacy-controls { margin-bottom: 18px; padding: 14px 0; display: grid; gap: 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-controls > strong { font-size: 11px; }
.privacy-controls label { display: flex; align-items: center; gap: 7px; color: #4f5d56; font-size: 11px; font-weight: 700; }
.privacy-controls input { accent-color: var(--forest); }
.privacy-controls small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.library-load-more { margin: 26px auto 0; }
.leave-dialog { width: min(540px,calc(100vw - 24px)); padding: 36px; background: var(--paper); border: 0; border-top: 5px solid var(--red); }
.leave-dialog::backdrop { background: rgba(10,26,22,.76); backdrop-filter: blur(5px); }
.leave-dialog h2 { margin: 8px 0; font: 900 28px/1.35 var(--serif); }
.leave-dialog > p { color: var(--muted); line-height: 1.7; }
.leave-mark { float: right; width: 48px; height: 48px; display: grid; place-items: center; background: var(--red); color: white; font: 900 24px var(--serif); }
.leave-actions { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.leave-actions .danger-text { grid-column: 1 / -1; color: var(--red); }
.study-detail-view { max-width: 1180px; margin: 0 auto; padding: 58px 38px 80px; }
.study-detail-head { display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.study-detail-head h1 { margin: 4px 0; font: 900 50px/1.2 var(--serif); }
.study-detail-head p { margin: 0; color: var(--red); font-size: 13px; font-weight: 700; }
.study-detail-meta { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0; }
.study-detail-meta span { padding: 6px 10px; background: #e8decb; color: #53615a; font-size: 10px; font-weight: 800; }
.study-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; border-top: 4px solid var(--forest); background: var(--white); }
.study-detail-layout > article { min-width: 0; padding: 38px; }
.study-detail-layout > article + article { border-left: 1px solid var(--line); background: #f0e6d4; }
.study-detail-layout h2 { margin: 8px 0 24px; font: 900 30px var(--serif); }
.study-original > div:not(.study-glossary),.study-translation > div { white-space: pre-wrap; font: 600 20px/2.1 var(--serif); }
.study-translation > div { color: #394640; font-family: var(--sans); font-size: 16px; line-height: 2; }
.study-glossary { margin-top: 34px; padding-top: 25px; border-top: 1px solid var(--line); }
.study-glossary h3 { margin: 0 0 12px; font: 900 16px var(--serif); }
.study-glossary > div > div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #ebe3d6; font-size: 12px; line-height: 1.7; }
.study-glossary strong { color: var(--red); }
.study-detail-footer { padding-top: 24px; display: flex; align-items: center; justify-content: space-between; }
.training-command { display: grid; grid-template-columns: minmax(170px,.72fr) minmax(280px,1.15fr) minmax(230px,.92fr) minmax(230px,.92fr); margin: 0 0 24px; border-top: 4px solid var(--gold); border-bottom: 1px solid #cfc4b2; background: #efe5d2; }
.training-command > div { min-width: 0; padding: 24px; }
.training-command > div + div { border-left: 1px solid #cfc4b2; }
.command-heading { background: var(--forest); color: white; display: grid; align-content: center; }
.command-heading .kicker { color: #f0ca68; }
.command-heading h2 { margin: 6px 0 0; font: 900 25px/1.35 var(--serif); }
.command-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.command-title span { color: var(--muted); font-size: 11px; font-weight: 900; }
.command-title strong { font: 900 18px var(--serif); color: var(--red); }
.daily-mission-list { display: grid; gap: 9px; }
.daily-mission-list > div { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; font-size: 11px; }
.daily-mission-list i { width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid #bfb29d; background: rgba(255,255,255,.55); color: white; font-style: normal; font-weight: 900; }
.daily-mission-list b { color: var(--muted); font-size: 10px; }
.daily-mission-list .done { color: var(--forest); font-weight: 800; }
.daily-mission-list .done i { background: var(--forest); border-color: var(--forest); }
.reward-button { width: 100%; min-height: 46px; margin-top: 15px; border: 1px solid #c9b77e; background: #e4d7b7; color: #6b5d39; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.reward-button span { font-size: 10px; font-weight: 800; }
.reward-button strong { font-family: var(--serif); }
.reward-button.ready { background: var(--gold); color: var(--forest); border-color: var(--gold); box-shadow: 0 8px 18px rgba(151,112,13,.2); }
.reward-button.claimed { background: #dce8e1; color: var(--forest); border-color: #9bb9ad; }
.reward-button:disabled { cursor: default; opacity: .72; }
.week-trail-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }
.week-trail-days div { display: grid; gap: 6px; text-align: center; }
.week-trail-days i { height: 42px; display: grid; place-items: center; background: rgba(255,255,255,.56); border: 1px solid #d2c6b4; color: var(--forest); font-style: normal; font-size: 10px; font-weight: 900; }
.week-trail-days .active i { background: var(--forest); border-color: var(--forest); color: white; }
.week-trail-days span { font-size: 9px; color: var(--muted); }
.week-trail small { display: block; margin-top: 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.smart-next { display: grid; align-content: center; gap: 7px; background: #f8f2e6; }
.smart-next > strong { font: 900 20px/1.35 var(--serif); }
.smart-next p { margin: 0; min-height: 44px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.smart-next .outline-button { width: fit-content; min-height: 40px; margin-top: 3px; }
.rank-controls { display: flex; align-items: center; gap: 14px; }
.rank-period { min-width: 166px; }
.mobile-filter-toggle, .mobile-reading-toggle { display: none; }
.mobile-filter-toggle strong { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; background: var(--red); color: white; font-size: 10px; border-radius: 50%; }
.clear-filters { min-height: 40px; align-self: end; justify-self: end; color: var(--red); }
.detail-filters { grid-template-columns: repeat(4, minmax(0,1fr)) auto; }
.result-actions #nextRecommended { background: var(--forest); }

@media (max-width: 980px) {
    .site-header { padding-left: 12px; padding-right: 12px; gap: 10px; }
    .brand-name { font-size: 17px; }
    .nav-link { padding-left: 10px; padding-right: 10px; }
    .nav-link::after { left: 10px; right: 10px; }
    .sound-toggle, .xp-pill { display: none !important; }
    .profile-button { min-width: 42px; padding-right: 5px; }
    .profile-button #accountLabel { display: none; }
    .master-arena { grid-template-columns: 1fr 1fr; }
    .master-arena-copy { grid-column: 1 / -1; }
    .game-shell.quiz-mode { grid-template-columns: 1fr; }.quiz-mode .reading-panel { position: static; max-height: none; }
    .game-hero { min-height: 680px; }
    .hero-copy { width: 70vw; margin-left: 7vw; }
    .today-card { width: 320px; }
    .dashboard-grid { grid-template-columns: 1.4fr .7fr; }.rank-teaser { grid-column: 1 / -1; }.rank-teaser { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.rank-teaser > .small-label, .rank-teaser > .text-button { grid-column: 1 / -1; }.mini-rank { border: 1px solid #e4dccd; padding: 10px; }
    .trend-band { grid-template-columns: 1fr; gap: 25px; }
    .passage-grid { grid-template-columns: 1fr 1fr; }.log-layout { grid-template-columns: 1fr; }.profile-panel { order: -1; }
    .library-tools { grid-template-columns: 1fr auto; }.library-count { grid-column: 1 / -1; justify-content: start; padding: 0; }
    .detail-filters { grid-template-columns: 1fr 1fr; }
    .detail-filters .clear-filters { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
    .training-command { grid-template-columns: 1fr 1fr; }
    .training-command .command-heading { grid-column: 1 / -1; }
    .training-command > .command-missions { border-left: 0; }
    .training-command .smart-next { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #cfc4b2; }
    .social-feed { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    body { padding-bottom: 66px; }
    .site-header { height: 62px; padding: 0 14px; }.desktop-nav { display: none; }.brand-name { font-size: 17px; }.brand-seal { width: 36px; height: 36px; font-size: 20px; }.sound-toggle, .xp-pill { display: none !important; }.profile-button { min-width: 42px; padding-right: 5px; }.profile-button #accountLabel { display: none; }
    .view { min-height: calc(100vh - 66px); }
    .game-hero { height: calc(100svh - 112px); min-height: 590px; max-height: 700px; align-items: flex-start; }
    .hero-art { background-image: url('../img/examination-hall-mobile.webp'); background-position: 69% center; }.hero-shade { background: linear-gradient(180deg, rgba(16,39,34,.94) 0%, rgba(16,39,34,.78) 55%, rgba(16,39,34,.38) 100%); }
    .hero-copy { width: auto; margin: 0; padding: 34px 22px 215px; }.hero-copy h1 { font-size: 54px; }.hero-lead { font-size: 14px; line-height: 1.58; }.hero-actions { align-items: stretch; gap: 7px; display: grid; grid-template-columns: 1fr 1fr; max-width: 300px; margin-top: 20px; }.hero-actions .text-button { grid-column: 1 / -1; text-align: left; }.hero-stats { gap: 9px; flex-wrap: wrap; margin-top: 15px; padding-top: 12px; }.today-card { left: 20px; right: 20px; width: auto; bottom: 74px; padding: 14px 16px; }.today-card strong { font-size: 18px; }.today-card small { font-size: 10px; }
    .dashboard-band, .content-view { padding: 44px 18px; }.section-heading, .page-title-row { align-items: flex-start; flex-direction: column; }.section-heading .text-button { align-self: flex-end; }.dashboard-grid { display: grid; grid-template-columns: 1fr; }.rank-teaser { grid-column: auto; display: block; }.mission-feature, .streak-panel, .rank-teaser { padding: 22px; }.mission-feature h3 { font-size: 28px; }
    .training-command { grid-template-columns: 1fr; margin-left: -18px; margin-right: -18px; }.training-command > div { padding: 20px; }.training-command > div + div { border-left: 0; border-top: 1px solid #cfc4b2; }.training-command .command-heading, .training-command .smart-next { grid-column: auto; }.week-trail-days i { height: 38px; }
    .social-band { padding: 44px 18px; }.social-heading { align-items: flex-start; flex-direction: column; }.social-heading h2 { font-size: 31px; }.social-feed { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-right: -18px; }.feed-item { flex: 0 0 min(84vw,350px); scroll-snap-align: start; }.feed-empty { flex: 0 0 calc(100% - 18px); }
    .master-arena { grid-template-columns: 1fr; gap: 28px; padding: 44px 20px; }.master-arena-copy { grid-column: auto; }.master-arena h2 { font-size: 34px; }.master-progress, .daily-goal { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); padding: 22px 0 0; }.master-actions { flex-direction: column; }.master-actions button { width: 100%; }
    .trend-band { padding: 48px 20px; }.trend-evidence { grid-template-columns: 1fr; }.trend-evidence > div + div { border-left: 0; border-top: 1px solid rgba(43,49,44,.13); }
    .passage-grid { grid-template-columns: 1fr; }.passage-card { min-height: 325px; }
    .library-tools { grid-template-columns: 1fr auto; position: sticky; top: 62px; z-index: 24; margin-left: -8px; margin-right: -8px; padding: 12px; box-shadow: 0 8px 20px rgba(31,35,29,.08); }.library-tools.filters-open { position: relative; top: auto; }.search-field { grid-column: 1 / -1; }.mobile-filter-toggle { display: inline-flex; grid-column: 1; grid-row: 2; min-height: 42px; box-shadow: none; }.library-count { grid-column: 2; grid-row: 2; padding: 0; }.library-toggle-row, .detail-filters { display: none; grid-column: 1 / -1; }.library-tools.filters-open .library-toggle-row { display: flex; flex-direction: column; }.library-tools.filters-open .detail-filters { display: grid; grid-template-columns: 1fr 1fr; }.favorite-filter { width: 100%; }.tier-segmented button { flex: 1 1 30%; }
    .library-heading-actions { width: 100%; align-items: stretch; flex-direction: column; }.clear-filters { grid-column: 1 / -1; width: 100%; justify-self: stretch; }
    .page-title-row h1 { font-size: 46px; }.segmented { width: 100%; }.segmented button { flex: 1; }.rank-controls { width: 100%; align-items: stretch; flex-direction: column; }.rank-season { width: 100%; }
    .podium { gap: 5px; }.podium-person { padding: 14px 6px; }.podium-person strong { font-size: 13px; }.rank-row { grid-template-columns: 35px 1fr 76px; padding: 13px 12px; }.rank-row > :nth-child(4), .rank-row > :nth-child(5) { display: none; }
    .metric-grid { grid-template-columns: 1fr 1fr; }.metric-grid > div:nth-child(2) { border-right: 0; }.metric-grid > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }.history-item { grid-template-columns: 1fr 55px 70px; }
    .overview-heading { align-items: flex-start; flex-direction: column; }.skill-bars, .training-plan-list { grid-template-columns: 1fr; }.plan-day { grid-template-columns: 52px minmax(0,1fr) 38px; }.journal-grid { grid-template-columns: 1fr; }.journal-section.wrong-section { grid-column: auto; }.wrong-list { grid-template-columns: 1fr; }.achievement-grid { grid-template-columns: 1fr; }
    .game-topbar { top: 62px; height: 62px; grid-template-columns: 40px minmax(0,1fr) 62px 64px; gap: 7px; padding: 0 10px; }.game-progress { grid-template-columns: 1fr; gap: 4px; }.game-progress span { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.game-timer { font-size: 11px; }.mobile-reading-toggle { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: white; font-size: 9px; font-weight: 900; }.game-shell { padding: 14px 9px 28px; }.reading-panel, .quiz-panel { padding: 26px 18px; }.reading-panel::before { inset: 7px; }.reading-heading { display: block; }.reading-heading h1 { font-size: 32px; }.reading-actions { margin-top: 12px; flex-direction: row; align-items: center; justify-content: flex-start; }.prediction-badge { display: none; }.classical-text { font-size: 18px; line-height: 2; }.glossary-strip { grid-template-columns: 1fr; }.quiz-panel h2 { font-size: 22px; }.option-button { min-height: 58px; padding: 13px 12px; }.option-button:hover { transform: none; }
    .mobile-reading-toggle[hidden] { display: none; }
    .game-shell.quiz-mode { gap: 8px; padding-bottom: 92px; }.quiz-mode .reading-panel { position: static; max-height: none; overflow: visible; border-bottom: 4px solid var(--gold); scroll-margin-top: 132px; }.quiz-mode .reading-heading h1 { font-size: 25px; }.quiz-mode .classical-text { font-size: 16px !important; line-height: 1.85; }.quiz-mode .glossary-strip { padding: 14px 0; }.quiz-mode .translation-drawer { margin-bottom: 8px; }.mobile-reading-hidden .reading-panel { display: none; }.quiz-panel { padding-bottom: 20px; }.quiz-panel h2 { scroll-margin-top: 145px; }.quiz-actions { position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(249,244,233,.97); border-top: 1px solid var(--line); box-shadow: 0 -8px 22px rgba(28,35,30,.12); }.quiz-actions .outline-button { flex: 0 0 105px; }.quiz-actions .primary-button { min-height: 48px; }
    .game-mode-picker { align-items: stretch; flex-direction: column; }.game-mode-picker .segmented { width: 100%; }.game-mode-picker .segmented button { flex: 1; }
    .mobile-nav { height: 66px; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: #f9f4e9; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }.mobile-nav button { border: 0; background: transparent; font-size: 9px; color: var(--muted); display: grid; place-content: center; gap: 2px; }.mobile-nav button span { font-family: var(--serif); font-size: 17px; }.mobile-nav button.active { color: var(--red); font-weight: 900; }
    .game-active { padding-bottom: 0; }.game-active .mobile-nav,.game-active footer { display: none; }
    footer { flex-direction: column; align-items: flex-start; padding-bottom: 85px; }
    .auth-dialog { padding: 30px 22px; }.result-dialog { padding: 38px 18px 28px; }.result-diagnostic, .guest-result-cta { padding: 16px 13px; }.result-diagnostic > div { grid-template-columns: 74px minmax(0,1fr); }.result-actions { flex-direction: column; }.result-actions button { width: 100%; }.result-review-item { padding: 15px 13px; }.answer-feedback { grid-template-columns: 34px minmax(0,1fr); padding: 13px 11px; }.feedback-icon { width: 32px; height: 32px; }.exam-submit-dialog { padding: 28px 18px; }.exam-submit-map { grid-template-columns: repeat(4,1fr); }.exam-submit-actions { grid-template-columns: 1fr; }.toast { bottom: 82px; max-width: calc(100vw - 30px); text-align: center; }
    .advanced-training-list { grid-template-columns: 1fr; }.tool-dialog { padding: 30px 16px; }.mock-toolbar { top: -30px; margin: 0 -16px 18px; padding: 12px 16px; }.study-room-dialog { width: calc(100vw - 20px); padding: 26px 12px 18px; }.room-dialog-heading { align-items: start; flex-direction: column; gap: 8px; margin: 0 40px 16px 2px; }.room-dialog-heading h2 { font-size: 29px; }.room-actions,.room-actions form { grid-template-columns: 1fr; }.room-actions form { padding: 13px; }.room-actions form button { width: 100%; }.study-room-dialog.room-detail-open .room-actions { display: none; }.room-workbench { min-height: 430px; grid-template-columns: 1fr; }.room-directory { border-right: 0; }.room-workbench.detail-open .room-directory,.room-workbench.detail-open .room-detail-placeholder { display: none; }.room-detail { padding: 18px 15px 22px; }.room-detail-back { display: inline-flex; }.room-detail-head h3 { font-size: 22px; }.room-detail-head .room-private-badge { display: none; }.room-overview div { padding: 10px; }.room-invite-band { grid-template-columns: 1fr; gap: 11px; padding: 13px; }.room-code-line { grid-template-columns: minmax(0,1fr) 84px; gap: 12px; }.room-code-line strong { font-size: 23px; }#studyRoomQr { width: 82px; height: 82px; }.room-share-invite { width: 100%; }.room-assignment { grid-template-columns: 1fr; }.room-assignment .outline-button { width: 100%; }.room-publish-band { grid-template-columns: 1fr; margin: 22px -15px 0; padding: 16px 15px 18px; }.room-publish-band > div:last-child { align-items: stretch; flex-direction: column; }.room-publish-band button { width: 100%; }.room-detail-actions { align-items: stretch; flex-direction: column; }.room-detail-actions > div { flex-direction: column; }.room-detail-actions button { width: 100%; }.weekly-share-panel > div { display: grid; grid-template-columns: 1fr 1fr; }.weekly-share-panel button:first-child,.weekly-share-panel button:last-child { grid-column: 1/-1; }.weekly-report-metrics { grid-template-columns: 1fr; }
    .result-card-dialog { padding: 22px 14px; }.result-share-layout { grid-template-columns: 1fr; gap: 22px; }.result-card-preview { width: min(100%,360px); justify-self: center; }.share-primary-actions, .card-dialog-actions { grid-template-columns: 1fr; }
    .mode-dialog { padding: 30px 20px; }.mode-choice-grid { grid-template-columns: 1fr; }.mode-choice-grid button { min-height: 135px; }
    .leave-dialog { padding: 30px 20px; }.leave-actions { grid-template-columns: 1fr; }.leave-actions .danger-text { grid-column: auto; }
    .study-detail-view { padding: 36px 16px 90px; }.study-detail-head { grid-template-columns: 40px 1fr; }.study-detail-head > .outline-button { grid-column: 1 / -1; width: 100%; }.study-detail-head h1 { font-size: 36px; }.study-detail-layout { grid-template-columns: 1fr; }.study-detail-layout > article { padding: 28px 22px; }.study-detail-layout > article + article { border-left: 0; border-top: 1px solid var(--line); }.study-original > div:not(.study-glossary) { font-size: 18px; }.study-detail-footer { align-items: stretch; flex-direction: column; gap: 8px; }.study-detail-footer button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
