/* Chroma · one look for every page: a living gradient behind frosted panels.
   The gradient (chroma-gradient.js) is the place itself: the sky now, the camera, or the colours of your last photo.
   Panels are frosted white with dark ink, so text stays readable on any gradient, night or day. */
:root {
  --paper: #f7e4e8; --ink: #1c1416; --ink-soft: rgba(28, 20, 22, .64); --line: rgba(28, 20, 22, .12);
  --frost: rgba(255, 255, 255, .62); --frost-strong: rgba(255, 255, 255, .8); --frost-line: rgba(255, 255, 255, .7);
  --accent: #e2456b;
  --serif: Fraunces, "Iowan Old Style", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body { margin: 0; min-height: 100svh; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* the living gradient */
.field { position: fixed; inset: -8%; width: 116%; height: 116%; z-index: 0; filter: blur(34px) saturate(1.25); }
.grain { position: fixed; inset: 0; z-index: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .12; background-repeat: repeat; background-size: 128px 128px; }

/* page column */
main { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; display: grid; gap: 14px;
  padding-block: max(16px, env(safe-area-inset-top, 0px)) max(28px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top { display: flex; align-items: center; gap: 8px; padding: 4px 2px 6px; }
.brand { font: 500 19px var(--serif); text-decoration: none; margin-right: auto; padding: 5px 14px; border-radius: 999px; background: var(--frost-strong); border: 1px solid var(--frost-line); }
.walk-top .brand { background: none; border: 0; padding: 0; }
.kick { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 10vw, 52px); line-height: 1.02; }
h2 { font-size: 24px; line-height: 1.1; }
h2 small, .muted, small { color: var(--ink-soft); font-family: var(--sans); font-size: 13px; }
p { margin: 0; }

/* frosted panels */
.panel { background: var(--frost); border: 1px solid var(--frost-line); border-radius: var(--radius); padding: 18px;
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); display: grid; gap: 12px; min-width: 0; }
.panel.hero { gap: 10px; padding: 22px 20px; }

/* buttons */
.cta, .btn, .pill, .chip, button { font: inherit; cursor: pointer; border: 0; text-decoration: none; }
.cta { display: flex; gap: 8px; justify-content: center; align-items: center; width: 100%; padding: 16px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 500; font-size: 16px; }
.cta.light { background: var(--frost-strong); color: var(--ink); border: 1px solid var(--frost-line); }
.cta:active, .chip:active, .pill:active { transform: scale(.98); }
.actions { display: grid; gap: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip, .pill { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--frost-strong); border: 1px solid var(--frost-line); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.round { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--frost-strong); border: 1px solid var(--frost-line); font: 600 15px var(--serif); }
button:disabled { opacity: .45; cursor: wait; }

/* colours */
.strip { display: flex; height: 14px; border-radius: 999px; overflow: hidden; border: 1px solid var(--frost-line); }
.strip span, .strip i { flex: 1; transition: background .6s; }
.strip.big { height: 44px; border-radius: 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); font-size: 13px; }
.tag b { font-weight: 600; }

/* status */
.status { font-size: 14px; font-weight: 500; min-height: 1.4em; }
.status.wait { color: var(--accent); }
#preview { width: 100%; max-height: 300px; object-fit: cover; border-radius: 16px; display: block; }

/* lists */
.list { display: grid; gap: 8px; }
.item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid var(--frost-line); }
.item img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; background: rgba(255, 255, 255, .6); }
.item .name { font: 400 18px/1.15 var(--serif); text-transform: capitalize; }
.item .strip { margin-top: 6px; height: 10px; }
.walks { display: grid; gap: 12px; }
.walk .cols { display: flex; height: 56px; border-radius: 14px; overflow: hidden; border: 1px solid var(--frost-line); }
.walk .cols span { flex: 1; display: flex; flex-direction: column; min-width: 2px; }
.walk .cols i { flex: 1; }
.walk small { display: block; margin-top: 4px; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* forms (login, listener type) */
.field-row { display: flex; gap: 8px; }
input[type=password] { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--frost-line); background: var(--frost-strong); color: var(--ink); }
.field-row .cta { width: auto; padding-inline: 24px; }
.personas { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.personas legend { padding: 0; margin-bottom: 8px; font-size: 14px; }
.persona { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; cursor: pointer; background: rgba(255, 255, 255, .5); border: 1px solid var(--frost-line); }
.persona input { position: absolute; opacity: 0; pointer-events: none; }
.persona b { font: 400 17px var(--serif); }
.persona span { font-size: 12px; color: var(--ink-soft); }
.persona:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.persona:has(input:checked) span { color: rgba(255, 255, 255, .75); }
.persona:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.personas .cite { grid-column: 1 / -1; }

/* info sheet */
.sheet { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 32px), 520px); max-height: 75svh; overflow: auto; background: rgba(255, 255, 255, .94); border-radius: var(--radius); padding: 18px; box-shadow: 0 16px 48px rgba(0, 0, 0, .18); display: grid; gap: 10px; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.sheet dt { color: var(--ink-soft); }
.sheet dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
/* text fields */
.field-label { font-size: 14px; }
input.text, textarea.text { width: 100%; font: inherit; font-size: 16px; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--frost-line); background: var(--frost-strong); color: var(--ink); }
textarea.text { border-radius: 18px; resize: none; }
details summary { cursor: pointer; }
details[open] summary { margin-bottom: 10px; }

