/* 영어 대화 (142568). Tokens follow her 툴즈 design system 1.0.0 (Pretendard, #191f28 / #6b7684, accent #2748c8). */
:root {
  --font: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --text: #191f28; --muted: #6b7684; --faint: #8b95a1; --icon: #b0b8c1;
  --accent: #2748c8; --accent-hover: #1f3ba6; --accent-weak: #eaf0ff; --focus: #3182f6;
  --bg: #f5f7fb; --panel: #ffffff; --surface: #f2f4f6; --subtle: #f9fafb;
  --border: #e5e8eb; --border-strong: #d1d6db;
  --ok: #14804a; --ok-weak: #e6f7ee; --warn: #9a5b0b; --warn-weak: #fdf3e3; --bad: #d92d3a; --bad-weak: #ffebee;
  --r-sm: 6px; --r: 8px; --r-control: 10px; --r-card: 12px;
  --sh: 0 1px 2px rgba(0,0,0,.067); --sh-pop: 0 4px 12px rgba(0,0,0,.08);
  --side: 232px; --rail: 320px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.45;
  letter-spacing: -0.02em; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-control);
  border: 1px solid var(--border-strong); background: var(--panel); font-weight: 600; font-size: 14px; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:hover { background: var(--subtle); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--text); border-color: var(--text); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r); }
