:root {
  --ink: #1c1222;
  --night: #140c1f;
  --night-2: #1f1430;
  --paper: #f6ecd9;
  --sun: #ffd27a;
  --coral: #ff7a45;
  --magenta: #d6336c;
  --cyan: #2fd3e0;
  --green: #2bd46b;
  --red: #ff3b4f;
  --muted: #b8a9c9;
  --radius: 18px;
  --font-comic: 'Bangers', 'Impact', system-ui, sans-serif;
  --font-ui: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--paper); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- print texture helpers ---------- */
.halftone-bg {
  background-image: radial-gradient(rgba(255,255,255,.07) 1.6px, transparent 1.8px);
  background-size: 12px 12px;
}
.misprint { text-shadow: 3px 0 0 rgba(255, 40, 100, .75), -3px 0 0 rgba(47, 211, 224, .75); }

/* ---------- scene (character + background) ---------- */
.scene { position: relative; overflow: hidden; background: #2b1850; isolation: isolate; }
.scene .bg-layer, .scene .char-layer { position: absolute; inset: 0; }
.scene .bg-layer svg { width: 100%; height: 100%; display: block; }
.scene .char-layer { display: flex; align-items: flex-end; justify-content: center; }
.scene .char-layer svg {
  width: 100%; height: 100%; display: block;
  /* offset-print misregistration, Spider-Verse style */
  filter: drop-shadow(3px 0 0 rgba(255, 30, 90, .55)) drop-shadow(-3px 0 0 rgba(30, 200, 230, .5));
}
.scene .grain {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.scene .vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(10, 4, 20, .55)); }

/* ---------- app shell ---------- */
.screen { min-height: 100vh; min-height: 100dvh; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 64px; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--font-comic); font-size: clamp(40px, 7vw, 64px); letter-spacing: .04em; line-height: .9; margin: 0; color: var(--sun); }
.brand small { display: block; font-family: var(--font-ui); font-size: 15px; letter-spacing: 0; color: var(--muted); text-shadow: none; margin-top: 10px; font-weight: 500; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .1s;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn:active { transform: scale(.95); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- philosopher grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin-top: 28px; }
.card {
  display: flex; flex-direction: column;
  position: relative; border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--night-2);
  box-shadow: 6px 6px 0 var(--ink); cursor: pointer; text-align: left; padding: 0; transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.card:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.card .portrait { aspect-ratio: 4 / 5; position: relative; }
.card .portrait .scene { position: absolute; inset: 0; }
.card .meta { flex: 1; padding: 12px 14px 14px; background: var(--paper); color: var(--ink); border-top: 3px solid var(--ink); }
.card .name { font-family: var(--font-comic); font-size: 28px; letter-spacing: .03em; line-height: 1; }
.card .sub { font-size: 13px; opacity: .75; margin-top: 4px; }
.card.locked { cursor: default; }
.card.locked:hover { transform: none; box-shadow: 6px 6px 0 var(--ink); }
.card.locked .portrait { filter: saturate(.3) brightness(.7); }
.silhouette { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.silhouette .initial { font-family: var(--font-comic); font-size: 120px; color: rgba(0,0,0,.35); line-height: 1; }
.badge {
  position: absolute; top: 10px; left: 10px; background: var(--sun); color: var(--ink); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-3deg);
}
.badge.live { background: var(--green); }

/* ---------- profile ---------- */
.profile { display: grid; grid-template-columns: minmax(260px, 400px) 1fr; gap: 32px; margin-top: 20px; align-items: start; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } }
.profile .portrait-card { border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 8px 8px 0 var(--ink); aspect-ratio: 4 / 5; position: relative; }
.profile .portrait-card .scene { position: absolute; inset: 0; }
.profile h2 { font-family: var(--font-comic); font-size: clamp(48px, 8vw, 84px); margin: 0; line-height: .9; letter-spacing: .03em; color: var(--paper); }
.profile .dates { color: var(--muted); margin: 10px 0 22px; }
.back { display: inline-flex; gap: 8px; align-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 0; font-size: 15px; }
.back:hover { color: var(--paper); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; border: 3px solid var(--ink); border-radius: 999px; padding: 12px 22px;
  font-weight: 700; font-size: 16px; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn svg { width: 20px; height: 20px; }
.btn-call { background: var(--green); color: #07210f; }
.btn-ghost { background: var(--paper); color: var(--ink); }

.section-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 32px 0 12px; }
.concepts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.concept {
  text-align: left; border: 3px solid var(--ink); border-radius: 14px; padding: 14px 14px 14px 58px; background: var(--paper); color: var(--ink);
  position: relative; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s, background .15s; min-height: 84px;
}
.concept:hover { background: #fff5e2; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.concept .ico {
  position: absolute; left: 12px; top: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--coral); border: 2.5px solid var(--ink); font-size: 17px; color: var(--ink);
}
.concept b { display: block; font-size: 15.5px; padding-right: 58px; }
.concept .time {
  position: absolute; top: 12px; right: 10px; font-style: normal; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: var(--ink); color: var(--sun); padding: 3px 7px; border-radius: 999px;
}
.total-time { margin-top: 16px; color: var(--muted); font-size: 14.5px; }
.total-time b { color: var(--sun); }
.total-time:empty { display: none; }
.concept span { display: block; font-size: 13px; opacity: .72; margin-top: 3px; line-height: 1.35; }

/* ---------- call ---------- */
.call { position: fixed; inset: 0; background: #000; z-index: 20; }
.call .scene { position: absolute; inset: 0; }
.call-top {
  position: absolute; top: 0; left: 0; right: 0; padding: max(16px, env(safe-area-inset-top)) 18px 40px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; background: linear-gradient(rgba(8, 3, 16, .65), transparent); z-index: 3; pointer-events: none;
}
.call-top > * { pointer-events: auto; }
.call-who { font-weight: 700; font-size: 20px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.call-who small { display: block; font-weight: 500; font-size: 13px; opacity: .8; margin-top: 2px; }
.chip {
  display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: var(--sun); color: var(--ink); border: 2px solid var(--ink);
}
.status-pill {
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap;
}
.status-pill .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: 0; }
.status-pill[data-s="listening"] .dot { background: var(--green); box-shadow: 0 0 0 0 rgba(43,212,107,.7); animation: ping 1.4s infinite; }
.status-pill[data-s="thinking"] .dot { background: var(--sun); }
.status-pill[data-s="speaking"] .dot { background: var(--coral); }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(43,212,107,0); } 100% { box-shadow: 0 0 0 0 rgba(43,212,107,0); } }

/* captions as comic narration boxes */
.captions { position: absolute; left: 50%; bottom: calc(128px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(720px, calc(100% - 32px)); z-index: 3; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.cap {
  background: var(--sun); color: var(--ink); border: 3px solid var(--ink); padding: 10px 16px; font-weight: 600; font-size: clamp(15px, 2.2vw, 19px);
  line-height: 1.35; box-shadow: 5px 5px 0 var(--ink); max-width: 100%; text-wrap: pretty;
}
.cap .said { opacity: 1; }
.cap .unsaid { opacity: .28; }
.cap.you .wait { position: absolute; left: 0; bottom: -3px; height: 4px; width: 100%; background: var(--green); transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }
.cap.you { position: relative; pointer-events: auto; cursor: pointer; background: var(--paper); align-self: flex-end; transform: rotate(.6deg); font-weight: 500; font-style: italic; }
.cap.you::before { content: 'YOU'; font-style: normal; font-weight: 800; font-size: 11px; letter-spacing: .12em; margin-right: 8px; color: var(--magenta); }

.thinking-bubble {
  position: absolute; right: 25px; top: calc(270px + env(safe-area-inset-top)); z-index: 3; background: var(--paper); color: var(--ink); /* sits below your camera tile, never over it */
  border: 3px solid var(--ink); border-radius: 50%; width: 86px; height: 58px; display: grid; place-items: center; font-weight: 800; font-size: 26px;
  box-shadow: 4px 4px 0 var(--ink); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.thinking-bubble.on { opacity: 1; }
.thinking-bubble span { animation: bob 1s infinite; display: inline-block; }
.thinking-bubble span:nth-child(2) { animation-delay: .15s; } .thinking-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-5px); } }

