/* Kid-Tok v3 (2026-10-20): dark and cinematic like the iOS app. Near-black, white text, one hot orange accent,
   Bebas Neue (SIL OFL, BebasNeue-OFL.txt) for titles, the system font for everything else. */
@font-face { font-family: "Bebas Neue"; src: url("BebasNeue-Regular.ttf") format("truetype"); font-display: swap; }
:root {
  --ink: #0b0b0f; --panel: #17171d; --raised: #23232b; --line: #34343f; --dim: #9a9aa8; --white: #fff;
  --accent: #ff5a1f; --warn: #ffc845; --good: #3ddc84; --r: 18px;
  --title: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--ink); color: var(--white); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px; line-height: 1.35; -webkit-user-select: none; user-select: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; -webkit-user-select: text; user-select: text; }
#app { max-width: 620px; margin: 0 auto; padding: 12px 12px 120px; }
h1, h2, h3, .title { font-family: var(--title); font-weight: 400; letter-spacing: .5px; text-transform: uppercase; }

/* top bar */
.top { display: flex; align-items: center; gap: 12px; padding: 6px 0 12px; }
.top h1 { font-size: 40px; margin: 0; flex: 1; line-height: 1; }
.face { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-family: var(--title); font-size: 30px; flex: none; background: var(--raised); padding-top: 3px; }
.face.small { width: 34px; height: 34px; font-size: 20px; }
.f-bill { background: #2f6fde; } .f-kate { background: #c2417a; } .f-frankie { background: #e0531f; }
.f-charlie { background: #7a4fd6; } .f-joey { background: #1f9e6e; } .f-someone { background: #55555f; }
.f-nobody { background: var(--raised); }

/* buttons: the accent ones are .big (and the old .mint/.pink names), the quiet ones .white/.sky/.lilac */
.big { display: flex; align-items: center; justify-content: center; gap: 10px; border: none; border-radius: 16px;
  padding: 14px 20px; font-size: 19px; font-weight: 700; background: var(--accent); color: #000; min-height: 58px;
  transition: transform .06s, opacity .06s; }
.big:active { transform: scale(.97); opacity: .85; }
.big:disabled { opacity: .4; }
.big .emo { display: none; }
.big.white, .big.sky, .big.lilac { background: var(--raised); color: #fff; }
.big.coral { background: #e5363d; color: #fff; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .big { flex: 1 1 180px; }
.small-btn { border: none; border-radius: 999px; background: var(--raised); color: #fff; padding: 8px 14px;
  font-size: 15px; font-weight: 600; }
.link { background: none; border: none; text-decoration: underline; font-size: 16px; padding: 8px; color: var(--dim); }

/* tabs */
.tabs { display: flex; gap: 6px; margin: 0 0 14px; flex-wrap: wrap; }
.tabs button { border: none; border-radius: 999px; background: var(--raised); color: var(--dim); padding: 8px 16px;
  font-size: 16px; font-weight: 700; }
.tabs button.on { background: #fff; color: #000; }

/* feed cards: a tall media box with the action bar on the right, like the app */
.card { background: var(--panel); border-radius: 22px; margin: 0 0 20px; overflow: hidden; position: relative; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.card-head b { font-family: var(--title); font-weight: 400; font-size: 28px; line-height: 1; }
.card-head small { color: var(--dim); font-size: 14px; }
.card-head .grow { flex: 1; }
.media { position: relative; background: #000; display: grid; place-items: center; min-height: 200px; }
.media img, .media video { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #000; }
.play { position: absolute; inset: 0; margin: auto; width: 88px; height: 88px; border-radius: 50%; border: none;
  background: var(--accent); color: #000; font-size: 36px; display: grid; place-items: center; padding-left: 6px; }
.placeholder { padding: 50px 0; font-size: 20px; text-align: center; width: 100%; color: var(--dim); }
.pin { background: var(--accent); color: #000; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 800; }

.actions { display: flex; gap: 8px; padding: 10px 12px 0; align-items: center; }
.act { display: inline-flex; align-items: center; gap: 6px; border: none; background: var(--raised); color: #fff;
  border-radius: 999px; padding: 8px 14px; font-size: 16px; font-weight: 700; min-height: 42px; }
.act svg { width: 22px; height: 22px; fill: currentColor; }
.act.on { color: var(--accent); }
.act .stack { display: inline-flex; }
.act .stack img { width: 24px; height: 24px; margin-left: -8px; }
.act .stack img:first-child { margin-left: 0; }

.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; padding: 12px; }
.stk { border: 2px solid transparent; background: var(--raised); border-radius: 16px; padding: 6px; aspect-ratio: 1; }
.stk img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.stk.on { border-color: var(--accent); background: rgba(255, 90, 31, .18); }
.stk:active { transform: scale(.92); }
.who-reacted { padding: 8px 14px 2px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--dim); }
.who-reacted span { display: inline-flex; align-items: center; gap: 4px; }
.who-reacted img { width: 30px; height: 30px; }
.card-foot { display: flex; justify-content: flex-end; padding: 8px 12px 12px; gap: 8px; flex-wrap: wrap; }
.hide-btn { border: none; background: none; color: var(--dim); border-radius: 999px; padding: 8px 10px; font-size: 15px; text-decoration: underline; }

/* comments */
.comments { padding: 4px 14px 10px; border-top: 1px solid rgba(52, 52, 63, .6); margin-top: 10px; }
.cmt { display: flex; gap: 10px; padding: 8px 0; align-items: flex-start; }
.cmt .grow { flex: 1; }
.cmt b { font-size: 13px; color: var(--dim); }
.cmt small { color: var(--dim); font-size: 12px; margin-left: 6px; opacity: .7; }
.cmt p { margin: 2px 0 0; font-size: 16px; -webkit-user-select: text; user-select: text; }
.cmt.waiting { opacity: .75; }
.cmt .wait { color: var(--warn); font-size: 13px; font-weight: 700; }
.cmt .x { border: none; background: none; color: var(--dim); font-size: 14px; padding: 4px 6px; }
.say { display: flex; gap: 8px; margin-top: 8px; }
.say input { flex: 1; border: 1px solid var(--line); background: var(--raised); color: #fff; border-radius: 14px; padding: 10px 12px; font-size: 16px; }
.say button { border: none; background: var(--accent); color: #000; border-radius: 14px; padding: 0 16px; font-weight: 800; }
.hint { color: var(--dim); font-size: 13px; margin: 6px 0 0; }

.done { text-align: center; padding: 30px 10px 10px; }
.done img { width: 120px; }
.done h2 { font-size: 48px; margin: 10px 0 4px; line-height: 1; }
.done p { margin: 0; color: var(--dim); }

/* states */
.chip { display: inline-block; border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 13px; }
.chip.pending { background: rgba(255, 200, 69, .16); color: var(--warn); }
.chip.shared { background: rgba(61, 220, 132, .16); color: var(--good); }
.chip.denied { background: rgba(255, 90, 31, .16); color: var(--accent); }
.reason { background: rgba(255, 90, 31, .14); border: 1px solid rgba(255, 90, 31, .5); border-radius: 14px; padding: 12px 14px; margin: 0 14px 12px; }
.warn { background: rgba(255, 200, 69, .12); border: 1px solid rgba(255, 200, 69, .6); border-radius: 14px; padding: 10px 14px; margin: 0 14px 10px; font-weight: 600; }
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.mine-grid .card { margin: 0; }
.mine-grid .media img { max-height: 240px; object-fit: cover; }

/* pairing */
.pair { text-align: center; padding-top: 30px; }
.pair img.logo { width: 128px; border-radius: 30px; box-shadow: 0 0 40px rgba(255, 90, 31, .35); }
.pair h1 { font-size: 64px; margin: 14px 0 4px; line-height: 1; }
.pair p { color: var(--dim); }
.code { font-size: 46px; letter-spacing: 10px; text-align: center; width: 100%; max-width: 420px; border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 12px 10px 12px 20px; margin: 20px 0; background: var(--raised); color: #fff; font-weight: 800;
  font-family: ui-monospace, Menlo, monospace; }
.tip { background: var(--panel); border-radius: 16px; padding: 14px 18px; margin: 24px auto 0; max-width: 520px;
  font-size: 16px; text-align: left; color: var(--dim); }

/* post flow */
.sheet h2 { font-size: 44px; margin: 4px 0 14px; line-height: 1; }
.preview { border-radius: 20px; overflow: hidden; background: #000; margin-bottom: 16px; }
.preview img, .preview video { display: block; width: 100%; max-height: 56vh; object-fit: contain; }
.faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 8px 0 20px; }
.pick { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: #fff; padding: 12px 6px; display: flex;
  flex-direction: column; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.pick.on { border: 2.5px solid var(--accent); background: rgba(255, 90, 31, .18); }
.pick .face { width: 58px; height: 58px; }
.trim { background: var(--panel); border-radius: 18px; padding: 14px 18px; margin-bottom: 16px; }
.trim input[type=range] { width: 100%; height: 44px; accent-color: var(--accent); }
.bar { height: 10px; border-radius: 999px; overflow: hidden; background: var(--raised); margin: 16px 0; }
.bar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.center { text-align: center; color: var(--dim); }
.sent img { width: 140px; margin-top: 20px; }

/* parents */
.parent-box { background: var(--panel); border-radius: 18px; padding: 14px 18px; margin-bottom: 16px; font-size: 16px; }
.parent-box h3 { margin: 0 0 10px; font-size: 28px; line-height: 1; }
.line { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; border-top: 1px solid var(--line); }
.line:first-of-type { border-top: none; }
.line .grow { flex: 1; min-width: 160px; }
.line small { color: var(--dim); }
.switch { width: 26px; height: 26px; accent-color: var(--accent); }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.reasons button { border: none; border-radius: 999px; background: var(--raised); color: #fff; padding: 6px 12px; font-size: 15px; font-weight: 600; }
.reasons button.on { background: var(--accent); color: #000; }
.note { width: 100%; border: 1px solid var(--line); background: var(--raised); color: #fff; border-radius: 14px; padding: 10px 12px; font-size: 16px; }
.btns { display: flex; gap: 10px; padding: 0 14px 14px; flex-wrap: wrap; }
.btns .big { flex: 1; min-height: 52px; font-size: 17px; padding: 10px; }

#toast { position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--raised); border: 1px solid var(--line); color: #fff; border-radius: 999px; padding: 12px 20px;
  font-size: 16px; font-weight: 600; max-width: 90vw; text-align: center; z-index: 10; }
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; z-index: 5; padding: 20px; }
.modal { background: var(--panel); border-radius: 22px; padding: 22px; max-width: 520px; width: 100%; text-align: center; }
.modal h2 { margin: 0 0 16px; font-size: 36px; line-height: 1; }
.modal .row { margin-top: 10px; }
.empty { text-align: center; color: var(--dim); padding: 30px 0; }
.qr svg { width: 240px; height: 240px; display: block; margin: 0 auto 6px; border-radius: 12px; }

/* v4 profiles */
.face { overflow: hidden; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face img.head { width: 82%; height: 82%; object-fit: contain; }
.tap { cursor: pointer; }
.profile { text-align: center; margin: 10px 0 18px; }
.profile .face { width: 112px; height: 112px; margin: 0 auto; font-size: 60px; border: 2px solid #fff; }
.profile h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 42px; margin: 10px 0 4px; letter-spacing: .5px; }
.profile .bio { color: var(--dim); margin: 4px auto; max-width: 420px; }
.profile .stats { display: flex; gap: 36px; justify-content: center; margin-top: 8px; }
.profile .stats b { display: block; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 30px; }
.profile .stats small { color: var(--dim); font-weight: 600; }
.waiting-note { color: #ffc845; font-weight: 600; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 12px; overflow: hidden; }
@media (min-width: 700px) { .profile-grid { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; aspect-ratio: 9 / 14; padding: 0; border: 0; background: var(--panel); overflow: hidden; cursor: pointer; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .pin { position: absolute; top: 6px; left: 6px; }
.tile .len { position: absolute; bottom: 6px; left: 7px; color: #fff; font-weight: 700; font-size: 13px; text-shadow: 0 1px 3px #000; }