.btn.icon { width: 32px; height: 32px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); border-radius: var(--r); }
.btn.icon:hover { background: var(--surface); color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.on { background: var(--accent-weak); border-color: #c9d6fb; color: var(--accent); }

/* login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login form { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px 28px; box-shadow: var(--sh); }
.login h1 { font-size: 22px; margin-bottom: 6px; }
.login p { margin: 0 0 22px; color: var(--muted); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input { width: 100%; height: 42px; border: 1px solid var(--border-strong); border-radius: var(--r-control); padding: 0 12px; background: var(--panel); font-size: 15px; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px #e8f3ff; }
.login .btn { width: 100%; height: 44px; margin-top: 6px; font-size: 15px; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* shell */
.shell { display: grid; grid-template-columns: var(--side) 1fr; height: 100vh; height: 100dvh; }
.side { background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.brand { padding: 22px 20px 16px; }
.brand b { font-size: 17px; font-weight: 700; display: block; }
.brand span { font-size: 13px; color: var(--muted); }
.nav { padding: 0 10px; display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r); color: var(--text); text-decoration: none;
  font-size: 15px; font-weight: 600; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface); }
.nav a.cur { background: var(--accent-weak); color: var(--accent); }
.nav a .n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); }
.nav a.cur .n { color: var(--accent); }
.side h3 { font-size: 13px; color: var(--muted); padding: 22px 22px 8px; display: flex; align-items: center; justify-content: space-between; }
.threads { overflow-y: auto; padding: 0 10px 16px; flex: 1; min-height: 0; }
.threads a { display: block; padding: 9px 12px; border-radius: var(--r); text-decoration: none; color: var(--text); }
.threads a:hover { background: var(--surface); }
.threads a.cur { background: var(--surface); }
.threads a b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threads a span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot { border-top: 1px solid var(--border); padding: 12px 14px; display: flex; gap: 6px; align-items: center; }
.side-foot .who { font-size: 13px; color: var(--muted); margin-right: auto; padding-left: 6px; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { flex: 1; min-height: 0; overflow-y: auto; }
.page-in { max-width: 1040px; margin: 0 auto; padding: 32px 40px 64px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: 24px; line-height: 1.35; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .act { margin-left: auto; display: flex; gap: 8px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); }

/* chat layout */
.chat { display: grid; grid-template-columns: 1fr var(--rail); height: 100%; min-height: 0; }
.chat-col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { height: 60px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 28px; border-bottom: 1px solid var(--border); background: var(--panel); }
.chat-head h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head .sub { color: var(--muted); font-size: 13px; white-space: nowrap; }
.chat-head .act { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.log { flex: 1; overflow-y: auto; padding: 28px 28px 12px; }
.log-in { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.msg { max-width: 82%; border-radius: var(--r-card); padding: 14px 16px 10px; animation: msgIn .2s var(--ease); }
@keyframes msgIn { from { opacity: 0; } to { opacity: 1; } }
.msg.ai { align-self: flex-start; background: var(--panel); border: 1px solid var(--border); }
.msg.me { align-self: flex-end; background: var(--accent-weak); }
.msg .src { font-size: 14px; color: var(--muted); margin-bottom: 4px; white-space: pre-wrap; }
.msg .en { font-size: 17px; line-height: 1.5; font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.msg .ko { font-size: 14px; color: var(--muted); margin-top: 6px; white-space: pre-wrap; }
.msg.pending { opacity: .7; }
.msg .tools { display: flex; gap: 2px; margin: 6px -8px 0; }
.msg .tools .btn { height: 28px; font-size: 12px; padding: 0 8px; color: var(--muted); font-weight: 500; }
.hideko .msg.ai .ko { filter: blur(5px); cursor: pointer; transition: filter .2s; }
.hideko .msg.ai .ko.show { filter: none; }
.w { cursor: pointer; border-radius: 3px; transition: background .12s; }
.w:hover { background: rgba(39,72,200,.1); }
.w.saved { text-decoration: underline; text-decoration-color: #9fb3f0; text-underline-offset: 3px; }
.fix { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(39,72,200,.15); }
del.x { color: var(--bad); background: var(--bad-weak); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
ins.x { color: var(--ok); background: var(--ok-weak); text-decoration: none; border-radius: 3px; padding: 0 2px; font-weight: 600; }
.fix .why { font-size: 13px; color: var(--text); margin-top: 6px; display: flex; gap: 8px; }
.fix .why b { font-weight: 600; color: var(--ok); white-space: nowrap; }
.goodline { font-size: 13px; color: var(--ok); margin-top: 6px; font-weight: 600; }
.typing { align-self: flex-start; color: var(--muted); font-size: 13px; padding: 4px 2px; }

.coach { align-self: stretch; background: var(--warn-weak); border-radius: var(--r-card); padding: 14px 16px; }
.coach .t { font-size: 13px; font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.coach .say { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.coach .say .btn { height: 30px; font-size: 14px; font-weight: 500; background: var(--panel); border-color: #ecd9b8; }
.result { align-self: stretch; background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-card); padding: 18px 20px; }
.result h3 { font-size: 18px; margin-bottom: 4px; }
.result .score { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.result ul { margin: 8px 0 0; padding-left: 18px; }
.result .note { font-size: 12px; color: var(--faint); margin-top: 12px; }

/* composer */
.compose-wrap { flex: none; padding: 0 28px 22px; }
.compose-in { max-width: 760px; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips .btn { height: 32px; font-weight: 500; font-size: 14px; }
.composer { background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-card); box-shadow: var(--sh); transition: border-color .15s; }
.composer:focus-within { border-color: var(--focus); }
.composer .row { display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px 10px 16px; }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; font-size: 16px; line-height: 1.5; min-height: 24px; max-height: 180px; padding: 6px 0; background: transparent; }
.composer .send { height: 38px; padding: 0 16px; }
.live { border-top: 1px solid var(--border); padding: 12px 16px 14px; display: flex; gap: 10px; align-items: flex-start; min-height: 58px; }
.live .say { flex: none; margin-top: -2px; }
.live .txt { font-size: 19px; line-height: 1.45; font-weight: 600; color: var(--text); transition: opacity .2s; word-break: break-word; }
.live .txt.ko { font-size: 16px; font-weight: 500; color: #333d4b; }
.live .txt.empty { font-size: 15px; font-weight: 400; color: var(--faint); }
.live .txt.stale { opacity: .45; }
.hint { font-size: 12px; color: var(--faint); margin-top: 8px; text-align: right; }

/* right rail */
.rail { border-left: 1px solid var(--border); background: var(--panel); overflow-y: auto; padding: 8px 0 24px; }
.rail section { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.rail section:last-child { border-bottom: 0; }
.rail h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; display: flex; align-items: center; }
.rail h4 .n { margin-left: 6px; color: var(--muted); font-weight: 500; }
.rail h4 a { margin-left: auto; font-size: 13px; font-weight: 500; text-decoration: none; }
.alt { display: flex; align-items: flex-start; gap: 6px; padding: 6px 0; font-size: 15px; }
.alt .btn.icon { width: 26px; height: 26px; margin-top: -2px; }
.alt + .alt { border-top: 1px solid var(--surface); }
.mini { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; font-size: 14px; }
.mini b { font-weight: 600; }
.mini span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.steps li { counter-increment: st; display: flex; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--muted); }
.steps li::before { content: counter(st); width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1px solid var(--border-strong); font-size: 12px; display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.steps li.done { color: var(--text); }
.steps li.done::before { background: var(--surface); border-color: var(--surface); }
.steps li.now { color: var(--text); font-weight: 600; }
.steps li.now::before { border-color: var(--accent); color: var(--accent); }
.empty-note { color: var(--faint); font-size: 13px; }

/* popover */
.pop { position: fixed; z-index: 40; width: 320px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh-pop);
  padding: 16px 18px; animation: popIn .16s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pop .hw { display: flex; align-items: center; gap: 8px; }
.pop .hw b { font-size: 21px; font-weight: 700; }
.pop .ipa { color: var(--muted); font-size: 14px; }
.pop .pos { font-size: 12px; color: var(--muted); margin-top: 8px; }
.pop .mean { font-size: 16px; font-weight: 600; margin-top: 2px; }
.pop .other { font-size: 13px; color: var(--muted); margin-top: 2px; }
.pop .ex { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--surface); font-size: 14px; }
.pop .ex .k { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pop .foot { margin-top: 12px; font-size: 12px; color: var(--ok); font-weight: 600; }

/* lists */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { background: none; border: 0; padding: 10px 0 12px; font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tabs button.cur { color: var(--text); border-bottom-color: var(--text); }
.rows .r { display: grid; grid-template-columns: minmax(150px, 220px) 1fr auto; gap: 16px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.rows .r:last-child { border-bottom: 0; }
.rows .r .h { font-size: 16px; font-weight: 600; }
.rows .r .h small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.rows .r .d { font-size: 14px; min-width: 0; }
.rows .r .d small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .r .a { display: flex; gap: 2px; align-items: center; }
.rows .r .a .stat { font-size: 12px; color: var(--muted); margin-right: 8px; white-space: nowrap; }
.more { display: block; width: 100%; border: 0; border-top: 1px solid var(--border); background: none; height: 44px; color: var(--muted); font-weight: 600; border-radius: 0 0 var(--r-card) var(--r-card); }
.more:hover { background: var(--subtle); }
.search { max-width: 280px; height: 36px; }
.summary { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; color: var(--muted); }
.summary b { color: var(--text); }

/* quiz and cards */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-control); overflow: hidden; }
.seg button { border: 0; background: var(--panel); height: 36px; padding: 0 14px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--border); }
.seg button:first-child { border-left: 0; }
.seg button.cur { background: var(--text); color: #fff; }
.card { max-width: 560px; margin: 24px auto 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px; box-shadow: var(--sh); }
.card .q { font-size: 26px; font-weight: 700; text-align: center; margin: 8px 0 4px; }
.card .qs { text-align: center; color: var(--muted); margin-bottom: 22px; min-height: 20px; }
.opts { display: grid; gap: 8px; }
.opts .btn { height: auto; min-height: 48px; justify-content: flex-start; text-align: left; padding: 10px 16px; font-weight: 500; font-size: 15px; white-space: normal; }
.opts .btn.right { background: var(--ok-weak); border-color: #a7dcbf; color: var(--ok); font-weight: 600; }
.opts .btn.wrong { background: var(--bad-weak); border-color: #f3b9be; color: var(--bad); }
.card .foot { display: flex; align-items: center; margin-top: 20px; gap: 8px; }
.card .foot .muted { margin-right: auto; }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.grades .btn { height: 44px; }
.reveal { text-align: center; font-size: 20px; font-weight: 600; margin: 18px 0 4px; }

/* situations */
.level { margin-bottom: 28px; }
.level h2 { font-size: 17px; margin-bottom: 2px; }
.level > p { margin: 0 0 12px; color: var(--muted); }
.sc { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.sc:last-child { border-bottom: 0; }
.sc b { font-size: 16px; font-weight: 600; }
.sc .beats { color: var(--muted); font-size: 13px; margin-top: 3px; }
.sc .go { display: flex; gap: 6px; }

/* video */
.vid-add { display: flex; gap: 8px; margin-bottom: 24px; }
.vid-add .input { max-width: 520px; }
.vid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.player { position: sticky; top: 0; }
.player .frame { aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-card); overflow: hidden; }
.player .frame iframe, .player .frame > div { width: 100%; height: 100%; border: 0; }
.player .ctl { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.player h2 { font-size: 18px; margin-top: 14px; }
.lines { max-height: calc(100vh - 190px); overflow-y: auto; }
.line { padding: 12px 16px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 44px 1fr; gap: 10px; }
.line:last-child { border-bottom: 0; }
.line.cur { background: var(--subtle); }
.line .tm { font-size: 12px; color: var(--muted); padding-top: 3px; font-variant-numeric: tabular-nums; background: none; border: 0; text-align: left; padding-left: 0; }
.line .tm:hover { color: var(--accent); }
.line .e { font-size: 15px; font-weight: 500; }
.line .k { font-size: 13px; color: var(--muted); margin-top: 2px; }
.line .tag { font-size: 11px; font-weight: 700; color: var(--accent); margin-right: 6px; }
.line .acts { display: flex; gap: 2px; margin: 4px -6px 0; }
.line .acts .btn { height: 26px; font-size: 12px; padding: 0 6px; font-weight: 500; color: var(--muted); }
.rp { margin-top: 4px; }
.rp .turn { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.rp .turn:last-child { border-bottom: 0; }
.rp .who { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.rp .gr { margin-top: 10px; font-size: 14px; }
.rp .gr .sc2 { font-size: 15px; font-weight: 700; }
.rp textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-control); padding: 10px 12px; font-size: 16px; resize: vertical; min-height: 52px; }
.rp textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px #e8f3ff; }
.rp .live2 { font-size: 15px; font-weight: 600; margin-top: 6px; min-height: 22px; }

/* settings */
.set-grid { display: grid; gap: 16px; max-width: 720px; }
.set { padding: 18px 20px; }
.set h3 { font-size: 16px; margin-bottom: 4px; }
.set > p { margin: 0 0 14px; color: var(--muted); }
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.voice { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--r-control); padding: 8px 8px 8px 12px; cursor: pointer; }
.voice.cur { border-color: var(--accent); background: var(--accent-weak); }
.voice span { flex: 1; font-size: 14px; }
.voice span small { display: block; color: var(--muted); font-size: 12px; }
.toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--surface); }
.toggle:first-of-type { border-top: 0; }
.sw { width: 40px; height: 24px; border-radius: 12px; background: var(--border-strong); position: relative; border: 0; transition: background .15s; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: var(--sh); }
.sw.on { background: var(--accent); }
.sw.on::after { left: 19px; }
table.usage { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.usage th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
table.usage td { padding: 8px; border-bottom: 1px solid var(--surface); }
table.usage td.n, table.usage th.n { text-align: right; }

#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--r-control);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
.modal-bg { position: fixed; inset: 0; background: rgba(25,31,40,.35); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 380px; background: var(--panel); border-radius: var(--r-card); padding: 22px; box-shadow: var(--sh-pop); }
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal p { margin: 0 0 16px; color: var(--muted); }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.scrim { display: none; }

@media (max-width: 1180px) {
  :root { --rail: 280px; }
  .vid { grid-template-columns: 1fr; }
  .player { position: static; }
  .lines { max-height: none; }
}
@media (max-width: 980px) {
  .chat { grid-template-columns: 1fr; }
  .rail { display: none; }
  .chat.rail-open .rail { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 90vw); z-index: 45; box-shadow: var(--sh-pop); }
  .chat.rail-open .scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(25,31,40,.3); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(280px, 86vw); z-index: 46; transform: translateX(-100%); transition: transform .22s var(--ease); }
  .shell.nav-open .side { transform: none; box-shadow: var(--sh-pop); }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(25,31,40,.3); }
  .topbar { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 8px; background: var(--panel); border-bottom: 1px solid var(--border); flex: none; }
  .topbar b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .act { margin-left: auto; display: flex; }
  .chat-head { display: none; }
  .log { padding: 16px 12px 8px; }
  .msg { max-width: 92%; }
  .msg .en { font-size: 16px; }
  .compose-wrap { padding: 0 10px calc(10px + env(safe-area-inset-bottom)); }
  .live .txt { font-size: 17px; }
  .hint { display: none; }
  .page-in { padding: 20px 16px 48px; }
  .page-head { flex-wrap: wrap; }
  .page-head .act { margin-left: 0; }
  .rows .r { grid-template-columns: 1fr auto; }
  .rows .r .d { grid-column: 1 / -1; grid-row: 2; }
  .sc { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .grades { grid-template-columns: repeat(2, 1fr); }
  .vid-add { flex-wrap: wrap; }
  .pop { left: 8px !important; right: 8px; width: auto; }
  .btn, .nav a { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
