/* Vocab: the parts every room shares (loaded after the room's own styles). */
/* type: one pair across the app */
:root { --font:"Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; --serif:"Fraunces", Georgia, "Times New Roman", serif; }

/* the room's name is the way home */
a.brand { color:inherit; text-decoration:none; border-radius:12px; margin-left:-6px; padding:4px 6px; -webkit-tap-highlight-color:transparent; }
a.brand:hover { background:var(--surface, rgba(0,0,0,.05)); }
a.brand:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.vk-back { width:18px; height:18px; flex:none; margin-right:-2px; color:var(--muted); stroke:currentColor; fill:none; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }

/* no streaks, no XP: practice is its own reward */
.streak-pill { display:none !important; }

/* interface language */
.vk-lang { font:800 11px/1 var(--font); letter-spacing:.02em; }
.vk-lang svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.vk-dim { position:fixed; inset:0; z-index:200; background:rgba(15,12,10,.42); display:flex; align-items:flex-end; justify-content:center; animation:vkIn .18s ease-out; }
.vk-sheet { width:100%; max-width:420px; background:var(--card, #fff); color:var(--text, #1C1917); border:1px solid var(--border, #E6DCC6); border-bottom:0;
  border-radius:22px 22px 0 0; padding:14px 14px calc(14px + env(safe-area-inset-bottom, 0px)); box-shadow:0 -10px 40px rgba(0,0,0,.18); font-family:var(--font); animation:vkUp .22s cubic-bezier(.2,.9,.3,1); }
@media (min-width:640px) { .vk-dim { align-items:center; } .vk-sheet { border-radius:22px; border-bottom:1px solid var(--border, #E6DCC6); padding-bottom:14px; } }
.vk-sheet h2 { margin:2px 6px 10px; font:700 17px/1.2 var(--serif); }
.vk-sheet button { display:flex; width:100%; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:0 14px; margin:0 0 6px; border:1px solid var(--border, #E6DCC6);
  border-radius:14px; background:transparent; color:inherit; font:600 16px/1 var(--font); cursor:pointer; }
.vk-sheet button small { font-weight:700; font-size:11px; color:var(--muted, #6B6155); letter-spacing:.04em; }
.vk-sheet button[aria-checked="true"] { border-color:var(--accent); background:var(--accent-soft, rgba(196,17,26,.08)); }
.vk-sheet button[aria-checked="true"] small { color:var(--accent); }
.vk-sheet button:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.vk-sheet .vk-x { justify-content:center; border:0; color:var(--muted, #6B6155); margin:4px 0 0; }
@keyframes vkIn { from { opacity:0; } }
@keyframes vkUp { from { transform:translateY(24px); opacity:0; } }
@media (prefers-reduced-motion: reduce) { .vk-dim, .vk-sheet { animation:none; } }

/* bring your own words */
.vk-imp { max-width:520px; }
.vk-imp .vk-how { margin:0 6px 10px; font-size:14px; color:var(--muted, #6B6155); }
.vk-imp textarea { width:100%; min-height:132px; resize:vertical; padding:12px; border-radius:14px; border:1px solid var(--border, #E6DCC6); background:var(--surface, #F3ECDD); color:inherit; font:500 15px/1.45 var(--mono, ui-monospace, Menlo, monospace); }
.vk-imp textarea:focus { outline:2px solid var(--accent); outline-offset:1px; }
.vk-imp .vk-row { display:flex; align-items:center; gap:10px; margin-top:10px; }
.vk-imp .vk-file span { display:inline-flex; align-items:center; min-height:40px; padding:0 14px; border-radius:12px; border:1px solid var(--border, #E6DCC6); font-weight:600; font-size:14px; cursor:pointer; white-space:nowrap; }
.vk-imp .vk-file:focus-within span { outline:2px solid var(--accent); outline-offset:1px; }
.vk-imp .vk-found { font-size:13px; color:var(--muted, #6B6155); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vk-imp .vk-local { margin:10px 6px 0; font-size:12px; color:var(--muted, #6B6155); }
.vk-imp .vk-btns { justify-content:flex-end; }
.vk-imp .vk-btns button { width:auto; margin:0; min-height:44px; padding:0 18px; }
.vk-imp .vk-go { background:var(--accent); border-color:var(--accent); color:var(--accent-ink, #fff); }
.vk-imp .vk-go:disabled { opacity:.45; cursor:default; }
.vk-note { position:fixed; left:50%; bottom:calc(var(--tab-h, 60px) + env(safe-area-inset-bottom, 0px) + 16px); z-index:210; transform:translate(-50%, 8px); opacity:0; pointer-events:none;
  max-width:calc(100% - 32px); padding:10px 16px; border-radius:999px; background:var(--text, #1C1917); color:var(--bg, #fff); font:600 14px/1.3 var(--font); transition:opacity .2s, transform .2s; }
.vk-note.on { opacity:1; transform:translate(-50%, 0); }
.vk-imp-btn { display:inline-flex; align-items:center; gap:6px; }

/* one screen on a phone: the card gives way first */
.scene { height:clamp(190px, calc(100vh - 420px), 440px); height:clamp(190px, calc(100dvh - 420px), 440px); }

/* a phone on its side: the tabs become a rail on the left, the header one line */
@media (orientation:landscape) and (max-height:500px) {
  :root { --rail:68px; }
  body { padding-left:calc(var(--rail) + env(safe-area-inset-left, 0px)) !important; padding-bottom:12px !important; }
  .tabbar, nav.tabs { top:0; bottom:0; left:0; right:auto; width:calc(var(--rail) + env(safe-area-inset-left, 0px)); padding:0 0 0 env(safe-area-inset-left, 0px); border-top:0; border-right:1px solid var(--border); }
  .tabbar-in, .tabbar-in.three, nav.tabs .tabbar-in { height:100%; max-width:none; grid-template-columns:1fr; grid-auto-rows:minmax(0, 72px); align-content:center; }
  .tab, nav.tabs button { padding:4px 0; }
  .tab span, nav.tabs button span { display:block !important; font-size:10px; }
  .tab.on::before, nav.tabs button[aria-current=page]::before { top:50%; left:0; width:4px; height:28px; transform:translateY(-50%); border-radius:0 4px 4px 0; }
  .flagbar { display:none; }
  .top { display:flex; align-items:center; gap:4px; padding-top:env(safe-area-inset-top, 0px) !important; }
  .top::before { display:none; }
  .top-row { flex:0 0 auto; order:2; height:48px; max-width:none; margin:0; padding:0 8px 0 0; }
  .top-row .brand { flex:0 1 auto; order:-1; }
  .top > .top-row { display:contents; }
  .top a.brand { order:1; margin-left:6px; flex:none; }
  .top-row > button { order:3; }
  .subnav { order:2; flex:1 1 auto; max-width:none; margin:0; padding:0 6px; align-items:center; }
  .toast, .vk-note { bottom:14px !important; left:calc(50% + var(--rail) / 2) !important; }
  .scene { height:calc(100vh - 272px) !important; height:calc(100dvh - 272px) !important; min-height:120px; }
  .term { font-size:clamp(24px, 9vh, 34px) !important; }
  .vk-sheet { max-height:calc(100dvh - 16px); overflow:auto; }
}

/* sync */
.vk-cloud svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.vk-cloud.on { color:var(--accent); }
.vk-cloud.busy svg { animation:vkPulse 1s ease-in-out infinite alternate; }
.vk-cloud.err { color:var(--warn, #A16207); }
@keyframes vkPulse { to { opacity:.35; } }
.vk-sync .vk-how { margin:0 6px 8px; font-size:14px; color:var(--muted, #6B6155); }
.vk-sync .vk-st { margin:0 6px 10px; font-size:13px; font-weight:600; min-height:1em; }
.vk-sync .vk-tog.vk-go { background:var(--accent); border-color:var(--accent); color:var(--accent-ink, #fff); justify-content:center; }
.vk-sync .vk-tog { justify-content:center; }
.vk-sync details { margin:4px 0 8px; padding:10px 12px; border:1px solid var(--border, #E6DCC6); border-radius:14px; }
.vk-sync summary { cursor:pointer; font-weight:600; }
.vk-sync .vk-how2 { font-size:13px; color:var(--muted, #6B6155); margin:8px 0; }
.vk-sync .vk-row { display:flex; gap:8px; }
.vk-sync .vk-link { flex:1; min-width:0; padding:10px; border-radius:10px; border:1px solid var(--border, #E6DCC6); background:var(--surface, #F3ECDD); color:inherit; font:500 13px var(--mono, ui-monospace, monospace); }
.vk-sync .vk-copy { width:auto !important; margin:0 !important; padding:0 14px !important; }
.vk-sync .vk-forget { justify-content:center; border:0 !important; color:var(--bad, #BE123C); font-size:14px !important; }
@media (prefers-reduced-motion: reduce) { .vk-cloud.busy svg { animation:none; } }

/* say it yourself */
.vk-mic .vk-word { margin:0 6px 4px; font:700 28px/1.2 var(--serif); }
.vk-mic .vk-how { margin:0 6px 12px; font-size:13px; color:var(--muted, #6B6155); }
.vk-mic .vk-microw { display:grid; grid-template-columns:1fr 1.2fr 1fr; gap:8px; }
.vk-mic .vk-microw button { margin:0; justify-content:center; padding:0 8px; }
.vk-mic .vk-go { background:var(--accent); border-color:var(--accent); color:var(--accent-ink, #fff); }
.vk-mic .vk-you:disabled { opacity:.4; }
.vk-mic .vk-st { min-height:1.3em; margin:10px 6px 0; font-size:13px; color:var(--muted, #6B6155); }
.vk-micbtn svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* a narrow phone: the header keeps the room's name and its buttons */
@media (max-width:400px) {
  .top-row { gap:2px !important; }
  .top-row .logo, .top-row .flag { display:none !important; }
  .top-row .icon-btn { width:34px !important; height:36px !important; }
  .top-row .lvl-pill { padding:0 7px !important; }
  .top-row .brand-title { font-size:17px !important; }
}
.vk-sync .vk-fp { margin:8px 0 0; font:500 10px/1.3 var(--mono, ui-monospace, monospace); color:var(--muted, #6B6155); word-break:break-all; user-select:all; }