/* friends, chat, jam */
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid var(--frost-line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 500 17px var(--serif); text-transform: uppercase; position: relative; }
.avatar.on::after { content: ""; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #2fbf71; border: 2px solid #fff; }
.person .who b { display: block; font: 400 18px/1.15 var(--serif); }
.person .who small { display: block; }
.person .acts { display: flex; gap: 6px; }
.chat { display: grid; gap: 6px; max-height: 46svh; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 16px; background: rgba(255, 255, 255, .8); justify-self: start; overflow-wrap: anywhere; }
.msg.mine { justify-self: end; background: var(--ink); color: #fff; }
.msg small { display: block; font-size: 11px; opacity: .6; margin-top: 2px; }
.pick { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid var(--frost-line); cursor: pointer; }
.pick:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.pick input { width: 18px; height: 18px; accent-color: #fff; }
.banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.people { display: flex; gap: 6px; flex-wrap: wrap; }
.people .chip.driver { background: #ffb547; border-color: #ffb547; }
.people .chip.away { opacity: .55; }

/* home: the two ways in */
.choices { display: grid; gap: 12px; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; text-align: left; text-decoration: none;
  padding: 18px; border-radius: var(--radius); background: var(--frost); border: 1px solid var(--frost-line); color: var(--ink);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.choice .icon { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px; }
.choice b { display: block; font: 400 25px/1.1 var(--serif); }
.choice .d { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 3px; }
.choice .go { font-size: 22px; color: var(--ink-soft); }
.choice:active { transform: scale(.99); }
.back { align-self: start; justify-self: start; }

/* walking: the live camera fills the screen; labels float on top; the music sits in a frosted dock */
.walklive { position: fixed; inset: 0; z-index: 5; background: #000; color: var(--ink); }
.walklive .cam { position: absolute; inset: 0; }
.walklive .cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.walklive .cam video.mirror { transform: scaleX(-1); }
body.live main { display: none; }               /* walking or jamming: only the camera (or the sky) and the dock */
.walklive.nocam { background: transparent; }   /* no camera (a laptop): the sky gradient shows through */
.walk-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  background: linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, 0)); }
.walk-top .brand { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.hud { position: absolute; z-index: 2; left: max(14px, env(safe-area-inset-left, 0px)); right: max(14px, env(safe-area-inset-right, 0px));
  top: calc(max(12px, env(safe-area-inset-top, 0px)) + 52px); display: flex; flex-wrap: wrap; gap: 6px; }
.hud .chip { background: rgba(255, 255, 255, .78); }
.hud .chip.hot { background: #ffb547; border-color: #ffb547; color: var(--ink); }
.walk-dock { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 28px), 560px); gap: 10px; padding: 16px; }
.walk-dock h2 { font-size: 30px; text-transform: capitalize; }
.walk-dock .strip { height: 12px; }
.sound-btn { background: #ffb547; color: var(--ink); }
footer { position: relative; z-index: 1; text-align: center; font-size: 12px; color: var(--ink-soft); padding: 4px 16px 24px; }
footer a { text-underline-offset: 3px; }
@media (min-width: 900px) { main { max-width: 600px; } }