.self-view {
  position: absolute; right: 16px; top: calc(86px + env(safe-area-inset-top)); width: 104px; height: 140px; border-radius: 16px; z-index: 3;
  background: #1a1225; border: 2px solid rgba(255,255,255,.18); display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.self-view { cursor: pointer; transition: box-shadow .08s; }
.self-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.self-view.cam-on { width: 118px; height: 168px; }
.self-view.cam-on .you-dot { display: none; }
.self-view.cam-on .lbl { z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.8); opacity: .9; }
@media (max-width: 480px) { .self-view.cam-on { width: 96px; height: 136px; } }
.self-view .you-dot { width: 54px; height: 54px; border-radius: 50%; background: var(--magenta); display: grid; place-items: center; font-weight: 800; transition: box-shadow .08s; }
.self-view .lbl { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 11px; opacity: .75; }

.controls {
  position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 4;
  display: flex; gap: 14px; padding: 12px 16px; border-radius: 999px; background: rgba(20, 12, 31, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12);
}
.ctl { width: 58px; height: 58px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.16); transition: background .15s, transform .1s; position: relative; }
.ctl:hover { background: rgba(255,255,255,.26); }
.ctl:active { transform: scale(.94); }
.ctl svg { width: 24px; height: 24px; }
.ctl.on { background: var(--paper); color: var(--ink); }
.ctl.end { background: var(--red); }
.ctl.end:hover { background: #ff5566; }
.ctl.talk.holding { background: var(--green); color: #07210f; }
.ctl .tip { position: absolute; bottom: -20px; font-size: 10.5px; opacity: .7; white-space: nowrap; }
@media (max-width: 480px) { .ctl { width: 48px; height: 48px; } .ctl svg { width: 22px; height: 22px; } .controls { gap: 8px; padding: 10px 12px; } .ctl .tip { display: none; } }

.type-box {
  position: absolute; left: 50%; bottom: calc(118px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(620px, calc(100% - 32px)); z-index: 5;
  display: flex; gap: 8px;
}
.type-box input {
  flex: 1; font: inherit; font-size: 16px; padding: 14px 18px; border-radius: 999px; border: 3px solid var(--ink); background: var(--paper); color: var(--ink); outline: none;
}
.type-box button { border: 3px solid var(--ink); border-radius: 999px; background: var(--sun); color: var(--ink); font-weight: 800; padding: 0 20px; cursor: pointer; }
.type-box:not(.hidden) ~ .captions { bottom: calc(190px + env(safe-area-inset-bottom)); }

/* ringing / connecting overlay */
.ringing { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(12, 5, 22, .72); backdrop-filter: blur(6px); transition: opacity .4s; }
.ringing.gone { opacity: 0; pointer-events: none; }
.ringing .ring-inner { text-align: center; }
.ringing .avatar { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--ink); overflow: hidden; margin: 0 auto 18px; position: relative; box-shadow: 0 0 0 0 rgba(255,210,122,.6); animation: ring 1.6s infinite; }
.ringing .avatar .scene { position: absolute; inset: 0; }
@keyframes ring { 70% { box-shadow: 0 0 0 26px rgba(255,210,122,0); } 100% { box-shadow: 0 0 0 0 rgba(255,210,122,0); } }
.ringing h3 { font-family: var(--font-comic); font-size: 44px; margin: 0; letter-spacing: .04em; }
.ringing p { color: var(--muted); margin: 6px 0 0; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 50; background: var(--paper); color: var(--ink); border: 3px solid var(--ink);
  padding: 10px 16px; border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); font-weight: 600; font-size: 14px; max-width: calc(100% - 32px);
}

/* settings drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100%); background: var(--night-2); z-index: 31; padding: 24px 20px; overflow: auto;
  border-left: 3px solid var(--ink); box-shadow: -8px 0 30px rgba(0,0,0,.4);
}
.drawer h3 { font-family: var(--font-comic); font-size: 34px; margin: 0 0 18px; letter-spacing: .04em; }
.field { margin-bottom: 18px; }
.field label.title { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 2px solid rgba(255,255,255,.18); background: transparent; border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 14px; }
.seg button.sel { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 700; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 15px; }
.toggle small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--green); flex: none; }
.keys { font-size: 13.5px; line-height: 1.8; color: var(--muted); }
.keys b { color: var(--paper); }
.keys .ok { color: var(--green); } .keys .no { color: #ff8a8a; }
.demo-banner { margin-top: 18px; padding: 10px 14px; border: 2px dashed rgba(255,210,122,.5); border-radius: 12px; color: var(--sun); font-size: 14px; }

/* ---------- art styles ---------- */
/* Spider-Verse: heavy print misregistration, neon rim light, dot screen over everything */
.style-spiderverse .char-layer svg {
  filter: drop-shadow(5px 0 0 rgba(255, 0, 110, .7)) drop-shadow(-5px 1px 0 rgba(0, 220, 255, .65)) saturate(1.2) contrast(1.05);
}
.style-spiderverse .char-layer svg [stroke="#1c1222"] { stroke-width: 6px; }
.style-spiderverse .char-layer svg [id$="-wrinkles"] path { stroke-width: 3.4px; }
.style-spiderverse .bg-layer svg { filter: saturate(1.35) hue-rotate(-8deg); }
.style-spiderverse::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .15;
  background-image: radial-gradient(#3a0a4a 1.4px, transparent 1.7px); background-size: 7px 7px;
}

/* Clone Wars: carved puppet in a matte painting: thin soft lines, warm key light, soft depth of field */
.style-clonewars .char-layer svg {
  filter: drop-shadow(-3px -2px 0 rgba(255, 215, 170, .55)) drop-shadow(0 14px 22px rgba(0, 0, 0, .45)) saturate(.95) contrast(1.16);
}
.style-clonewars .char-layer svg [stroke="#1c1222"] { stroke: rgba(45, 22, 22, .65); stroke-width: 1.8px; }
.style-clonewars .char-layer svg [id*="-lash"] { stroke: #2a1414; stroke-width: 3.6px; }
.style-clonewars .char-layer svg [id$="-mouthLine"] { stroke: #2a0d10; stroke-width: 2.4px; }
.style-clonewars .char-layer svg [id$="-wrinkles"] path { stroke: rgba(90, 40, 30, .55); stroke-width: 1.8px; }
.style-clonewars .bg-layer svg { filter: blur(3.5px) saturate(.75) brightness(.92); transform: scale(1.04); }
.style-clonewars .grain { opacity: .5; mix-blend-mode: soft-light; }
.style-clonewars .char-layer svg [stroke="#12081b"] { stroke-width: 0; }

/* up next after finishing a topic */
.up-next { position: relative; margin-top: 22px; padding: 16px; border: 3px solid var(--ink); border-radius: 16px; background: var(--sun); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .up-next { grid-template-columns: 1fr; } }
.up-next .up-label { grid-column: 1 / -1; font-size: 14px; padding-right: 28px; }
.up-card { position: relative; text-align: left; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); padding: 12px 12px 12px 54px; cursor: pointer; min-height: 70px; }
.up-card .ico { position: absolute; left: 10px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--coral); border: 2.5px solid var(--ink); }
.up-card b { display: block; font-size: 15px; }
.up-card span:not(.ico) { display: block; font-size: 12.5px; opacity: .72; margin-top: 2px; }
.up-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }

