/* Layout: full-screen 3D canvas; glass HUD pinned to the corners; panels slide in from the right (wide modal for floors); RPG dialog at the bottom. */
:root {
  --bg: #F3F1FA; --surface: #FFFFFF; --surface-2: #F4F1FC; --fg: #221D3B; --muted: #625C80; --line: #DCD6EE;
  --accent: #23876C; --accent-soft: #D7F0E7; --accent-ink: #FFFFFF; --lilac: #B9A7F0; --rose: #F4B6CF; --gold: #E3B341;
  --good: #23876C; --bad: #C2475E; --glass: rgba(255, 255, 255, .82); --glass-line: rgba(255, 255, 255, .7);
  --shadow: 0 2px 6px rgba(30, 20, 80, .08), 0 14px 40px rgba(30, 20, 80, .16);
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif; --f-body: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #110F1E; --surface: #1C1930; --surface-2: #242040; --fg: #EEEAFB; --muted: #ABA5C8; --line: #3A3557; --accent: #5CCBA9; --accent-soft: #173A31; --accent-ink: #0B1C17; --lilac: #9C88E8; --rose: #E79BBB; --gold: #E9C35E; --good: #5CCBA9; --bad: #F08098; --glass: rgba(24, 21, 44, .84); --glass-line: rgba(255, 255, 255, .08); --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 14px 40px rgba(0, 0, 0, .45); color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #110F1E; --surface: #1C1930; --surface-2: #242040; --fg: #EEEAFB; --muted: #ABA5C8; --line: #3A3557; --accent: #5CCBA9; --accent-soft: #173A31; --accent-ink: #0B1C17; --lilac: #9C88E8; --rose: #E79BBB; --gold: #E9C35E; --good: #5CCBA9; --bad: #F08098; --glass: rgba(24, 21, 44, .84); --glass-line: rgba(255, 255, 255, .08); --shadow: 0 2px 6px rgba(0, 0, 0, .3), 0 14px 40px rgba(0, 0, 0, .45); color-scheme: dark; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--f-body); overflow: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
h2 { font-size: 1.6rem; } h3 { font-size: 1.15rem; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .num { font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: var(--shadow); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 11px 20px; font-weight: 700; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); transition: transform .12s, filter .12s; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.btn.small { padding: 7px 14px; font-size: .88rem; } .btn.danger { background: var(--bad); color: #fff; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.in { width: 100%; border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
textarea.in { min-height: 110px; resize: vertical; line-height: 1.5; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid var(--line); background: var(--surface-2); padding: 7px 13px; border-radius: 999px; font-weight: 600; }
.chip.sm { padding: 6px 11px; font-size: .86rem; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
kbd { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; background: var(--fg); color: var(--bg); font: 700 .78rem var(--f-body); }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
#scene:active { cursor: grabbing; }
#nogl { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; z-index: 60; background: var(--bg); }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > *, #hud button, #hud canvas, #hud .pill { pointer-events: auto; }
.hud-tl { position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); display: grid; gap: 10px; width: min(320px, calc(100vw - 28px)); pointer-events: none; }
.pcard { display: flex; gap: 12px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 18px; text-align: left; color: var(--fg); }
.pc-av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); }
.pc-av svg { width: 100%; height: 100%; display: block; }
.pc-txt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.pc-txt b { font-family: var(--f-display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-txt span { font-size: .78rem; color: var(--muted); }
.xpbar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lilac), var(--accent)); border-radius: 6px; transition: width .4s; }
.qcard { display: grid; gap: 3px; text-align: left; padding: 10px 14px; border-radius: 16px; color: var(--fg); }
.qcard b { font-size: .95rem; } .qcard .muted { font-size: .8rem; line-height: 1.35; }
.qcard .eyebrow .ico { width: 14px; height: 14px; color: var(--accent); }
.qprog { font-size: .78rem; font-weight: 700; color: var(--accent); }
.hud-tr { position: absolute; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.row-r { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 9px; border-radius: 999px; font-weight: 800; }
.coin-ico { color: #B8860B; fill: #FFD45E; } .star-ico { color: #E3B341; fill: #FFF2B8; }
.hud-menu { display: flex; gap: 2px; padding: 4px; border-radius: 16px; }
.hud-menu button { display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 6px 9px; border-radius: 12px; color: var(--fg); font-size: .7rem; font-weight: 700; }
.hud-menu button:hover { background: var(--surface-2); }
.mini-wrap { border-radius: 50%; padding: 5px; position: relative; }
#mini { width: 170px; height: 170px; display: block; border-radius: 50%; cursor: pointer; }
.mini-cap { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); font-size: .7rem; font-weight: 700; white-space: nowrap; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
#prompt { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
#prompt button { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 999px; font-weight: 700; color: var(--fg); animation: pop .25s ease; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
#tip { position: fixed; padding: 5px 10px; border-radius: 8px; background: rgba(20, 16, 40, .88); color: #fff; font-size: .8rem; font-weight: 600; pointer-events: none; z-index: 30; white-space: nowrap; }
.hud-help { position: absolute; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; font-size: .8rem; color: var(--muted); white-space: nowrap; transition: opacity 1s 4s; }
.hud-help b { color: var(--fg); }
.hud-help.fade { opacity: 0; pointer-events: none; }
.touch-only { display: none; }
@media (pointer: coarse) {
  .touch-only { display: block; } .hud-help { display: none; }
  #joy { position: absolute; left: 22px; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
  .joy-base { width: 124px; height: 124px; border-radius: 50%; background: rgba(255, 255, 255, .28); border: 2px solid rgba(255, 255, 255, .6); display: grid; place-items: center; touch-action: none; backdrop-filter: blur(6px); }
  .joy-knob { width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow); pointer-events: none; }
  .touch-btns { position: absolute; right: 22px; bottom: calc(34px + env(safe-area-inset-bottom, 0px)); }
  .touch-btns button { width: 72px; height: 72px; border-radius: 50%; font-weight: 800; color: var(--fg); }
  #prompt { bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 700px) {
  .hud-tl { width: min(250px, calc(100vw - 150px)); }
  .qcard .muted { display: none; }
  #mini { width: 110px; height: 110px; } .mini-cap { display: none; }
  .hud-menu button span { display: none; } .hud-menu { flex-direction: column; }
  .hud-tr { grid-template-columns: auto; }
}

/* toasts */
#toasts { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; pointer-events: none; width: min(440px, calc(100vw - 32px)); }
.toast { padding: 11px 16px; border-radius: 14px; background: rgba(20, 16, 40, .92); color: #fff; font-weight: 600; text-align: center; box-shadow: var(--shadow); animation: drop .3s ease; transition: opacity .4s, transform .4s; }
.toast.quest { background: linear-gradient(90deg, #1E5E4D, #23876C); } .toast.gold { background: linear-gradient(90deg, #8A6514, #C7972B); }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }

/* dialog */
#dialog { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); z-index: 40; }
.dlg { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; padding: 18px; border-radius: 22px; animation: rise .3s ease; max-height: min(78vh, 640px); overflow-y: auto; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.dlg-face { width: 76px; height: 76px; border-radius: 20px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.dlg-face svg { width: 64px; height: 64px; }
.dlg-main { display: grid; gap: 10px; min-width: 0; }
.dlg-who { font-family: var(--f-display); font-size: 1.05rem; }
.dlg-text { font-size: 1.02rem; line-height: 1.55; }
.dlg-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.dlg-choices .k { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .25); font-size: .72rem; }
.dlg-choices .ghost .k { background: var(--surface-2); }
.dlg-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.dlg-chips { max-height: 220px; overflow-y: auto; }
.obprog { height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; } .obprog i { display: block; height: 100%; background: linear-gradient(90deg, var(--lilac), var(--accent)); }
.thinking { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.matches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.mcard { text-align: left; display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 50%, var(--line)); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--fg); }
.mcard .pct { font-family: var(--f-display); font-size: 1.6rem; font-weight: 600; line-height: 1; } .mcard .muted { font-size: .82rem; }
@media (max-width: 560px) { .dlg { grid-template-columns: 1fr; } .dlg-face { width: 52px; height: 52px; } .dlg-face svg { width: 44px; height: 44px; } }

/* creator */
#creator { position: fixed; inset: 0; z-index: 35; pointer-events: none; display: flex; align-items: center; padding: 16px; }
.cr-card { pointer-events: auto; width: min(420px, 100%); max-height: calc(100% - 8px); overflow-y: auto; padding: 22px; border-radius: 24px; display: grid; gap: 14px; animation: rise .3s ease; }
.lbl { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.seg3 { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.seg3 button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; color: var(--muted); }
.seg3 button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
@media (max-width: 820px) { #creator { align-items: flex-end; } .cr-card { width: 100%; max-height: 56vh; } }

/* title */
#title { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(20, 16, 50, .1), rgba(20, 16, 50, .45)); }
.title-card { padding: clamp(24px, 5vw, 44px); border-radius: 28px; text-align: center; display: grid; gap: 12px; max-width: 520px; }
.title-card h1 { font-size: clamp(2.8rem, 8vw, 4.6rem); font-weight: 500; } .title-card h1 em { color: var(--accent); font-weight: 600; }

/* panels */
.panel-layer { position: fixed; inset: 0; z-index: 38; display: flex; justify-content: flex-end; pointer-events: none; }
.panel-layer.wide { justify-content: center; align-items: center; padding: 16px; background: rgba(15, 12, 35, .35); pointer-events: auto; }
.sheet { pointer-events: auto; position: relative; width: min(470px, 100vw); height: 100%; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow); animation: slide .28s ease; display: flex; }
.panel-layer.wide .sheet { width: min(1000px, 100%); height: min(92vh, 900px); border-radius: 24px; border: 1px solid var(--line); animation: rise .3s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.sheet-body { overflow-y: auto; padding: 26px 22px 40px; display: grid; gap: 14px; align-content: start; width: 100%; padding-top: calc(26px + env(safe-area-inset-top, 0px)); }
.panel-layer.wide .sheet-body { padding: 28px clamp(18px, 4vw, 36px) 36px; }
.x { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; z-index: 2; color: var(--fg); }
.sub { margin-top: 10px; font-size: 1rem; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.bhead2 { padding: 18px; border-radius: 18px; background: linear-gradient(130deg, color-mix(in srgb, var(--c) 38%, var(--surface)), var(--surface) 80%); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); display: grid; gap: 6px; }
.pips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.pip { width: 22px; height: 7px; border-radius: 4px; background: var(--line); }
.pip.done { background: var(--c, var(--accent)); } .pip.cur { background: var(--fg); }
.elev { display: grid; gap: 6px; padding: 10px; border-radius: 16px; background: color-mix(in srgb, var(--c) 10%, var(--surface-2)); border: 1px solid var(--line); }
.floor { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--fg); }
.floor .n { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; background: color-mix(in srgb, var(--c) 28%, var(--surface)); }
.floor .ft { display: grid; min-width: 0; } .floor .st { font-size: .8rem; font-weight: 800; color: var(--muted); }
.floor.done .n { background: var(--c); color: #1E1A33; } .floor.done .st { color: var(--good); }
.floor.next { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); } .floor.next .st { color: var(--accent); }
.floor.locked { opacity: .55; cursor: not-allowed; }
.lobby { text-align: center; font-weight: 700; color: var(--muted); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; padding: 4px; }
.career { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.floorcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 20px; border-radius: 20px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 32%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); padding-right: 56px; }
.fc-n { font-family: var(--f-display); font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1; font-weight: 600; min-width: 1.2em; text-align: center; }
.ftabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ftab { padding: 6px 13px; border-radius: 999px; font-weight: 700; font-size: .84rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.ftab.on { background: var(--fg); color: var(--bg); border-color: var(--fg); } .ftab.ok { color: var(--good); border-color: var(--good); }
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 22px; align-items: start; }
@media (max-width: 860px) { .lesson { grid-template-columns: 1fr; } }
.prose { display: grid; gap: 16px; max-width: 68ch; } .prose p { line-height: 1.65; } .prose h3 { margin-bottom: 4px; }
.lead2 { font-size: 1.1rem; }
.dil { padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); display: grid; gap: 4px; }
.aside { padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.bot-ico { width: 32px; height: 32px; }
.chat-log { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.msg { padding: 9px 12px; border-radius: 12px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.msg.me { background: var(--accent-soft); justify-self: end; max-width: 88%; } .msg.mel { background: var(--surface); border: 1px solid var(--line); }
.q-card { display: grid; gap: 14px; max-width: 760px; } .qq { font-size: 1.3rem; }
.answers { display: grid; gap: 8px; }
.ans { text-align: left; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; display: flex; gap: 12px; align-items: center; color: var(--fg); }
.ans:hover:not(:disabled) { border-color: var(--lilac); } .ans:disabled { cursor: default; }
.ans .k { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-size: .85rem; }
.ans.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--surface)); } .ans.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.feedback { padding: 13px 15px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 6px; }
.score { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.complete { text-align: center; display: grid; gap: 12px; justify-items: center; padding: clamp(20px, 4vw, 40px); border-radius: 22px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 30%, var(--surface)), color-mix(in srgb, var(--lilac) 30%, var(--surface))); }
.big-n { font-family: var(--f-display); font-size: clamp(4rem, 12vw, 6.5rem); line-height: 1; font-weight: 600; }
.earn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(100%, 480px); }
.earn div { padding: 10px; border-radius: 12px; background: var(--surface); } .earn b { display: block; font-size: 1.3rem; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.lb-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; } .lb-tabs .chip { flex: none; }
.lb { display: grid; gap: 6px; }
.lbrow { display: grid; grid-template-columns: 34px 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; color: var(--fg); }
.lbrow.me { background: var(--accent-soft); border-color: var(--accent); }
.lbrow .rk { font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; text-align: center; } .rk.p1 { color: #B8860B; } .rk.p2 { color: #8A8FA3; } .rk.p3 { color: #B06A3B; }
.lbrow .av { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; } .av svg { width: 100%; height: 100%; display: block; }
.lbrow .who { display: grid; min-width: 0; } .lbrow .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lbrow .pts { font-weight: 800; }
.scout { display: flex; gap: 16px; align-items: center; } .av.big { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex: none; }
.accent-t { color: var(--accent); font-weight: 700; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.kpi { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); } .kpi b { display: block; font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.ind-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 46px; gap: 10px; align-items: center; padding: 3px 0; font-size: .9rem; }
.bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 6px; }
.skill { padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); font-weight: 600; font-size: .85rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.item { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 12px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); font-size: .88rem; }
.item.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ii { width: 56px; height: 56px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; } .ii svg { width: 44px; height: 44px; }
.quests { display: grid; gap: 8px; }
.quest { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.quest .qk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-weight: 800; }
.quest.done { opacity: .7; } .quest.done .qk { background: var(--accent); color: var(--accent-ink); }
.quest .bar { margin-top: 6px; } .rw { font-weight: 800; color: #B8860B; }
.controls { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 560px) { .sheet { width: 100vw; } .panel-layer.wide { padding: 0; } .panel-layer.wide .sheet { height: 100%; border-radius: 0; } .ind-row { grid-template-columns: 90px minmax(0, 1fr) 40px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Hands-on tasks ===== */
.task { display: grid; gap: 14px; }
.task-head { display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.task-head h3 { font-size: 1.3rem; }
.task-body { display: grid; gap: 14px; min-width: 0; }
.tk-prompt { font-weight: 600; color: var(--muted); }
.tk-timer { color: var(--accent); font-weight: 800; }
.tk-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tk-order li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.tk-order li[draggable="true"] { cursor: grab; }
.tk-order li.dragging { opacity: .5; }
.tk-order li.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.tk-order li.no { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.tk-order li.empty { display: block; text-align: center; border-style: dashed; }
.tk-n { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; }
.tk-ctl { display: flex; gap: 4px; }
.tk-ctl button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); font-weight: 800; }
.tk-ctl button:disabled { opacity: .3; cursor: default; }
.tk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.tk-card { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.tk-card.ok { border-color: var(--good); } .tk-card.no { border-color: var(--bad); }
.tk-card p { font-weight: 600; }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.right { border-color: var(--good); box-shadow: inset 0 0 0 1px var(--good); }
.tk-why { font-size: .86rem; color: var(--muted); font-weight: 500 !important; }
.tk-sources { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--lilac) 14%, var(--surface)); border: 1px solid var(--line); display: grid; gap: 6px; font-size: .9rem; }
.doc { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.doc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .85rem; }
.doc-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); } .doc-bar b { margin-left: 8px; }
.doc-title { padding: 12px 16px; font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.doc.contract .seg, .doc.form .seg { font-family: Georgia, serif; }
.seg { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--line); cursor: pointer; line-height: 1.45; }
.seg:last-child { border-bottom: 0; }
.seg:hover { background: var(--surface-2); }
.seg-flag { color: var(--bad); font-weight: 800; }
.seg.flagged { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); }
.seg.hit { background: color-mix(in srgb, var(--good) 14%, var(--surface)); cursor: default; } .seg.hit .seg-flag { color: var(--good); }
.seg.miss { background: color-mix(in srgb, var(--gold) 18%, var(--surface)); cursor: default; } .seg.miss .seg-flag { color: #B8860B; }
.seg.false { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); cursor: default; }
.seg-note { grid-column: 2; font-size: .84rem; font-family: var(--f-body); font-weight: 600; }
.seg-note.good { color: var(--good); } .seg-note.warn { color: #9A6B00; } .seg-note.bad { color: var(--bad); }
.code-wrap { border-radius: 14px; overflow: hidden; border: 1px solid #2b2840; background: #17152A; }
.code-top { display: flex; justify-content: space-between; padding: 8px 14px; background: #221F3A; color: #E8E4FF; font-size: .85rem; }
.code-ed { width: 100%; min-height: 230px; border: 0; background: #17152A; color: #E8E4FF; font: 14px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 14px; resize: vertical; tab-size: 2; white-space: pre; overflow: auto; }
.code-ed:focus { outline: none; box-shadow: inset 0 0 0 2px var(--lilac); }
.tests { display: grid; gap: 4px; }
.test { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: .88rem; }
.test.ok { background: color-mix(in srgb, var(--good) 14%, var(--surface)); } .test.no { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.test code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
.ti { font-weight: 800; width: 16px; } .bad-t { color: var(--bad); }
.hint summary { cursor: pointer; color: var(--accent); font-weight: 700; } .hint { font-size: .9rem; }
.sheet-wrap { overflow-x: auto; }
.xsheet { border-collapse: collapse; width: 100%; min-width: 420px; font-variant-numeric: tabular-nums; }
.xsheet th, .xsheet td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.xsheet thead th { background: var(--surface-2); color: var(--muted); font-size: .8rem; text-align: center; }
.xsheet .rn { width: 34px; text-align: center; color: var(--muted); background: var(--surface-2); font-size: .8rem; }
.xsheet tr.frm td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); font-weight: 700; }
.cell-in { width: 100%; border: 1px solid color-mix(in srgb, #3D7BD9 50%, var(--line)); background: color-mix(in srgb, #3D7BD9 8%, var(--surface)); border-radius: 6px; padding: 5px 8px; font-variant-numeric: tabular-nums; }
.fx { display: block; font-size: .72rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-weight: 500; }
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 18px; align-items: start; }
@media (max-width: 760px) { .cfg { grid-template-columns: 1fr; } }
.cfg-opts { display: grid; gap: 14px; }
.cfg-prev { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 10px; }
.cfg-prev svg { width: 100%; height: auto; display: block; }
.poster { max-width: 220px; justify-self: center; border-radius: 6px; box-shadow: var(--shadow); }
.spec { display: grid; gap: 6px; }
.spec-row { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.spec-row:last-child { border-bottom: 0; }
.good { color: var(--good); } .bad { color: var(--bad); }
.meter { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; } .meter i { display: block; height: 100%; }
.post { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.post-h { display: flex; gap: 8px; align-items: center; padding: 8px 10px; font-size: .85rem; } .post-h .dot { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #F4B6CF, #8FD694); }
.post-img { height: 110px; display: grid; place-items: center; font-family: var(--f-display); font-size: 1.6rem; color: #fff; background: linear-gradient(135deg, #8FD694, #F4A6C6); }
.post p { padding: 8px 10px 0; } .post p:last-child { padding-bottom: 10px; }
.asm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .asm { grid-template-columns: 1fr; } }
.asm-pal { display: grid; gap: 6px; }
.asm-item { display: flex; justify-content: space-between; gap: 8px; align-items: center; text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px dashed var(--line); background: var(--surface); color: var(--fg); font-weight: 600; }
.asm-item:hover:not(:disabled) { border-color: var(--accent); border-style: solid; }
.asm-item:disabled { opacity: .4; cursor: default; }
.asm-seq { margin-bottom: 10px; }
.sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .sim { grid-template-columns: 1fr; } }
.sim-l, .sim-r { display: grid; gap: 12px; }
.news { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); font-weight: 600; margin-top: 6px; }
.slider { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-weight: 600; font-size: .92rem; }
.slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.slider b { color: var(--accent); }
.spark { width: 100%; height: auto; display: block; }
.sim-log { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.rp-goal { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; gap: 4px; }
.rp-chat { display: grid; gap: 10px; max-height: 380px; overflow-y: auto; padding: 4px; }
.rp { display: flex; gap: 10px; align-items: flex-start; }
.rp.npc > div { background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; border-radius: 4px 14px 14px 14px; max-width: 85%; display: grid; gap: 2px; }
.rp.npc b { font-size: .8rem; color: var(--muted); }
.rp-face { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; } .rp-face svg { width: 100%; height: 100%; display: block; }
.rp.me { flex-direction: column; align-items: flex-end; }
.rp.me p { background: var(--accent-soft); padding: 10px 12px; border-radius: 14px 4px 14px 14px; max-width: 85%; }
.rp-fb { font-size: .8rem; font-weight: 600; max-width: 85%; text-align: right; }
.rp-fb.s2 { color: var(--good); } .rp-fb.s1 { color: #9A6B00; } .rp-fb.s0 { color: var(--bad); }
.rp-opts { display: grid; gap: 8px; }
.rp-opt { text-align: left; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-weight: 600; line-height: 1.4; }
.rp-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.tk-result { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--lilac) 22%, var(--surface)), var(--surface)); animation: rise .3s ease; }
.tk-result.pass { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.tk-score { display: flex; align-items: baseline; gap: 4px; } .tk-score .num { font-family: var(--f-display); font-size: 3.2rem; font-weight: 600; line-height: 1; }
.tk-stars { font-size: 2rem; letter-spacing: 4px; color: var(--line); } .tk-stars .on { color: #F2B705; text-shadow: 0 2px 8px rgba(242, 183, 5, .4); }
.tk-stars.big { font-size: 2.6rem; }
.tk-verdict { font-weight: 700; }
.tk-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; width: min(100%, 640px); }
.tk-lines li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; font-size: .92rem; }
.tk-lines li.ok span { color: var(--good); font-weight: 800; } .tk-lines li.no span { color: var(--bad); font-weight: 800; }
.shift-card { display: grid; gap: 6px; justify-items: start; padding: 16px 18px; border-radius: 16px; background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); }
.shift-card b { font-family: var(--f-display); font-size: 1.2rem; }
.fstars { color: #E0A800; font-size: .9rem; letter-spacing: 1px; }
.earn.e4 { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 600px); }
@media (max-width: 560px) { .earn.e4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Admin ===== */
.adm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-right: 44px; }
.adm-head .eyebrow .ico { width: 15px; height: 15px; color: var(--accent); }
.adm-tabs { justify-self: start; }
.adm-tools { gap: 12px; }
.in.sm { width: auto; padding: 6px 10px; }
.kpis.k5 { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
.adm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 780px; }
.adm-table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.adm-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.adm-table tr[data-act] { cursor: pointer; } .adm-table tr[data-act]:hover td, .adm-table tr[data-act]:focus td { background: var(--surface-2); }
.adm-table .r { text-align: right; }
.adm-name { display: flex; align-items: center; gap: 8px; } .adm-name .av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.tag.ok { background: var(--accent-soft); color: var(--accent); } .tag.bad { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); } .tag.warn { background: color-mix(in srgb, var(--gold) 22%, var(--surface)); color: #8A6514; }
.adm-actions { gap: 8px; }
.confirm { display: inline-flex; gap: 8px; align-items: center; padding: 4px 4px 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); font-weight: 600; font-size: .88rem; }
.danger-t { color: var(--bad) !important; }
#blocked { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; background: rgba(20, 16, 50, .55); backdrop-filter: blur(4px); }

.auth-form { display: grid; gap: 12px; text-align: left; margin-top: 6px; }
.auth-form .seg3 { justify-self: center; }

.cr-tabs { justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cr-tabs .seg3 button { padding: 7px 11px; }
button.ftab { font-family: inherit; cursor: pointer; }
button.ftab:hover { filter: brightness(.95); }

/* ---------- Workplaces (3D shifts) ---------- */
#wp { --wp-ink: #17232B; --wp-muted: #5B6B74; --wp-glass: rgba(255,255,255,.88); --wp-line: rgba(23,35,43,.12); --wp-teal: #2F8F83; --wp-teal-ink: #0F5148; --wp-navy: #1F3B4D; --wp-bad: #C2353A; --wp-info: #E6F4F1;
  position: fixed; inset: 0; z-index: 200; color: var(--wp-ink); font-family: "Bricolage Grotesque", system-ui, sans-serif; background: #E9EEF2; }
#wp [hidden] { display: none !important; }
#wp .wp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#wp button { font: inherit; color: inherit; cursor: pointer; }
#wp .wp-glass { background: var(--wp-glass); border: 1px solid var(--wp-line); border-radius: 16px; box-shadow: 0 8px 28px rgba(23,35,43,.12); backdrop-filter: blur(10px); }
#wp .wp-eye { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wp-teal-ink); font-weight: 700; }
#wp .wp-muted { color: var(--wp-muted); font-size: .88rem; }
#wp .wp-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
#wp .wp-btn { border: 0; background: var(--wp-teal); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 999px; }
#wp .wp-btn:hover { background: var(--wp-teal-ink); } #wp .wp-btn[disabled] { opacity: .45; cursor: not-allowed; }
#wp .wp-btn.ghost { background: transparent; color: var(--wp-ink); box-shadow: inset 0 0 0 1.5px var(--wp-line); }
#wp :focus-visible { outline: 3px solid var(--wp-teal); outline-offset: 2px; }
#wp .wp-obj { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; width: min(320px, calc(100vw - 24px)); padding: 12px 14px; z-index: 5; max-height: 52vh; overflow: auto; }
#wp .wp-obj h2 { margin: 2px 0 8px; font-size: 1.02rem; line-height: 1.2; }
#wp .wp-bar { height: 5px; background: var(--wp-line); border-radius: 9px; overflow: hidden; margin-bottom: 8px; } #wp .wp-bar i { display: block; height: 100%; width: 0; background: var(--wp-teal); transition: width .4s; }
#wp .wp-obj ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .86rem; }
#wp .wp-obj li { display: flex; gap: 8px; align-items: flex-start; color: var(--wp-muted); line-height: 1.3; }
#wp .wp-obj li.now, #wp .wp-obj li.open { color: var(--wp-ink); } #wp .wp-obj li.now { font-weight: 700; }
#wp .wp-obj li.ok { color: var(--wp-teal-ink); text-decoration: line-through; text-decoration-color: rgba(15,81,72,.35); }
#wp .tick { flex: none; width: 17px; height: 17px; border-radius: 6px; border: 1.5px solid var(--wp-line); display: grid; place-items: center; font-size: .72rem; margin-top: 1px; }
#wp li.ok .tick { background: var(--wp-teal); border-color: var(--wp-teal); color: #fff; } #wp li.now .tick, #wp li.open .tick { border-color: var(--wp-teal); }
#wp .wp-notes { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: min(320px, calc(100vw - 24px)); padding: 10px 14px; z-index: 5; max-height: 40vh; overflow: auto; }
#wp .wp-notes ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-family: ui-monospace, Menlo, monospace; font-size: .74rem; line-height: 1.4; }
#wp .wp-hand { position: absolute; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 10px 14px; display: flex; gap: 10px; align-items: center; z-index: 5; max-width: 60vw; }
#wp .wp-hand small, #wp .wp-prompt small { display: block; font-size: .68rem; color: var(--wp-muted); text-transform: uppercase; letter-spacing: .08em; }
#wp .wp-pill { width: 26px; height: 14px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
#wp .wp-prompt { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 12px; align-items: center; padding: 10px 18px 10px 10px; z-index: 6; font-weight: 700; text-align: left; max-width: calc(100vw - 24px); }
#wp kbd { font-family: ui-monospace, Menlo, monospace; background: var(--wp-navy); color: #fff; border-radius: 9px; padding: 6px 11px; font-size: .9rem; }
#wp .wp-leave { position: absolute; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 6; border: 0; background: rgba(255,255,255,.75); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .82rem; }
#wp .wp-toast { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translate(-50%, -160%); max-width: min(460px, calc(100vw - 24px)); padding: 10px 16px; border-radius: 14px; background: var(--wp-navy); color: #fff; font-weight: 600; font-size: .9rem; z-index: 9; transition: transform .3s; text-align: center; }
#wp .wp-toast.show { transform: translate(-50%, 0); } #wp .wp-toast.bad { background: var(--wp-bad); } #wp .wp-toast.info { background: var(--wp-teal-ink); }
#wp .wp-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 7; overflow: hidden; }
#wp .wp-bubble { position: absolute; left: 0; top: 0; max-width: 250px; padding: 8px 12px; background: #fff; border-radius: 14px; font-size: .85rem; box-shadow: 0 6px 18px rgba(23,35,43,.18); line-height: 1.35; }
#wp .wp-bubble b { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--wp-teal-ink); }
#wp .wp-bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #fff; }
#wp .wp-progress { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; z-index: 7; font-weight: 700; }
#wp .wp-progress i { width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--wp-teal) var(--p, 0deg), rgba(255,255,255,.7) 0); -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%); mask: radial-gradient(circle, transparent 54%, #000 56%); }
#wp .wp-progress span { background: var(--wp-glass); padding: 4px 12px; border-radius: 99px; }
#wp .wp-screen { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; z-index: 8; background: rgba(15,30,38,.16); }
#wp .wp-scr { width: min(640px, 100%); max-height: calc(100% - 16px); overflow: auto; background: #F7FBFB; border: 10px solid #22272C; border-radius: 14px; padding: 0 20px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); animation: wpUp .35s ease; }
#wp .wp-scr.talk { border: 0; border-radius: 20px; background: #FFFFFF; }
#wp .wp-scr.talk .wp-scr-top { background: var(--wp-teal-ink); border-radius: 20px 20px 0 0; }
@keyframes wpUp { from { transform: translateY(14px) scale(.98); opacity: 0; } }
#wp .wp-scr-top { display: flex; justify-content: space-between; align-items: center; margin: 0 -20px 6px; padding: 8px 14px; background: var(--wp-navy); color: #CFE9E4; font-family: ui-monospace, Menlo, monospace; font-size: .78rem; }
#wp .wp-scr-top .x { background: none; border: 0; color: #fff; font-size: 1.4rem; line-height: 1; }
#wp .wp-scr h3 { margin: 12px 0 6px; font-size: 1.08rem; text-wrap: balance; } #wp .wp-scr p { margin: 4px 0 10px; line-height: 1.5; }
#wp .wp-info { background: #fff; border: 1px solid var(--wp-line); border-radius: 10px; padding: 10px 12px; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; display: grid; gap: 4px; margin: 6px 0 12px; line-height: 1.4; }
#wp .wp-opts { display: grid; gap: 8px; margin: 8px 0 14px; }
#wp .wp-opt { position: relative; text-align: left; padding: 10px 12px; background: #fff; border: 1.5px solid var(--wp-line); border-radius: 12px; line-height: 1.4; }
#wp .wp-opt:hover { border-color: var(--wp-teal); } #wp .wp-opt[aria-pressed="true"], #wp .wp-opt.on { border-color: var(--wp-teal); background: var(--wp-info); }
#wp .wp-rank { padding-left: 46px; } #wp .wp-rank .n { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--wp-line); display: grid; place-items: center; font-weight: 800; }
#wp .wp-rank.on .n { background: var(--wp-teal); color: #fff; border: 0; }
#wp .wp-item { display: flex; gap: 12px; align-items: center; } #wp .wp-item small { display: block; color: var(--wp-muted); }
#wp .wp-match { display: grid; gap: 8px; margin: 8px 0 14px; } #wp .wp-mrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); gap: 10px; align-items: center; padding: 8px 10px; background: #fff; border: 1px solid var(--wp-line); border-radius: 10px; }
#wp .wp-mrow select { font: inherit; padding: 6px; border-radius: 8px; border: 1px solid var(--wp-line); background: #fff; min-width: 0; }
#wp .wp-sliders { display: grid; gap: 14px; margin: 10px 0 16px; } #wp .wp-sl { display: grid; gap: 6px; } #wp .wp-sl span { display: flex; justify-content: space-between; gap: 10px; } #wp .wp-sl input { width: 100%; accent-color: var(--wp-teal); }
#wp .wp-fb { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; } #wp .wp-fb li { padding: 8px 10px; border-radius: 10px; background: var(--wp-info); display: grid; gap: 2px; line-height: 1.4; } #wp .wp-fb li.bad { background: #FDECEC; } #wp .wp-fb span { color: var(--wp-muted); font-size: .88rem; }
#wp .wp-explain { background: #fff; border-left: 4px solid var(--wp-teal); padding: 8px 12px !important; border-radius: 0; }
#wp .wp-card-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; z-index: 10; background: rgba(15,30,38,.28); }
#wp .wp-card { width: min(540px, 100%); max-height: calc(100% - 16px); overflow: auto; padding: 22px; display: grid; gap: 12px; }
#wp .wp-card h1, #wp .wp-card h2 { margin: 0; line-height: 1.1; text-wrap: balance; } #wp .wp-card h1 { font-size: 1.9rem; } #wp .wp-card h2 { font-size: 1.5rem; } #wp .wp-card p { margin: 0; line-height: 1.5; }
#wp .wp-how { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; } #wp .wp-how div { background: #fff; border: 1px solid var(--wp-line); border-radius: 12px; padding: 10px; font-size: .84rem; line-height: 1.35; } #wp .wp-how b { display: block; }
#wp .wp-stars { font-size: 2.1rem; letter-spacing: 4px; color: #D3D9DD; } #wp .wp-stars .on { color: #F2B630; }
#wp .wp-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } #wp .wp-kpis div { background: #fff; border: 1px solid var(--wp-line); border-radius: 12px; padding: 10px; text-align: center; } #wp .wp-kpis b { font-size: 1.4rem; display: block; font-variant-numeric: tabular-nums; } #wp .wp-kpis small { color: var(--wp-muted); }
#wp .wp-end-body h3 { margin: 6px 0 0; font-size: 1rem; } #wp .wp-end-body ul { margin: 0; padding-left: 18px; line-height: 1.5; } #wp .wp-end-body ul.bad li::marker { color: var(--wp-bad); }
#wp .wp-resume { background: var(--wp-info); border-radius: 12px; padding: 12px; line-height: 1.45; } #wp .wp-resume small { display: block; font-weight: 700; color: var(--wp-teal-ink); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; }
@media (max-width: 720px) {
  #wp .wp-obj { padding: 9px 12px; } #wp .wp-obj li:not(.now) { display: none; } #wp .wp-obj h2 { font-size: .92rem; margin-bottom: 6px; }
  #wp .wp-notes { top: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); max-height: 22vh; } #wp .wp-hand { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  #wp .wp-notes:not([hidden]) ~ .wp-hand { bottom: calc(76px + 22vh + 10px); }
  #wp .wp-leave { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; }
  #wp .wp-toast { top: calc(100px + env(safe-area-inset-top, 0px)); }
}
@media (prefers-reduced-motion: reduce) { #wp * { animation: none !important; transition: none !important; } }

.work-card { display: grid; gap: 12px; padding: 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); border-top: 5px solid var(--c); }
.work-card p { margin: 0; line-height: 1.55; }
.work-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.work-meta div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: .88rem; line-height: 1.35; }
.work-meta b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
