:root {
  --paper: #f6f2e9;
  --paper-deep: #ece6d9;
  --ink: #20251f;
  --muted: #74786e;
  --line: #ddd7ca;
  --green: #477363;
  --green-deep: #2f5548;
  --coral: #d26e4e;
  --yellow: #e6b74c;
  --white: #fffdf8;
  --shadow: 0 18px 40px rgba(47, 53, 43, .07);
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: "DM Sans", "Noto Sans KR", sans-serif; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 244px; flex: 0 0 244px; display: flex; flex-direction: column; padding: 31px 24px 25px; border-right: 1px solid var(--line); background: #f2ede2; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 2px 44px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--paper); background: var(--green); border-radius: 9px 9px 9px 2px; font: 600 17px "Noto Sans JP", sans-serif; transform: rotate(-5deg); }
.brand-name { font-size: 12px; font-weight: 700; letter-spacing: .15em; }
.brand-caption { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.section-kicker, .eyebrow, .stat-meta { color: #9c9d91; font: 500 10px "DM Mono", monospace; letter-spacing: .14em; }
.sidebar-section { flex: 1; }
.category-nav { display: grid; gap: 6px; margin-top: 15px; }
.category-button { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; padding: 11px 12px; color: #6f756b; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; transition: .2s ease; }
.category-button:hover { color: var(--ink); background: rgba(255,255,255,.45); }
.category-button.active { color: var(--green-deep); background: #e2e9df; font-weight: 700; }
.category-button.favorites-nav { margin-top: 7px; padding-top: 16px; border-top: 1px solid var(--line); }
.category-button.favorites-nav .category-icon { color: var(--coral); }
.category-button .category-label { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.category-icon { width: 22px; height: 22px; display: grid; place-items: center; color: var(--green); border: 1px solid #c8d5c9; border-radius: 50%; font-size: 11px; }
.category-button .category-count { color: #9b9f95; font: 11px "DM Mono", monospace; }
.sidebar-note { display: flex; gap: 9px; margin: 22px 0; padding: 13px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note-dot { width: 7px; height: 7px; flex: 0 0 7px; margin-top: 5px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px #f1d9cf; }
.sidebar-note strong { font-size: 11px; }
.sidebar-note p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.sidebar-bottom { padding-top: 4px; }
.mini-progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.mini-progress-label strong { color: var(--green); font: 11px "DM Mono", monospace; }
.progress-track { height: 5px; overflow: hidden; margin-top: 9px; border-radius: 10px; background: #ddd9ce; }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .4s ease; }
.sidebar-footnote { margin-top: 10px; color: #a2a398; font-size: 9px; }
.main-content { flex: 1 1 auto; width: auto; max-width: 1540px; min-width: 0; padding: 0 clamp(32px, 4.5vw, 72px); margin: 0 auto; }
.topbar { height: 77px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #a0a296; font: 11px "DM Mono", monospace; letter-spacing: .04em; }
.breadcrumb i { padding: 0 8px; color: #d0c8ba; font-style: normal; }
.breadcrumb strong { color: #5c655b; font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.voice-picker { display: flex; align-items: center; gap: 6px; color: #a0a296; font: 10px "DM Mono", monospace; letter-spacing: .04em; }
.voice-picker select { max-width: 145px; padding: 4px 2px; border: 0; outline: 0; color: var(--green-deep); background: transparent; font: 10px "Noto Sans KR", sans-serif; cursor: pointer; }
.icon-button, .avatar { border: 0; cursor: pointer; }
.icon-button { color: var(--green); padding: 7px; background: transparent; font-size: 18px; letter-spacing: -8px; }
.avatar { width: 30px; height: 30px; color: var(--paper); background: var(--green-deep); border-radius: 50%; font-size: 11px; }
.intro-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding: 57px 0 48px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--coral); }
.eyebrow-line { width: 23px; height: 1px; background: var(--coral); }
h1 { margin: 17px 0 16px; font-size: clamp(36px, 4vw, 57px); font-weight: 500; letter-spacing: -.065em; line-height: 1.1; }
h1 em { color: var(--green); font-style: normal; }
.intro-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.today-card { width: 216px; flex: 0 0 216px; margin-top: 8px; padding: 20px 20px 18px; color: var(--white); background: var(--green); border-radius: 2px 24px 2px 2px; box-shadow: 12px 12px 0 #dde3d6; }
.today-card-top { display: flex; justify-content: space-between; color: #c6d9cc; font: 10px "DM Mono", monospace; letter-spacing: .08em; }
.sun-icon { color: #efcd76; font-size: 16px; }
.today-word { margin-top: 25px; font: 500 31px "Noto Sans JP", sans-serif; }
.today-reading { margin-top: 2px; color: #d6e1d9; font-size: 11px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 0; border: 0; color: #f4efe4; background: transparent; font-size: 10px; cursor: pointer; }
.text-button span { font-size: 15px; }
.section-switcher { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 28px; }
.section-switcher-button { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid #d4e6ed; border-radius: 12px; color: #3b8caf; background: #edf7fb; cursor: pointer; text-align: left; transition: .2s ease; }
.section-switcher-button:hover { border-color: #a6cfe0; background: #f7fcfe; transform: translateY(-1px); }
.section-switcher-button.active { color: #fff; border-color: #5ba8ca; background: #5ba8ca; box-shadow: 0 8px 18px rgba(77, 157, 193, .15); }
.favorites-switcher { color: var(--green-deep); border-color: #c7d8c8; background: #f0f5ee; }
.favorites-switcher:hover { border-color: #9fbea5; background: #f7faf5; }
.favorites-switcher.active { color: #fff; border-color: var(--green); background: var(--green); box-shadow: 0 8px 18px rgba(72, 115, 99, .16); }
.section-switcher-button span { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 11px; font-weight: 600; white-space: nowrap; }
.section-switcher-button small { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 10px "Noto Sans JP", sans-serif; opacity: .85; }
.section-switcher-button strong { font-size: 20px; font-weight: 400; line-height: 1; }
.stats-strip { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)) 1.5fr; min-height: 92px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-cell { display: flex; flex-direction: column; justify-content: center; padding: 13px 20px 13px 24px; border-right: 1px solid var(--line); }
.stat-label { color: var(--muted); font-size: 11px; }
.stat-cell strong { margin-top: 7px; color: var(--green-deep); font: 500 23px "DM Mono", monospace; }
.stat-meta { margin-top: 2px; font-size: 8px; }
.stat-quote { display: flex; align-items: center; justify-content: flex-start; gap: 11px; padding: 0 24px; color: #898c81; }
.stat-quote > span { flex: 0 0 auto; color: var(--yellow); font: 34px/1 Georgia, serif; transform: translateY(-5px); }
.stat-quote p { max-width: 190px; margin: 0; font-size: 13px; line-height: 1.55; text-align: left; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 42px; min-width: 0; padding-top: 50px; }
.library-column { min-width: 0; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; }
h2 { margin: 7px 0 0; font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.result-count { color: var(--muted); font: 11px "DM Mono", monospace; }
.toolbar { display: flex; gap: 10px; margin-top: 21px; }
.search-box, .sort-box { display: flex; align-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.42); }
.search-box { flex: 1; gap: 9px; padding: 0 13px; }
.search-box span { color: var(--green); font-size: 22px; transform: rotate(-20deg); }
.search-box input { width: 100%; padding: 11px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: #a7a99e; }
.sort-box { gap: 9px; padding: 0 11px; color: var(--muted); font-size: 10px; }
.sort-box select { padding: 10px 0; border: 0; outline: 0; color: var(--green-deep); background: transparent; font-size: 10px; cursor: pointer; }
.rank-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 16px; }
.rank-tab { padding: 6px 9px; border: 1px solid transparent; border-radius: 4px; color: #999d92; background: transparent; font: 10px "DM Mono", monospace; cursor: pointer; transition: .2s; }
.rank-tab:hover { color: var(--green); }
.rank-tab.active { color: var(--green-deep); border-color: #b6caba; background: #e4ede2; font-weight: 500; }
.word-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.word-grid.reference-grid { grid-template-columns: 1fr; gap: 11px; }
.reference-card { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px 13px 17px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.76); cursor: pointer; transition: .2s ease; }
.reference-card:hover, .reference-card.selected { border-color: #a9c1ad; background: var(--white); box-shadow: var(--shadow); transform: translateY(-1px); }
.reference-card-main { min-width: 0; }
.reference-word { color: var(--ink); font: 700 22px "Noto Sans JP", sans-serif; letter-spacing: -.02em; }
.reference-reading { margin-left: 8px; color: var(--muted); font: 11px "Noto Sans KR", sans-serif; }
.reference-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.reference-tags span { padding: 4px 8px; color: var(--green); border: 1px solid #c8d5c9; border-radius: 999px; background: #e7eee4; font-size: 10px; }
.reference-card-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.reference-rank { color: #aaa99e; font: 10px "DM Mono", monospace; }
.reference-card .star-button { position: static; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #c8d5c9; border-radius: 50%; color: var(--green); background: #fff; font-size: 14px; }
.reference-arrow { color: #a8ada3; font-size: 23px; line-height: 1; }
.word-card { position: relative; min-height: 131px; padding: 17px 17px 14px; border: 1px solid var(--line); border-radius: 2px; background: rgba(255,253,248,.42); cursor: pointer; text-align: left; transition: .2s ease; }
.word-card:hover, .word-card.selected { border-color: #a9c1ad; background: var(--white); box-shadow: var(--shadow); transform: translateY(-2px); }
.word-card.selected::after { position: absolute; top: 0; right: 0; width: 3px; height: 100%; border-radius: 0 2px 2px 0; background: var(--coral); content: ""; }
.word-card-top { display: flex; align-items: center; justify-content: space-between; }
.rank-number { color: #aaa99e; font: 10px "DM Mono", monospace; }
.card-badges, .detail-head-badges { display: inline-flex; align-items: center; gap: 5px; }
.jlpt-badge { padding: 4px 6px; color: var(--coral); border: 1px solid #efd1c5; border-radius: 2px; font: 9px "DM Mono", monospace; }
.category-chip { padding: 4px 7px; color: var(--green); border-radius: 2px; background: #e7eee4; font-size: 9px; }
.word-card h3 { margin: 14px 0 2px; font: 600 24px "Noto Sans JP", sans-serif; letter-spacing: -.03em; }
.word-card .word-reading { color: var(--muted); font: 11px "Noto Sans JP", sans-serif; }
.word-card .word-meaning { margin-top: 11px; color: #555e54; font-size: 11px; }
.star-button { position: absolute; right: 12px; bottom: 11px; padding: 2px; border: 0; color: #c3c3b8; background: transparent; cursor: pointer; font-size: 16px; line-height: 1; }
.star-button.saved { color: var(--coral); }
.empty-state { padding: 57px 20px; color: var(--muted); border: 1px dashed var(--line); text-align: center; }
.empty-state div { color: var(--green); font-size: 30px; }
.empty-state strong { display: block; margin-top: 8px; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 6px 0 0; font-size: 11px; }
.hidden { display: none !important; }
.detail-panel { position: sticky; top: 24px; align-self: start; min-width: 0; min-height: 0; height: calc(100vh - 48px); max-height: calc(100vh - 48px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-margin-top: 20px; scrollbar-width: thin; scrollbar-color: #c6d4c8 transparent; padding: 27px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.detail-kicker { display: flex; align-items: center; justify-content: space-between; color: #a1a397; font: 10px "DM Mono", monospace; letter-spacing: .1em; }
.detail-rank { color: var(--coral); }
.detail-jlpt { padding: 4px 6px; color: var(--green); border: 1px solid #bfd1c0; border-radius: 2px; font-size: 9px; letter-spacing: .02em; }
.detail-word-row { display: flex; align-items: start; justify-content: space-between; margin-top: 22px; }
.detail-word { margin: 0; font: 600 43px "Noto Sans JP", sans-serif; letter-spacing: -.06em; }
.detail-word-reading { margin-left: 8px; color: var(--muted); font: 400 .4em "Noto Sans JP", sans-serif; letter-spacing: 0; white-space: nowrap; }
.detail-reading { margin-top: 5px; color: var(--muted); font: 12px "Noto Sans JP", sans-serif; }
.detail-meaning { margin-top: 16px; color: var(--green-deep); font-size: 14px; font-weight: 600; }
.speaker-button { width: 38px; height: 38px; border: 1px solid #c2d2c3; color: var(--green); background: #edf3eb; border-radius: 50%; cursor: pointer; font-size: 17px; transition: .2s; }
.speaker-button:hover { color: var(--white); background: var(--green); }
.detail-note { margin: 19px 0 0; padding: 10px 12px; border-left: 2px solid var(--yellow); color: #777b70; background: #faf6e9; font-size: 11px; line-height: 1.6; }
.reference-detail-info { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 11px 12px; border: 1px solid #d9e3d9; border-radius: 8px; color: var(--muted); background: #f2f5ef; font-size: 11px; }
.reference-detail-info span { color: #929b91; font: 9px "DM Mono", monospace; letter-spacing: .08em; }
.reference-detail-info strong { color: var(--green-deep); font-weight: 600; }
.reference-explanation { white-space: pre-line; border-left-color: var(--yellow); background: #faf6e9; }
.detail-block { margin-top: 26px; }
.detail-block-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; color: #777c70; font: 10px "DM Mono", monospace; letter-spacing: .09em; }
.detail-block-title span:last-child { color: #a7a89f; font-size: 9px; }
.pitch-chart { display: flex; align-items: end; height: 118px; padding: 24px 7px 31px; border-bottom: 1px solid #d6d9ce; position: relative; overflow: visible; }
.pitch-chart::before, .pitch-chart::after { position: absolute; left: 0; right: 0; height: 1px; background: #ebe9e0; content: ""; }
.pitch-chart::before { top: 34px; }
.pitch-chart::after { top: 68px; }
.pitch-syllable { position: relative; z-index: 1; flex: 1 1 0; width: auto; min-width: 24px; height: 100%; display: flex; align-items: end; justify-content: center; }
.pitch-bar { width: min(16px, 62%); min-width: 8px; border-radius: 8px 8px 2px 2px; background: #a8c0ab; transition: .2s; }
.pitch-bar.accent { background: var(--coral); }
.pitch-label { position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); color: #737a70; font: 11px "Noto Sans JP", sans-serif; white-space: nowrap; }
.pitch-number { position: absolute; top: -18px; right: 50%; transform: translateX(50%); color: var(--coral); font: 9px "DM Mono", monospace; white-space: nowrap; }
.pitch-legend { margin-top: 14px; color: #a1a39a; font-size: 10px; }
.pitch-legend b { color: var(--coral); font-weight: 500; }
.pitch-mode-switch { display: inline-flex; gap: 3px; margin: -4px 0 13px; padding: 3px; border-radius: 5px; background: #f1f4ef; }
.pitch-mode-button { padding: 5px 10px; border: 0; border-radius: 3px; color: #8b9287; background: transparent; font-size: 10px; cursor: pointer; }
.pitch-mode-button.active { color: var(--green-deep); background: var(--white); box-shadow: 0 2px 7px rgba(47,53,43,.06); font-weight: 600; }
.smooth-pitch-chart { position: relative; min-height: 111px; padding-bottom: 19px; border-bottom: 1px solid #d6d9ce; }
.smooth-pitch-chart svg { display: block; width: 100%; height: 88px; overflow: visible; }
.smooth-guide { stroke: #ebe9e0; stroke-width: 1; }
.smooth-area { fill: rgba(72, 115, 99, .09); stroke: none; }
.smooth-line { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.smooth-point { fill: var(--green); stroke: var(--white); stroke-width: 2; }
.smooth-point.accent { fill: var(--coral); }
.smooth-labels { display: flex; justify-content: space-between; padding: 0 7px; color: #737a70; font: 11px "Noto Sans JP", sans-serif; }
.smooth-labels span { flex: 1 1 0; min-width: 0; text-align: center; }
.conjugation-tabs { display: flex; gap: 4px; margin-bottom: 8px; padding: 3px; border-radius: 4px; background: #f2f4ee; }
.conjugation-tab { flex: 1; padding: 7px 5px; border: 0; border-radius: 3px; color: #8b9287; background: transparent; font-size: 10px; cursor: pointer; }
.conjugation-tab.active { color: var(--green-deep); background: var(--white); box-shadow: 0 2px 7px rgba(47,53,43,.06); font-weight: 600; }
.forms-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.conjugation-row { cursor: pointer; transition: background .18s ease; }
.conjugation-row:hover, .conjugation-row:focus, .conjugation-row.active { outline: 0; background: #eef6ef; }
.conjugation-row.active th { color: var(--coral); }
.conjugation-row.active td { color: var(--green-deep); font-weight: 600; }
.forms-table tr { border-bottom: 1px solid #eeece4; }
.forms-table tr:last-child { border-bottom: 0; }
.forms-table th { width: 31%; padding: 8px 0; color: #969a8f; font-size: 10px; font-weight: 400; text-align: left; }
.forms-table td { padding: 8px 0; color: #444d43; font-family: "Noto Sans JP", sans-serif; overflow-wrap: anywhere; }
.forms-table td small { display: block; margin-top: 3px; color: #9a9f94; font: 10px "Noto Sans KR", sans-serif; }
.form-text { display: inline-block; }
.example-box { padding: 13px 14px; background: #f2f5ef; }
.examples-stack { display: grid; gap: 8px; }
.example-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #9a9f94; font: 9px "DM Mono", monospace; letter-spacing: .05em; }
.example-speaker { width: 24px; height: 24px; border: 1px solid #c4d5c5; color: var(--green); background: var(--white); border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; }
.example-jp { color: var(--green-deep); font: 14px "Noto Sans JP", sans-serif; line-height: 1.7; }
.example-ko { margin-top: 6px; color: #737a70; font-size: 10px; line-height: 1.5; }
.example-pattern { margin-top: 9px; color: var(--coral); font: 9px "DM Mono", monospace; }
.learn-button { width: 100%; margin-top: 23px; padding: 11px; border: 1px solid var(--green); color: var(--green-deep); background: transparent; font-size: 11px; cursor: pointer; transition: .2s; }
.learn-button:hover, .learn-button.learned { color: var(--white); background: var(--green); }
.detail-source { margin: 21px 0 0; color: #b0b0a6; font-size: 9px; line-height: 1.5; }
.detail-empty { min-height: 250px; display: grid; place-content: center; justify-items: center; padding: 25px; color: var(--muted); text-align: center; }
.detail-empty > span { color: var(--yellow); font-size: 29px; }
.detail-empty strong { margin-top: 12px; color: var(--ink); font-size: 14px; }
.detail-empty p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 58px; padding: 19px 0 24px; border-top: 1px solid var(--line); color: #aaa99e; font: 9px "DM Mono", monospace; letter-spacing: .04em; }
.back-to-top { position: fixed; right: clamp(18px, 3vw, 34px); bottom: 24px; z-index: 20; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #9ab9a9; border-radius: 50%; color: var(--white); background: var(--green); box-shadow: 0 9px 24px rgba(40, 66, 54, .2); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .2s ease; }
.back-to-top:hover { background: var(--green-deep); transform: translateY(-2px); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top span { font-size: 23px; line-height: 1; transform: translateY(-1px); }
.flashcard-entry { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; margin: 6px 0 24px; border: 1px solid #bdcfc1; border-radius: 10px; color: var(--green-deep); background: #e7eee4; font-size: 12px; text-decoration: none; font-weight: 600; }
.flashcard-entry:hover { background: #dbe6d7; }
.legacy-export { border: 0; background: transparent; color: var(--green); text-decoration: underline; cursor: pointer; font-size: 11px; }
@media(max-width:680px) { .flashcard-entry { margin: 0; } }
@media (min-width: 1121px) {
  .main-content > .topbar, .main-content > .intro-row, .main-content > .section-switcher, .main-content > .stats-strip, .main-content > .workspace, .main-content > .footer { width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 1120px) {
  .sidebar { width: 205px; flex-basis: 205px; padding-left: 17px; padding-right: 17px; }
  .main-content { width: auto; max-width: none; padding: 0 28px; margin: 0; }
  .workspace { grid-template-columns: 1fr; }
  .detail-panel { display: block; position: static; grid-column: 1; width: 100%; height: auto; max-height: none; overflow: visible; margin-top: 8px; }
  .section-switcher { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) and (min-width: 681px) {
  .sidebar { width: 184px; flex-basis: 184px; padding-left: 14px; padding-right: 14px; }
  .main-content { width: auto; padding: 0 20px; }
  .intro-row { padding-top: 42px; }
  h1 { font-size: 42px; }
  .section-switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip { grid-template-columns: repeat(3, minmax(90px, 1fr)); }
  .stat-quote { display: none; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; height: auto; padding: 17px 18px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-lockup { padding-bottom: 15px; }
  .sidebar-section { display: none; }
  .sidebar-note, .sidebar-bottom { display: none; }
  .main-content { width: 100%; padding: 0 18px; }
  .topbar { height: 60px; }
  .breadcrumb { font-size: 9px; }
  .voice-picker { display: none; }
  .intro-row { display: block; padding: 38px 0 35px; }
  h1 { font-size: 40px; }
  .today-card { width: 100%; margin-top: 28px; box-shadow: 7px 7px 0 #dde3d6; }
  .section-switcher { grid-template-columns: 1fr; gap: 6px; margin-bottom: 22px; }
  .section-switcher-button { min-height: 48px; border-radius: 12px; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .stat-cell { padding-right: 9px; padding-left: 12px; }
  .stat-quote { display: none; }
  .workspace { padding-top: 37px; }
  .detail-panel { padding: 20px 16px; }
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .detail-word { font-size: 36px; }
  .detail-block-title { gap: 10px; align-items: flex-start; }
  .detail-block-title span:last-child { text-align: right; }
  .word-grid { grid-template-columns: 1fr; }
  .reference-card { align-items: flex-start; padding-left: 14px; }
  .reference-card-actions { margin-top: 1px; }
  .reference-rank { display: none; }
  .toolbar { display: block; }
  .sort-box { margin-top: 8px; justify-content: space-between; }
  .sort-box select { flex: 1; margin-left: 9px; }
  .footer { display: block; line-height: 1.8; }
  .footer span { display: block; }
}