/* fields + progress rings */
.field-group + .field-group { margin-top: 22px; }
.field-title { margin: 0 0 10px; font-family: var(--font-comic); font-size: 24px; letter-spacing: .04em; color: var(--paper); font-weight: 400; }
.concept .ring-wrap { position: absolute; left: 7px; top: 9px; width: 44px; height: 44px; }
.concept .ring-wrap .ico { left: 5px; top: 5px; }
.concept .ring { position: absolute; inset: 0; }
.concept .ring circle, .concept .ring path { fill: none; stroke-width: 4; }
.concept .ring .track { stroke: rgba(28, 18, 34, .12); }
.concept .ring .fill { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.concept.complete .ico { background: var(--green); }
.concept .prog { display: block; font-style: normal; font-size: 12px; font-weight: 700; margin-top: 6px; color: #1f7a45; }
.concept.complete .prog { color: #13893f; }
.done-count { display: block; margin-top: 4px; color: var(--green); font-weight: 600; }
.done-count:empty { display: none; }
.up-gain, .up-left { grid-column: 1 / -1; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.up-gain span { font-weight: 600; color: #0f6b33; }
.up-left span { opacity: .8; }
.up-continue { background: #fff9ea; }

#concepts { display: block; }

/* two-layer rings: inner = learned (green), outer = mastered (gold) */
.concept { padding-left: 66px; }
.concept .ring-wrap { left: 7px; top: 9px; width: 50px; height: 50px; }
.concept .ring-wrap .ico { left: 10px; top: 10px; width: 30px; height: 30px; font-size: 15px; }
.concept .ring circle, .concept .ring path { fill: none; stroke-width: 3.6; }
.concept .ring .fill-in { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.concept .ring .fill-out { stroke: #e3a524; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.concept.learned .ico { background: var(--green); }
.concept.mastered .ico { background: #ffc93c; }
.concept.mastered { background: #fff6d8; }
.concept.mastered::after { content: '★'; position: absolute; left: 40px; top: 4px; font-size: 16px; color: #e3a524; text-shadow: 0 0 0 var(--ink); }
.concept.locked { background: #3a3046; color: #a89bb8; box-shadow: 4px 4px 0 #0e0816; border-color: #0e0816; cursor: not-allowed; }
.concept.locked:hover { transform: none; background: #3a3046; }
.concept.locked .ico { background: #5b4e6b; color: #a89bb8; }
.concept.locked .ring { opacity: .25; }
.concept.locked .prog { color: #d8c9ea; }
.concept.learned:not(.mastered) .prog { color: #1f7a45; }
.concept.mastered .prog { color: #a36d00; }

/* choice sheet */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(8, 3, 16, .6); display: grid; place-items: end center; padding: 16px; }
@media (min-width: 700px) { .sheet { place-items: center; } }
.sheet-card { width: min(440px, 100%); background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 6px 6px 0 var(--ink); padding: 18px; display: grid; gap: 10px; }
.sheet-title { font-family: var(--font-comic); font-size: 30px; letter-spacing: .03em; }
.sheet-sub { font-size: 14px; opacity: .75; margin-top: -6px; }
.sheet-btn { text-align: left; border: 2.5px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); padding: 12px 14px; cursor: pointer; }
.sheet-btn b { display: block; font-size: 16px; }
.sheet-btn span { display: block; font-size: 13px; opacity: .7; margin-top: 2px; }
.sheet-btn.primary { background: var(--sun); }
.sheet-cancel { border: 0; background: none; color: var(--ink); opacity: .6; padding: 8px; cursor: pointer; font-size: 15px; }

.mv-link { display: block; margin-top: 34px; padding: 16px 18px; border-radius: 16px; text-decoration: none; color: #f3f0ff; font-weight: 700; background: linear-gradient(120deg, #3b1fa0, #7a2fc4); border: 2px solid #5ff2ff; box-shadow: 0 0 20px rgba(95,242,255,.35); }

.up-ideas { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; line-height: 1.35; }
.up-ideas .idea.new { font-weight: 700; color: #0f6b33; }
.up-ideas .idea.new em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #2bd46b; color: #07210f; padding: 1px 6px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.up-ideas .idea.done { color: #1f7a45; }
.up-ideas .idea.todo { opacity: .75; }

.text-in { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: var(--paper); outline: none; }
.text-in:focus { border-color: var(--sun); }

@media (max-width: 480px) { .thinking-bubble { right: 21px; top: calc(236px + env(safe-area-inset-top)); } }

/* usage meter */
.usage { font-size: 14px; color: var(--paper); }
.u-row { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.u-row span { color: var(--muted); }
.u-row b { font-size: 16px; color: var(--sun); text-align: right; }
.u-row em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--muted); opacity: .8; }
.u-split { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; background: rgba(255,255,255,.08); }
.u-split span { width: var(--w); }
.u-voice { background: var(--coral); } .u-brain { background: #8e7cc3; } .u-hear { background: var(--cyan); }
.u-legend { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.u-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.u-calls { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.u-calls div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.u-calls b { color: var(--paper); }
.u-note { display: block; margin-top: 10px; font-size: 11.5px; color: var(--muted); opacity: .7; }

/* overall progress rings (philosopher card + profile header) */
.card .meta { display: flex; align-items: center; gap: 10px; }
.card .meta-text { flex: 1; min-width: 0; }
.card-prog { font-size: 12px; font-weight: 700; margin-top: 6px; color: #2e7d4f; }
.overall { position: relative; flex: none; width: 58px; height: 58px; display: inline-block; }
.overall .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.overall .ring path { fill: none; stroke-width: 3.6; }
.overall .ring .track { stroke: rgba(28, 18, 34, .13); }
.overall .ring .fill-in { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.overall .ring .fill-out { stroke: #e3a524; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.overall .pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.p-title { display: flex; align-items: center; gap: 14px; }
.p-overall .overall { width: 64px; height: 64px; }
.p-overall .ring .track { stroke: rgba(255, 255, 255, .16); }
.card-prog small { display: block; font-weight: 600; font-size: 11px; color: rgba(28, 18, 34, .6); margin-top: 2px; }

/* ---------- first-run onboarding (same comic-print look as the rest of the app) ---------- */
.onboard { position: fixed; inset: 0; z-index: 60; overflow-y: auto; background-color: var(--night);
  background-image: radial-gradient(rgba(255,255,255,.07) 1.6px, transparent 1.8px); background-size: 12px 12px; }
.ob-wrap { max-width: 440px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; min-height: 100%; animation: obIn .3s ease-out; }
@keyframes obIn { from { opacity: 0; transform: translateY(10px); } }
.ob-top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 22px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.14); border: 1.5px solid rgba(0,0,0,.2); }
.ob-dots i.on { background: var(--sun); }
.ob-brand { text-align: center; margin: 6px 0 14px; }
.ob-panel { border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; aspect-ratio: 1 / 1; }
.ob-panel.small { aspect-ratio: 5 / 4; margin-top: 8px; }
.ob-panel .scene { width: 100%; height: 100%; }
/* comic speech bubble with its tail pointing up at Plato */
.ob-bubble { position: relative; margin: 18px 6px 16px; padding: 12px 16px; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink); font-weight: 700; font-size: 17px; line-height: 1.35; animation: obPop .35s cubic-bezier(.2,1.4,.4,1); }
.ob-bubble::before { content: ''; position: absolute; top: -17px; left: 38%; border: 9px solid transparent; border-bottom: 14px solid var(--ink); border-top: 0; }
.ob-bubble::after { content: ''; position: absolute; top: -11px; left: calc(38% + 3px); border: 6px solid transparent; border-bottom: 10px solid #fff; border-top: 0; }
@keyframes obPop { from { transform: scale(.85); opacity: 0; } }
.ob-body { display: flex; flex-direction: column; gap: 12px; }
.ob-lead { margin: 0 6px; color: var(--muted); font-size: 15.5px; line-height: 1.45; text-align: center; }
.ob-lang { align-self: center; font-size: 14px; color: var(--muted); }
.ob-lang select { margin-left: 6px; font: inherit; font-weight: 700; color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 10px; padding: 5px 8px; box-shadow: 2px 2px 0 var(--ink); }
.ob-go { justify-content: center; font-size: 17px; padding: 14px 22px; }
.ob-note { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.ob-opts { display: grid; gap: 10px; }
.ob-opt { min-height: 0; width: 100%; }
.ob-opt span:not(.ico) { display: block; font-size: 13.5px; opacity: .72; margin-top: 2px; }
.ob-opt .ico { background: var(--sun); }
.ob-opt.sel { background: var(--sun); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.ob-opt.sel .ico { background: var(--coral); }
.ob-signup .text-in { margin: 2px 0; width: 100%; font-size: 16px; color: var(--ink); background: #fff; border: 2.5px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ob-signup .sheet-btn.primary { text-align: center; background: var(--green); box-shadow: 3px 3px 0 var(--ink); }
.ob-signup .sheet-btn.primary b { font-size: 17px; }

.su-head { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.su-face { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.su-face .scene { width: 100%; height: 100%; }
.su-bubble { position: relative; flex: 1; background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 11px; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.su-bubble::before { content: ''; position: absolute; left: -12px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-right: 11px solid var(--ink); border-left: 0; }
.su-bubble::after { content: ''; position: absolute; left: -7px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-right: 8px solid #fff; border-left: 0; }

/* Add to Home Screen + open-in-browser prompts */
.hs-top { display: flex; gap: 12px; align-items: center; }
.hs-app { width: 60px; height: 60px; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); flex: none; }
.hs-card .sheet-title { font-size: 26px; line-height: 1.05; }
.hs-steps { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.4; }
.hs-after { margin: 2px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft, #5a4a60); }
.hs-ico { width: 20px; height: 20px; vertical-align: -4px; color: #0a84ff; }
.iab-card { max-width: 420px; margin: 0 auto; padding: max(40px, env(safe-area-inset-top)) 22px 30px; display: flex; flex-direction: column; gap: 14px; text-align: center; position: relative; }
.iab-art img { width: 96px; height: 96px; border-radius: 22px; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.iab-steps { text-align: left; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); padding: 14px 16px 14px 38px; }
.iab-arrow { position: fixed; top: max(6px, env(safe-area-inset-top)); right: 16px; font-size: 44px; color: var(--sun); animation: iabBob 1s ease-in-out infinite; }
@keyframes iabBob { 50% { transform: translate(4px, -6px); } }
.iab-skip { align-self: center; }
.iab-arrow.big { font-size: 64px; right: 10px; text-shadow: 0 0 18px rgba(255,201,60,.6); }
a.btn { text-decoration: none; }
.hs-card .sheet-title { font-size: 24px; line-height: 1.05; }
.hs-card .sheet-sub { margin-top: 4px; }

.voice-list { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.vl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.1); }
.vl-row.on { border-color: var(--sun); background: rgba(255,210,122,.1); }
.vl-play { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sun); color: var(--ink); cursor: pointer; font-size: 13px; }
.vl-txt { flex: 1; min-width: 0; }
.vl-txt b { display: block; font-size: 14.5px; }
.vl-txt small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-use { flex: none; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.vl-row.on .vl-use { background: var(--sun); }
.vl-empty { color: var(--muted); font-size: 14px; }

.ob-hear { position: absolute; right: -10px; top: -14px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); background: var(--sun); box-shadow: 2px 2px 0 var(--ink); font-size: 16px; cursor: pointer; animation: obPulse 1.6s ease-in-out infinite; }
@keyframes obPulse { 50% { transform: scale(1.1); } }
.ob-hear.quiet { animation: none; width: 32px; height: 32px; font-size: 13px; right: -8px; top: -12px; opacity: .9; }
.ob-panel + .ob-body { margin-top: 20px; }
.voice-list { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; } .vl-row { min-width: 0; } .vl-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* onboarding v3: full-screen Plato, everything overlaid */
.onboard { background: var(--night); }
.ob-full { position: fixed; inset: 0; z-index: 0; }
.ob-full .scene { position: absolute; inset: 0; }
.ob-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,7,24,.55) 0%, rgba(14,7,24,0) 16%, rgba(14,7,24,0) 38%, rgba(14,7,24,.78) 62%, rgba(14,7,24,.96) 100%); }
.ob-shade.light { background: linear-gradient(180deg, rgba(14,7,24,.45) 0%, rgba(14,7,24,0) 18%, rgba(14,7,24,0) 50%, rgba(14,7,24,.85) 78%, rgba(14,7,24,.97) 100%); }
.ob-wrap { position: relative; z-index: 1; min-height: 100dvh; }
.ob-spacer { flex: 1; min-height: 30dvh; }
.ob-brand { text-shadow: 3px 0 0 rgba(255, 40, 100, .75), -3px 0 0 rgba(47, 211, 224, .75), 0 4px 18px rgba(0,0,0,.6); }
.ob-top .back { color: var(--paper); text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.ob-bubble { margin-top: 0; }
.ob-bubble::before { left: 50%; }
.ob-bubble::after { left: calc(50% + 3px); }
.ob-lead { color: #e4dbf0; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.ob-lang { color: #e4dbf0; }
.ob-opt { box-shadow: 4px 4px 0 var(--ink), 0 10px 24px rgba(0,0,0,.35); }
.ob-note { color: #e4dbf0; }
/* compact single-column options so Plato's mouth stays clear of the bubble */
.ob-opt { padding-top: 10px; padding-bottom: 10px; }
.ob-opts { gap: 8px; }

/* one dot per scenario on each character card: your best grade in it (grey until you've done it) */
.card-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.card-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: #d8d0c2; }
.card-dots i.lock { border: 0; border-radius: 0; background: none; color: #5a4a60; display: flex; align-items: center; justify-content: center; } .card-dots i.lock svg { width: 15px; height: 17px; display: block; }
.card-dots i.gA { background: #ffc93c; } .card-dots i.gB { background: #2bd46b; } .card-dots i.gC { background: #5aa9e6; } .card-dots i.gD { background: #f5935a; } .card-dots i.gF { background: #ff5a5a; }

/* philosophy: key-idea dots on topic cards, and the "Part 3 of 5" bar in a call */
.concept .idea-dots { margin-top: 8px; gap: 5px; } .concept .idea-dots i { width: 13px; height: 13px; }
.idea-bar { margin-top: 8px; max-width: 230px; }
.idea-bar .ib-segs { display: flex; gap: 4px; }
.idea-bar .ib-segs i { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,.28); border: 1.5px solid rgba(0,0,0,.45); }
.idea-bar .ib-segs i.done { background: #2bd46b; } .idea-bar .ib-segs i.now { background: #ffc93c; box-shadow: 0 0 8px #ffc93c; }
.idea-bar .ib-label { font-size: 12px; font-weight: 600; margin-top: 4px; opacity: .9; text-shadow: 0 1px 6px rgba(0,0,0,.7); }

.up-grade { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; }
.up-grade .grade { flex: none; min-width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--ink); display: grid; place-items: center; font-weight: 900; font-size: 20px; color: var(--ink); background: #d8d0c2; }
.up-grade .grade.gA { background: #ffc93c; } .up-grade .grade.gB { background: #2bd46b; } .up-grade .grade.gC { background: #5aa9e6; } .up-grade .grade.gD { background: #f5935a; } .up-grade .grade.gF { background: #ff6b6b; }
.up-grade em { opacity: .7; font-style: normal; font-weight: 700; }

/* ---------- the study (/study/) ---------- */
.branch-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; border: 2px solid var(--ink); vertical-align: middle; }
.branch-chip.dark { background: #1c1222; }
.concept .branch-chip { display: table; margin: 4px 0 2px; }
.st { max-width: 520px; margin: 0 auto; padding: 0; min-height: 100%; display: flex; flex-direction: column; } .st > .st-now { flex: 1; align-content: start; }
.st-top { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.st-clock { flex: 1; background: rgba(0,0,0,.25); border-radius: 14px; padding: 8px 14px; }
.st-clock small { display: block; font-size: 11px; letter-spacing: .14em; color: #ffc93c; font-weight: 800; }
.st-clock b { font-family: var(--font-comic, inherit); font-size: 30px; }
.st-speed, .st-gear { width: 46px; height: 46px; border-radius: 12px; border: 0; background: rgba(255,255,255,.12); color: #f6ecd9; font-size: 18px; cursor: pointer; }
.st-room { position: relative; margin: 0; overflow: hidden; aspect-ratio: 390 / 400; } /* edge to edge, like the flats */
.st-room > svg { width: 100%; height: 100%; display: block; }
.st-hot { position: absolute; background: none; border: 0; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; }
.st-hot span { background: rgba(28,18,34,.85); color: #f6ecd9; font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 2px solid rgba(255,255,255,.25); white-space: nowrap; }
.st-hot span i { font-style: normal; background: #e0567a; border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.st-portal { left: 28%; top: 14%; width: 44%; height: 62%; align-items: center; } .st-portal span { background: rgba(80,40,140,.85); }
.st-desk { left: 0; top: 66%; width: 46%; height: 30%; }
.st-shelf { left: 60%; top: 10%; width: 40%; height: 50%; align-items: center; }
.st-now { position: relative; margin-top: -18px; padding: 16px 14px 30px; display: grid; gap: 9px; background: #f6ecd9; border-top: 4px solid #1c1222; border-radius: 22px 22px 0 0; }
.st-now .st-row { background: #fff; }
.st-row { display: flex; gap: 12px; align-items: center; text-align: left; background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 14px; padding: 10px 12px; box-shadow: 3px 3px 0 #1c1222; cursor: pointer; width: 100%; font: inherit; text-decoration: none; }
.st-row b { display: block; } .st-row small { opacity: .7; font-size: 12.5px; }
#study .st-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #ffc93c; border: 2px solid #1c1222; flex: none; }
.st-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10,6,20,.82); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.st-overlay.hidden { display: none; }
.st-sheet { background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 18px; box-shadow: 5px 5px 0 #1c1222; padding: 18px; width: min(440px, 100%); }
.st-sheet p { line-height: 1.45; }
.st-sheet-h { font-size: 12px; letter-spacing: .14em; font-weight: 800; opacity: .7; margin-bottom: 8px; }
.st-big { font-family: var(--font-comic, inherit); font-size: 32px; line-height: 1; margin-bottom: 8px; }
.st-btn { display: block; width: 100%; margin-top: 10px; padding: 13px; border-radius: 999px; border: 3px solid #1c1222; background: #ffc93c; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 3px 3px 0 #1c1222; color: #1c1222; }
.st-btn.purple { background: #8a6fd1; color: #fff; } .st-btn.ghost { background: #fff; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chips .st-chip { padding: 8px 12px; border-radius: 999px; border: 2px solid #1c1222; background: var(--c, #2bd46b); color: #fff; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.st-chips .st-chip:not([style]) { background: #3f9a52; }
.st-chips .st-chip.off { background: #d8d0c2 !important; color: #1c1222; text-decoration: line-through; opacity: .7; }
.st-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-roomopt { border: 3px solid #1c1222; border-radius: 12px; padding: 0; overflow: hidden; background: #fff; cursor: pointer; font: inherit; }
.st-roomopt.sel { outline: 4px solid #8a6fd1; } .st-roomopt b { display: block; padding: 6px; font-size: 13px; }
.st-letterpaper { background: #fff6e0; border: 2px solid #c9a04a; border-radius: 8px; padding: 6px 16px; font-family: Georgia, serif; font-size: 15px; transform: rotate(-.6deg); }
.st-visit { width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; color: #f6ecd9; }
.sv-top { letter-spacing: .2em; font-weight: 800; font-size: 13px; color: #ffc93c; margin-bottom: 14px; }
.sv-portal { position: relative; width: 250px; height: 250px; }
.sv-swirl { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#8a6fd1, #2f8a8a, #ffc93c, #e0567a, #8a6fd1); box-shadow: 0 0 60px #8a6fd1aa; animation: svspin 6s linear infinite; }
@keyframes svspin { to { transform: rotate(360deg); } }
.sv-face { position: absolute; inset: 26px; border-radius: 50%; overflow: hidden; border: 4px solid #1c1222; background: #3a1f5e; }
.sv-face .scene { position: absolute; inset: -10% -30% -60%; }
.sv-face .bg-layer { display: none; }
.sv-face .char-layer, .sv-face .char-layer svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sv-ring { position: absolute; inset: -6px; border-radius: 50%; border: 5px solid #1c1222; pointer-events: none; }
.sv-who { font-size: 30px; font-weight: 900; margin-top: 16px; }
.sv-card { background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 18px; box-shadow: 5px 5px 0 #1c1222; margin-top: 12px; padding: 14px 16px; width: 100%; }
.sv-card .k { font-size: 11px; font-weight: 800; letter-spacing: .12em; opacity: .6; } .sv-card .t { font-size: 20px; font-weight: 900; margin: 4px 0 8px; } .sv-card p { font-size: 13px; opacity: .8; margin: 8px 0 0; }
.sv-btns { display: flex; gap: 12px; margin-top: 18px; }
.sv-btns button { color: #1c1222; border: 3px solid #1c1222; border-radius: 999px; padding: 13px 18px; font: inherit; font-weight: 900; font-size: 15px; box-shadow: 3px 3px 0 #1c1222; cursor: pointer; }
.sv-yes { background: #2bd46b; } .sv-no { background: #f6ecd9; }
.st-page { padding: 16px 14px 30px; max-width: 520px; margin: 0 auto; }
.st-page .back { color: #f6ecd9; opacity: .8; text-decoration: none; font-weight: 700; }
.st-h { font-family: var(--font-comic, inherit); color: #ffc93c; font-size: 34px; margin: 12px 0 6px; }
.st-sub { opacity: .75; font-size: 13.5px; margin: 0 0 10px; }
.st-paper { background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 18px; box-shadow: 5px 5px 0 #1c1222; padding: 10px; text-align: center; }
.st-paper small { display: block; font-size: 12px; opacity: .7; }
.st-sec { font-size: 12px; letter-spacing: .14em; font-weight: 800; opacity: .6; margin: 16px 0 4px; }
.st-trow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; background: #2a1e38; border-radius: 12px; padding: 9px 12px; margin-top: 7px; font-size: 13px; color: #f6ecd9; text-decoration: none; }
.st-trow small { display: block; opacity: .6; font-size: 11px; }
.st-state { font-size: 11px; font-weight: 800; color: #9fe3b0; } .st-state.m { color: #ffc93c; }
.st-empty { opacity: .7; }
.st-letter { display: flex; gap: 12px; align-items: center; background: #2a1e38; border-radius: 12px; padding: 10px 12px; margin-top: 8px; color: #f6ecd9; text-decoration: none; }
.st-letter small { display: block; opacity: .65; font-size: 12px; } .st-letter > span:nth-child(2) { flex: 1; }
.st-letter i { font-style: normal; background: #e0567a; border-radius: 999px; padding: 0 7px; font-weight: 800; }
.st-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; border: 2px solid #1c1222; color: #fff; flex: none; }
.st-thread { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.st-msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; }
.st-msg.them { background: #fff6e0; color: #1c1222; font-family: Georgia, serif; align-self: flex-start; border: 2px solid #c9a04a; }
.st-msg.me { background: #8a6fd1; color: #fff; align-self: flex-end; }
.st-reply { display: flex; gap: 8px; margin: 10px 0 14px; } .st-reply input { flex: 1; padding: 12px; border-radius: 999px; border: 2px solid #1c1222; font: inherit; } .st-reply button { padding: 0 18px; border-radius: 999px; border: 2px solid #1c1222; background: #ffc93c; font-weight: 800; }

.home-extras { display: grid; gap: 8px; margin: 0 0 12px; }
.home-extras .back { color: #f6ecd9; opacity: .8; text-decoration: none; font-weight: 700; }


/* the visit: a close-up of the room's real portal, the philosopher emerging from the swirl */
.sv-portal.real { width: min(300px, 78vw); height: auto; aspect-ratio: 280 / 318; border-radius: 18px; overflow: hidden; border: 3px solid #000; box-shadow: 0 0 60px #8a6fd1aa; }
.sv-portal.real > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sv-portal.real .sv-face { inset: auto; left: 50%; top: var(--fy, 53%); width: 50%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; background: none; -webkit-mask: radial-gradient(circle, #000 52%, transparent 71%); mask: radial-gradient(circle, #000 52%, transparent 71%); animation: svEmerge 1.6s ease-out both; }
.sv-portal.real .sv-glow { position: absolute; left: 50%; top: var(--fy, 53%); width: 60%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, transparent 45%, rgba(200,168,255,.55) 62%, transparent 72%); animation: svPulse 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes svEmerge { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); filter: blur(6px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } }
@keyframes svPulse { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.06); } }

/* the portal stirs: your study's portal fills the screen, like the front door in the flats */
.st-overlay.full { padding: 0; display: block; background: #140c1f; }
.st-visit.full { position: fixed; inset: 0; overflow: hidden; color: #f6ecd9; }
.st-visit.full .sv-portal.real { position: absolute; inset: 0; width: auto; height: auto; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.st-visit.full .sv-portal.real > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-visit.full .sv-portal.real .sv-face { left: var(--fx, 50%); width: var(--fs, 50%); }
.st-visit.full .sv-portal.real .sv-glow { left: var(--fx, 50%); width: calc(var(--fs, 50%) * 1.2); }
.st-visit.full .sv-top { position: absolute; left: 0; right: 0; top: max(18px, env(safe-area-inset-top)); text-align: center; z-index: 2; font-family: var(--font-comic, inherit); font-size: 22px; letter-spacing: 3px; color: #ffc93c; -webkit-text-stroke: 1px #1c1222; text-shadow: 2px 2px 0 #1c1222; }
.st-visit.full .sv-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 40px 16px max(22px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(20,12,31,.9) 28%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.st-visit.full .sv-bottom .sv-card, .st-visit.full .sv-bottom .sv-btns { width: min(440px, 100%); margin: 0; }

.st-phil { height: 46px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 12px; border: 2px solid #1c1222; background: #ffc93c; color: #1c1222; font: inherit; font-weight: 800; font-size: 12px; line-height: 1.05; text-align: left; cursor: pointer; box-shadow: 2px 2px 0 #1c1222; } .st-phil { font-size: 12px; } .st-phil span { display: block; }
.st-clock { min-width: 0; } .st-clock small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-clock { padding: 8px 10px; } .st-clock small { font-size: 10px; letter-spacing: .08em; } .st-phil { font-size: 11px; padding: 0 8px; gap: 5px; }

/* letters: the same layout as the phone's messages in the flats */
.st > .st-page, .st > .lt-phone { width: 100%; box-sizing: border-box; }
.lt-phone { display: flex; flex-direction: column; min-height: 100dvh; background: #f6ecd9; color: #1c1222; }
.lt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: #1c1222; color: #ffc93c; font-size: 12.5px; font-weight: 700; }
.lt-back { color: #f6ecd9; text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 0; white-space: nowrap; }
.lt-h { font-family: var(--font-comic, inherit); font-size: 32px; letter-spacing: 1px; padding: 12px 16px 4px; }
.lt-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1.5px solid #e2d6bf; color: #1c1222; text-decoration: none; }
.lt-row > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lt-row small { color: #6a5a70; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-av { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #1c1222; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-comic, inherit); font-size: 20px; color: #fff; flex: none; } .lt-av.big { width: 48px; height: 48px; }
.lt-badge { min-width: 20px; height: 20px; border-radius: 999px; background: #e0567a; color: #fff; font-style: normal; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; box-sizing: border-box; }
.lt-empty { padding: 8px 16px; color: #6a5a70; }
.lt-thread-h { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid #e2d6bf; } .lt-thread-h span:last-child { display: flex; flex-direction: column; } .lt-thread-h small { color: #6a5a70; }
.lt-msgs { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lt-b { max-width: 82%; border: 2.5px solid #1c1222; border-radius: 16px; padding: 10px 13px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; }
.lt-b.them { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; font-family: Georgia, serif; } .lt-b.me { align-self: flex-end; background: #ffc93c; border-bottom-right-radius: 4px; }
.lt-talk { align-self: center; margin-top: 6px; border: 3px solid #1c1222; border-radius: 999px; background: #8a6fd1; color: #fff; font: inherit; font-weight: 800; padding: 10px 16px; box-shadow: 3px 3px 0 #1c1222; cursor: pointer; }
.lt-compose { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 2px solid #e2d6bf; position: sticky; bottom: 0; background: #f6ecd9; }
.lt-compose input { flex: 1; min-width: 0; height: 46px; border: 3px solid #1c1222; border-radius: 999px; padding: 0 16px; font: inherit; font-size: 16px; }
.lt-send { border: 3px solid #1c1222; border-radius: 999px; background: #2bd46b; font: inherit; font-weight: 700; padding: 0 16px; cursor: pointer; color: #1c1222; }
.sv-btns { justify-content: center; } .st-visit.full .sv-btns button { flex: 1; display: flex; align-items: center; justify-content: center; }
.st-visit.full .sv-btns button { white-space: nowrap; padding: 13px 10px; } .st-visit.full .sv-btns .sv-yes { flex: 1.5; }
#call.in-person #selfView, #call.in-person #bCam { display: none !important; }
.lt-sys { align-self: center; font-size: 12px; font-weight: 700; color: #8a7a90; background: #ece0c8; border-radius: 999px; padding: 4px 10px; }
.lt-b.typing { opacity: .6; }

/* study top bar, like the flats: brand + streak + Your philosophy + help + settings, then the clock row */
.st-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 6px; }
.st-brand .brand { font-size: 26px; line-height: 1; } .st-brand small { display: block; font-size: 12px; color: #cbb8d6; margin-top: 2px; }
.st-topbar-r { display: flex; align-items: center; gap: 6px; }
.st-pill { background: #2a1d38; border: 2px solid #3d2c50; border-radius: 999px; padding: 5px 9px; font: inherit; font-weight: 800; font-size: 13px; color: #f6ecd9; white-space: nowrap; }
.st-pill.phil { background: #ffc93c; border-color: #1c1222; color: #1c1222; cursor: pointer; box-shadow: 2px 2px 0 #1c1222; }
.st-icon { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255,255,255,.12); color: #f6ecd9; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.st-top { padding: 4px 12px 8px; }
.st-top .st-clock { display: flex; align-items: baseline; gap: 10px; } .st-top .st-clock small { order: 2; }
.st-now-h { font-family: var(--font-comic, inherit); font-size: 24px; letter-spacing: 1px; color: #1c1222; }
.st-now-h.small { font-size: 15px; letter-spacing: .1em; opacity: .55; margin-top: 4px; }
.st-row.dashed { border-style: dashed; box-shadow: none; font-weight: 600; color: #5a4a60; cursor: default; }
.st-badge { font-style: normal; margin-left: auto; min-width: 22px; height: 22px; border-radius: 999px; background: #e0567a; color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.st-row > span:nth-child(2) { flex: 1; min-width: 0; } .st-row small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* how it works + good night */
.st-howlist { display: grid; gap: 10px; margin: 6px 0 4px; } .st-howlist div { display: flex; gap: 10px; align-items: flex-start; } .st-howlist span { font-size: 22px; width: 30px; flex: none; text-align: center; } .st-howlist p { margin: 0; }
.st-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; } .st-stats div { background: #fff; border: 3px solid #1c1222; border-radius: 12px; text-align: center; padding: 8px 4px; } .st-stats b { display: block; font-family: var(--font-comic, inherit); font-size: 28px; line-height: 1; } .st-stats span { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; opacity: .7; }
.st-list { display: grid; gap: 6px; margin: 6px 0; } .st-list div { display: flex; justify-content: space-between; gap: 8px; background: #fff; border-radius: 10px; padding: 7px 10px; font-size: 14px; }
.st-note, .st-empty-d { font-size: 13.5px; opacity: .8; margin: 6px 0; }
.st-tease { margin: 8px 0 2px; padding: 9px 12px; border: 2px dashed #8a6fd1; border-radius: 12px; font-weight: 700; color: #5a3fa8; }
/* a letter arriving pops up over the room */
.st-notif { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; background: #fff; color: #1c1222; border: 3px solid #1c1222; border-radius: 16px; box-shadow: 3px 3px 0 #1c1222; padding: 8px 12px; text-align: left; font: inherit; cursor: pointer; animation: stNotifIn .35s ease-out; transition: opacity .35s, transform .35s; }
.st-notif .st-av { width: 34px; height: 34px; font-size: 16px; }
.st-notif span:last-child { display: flex; flex-direction: column; min-width: 0; } .st-notif b { font-size: 13.5px; } .st-notif small { font-size: 13px; color: #3a2a40; line-height: 1.3; font-family: Georgia, serif; }
.st-notif.out { opacity: 0; transform: translateY(-8px); }
@keyframes stNotifIn { from { opacity: 0; transform: translateY(-10px); } }
.st-now { grid-template-columns: minmax(0, 1fr); }
.st-topbar { padding: 12px 12px 6px; gap: 6px; } .st-brand { min-width: 0; } .st-brand .brand { font-size: 22px; } .st-brand small { display: none; }
.st-topbar-r { gap: 5px; } .st-pill { padding: 5px 8px; font-size: 12.5px; } .st-icon { width: 32px; height: 32px; font-size: 15px; }
.st-list b { white-space: nowrap; } .st-stats span { white-space: nowrap; font-size: 9.5px; letter-spacing: .04em; }
body:not(.es) .concept.rand > .grade.none { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #ffc93c; border: 2px solid #1c1222; }
/* Surprise me (home): a random character + scenario/topic */
.surprise-all { display: flex; align-items: center; gap: 12px; width: 100%; margin: 18px 0 12px; padding: 12px 14px; background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 16px; box-shadow: 4px 4px 0 #1c1222; font: inherit; text-align: left; cursor: pointer; }
.surprise-all .sa-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #ffc93c; border: 2px solid #1c1222; flex: none; }
.surprise-all b { display: block; font-size: 17px; } .surprise-all small { display: block; font-size: 13px; opacity: .7; }
.surprise-all:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #1c1222; }

/* lessons with the teacher (languages): a compact strip at the top of the home screen */
.lessons { margin: 0 0 12px; padding: 8px 10px; background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 14px; box-shadow: 3px 3px 0 #1c1222; }
.ls-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .ls-h b { display: block; font-size: 14.5px; } .ls-h small { display: none; }
.ls-face { position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; border: 2px solid #1c1222; flex: none; background: #3a7ad8; }
.ls-face .scene, .ls-face .bg-layer, .ls-face .char-layer { position: absolute; inset: 0; } .ls-face svg { width: 100%; height: 100%; }
.ls-sets { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px 2px; } .ls-sets::-webkit-scrollbar { display: none; }
.ls-set { flex: none; display: flex; align-items: center; gap: 5px; padding: 6px 10px; background: #fff; color: #1c1222; border: 2px solid #1c1222; border-radius: 999px; font: inherit; cursor: pointer; white-space: nowrap; }
.ls-set b { font-size: 13px; } .ls-set small { font-size: 11px; opacity: .6; } .ls-ico { font-size: 15px; }
/* texting someone: their face and background sit behind the conversation (flat threads and the characters' chat) */
.chat-bg { position: fixed; inset: 0; max-width: 520px; margin: 0 auto; z-index: 0; overflow: hidden; background: #140c1f; }
.chat-bg .scene, .chat-bg .bg-layer, .chat-bg .char-layer { position: absolute; inset: 0; } .chat-bg svg { width: 100%; height: 100%; }
.chat-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,31,.15), rgba(20,12,31,.55)); }
.chat-over { position: relative; z-index: 1; }
/* the characters version's chat */
.ct-phone { display: flex; flex-direction: column; min-height: 100dvh; max-width: 520px; margin: 0 auto; color: #1c1222; }
.ct-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f6ecd9; border-bottom: 2px solid #1c1222; }
.ct-head button { background: none; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; color: #1c1222; padding: 6px 4px; }
.ct-head b { display: block; } .ct-head small { color: #6a5a70; } .ct-head .ct-call { margin-left: auto; background: #2bd46b; border: 2.5px solid #1c1222; border-radius: 999px; padding: 6px 12px; }
.ct-bubbles { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - 140px); }
.ct-b { max-width: 78%; border: 2.5px solid #1c1222; border-radius: 16px; padding: 9px 12px; font-size: 15px; line-height: 1.35; white-space: pre-wrap; box-shadow: 2px 2px 0 #1c1222; }
.ct-b.them { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; } .ct-b.me { align-self: flex-end; background: #ffc93c; border-bottom-right-radius: 4px; }
.ct-fix { align-self: flex-end; max-width: 82%; background: #fff; border: 2px solid #1c1222; border-radius: 12px; padding: 6px 10px; font-size: 12.5px; } .ct-fix s { opacity: .6; } .ct-fix em { display: block; color: #6a5a70; }
.ct-fix.nice { background: #fff4cf; border-color: #c99400; } .ct-fix.nice > b:first-child { color: #a87400; }
.ct-score { align-self: center; margin: 8px 0 2px; background: #ffc93c; color: #1c1222; border: 3px solid #1c1222; border-radius: 999px; padding: 7px 16px; font-weight: 800; font-size: 14px; box-shadow: 3px 3px 0 #1c1222; cursor: pointer; font-family: inherit; }
.ct-words { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 5px; } .ct-words span { font-size: 12px; background: #e8ffe8; border: 1.5px solid #0f6b33; border-radius: 8px; padding: 2px 7px; }
.ct-sys { align-self: center; font-size: 12.5px; color: #f6ecd9; background: rgba(20,12,31,.7); border-radius: 999px; padding: 4px 10px; }
.ct-compose { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #f6ecd9; border-top: 2px solid #1c1222; position: sticky; bottom: 0; }
.ct-compose input { flex: 1; height: 46px; border: 3px solid #1c1222; border-radius: 999px; padding: 0 16px; font: inherit; font-size: 16px; }
.ct-compose button { border: 3px solid #1c1222; border-radius: 999px; padding: 0 18px; background: #2bd46b; font: inherit; font-weight: 800; cursor: pointer; }
.btn-text { background: #f6ecd9 !important; color: #1c1222 !important; }

/* call transcript: a small pill under your camera, and the panel it opens */
.tx-btn { position: absolute; right: 16px; top: calc(236px + env(safe-area-inset-top)); z-index: 4; display: flex; align-items: center; gap: 5px; padding: 6px 10px 6px 8px; border: 0; border-radius: 999px; background: rgba(20, 12, 28, .55); color: #fff; font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: .85; }
.tx-btn svg { width: 15px; height: 15px; }
.tx-btn.on { background: var(--sun); color: var(--ink); opacity: 1; }
.tx-panel { position: absolute; left: 12px; right: 12px; bottom: calc(100px + env(safe-area-inset-bottom)); max-width: 640px; margin: 0 auto; max-height: 52vh; z-index: 6; display: flex; flex-direction: column; background: #fffaf0; color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); transform: translateY(14px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.tx-panel.on { transform: none; opacity: 1; pointer-events: auto; }
.tx-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px 7px; border-bottom: 2px solid rgba(28, 18, 34, .12); }
.tx-head b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.tx-close { border: 0; background: none; font-size: 16px; cursor: pointer; color: var(--ink); padding: 2px 4px; }
.tx-list { overflow-y: auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 9px; -webkit-overflow-scrolling: touch; }
.tx-line { font-size: 15px; line-height: 1.4; }
.tx-line i { display: block; font-style: normal; font-weight: 800; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .55; margin-bottom: 1px; }
.tx-line.you { align-self: flex-end; text-align: right; font-style: italic; color: #5a3d66; max-width: 85%; }
.tx-line.you i { color: var(--magenta); opacity: 1; }
.tx-empty { margin: 0; opacity: .6; font-size: 14px; }
.cap.plato { pointer-events: auto; cursor: pointer; }
.call.tx-open .captions { opacity: 0; pointer-events: none; }
/* the transcript pill sits under your camera tile; with no tile (in person, at the door) it tucks under the status pill */
#call:not(:has(.self-view.cam-on)) .tx-btn, #call.in-person .tx-btn { top: calc(68px + env(safe-area-inset-top)); }
#call:has(.self-view.cam-on) .tx-btn { top: calc(264px + env(safe-area-inset-top)); }
@media (max-width: 480px) { #call:has(.self-view.cam-on) .tx-btn { top: calc(232px + env(safe-area-inset-top)); } }
.ob-bubble { cursor: pointer; padding-right: 46px; }
.ob-replay { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink); background: var(--sun); color: var(--ink); display: grid; place-items: center; padding: 0; cursor: pointer; }
.ob-replay svg { width: 16px; height: 16px; }
/* waiting for the browser's microphone prompt after tapping Answer */
#ringing.mic-wait .ring-btn { opacity: .35; pointer-events: none; }

/* praise that raises a stat: a small green "▲ Vocab +1" pill */
.nh { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 0; margin-bottom: 3px; } .nh .k { white-space: nowrap; flex: none; } .nh .boost { margin: 0; flex: none; }
.boost { display: inline-block; background: #2bd46b; color: #10331d; border: 2px solid #1c1222; border-radius: 999px; padding: 0 8px; margin: 0 6px 2px 0; font-weight: 800; font-size: 11.5px; letter-spacing: .02em; text-transform: none; vertical-align: 1px; white-space: nowrap; animation: boostPop .5s ease-out .15s both; }
@keyframes boostPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
.ob-login { display: block; margin: 12px auto 0; background: none; border: 0; padding: 8px 12px; font: inherit; font-size: 14.5px; color: #f6ecd9; opacity: .9; cursor: pointer; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ob-login u { font-weight: 800; }

/* ---------- endless calls (feed version) ---------- */

.fd { max-width: 430px; margin: 0 auto; padding: 14px 14px 24px; }
.fd-top { display: flex; align-items: center; justify-content: space-between; }
.fd-top .brand { font-size: 34px; }
.fd-pills { display: flex; align-items: center; gap: 6px; }
.fd-pill { box-sizing: border-box; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; background: #2a1d38; border: 2px solid #3d2c50; border-radius: 999px; padding: 0 9px; font-weight: 800; font-size: 13px; line-height: 1; white-space: nowrap; }
.fd-pill.lvl { color: #ffc93c; }
.fd-lvl { background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 16px; padding: 10px 12px; margin-top: 12px; box-shadow: 4px 4px 0 #000; }
.fd-lvl-h { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; }
.fd-lvl-h em { font-style: normal; color: #6a5a70; font-weight: 700; font-size: 12.5px; }
.fd-bar { height: 12px; background: #e3d6c3; border: 2px solid #1c1222; border-radius: 999px; margin-top: 7px; overflow: hidden; }
.fd-bar i { display: block; height: 100%; width: 38%; background: linear-gradient(90deg, #2bd46b, #8be26f); }
.fd-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.fd-st { text-align: center; font-size: 10.5px; color: #4a3a52; font-weight: 700; }
.fd-st b { display: block; font-size: 15px; color: #1c1222; }
.fd-st span { display: block; height: 5px; background: #e3d6c3; border-radius: 3px; margin-top: 3px; overflow: hidden; } .fd-st span i { display: block; height: 100%; background: #5aa9e6; }
.fd-q { font-family: var(--font-comic, Impact); font-size: 22px; letter-spacing: .04em; margin: 18px 2px 10px; }
.fd-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fd-card { background: #f6ecd9; color: #1c1222; border: 3px solid #1c1222; border-radius: 18px; overflow: hidden; box-shadow: 5px 5px 0 #000; padding: 0; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; }
.fd-card .pic { position: relative; aspect-ratio: 4 / 5; border-bottom: 3px solid #1c1222; }
.fd-card .pic .scene { position: absolute; inset: 0; }
.fd-card .ring { position: absolute; top: 8px; left: 8px; background: #2bd46b; color: #10331d; border: 2px solid #1c1222; border-radius: 999px; font-weight: 800; font-size: 11px; padding: 2px 8px; animation: rpulse 1.2s infinite; }
@keyframes rpulse { 50% { transform: scale(1.06); } }
.fd-card .txt { padding: 9px 10px 11px; }
.fd-card b { font-family: var(--font-comic, Impact); font-size: 21px; letter-spacing: .03em; display: block; line-height: 1; }
.fd-card .what { font-size: 13px; margin-top: 5px; font-weight: 700; line-height: 1.25; }
.fd-card .what small { display: block; font-weight: 600; color: #6a5a70; font-size: 11.5px; margin-top: 2px; }
.fd-card .tag { display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; border: 2px solid #1c1222; }
.tag.chat { background: #ffc93c; } .tag.scn { background: #5aa9e6; }
.fd-row { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.fd-shuffle { background: none; border: 2px solid #f6ecd9; color: #f6ecd9; border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 800; }
.fd-today { font-size: 13px; color: #c9bcd8; }
#feed { color: #f6ecd9; }
.fd-q small { display: block; font-family: system-ui, sans-serif; font-size: 12px; letter-spacing: 0; opacity: .7; margin-top: 2px; }
.fd-card:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 #000; }
.fd-more { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.fd-link { background: #2a1d38; border: 2px solid #3d2c50; color: #f6ecd9; border-radius: 14px; padding: 12px 14px; font: inherit; font-weight: 700; text-align: left; }
.fd-top .icon-btn { box-sizing: border-box; width: 34px; height: 34px; min-width: 34px; padding: 0; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.fd-top { gap: 10px; }
.fd-top .brand { font-size: 28px; flex-shrink: 0; }
.fd-pills { gap: 6px; }
@media (max-width: 380px) { .fd-top .brand { font-size: 23px; } .fd-pills { gap: 4px; } .fd-pill { padding: 0 7px; height: 32px; } .fd-top .icon-btn { width: 32px; height: 32px; min-width: 32px; } }
.stats-panel { display: block; width: 100%; background: none; border: 0; padding: 0; margin: 0 0 6px; text-align: left; font: inherit; cursor: pointer; }
.stats-panel .fd-lvl { margin-top: 4px; }
.fd-lvl { cursor: pointer; }

/* ---------- Phil home by branch (rows of topics per branch of philosophy) ---------- */
.home-view { display: flex; gap: 6px; background: rgba(246, 236, 217, .08); border: 2px solid rgba(246, 236, 217, .15); border-radius: 999px; padding: 4px; margin: 0 0 16px; }
.home-view button { flex: 1; border: 0; border-radius: 999px; padding: 9px 10px; font: 700 14.5px inherit; font-family: inherit; color: var(--paper, #f6ecd9); background: none; cursor: pointer; }
.home-view button.on { background: var(--paper, #f6ecd9); color: var(--ink, #1c1222); }
.grid.by-branch { display: block; }
.bb-sec { margin: 6px 0 20px; }
.bb-h { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; color: var(--paper, #f6ecd9); }
.bb-h i { width: 12px; height: 12px; border-radius: 50%; background: var(--bc); border: 2px solid var(--ink, #1c1222); flex: none; }
.bb-h b { font-family: Bangers, Impact, sans-serif; font-weight: 400; letter-spacing: 1px; font-size: 26px; }
.bb-h span { margin-left: auto; font-size: 13px; opacity: .7; }
.bb-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 10px 24px 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.bb-row::-webkit-scrollbar { display: none; }
.bb-card { position: relative; flex: 0 0 136px; scroll-snap-align: start; text-align: left; background: #f6ecd9; border: 3px solid #1c1222; border-radius: 16px; box-shadow: 3px 3px 0 #1c1222; overflow: hidden; color: #1c1222; padding: 0; font: inherit; cursor: pointer; }
.bb-stack { margin-right: 8px; box-shadow: 4px 4px 0 #efe3cc, 4px 4px 0 3px #1c1222, 8px 8px 0 #e6d8bd, 8px 8px 0 3px #1c1222; }
.bb-card.locked .bb-face { filter: grayscale(.7) brightness(.8); }
.bb-face { position: relative; height: 96px; border-bottom: 3px solid #1c1222; overflow: hidden; background: #2a1d3a; }
.bb-face::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--bc); }
.bb-face .bg-layer, .bb-face .char-layer { position: absolute; inset: 0; }
.bb-t { font-weight: 800; font-size: 14px; line-height: 1.15; padding: 8px 9px 2px; min-height: 34px; }
.bb-w { font-size: 12px; opacity: .7; padding: 0 9px 9px; }
.bb-ring { position: absolute; left: 6px; top: 6px; width: 40px; height: 40px; z-index: 2; background: #f6ecd9; border-radius: 50%; box-shadow: 1px 1px 0 #1c1222; }
.bb-ring svg { width: 100%; height: 100%; }
.bb-ring path { fill: none; stroke-width: 4; stroke-linecap: round; }
.bb-ring .track { stroke: rgba(28, 18, 34, .14); }
.bb-ring .fill-in { stroke: var(--green, #2bd46b); }
.bb-ring .fill-out { stroke: var(--gold, #f2b33d); }
.bb-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.bb-n { position: absolute; right: 6px; top: 6px; z-index: 2; background: #1c1222; color: #ffc93c; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.bb-lock { position: absolute; right: 6px; top: 6px; z-index: 2; font-size: 16px; }
.bb-sheet .bb-sh-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.bb-sh-face { position: relative; width: 64px; height: 64px; flex: none; border: 3px solid #1c1222; border-radius: 14px; overflow: hidden; }
.bb-sh-face .bg-layer, .bb-sh-face .char-layer { position: absolute; inset: 0; }
.bb-topic { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 3px solid #1c1222; border-radius: 14px; box-shadow: 3px 3px 0 #1c1222; padding: 10px 12px; margin: 8px 0; font: inherit; color: #1c1222; cursor: pointer; }
.bb-topic .bb-ring { position: relative; left: 0; top: 0; width: 36px; height: 36px; flex: none; box-shadow: none; }
.bb-topic b { flex: 1; font-size: 16px; }
.bb-topic span { font-size: 20px; }
.bb-topic.locked { opacity: .65; }

/* in person (door, visit, out): no call timer or call bar; where you are, comic chips, and a "say bye" button instead of hanging up */
.call-where { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; background: #f6ecd9; color: #1c1222; border: 2.5px solid #1c1222; border-radius: 999px; padding: 4px 12px 4px 8px; font-weight: 800; font-size: 13.5px; box-shadow: 2px 2px 0 #1c1222; max-width: 62vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-where.hidden, .ctl.end .end-lbl { display: none; }
#call.in-person #cTimer { display: none; }
#call.in-person .controls { background: none !important; box-shadow: none !important; border: 0 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
#call.in-person .ctl { background: #f6ecd9 !important; color: #1c1222 !important; border: 3px solid #1c1222 !important; box-shadow: 3px 3px 0 #1c1222 !important; }
#call.in-person .ctl.on { background: #fff !important; }
#call.in-person .ctl.end { width: auto !important; padding: 0 16px !important; border-radius: 999px !important; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
#call.in-person .ctl.end:has(.end-lbl) svg { display: none; }
#call.in-person .ctl.end .end-lbl { display: inline; font-weight: 800; font-size: 15.5px; }

/* onboarding like Abroad's: the app tag next to the name, and interest chips */
.es-tag { display: inline-block; font-size: .42em; vertical-align: middle; background: var(--coral); color: var(--ink); border: 3px solid var(--ink); border-radius: 8px; padding: 4px 8px 2px; transform: rotate(-4deg) translateY(-6px); box-shadow: 3px 3px 0 var(--ink); letter-spacing: .06em; text-shadow: none; }
.ph-tag { background: #8a6fd1; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.chip-btn { border: 2.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.chip-btn.sel { background: var(--green); }
.ob-chips { margin-bottom: 4px; }
