:root {
  color-scheme: light;
  --ink: #1d302c;
  --body: #34473f;
  --muted: #607168;
  --green: #156449;
  --deep-green: #104e39;
  --mint: #e6f3ec;
  --line: #dbe4de;
  --white: #fff;
  font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f7f9f6;
  color: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .55; }
button, a, textarea, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid #4a978c; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button { touch-action: manipulation; }
svg { display: block; flex-shrink: 0; }
button i, .level-control i, .card-label i, .rail-title i, .session-heading i, .session-row i, .suggestion-label i {
  display: inline-flex; align-items: center; justify-content: center; font-style: normal; flex: 0 0 auto;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner, .shell { width: min(100% - 72px, 1320px); margin-inline: auto; }
.topbar-inner { display: flex; align-items: center; min-height: 76px; gap: 48px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: #183a2e; text-decoration: none;
  font-size: 1.52rem; line-height: 1; font-weight: 750; letter-spacing: -.06em;
}
.brand-mark { display: inline-flex; }
.topnav { display: flex; gap: 6px; align-items: center; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px;
  border: 0; border-radius: 9px; background: transparent; color: #52605b; font-size: .91rem; font-weight: 600;
}
.nav-btn { white-space: nowrap; }
.nav-btn svg { width: 17px; height: 17px; }
.nav-btn.active { background: #e8f3ec; color: #195e45; }
.nav-btn:hover:not(.active) { background: #f3f6f3; }
.profile-avatar {
  display: grid; place-items: center; margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  color: #365639; background: #e6ebd6; border: 1px solid #d5dfc5; font-weight: 650; font-size: .95rem;
}
.shell { padding-bottom: 40px; }
.page-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 34px 0 27px;
}
.page-heading h1 { color: var(--ink); font-size: clamp(2rem, 2.5vw, 2.65rem); line-height: 1.16; letter-spacing: -.052em; font-weight: 710; }
.page-heading p { margin-top: 7px; color: var(--muted); font-size: 1rem; }
.level-control {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 0 12px; height: 42px; border: 1px solid #d4dfd8; border-radius: 10px;
  color: var(--muted); background: #fff; font-size: .87rem;
}
.level-control > svg:first-child { color: var(--green); }
.level-control > svg:last-child { display: none; }
.level-control select {
  min-height: 38px; appearance: none; color: #293d33; border: 0; background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4.5 6.5 3.5 3.5 3.5-3.5' stroke='%2347584d' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right center; background-repeat: no-repeat; padding: 0 20px 0 0; font-weight: 650;
}
.studio-grid { display: grid; grid-template-columns: minmax(185px, .81fr) minmax(0, 2.38fr) minmax(215px, .92fr); gap: 22px; align-items: start; }
.scenario-rail, .coach-rail, .chat-card { min-width: 0; }
.rail-title { display: flex; align-items: center; gap: 8px; margin: 0 0 15px; color: #283e33; font-size: 1rem; line-height: 1.3; font-weight: 700; letter-spacing: -.018em; }
.rail-title svg { width: 17px; height: 17px; color: #476d55; }
.scenario-list { display: grid; gap: 9px; }
.scenario-button {
  display: flex; width: 100%; min-width: 0; min-height: 70px; align-items: center; gap: 12px;
  text-align: left; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 13px;
  transition: border-color .15s, background .15s;
}
.scenario-button:hover { border-color: #9abcaa; background: #fbfdfb; }
.scenario-button.active { border-color: #77a48e; background: #ebf5ee; box-shadow: inset 0 0 0 .5px #91b5a0; }
.scenario-icon, .partner-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; }
.scenario-icon svg, .partner-icon svg { width: 21px; height: 21px; }
.scenario-icon.daily, .partner-icon { background: #d8eddf; color: #296947; }
.scenario-icon.travel, .partner-icon.travel { background: #e3eff8; color: #397195; }
.scenario-icon.work, .partner-icon.work { background: #efe9fa; color: #7b6198; }
.scenario-icon.interview, .partner-icon.interview { background: #f9e7da; color: #aa6c40; }
.scenario-copy { display: grid; gap: 2px; min-width: 0; }
.scenario-copy strong { font-size: .95rem; line-height: 1.35; color: #233b2d; font-weight: 670; }
.scenario-copy small { font-size: .8rem; line-height: 1.4; color: #586c5f; }
.scenario-dot { margin-left: auto; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; }
.active .scenario-dot { background: #2c7856; }
.session-card { margin-top: 25px; padding: 17px; border: 1px solid #d1e2d5; border-radius: 15px; background: #eaf3ea; }
.session-heading { display: flex; align-items: center; gap: 9px; color: #244d35; font-size: .96rem; font-weight: 700; margin-bottom: 12px; }
.session-heading svg { width: 17px; height: 17px; }
.session-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .86rem; padding: 3px 0; color: #536656; }
.session-row strong { color: #284832; font-weight: 650; }
.summary-btn, .secondary-btn, .primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid #c8d7cc; border-radius: 9px; padding: 9px 14px; background: #fff; font-size: .89rem; font-weight: 620;
}
.summary-btn { margin-top: 14px; width: 100%; background: #f8fcf7; color: #28583d; }
.summary-btn:hover, .secondary-btn:hover { background: #f0f7f0; border-color: #9fb6a6; }
.summary-btn svg, .secondary-btn svg, .primary-btn svg { width: 16px; height: 16px; }
.primary-btn { background: var(--green); color: #fff; border-color: var(--green); }
.primary-btn:hover { background: var(--deep-green); }
.chat-card, .coach-card, .review-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 4px #23392a04;
}
.chat-card { overflow: hidden; }
.live-panel {
  display: flex; align-items: center; gap: 13px; padding: 15px 20px;
  border-bottom: 1px solid #d7e6dc; background: #f0f8f2;
}
.voice-orb {
  width: 42px; height: 42px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  gap: 3px; border-radius: 50%; background: #d8ebdf; color: #246b4b;
}
.voice-orb i { width: 3px; height: 8px; background: currentColor; border-radius: 5px; }
.voice-orb i:nth-child(2), .voice-orb i:nth-child(4) { height: 15px; }
.voice-orb i:nth-child(3) { height: 22px; }
.live-panel[data-state="listening"] .voice-orb { color: #fff; background: #286d4c; }
.live-panel[data-state="speaking"] .voice-orb i, .live-panel[data-state="listening"] .voice-orb i { animation: voice-wave 1s ease-in-out infinite alternate; }
.voice-orb i:nth-child(2n) { animation-delay: -.65s !important; }
.voice-orb i:nth-child(3n) { animation-delay: -.3s !important; }
@keyframes voice-wave { from { transform: scaleY(.5); } to { transform: scaleY(1); } }
.live-copy { flex: 1 1 140px; min-width: 0; }
.live-copy strong { color: #24583b; font-size: .98rem; }
.live-copy p { color: #486650; font-size: .86rem; line-height: 1.45; margin-top: 3px; }
.live-copy [data-live-partial] { color: var(--green); overflow-wrap: anywhere; font-style: italic; }
.live-toggle, .live-retry {
  border: 1px solid #1c654a; border-radius: 9px; padding: 8px 12px; color: white;
  background: var(--green); font-size: .87rem; line-height: 1.45; font-weight: 600; white-space: nowrap;
}
.live-toggle[aria-pressed="true"], .live-retry { background: #fff; border-color: #adc9b8; color: var(--green); }
.turn-correction {
  max-width: 90%; margin: 7px 0 0; padding: 9px 12px; border: 1px solid #e8dabe;
  border-radius: 10px; background: #fff9ed; color: #594e38; text-align: left; overflow-wrap: anywhere;
}
.turn-correction strong { display:flex; gap:5px; align-items:center; font-size:.8rem; font-weight:650; color:#795a2d; }
.turn-correction p { display:flex; align-items:baseline; flex-wrap:wrap; gap:7px; margin:4px 0; }
.correct-from { color:#776a55; text-decoration:line-through; font-size:.86rem; }
.correct-to { font-size:.95rem; font-weight:620; color:#2c6341; }
.turn-correction small { font-size:.84rem; line-height:1.5; display:block; }
@media(max-width:680px){ .live-panel { gap:9px; padding:12px; flex-wrap:wrap; } .voice-orb { width:34px; height:34px; } .live-retry { margin-left:auto; } }
@media(prefers-reduced-motion:reduce){ .voice-orb i { animation:none !important; } }
.chat-header { display: flex; gap: 12px; align-items: center; padding: 19px 21px; }
.chat-title { min-width: 0; }
.chat-title h2 { font-size: 1.21rem; letter-spacing: -.033em; line-height: 1.3; font-weight: 710; color: var(--ink); }
.chat-title p { margin-top: 2px; font-size: .83rem; color: var(--muted); }
.icon-btn, .mic-btn, .send-btn, .listen-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0;
  background: transparent; border: 0; color: #5e7366; border-radius: 8px;
}
.icon-btn { width: 35px; height: 35px; border: 1px solid var(--line); background: #fff; }
.icon-btn:hover, .listen-btn:hover, .mic-btn:hover { background: var(--mint); color: var(--green); }
.icon-btn svg, .mic-btn svg, .send-btn svg { width: 18px; height: 18px; }
.chat-header > .icon-btn { margin-left: auto; }
.scene-banner { position: relative; width: 100%; overflow: hidden; background: #d6e6dc; }
.scene-banner > svg, .scene-banner > img { width: 100%; height: auto; display: block; }
.chat-log {
  padding: 20px 21px 19px; min-height: 167px; max-height: clamp(260px, 38vh, 440px);
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c5d5c9 transparent;
}
.message { display: flex; flex-direction: column; align-items: flex-start; }
.message + .message { margin-top: 16px; }
.message.user { align-items: flex-end; }
.message-label { display: inline-flex; align-items: center; gap: 6px; font-size: .79rem; font-weight: 650; color: #496350; margin-bottom: 5px; }
.message-label svg { width: 14px; height: 14px; }
.bubble { max-width: 89%; padding: 12px 15px; border-radius: 2px 14px 14px 14px; background: #f0f4f0; font-size: .98rem; line-height: 1.55; color: #2b4235; overflow-wrap: anywhere; white-space: pre-line; }
.user .bubble { background: #dceee0; border-radius: 14px 2px 14px 14px; }
.listen-btn { min-width: 26px; min-height: 24px; }
.listen-btn svg { width: 14px; height: 14px; }
.message .listen-btn { gap: 5px; padding: 2px 6px; margin: 4px 0 -2px -5px; font-size: .77rem; font-weight: 550; }
.chat-header .icon-btn[aria-pressed=true] { background: var(--mint); border-color: #b8d6c1; color: var(--green); }
.composer { border-top: 1px solid #e4eae5; padding: 15px 20px 18px; }
.suggestion-label, .card-label { display: flex; align-items: center; gap: 7px; font-size: .83rem; font-weight: 650; }
.suggestion-label { color: #5a6d62; margin-bottom: 8px; }
.suggestion-label svg, .card-label svg { width: 16px; height: 16px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; }
.suggestion {
  border: 1px solid #cce0d1; color: #2d674b; background: #f5faf5; padding: 6px 11px;
  font-size: .83rem; border-radius: 18px; text-align: left; line-height: 1.4;
}
.suggestion:hover { background: #e7f4e9; border-color: #8fb59c; }
.input-row { display: flex; align-items: center; gap: 6px; padding: 7px; border: 1px solid #cbd9cf; background: #fff; border-radius: 12px; margin-top: 15px; }
.input-row:focus-within { border-color: #75a48a; box-shadow: 0 0 0 2px #d9eade; }
.input-row textarea {
  width: 100%; min-width: 0; min-height: 36px; max-height: 110px; height: 36px; resize: none; border: 0;
  outline: 0; padding: 7px; color: var(--ink); background: transparent; font-size: .94rem; line-height: 1.4;
}
.input-row textarea::placeholder { color: #718176; }
.mic-btn, .send-btn { width: 35px; height: 35px; }
.mic-btn[aria-pressed=true], .mic-btn.listening { background: #fae3da; color: #a54c32; }
.send-btn { color: #fff; background: var(--green); }
.send-btn:disabled { opacity: .78; }
.send-btn:not(:disabled):hover { background: var(--deep-green); }
#voice-status:not(:empty) { margin-top: 10px; border-radius: 8px; padding: 8px 10px; color: #466450; background: #f0f6f1; font-size: .82rem; line-height: 1.45; }
#voice-status audio { display: block; width: 100%; max-width: 360px; height: 36px; margin-top: 6px; }
#voice-status .text-btn { display: block; }
.coach-card { padding: 17px; }
.coach-card + .coach-card { margin-top: 14px; }
.coach-rail > .coach-card:first-of-type, .coach-card.correction, .coach-card.tip { background: #fff9ee; border-color: #eadfc7; }
.coach-rail > .coach-card:first-of-type .card-label, .coach-card.correction .card-label { color: #81582f; }
.card-label { color: #385941; font-size: .91rem; }
.phrasing-card .card-label { color: #805627; }
.phrase-caption { margin-top: 16px; font-size: .77rem; font-weight: 600; color: #736951; line-height: 1.4; }
.phrase-caption.improved-caption { margin-top: 11px; color: #477049; }
.phrase-original { margin-top: 4px; font-size: .94rem; line-height: 1.45; color: #786d58; overflow-wrap: anywhere; }
.phrase-example { font-size: 1rem; font-weight: 610; line-height: 1.45; letter-spacing: -.01em; color: #365f42; margin-top: 4px; overflow-wrap: anywhere; }
.phrasing-card .coach-explanation { margin-top: 13px; padding-top: 11px; border-top: 1px solid #ebe2cf; color: #6c6959; }
.coach-explanation, .vocab-meaning { font-size: .875rem; line-height: 1.5; color: #617067; }
.coach-explanation { margin-top: 8px; }
.vocab-row { border-top: 1px solid #e5ebe5; padding: 12px 0; }
.card-label + .vocab-row { margin-top: 3px; border: 0; }
.vocab-row:last-child { padding-bottom: 0; }
.vocab-word { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #2d4f3a; font-size: .97rem; font-weight: 650; overflow-wrap: anywhere; }
.word-listen { width: 27px; height: 27px; background: #f4f7f3; border-color: transparent; border-radius: 8px; }
.word-listen svg { width: 14px; height: 14px; }
.vocab-word small, .review-tabs small { padding: 1px 7px; border-radius: 12px; font-weight: 600; color: #506655; background: #e9f0e8; font-size: .75rem; white-space: nowrap; }
.vocab-meaning { display: block; margin-top: 2px; }
.word-example { margin-top: 6px; color: #53735e; font-size: .88rem; font-style: italic; }
.text-btn { display: inline-flex; align-items: center; gap: 5px; background: transparent; color: var(--green); padding: 5px 0; font-size: .87rem; font-weight: 650; border: 0; text-align: left; }
.text-btn:hover { text-decoration: underline; }
.text-btn svg { width: 16px; height: 16px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(275px, 100%), 1fr)); gap: 20px; align-items: start; }
.review-card, .empty-state { padding: 22px; }
.review-card h2, .empty-state h2, dialog h2 { color: var(--ink); font-size: 1.2rem; line-height: 1.4; letter-spacing: -.025em; }
.empty-state { background: #edf3ec; border: 1px solid #d7e4d7; border-radius: 14px; }
.empty-state p { color: var(--muted); margin: 8px 0 15px; }
.history-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.review-list { display: grid; margin: 12px 0 0; padding: 0; list-style: none; gap: 12px; }
.review-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.review-tabs .secondary-btn { border-color: transparent; color: var(--muted); }
.review-tabs .secondary-btn.active { background: #e7f3ea; color: var(--green); border-color: #d6e7da; }
.review-list { gap: 0; }
.review-list > :first-child { border-top: 0; }
.review-list .vocab-row { padding: 14px 2px; }
.review-list .phrase-original + .phrase-example, dialog .phrase-original + .phrase-example { border-left: 2px solid #91bba0; padding-left: 9px; }
.review-list .empty-state { padding: 38px 18px; margin-top: 8px; text-align: center; border: none; background: #f4f8f3; }
.empty-state > svg { margin: 0 auto 11px; color: #5c8668; }
.empty-state h3 { margin: 0; font-size: 1.1rem; letter-spacing: -.02em; }
.empty-state .primary-btn { margin-top: 4px; }
button.history-row { width: 100%; padding: 14px 6px; text-align: left; background: #fff; border: none; border-bottom: 1px solid var(--line); }
button.history-row:last-child { border-bottom: 0; }
.history-row:hover { background: #f5faf5; }
.history-row strong, .history-row small { display: block; }
.history-row small { margin-top: 3px; color: var(--muted); font-size: .83rem; }
.history-row > svg { margin-left: auto; color: #66806c; }
dialog {
  padding: 25px; width: min(530px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  color: var(--body); background: #fff; border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 20px 85px #17352a26;
}
dialog::backdrop { background: #1b302a66; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog-stats { display: flex; gap: 8px; margin: 15px 0; }
.stat { flex: 1 1 0; padding: 11px; background: #eef5ee; border: 1px solid #dfebdf; border-radius: 10px; }
.stat strong { display: block; font-size: 1.35rem; color: var(--green); }
.stat small, .stat span { font-size: .8rem; color: #5b7061; }
.dialog-head p { margin-top: 1px; color: var(--muted); font-size: .9rem; }
dialog > h3 { margin: 20px 0 4px; color: var(--ink); font-size: 1rem; }
dialog > h3 + .vocab-row { border-top: 0; }
.transcript { margin-top: 18px; background: #f5f8f4; padding: 12px 14px; border-radius: 10px; font-size: .89rem; }
.transcript summary { cursor: pointer; color: #43624c; font-weight: 630; }
.transcript p { border-top: 1px solid #dfe9df; margin-top: 10px; padding-top: 9px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 8; left: 50%; bottom: 20px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); background: #243e30; color: #fff; border-radius: 11px; padding: 11px 16px; font-size: .9rem; box-shadow: 0 5px 15px #0002; }
@media (min-width: 1550px) {
  .page-heading { margin-top: 42px; margin-bottom: 31px; }
}
@media (max-width: 1150px) {
  .topbar-inner, .shell { width: calc(100% - 40px); }
  .studio-grid { gap: 15px; grid-template-columns: minmax(154px, .74fr) minmax(0, 2.1fr) minmax(195px, .85fr); }
  .scenario-button { padding: 10px; gap: 8px; }
  .scenario-icon { width: 35px; height: 35px; }
  .session-card, .coach-card { padding: 14px; }
  .chat-header, .chat-log, .composer { padding-inline: 16px; }
}
@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 175px minmax(0, 1fr); gap: 18px; }
  .coach-rail { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .coach-rail .rail-title { grid-column: 1 / -1; margin: 2px 0; }
  .coach-card + .coach-card { margin-top: 0; }
}
@media (max-width: 680px) {
  .topbar-inner, .shell { width: calc(100% - 28px); }
  .topbar-inner { min-height: 62px; gap: 12px; }
  .brand { gap: 6px; font-size: 1.3rem; }
  .brand-mark svg { width: 30px; height: 30px; }
  .topnav { margin-left: auto; gap: 2px; }
  .nav-btn { font-size: .84rem; padding: 8px 10px; gap: 5px; }
  .nav-btn svg { width: 15px; height: 15px; }
  .profile-avatar { margin-left: 0; width: 30px; height: 30px; font-size: .8rem; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; gap: 13px; margin: 23px 0 18px; }
  .page-heading h1 { font-size: 2rem; }
  .page-heading p { font-size: .93rem; margin-top: 4px; }
  .level-control { height: 37px; }
  .studio-grid { display: flex; flex-direction: column; gap: 15px; }
  .scenario-rail, .chat-card, .coach-rail { width: 100%; }
  .scenario-rail { display: contents; }
  .scenario-rail .rail-title { display: none; }
  .scenario-list { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .scenario-button { flex-direction: column; justify-content: center; gap: 5px; min-height: 62px; padding: 6px 2px; border-radius: 11px; }
  .scenario-copy strong { font-size: .77rem; text-align: center; }
  .scenario-copy small, .scenario-dot { display: none; }
  .scenario-icon { width: 27px; height: 27px; border-radius: 8px; }
  .scenario-icon svg { width: 16px; height: 16px; }
  .session-card { width: 100%; order: 4; margin-top: 0; }
  .coach-rail { order: 3; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
  .chat-card { order: 2; }
  .chat-header { padding-block: 13px; }
  .chat-log { padding-block: 15px; min-height: 130px; }
  .bubble { max-width: 95%; }
  .composer { padding: 12px; }
  .input-row textarea { font-size: 1rem; }
  .review-grid { gap: 12px; }
}
@media (max-width: 360px) {
  .nav-btn svg, .profile-avatar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}

.tone-peach { --tint: #f9e7d8; --accent: #945b35; }
.tone-sage { --tint: #dceee1; --accent: #326947; }
.tone-rose { --tint: #f8e3e4; --accent: #944b5a; }
.tone-blue { --tint: #e0edf7; --accent: #396984; }
.tone-aqua { --tint: #dcf0ec; --accent: #376d67; }
.tone-wheat { --tint: #f3ead3; --accent: #7c6632; }
.tone-lilac { --tint: #ece5f5; --accent: #715485; }
.category-symbol, .scenario-icon[class*="tone-"] { color: var(--accent); background: var(--tint); }
.browse-scenes { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; width: 100%; background: var(--green); color: #fff; border: 0; border-radius: 10px; font-size: .9rem; font-weight: 600; margin-top: 12px; }
.browse-scenes:hover { background: var(--deep-green); }
.task-banner { background: var(--tint); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 25px; min-height: 115px; overflow: hidden; }
.task-banner strong { font-size: .82rem; color: var(--accent); font-weight: 650; }
.task-banner p { margin: 5px 0 0; font-size: 1.05rem; line-height: 1.65; color: var(--ink); }
.task-motif { color: var(--accent); background: #ffffff59; border-radius: 50%; width: 84px; height: 84px; display: grid; place-items: center; flex-shrink: 0; }
.task-motif svg { width: 44px; height: 44px; stroke-width: 1.25; }
.library-page { padding-top: 29px; }
.library-hero { display: grid; grid-template-columns: 1fr minmax(300px, 44%); align-items: center; background: #e7f2e9; border: 1px solid #d4e5d7; border-radius: 17px; overflow: hidden; }
.library-hero > div:first-child { padding: 24px 29px; }
.library-hero h1 { color: #193f2c; font-size: clamp(1.6rem,2.7vw,2.5rem); line-height: 1.28; }
.library-hero p { margin-top: 7px; color: #486752; }
.library-art { align-self: stretch; display: flex; align-items: flex-end; background: #d8e8dc; }
.library-art svg { width: 100%; height: 100%; min-height: 130px; }
.library-tools { margin: 24px 0 16px; }
.scene-search { display: flex; align-items: center; gap: 10px; background: white; color: #598068; border: 1px solid var(--line); border-radius: 12px; padding: 0 15px; max-width: 580px; }
.scene-search:focus-within { border-color: #74a58a; box-shadow: 0 0 0 2px #d6e9dd; }
.scene-search input { min-width: 0; width: 100%; height: 45px; border: 0; background: transparent; outline: 0; color: var(--ink); font-size: 1rem; }
.category-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.filter-chip { color: #476152; border: 1px solid var(--line); background: #fff; padding: 7px 12px; border-radius: 18px; font-size: .88rem; }
.filter-chip:hover { border-color: #8db59d; }
.filter-chip[aria-pressed=true] { background: var(--green); color: white; border-color: var(--green); }
.library-count { margin-block: 15px; color: var(--muted); font-size: .88rem; }
.category-group { margin-bottom: 25px; }
.category-group h2 { display: flex; align-items: center; gap: 10px; font-size: 1.18rem; color: var(--ink); margin-bottom: 12px; }
.category-group h2 small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.category-symbol { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.library-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(224px,100%),1fr)); gap: 11px; }
.library-item { display: flex; flex-direction: column; background: #fff; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 13px; padding: 15px 16px; overflow-wrap: anywhere; }
.library-item:hover, .library-item:focus-visible { border-color: #7dab92; background: #f2f8f3; }
.library-item-title { color: #264d39; font-weight: 650; font-size: 1.03rem; }
.english-name { color: #4f6f5c; font-size: .88rem; margin-top: 2px; }
.scene-goal { font-size: .88rem; color: #58675e; line-height: 1.6; margin-top: 8px; }
.resume-tag { margin-top: 9px; color: var(--green); font-size: .8rem; font-weight: 600; }
@media(max-width:680px){
 .browse-scenes { margin-top: -5px; }
 .library-page { padding-top: 17px; }
 .library-hero { grid-template-columns: 1fr; }
 .library-hero > div:first-child { padding: 19px; }
 .library-art { max-height: 80px; overflow: hidden; }
 .library-art svg { height: 80px; min-height: 0; }
 .library-tools { margin-top: 15px; }
 .category-filters { gap: 6px; }
 .filter-chip { font-size: .85rem; padding: 6px 10px; }
 .task-banner { padding: 16px; min-height: 90px; }
 .task-motif { width: 55px; height: 55px; }
 .task-motif svg { width: 32px; height: 32px; }
 .topbar-inner { gap: 8px; }
 .nav-btn { padding: 7px; }
 .topbar-inner .profile-avatar { display: none; }
 .library-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
 .library-item { padding: 12px; }
 .library-item-title { font-size: 1rem; }
}
@media(max-width:420px){
 .topnav .nav-btn svg { display:none; }
 .topbar-inner .brand { font-size:1.1rem; }
}
