/* Phone view – the same world as the projector: flat light ground, white rounded panels,
   lime/teal/amber caps, outlined lime pills, Roboto. 16px gutters, thumb-sized targets. */
:root {
  --ground: #EDEDEF; --ink: #161616; --ink-2: #3A3A3C; --muted: #6E6E70; --rule: #C5C5C5;
  --lime: #9DBD38; --lime-ink: #5E7A12; --teal: #01758A; --amber: #D39B33; --card: #FFFFFF; --track: #F9FAF9; --rose: #B3261E;
  --shadow: 0 4px 16px rgba(22, 22, 22, .08), 0 1px 2px rgba(22, 22, 22, .05);
}
html { background: var(--ground); }
body { background: var(--ground); color: var(--ink); font-family: 'Roboto', system-ui, sans-serif; font-size: 16px; line-height: 1.45; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(237, 237, 239, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top .zel-mark { width: 34px; height: 34px; color: var(--ink); flex: none; }
.top .t { flex: 1; min-width: 0; font-size: 14px; line-height: 1.25; }
.top .t b { display: block; font-weight: 700; }
.top .t span { color: var(--ink-2); }
.langs { display: flex; border: 2px solid var(--lime); border-radius: 999px; overflow: hidden; flex: none; }
.langs button { font: inherit; font-size: 13px; font-weight: 700; border: 0; background: transparent; color: var(--lime-ink); padding: 6px 10px; min-height: 34px; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.conn { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); flex: none; }
body.offline .conn { background: var(--rose); }

main { padding: 16px; display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.panel { background: var(--card); border-radius: 18px; padding: 18px 16px; box-shadow: var(--shadow); display: grid; gap: 12px; position: relative; overflow: hidden; }
.panel.cap::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--lime); }
.panel h2 { margin: 0; font-size: 22px; line-height: 1.22; font-weight: 900; letter-spacing: -.005em; text-wrap: balance; }
.panel h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.panel p { margin: 0; color: var(--ink-2); }
.panel code { font-family: 'Roboto Mono', ui-monospace, monospace; font-size: .9em; background: rgba(22, 22, 22, .06); border-radius: 5px; padding: 0 .3em; }
.now-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); padding: 0 2px; }
.now-head .blk { font-weight: 700; color: var(--ink-2); }
.now-head .live { display: inline-flex; align-items: center; gap: 6px; }
.now-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.sub { margin: -6px 0 0; font-size: 15px; color: var(--ink-2) !important; }
.hint { font-size: 14px; color: var(--muted); }
.ok-msg { font-size: 15px; color: var(--lime-ink); font-weight: 700; }
.err { font-size: 15px; color: var(--rose); font-weight: 700; }

/* inputs */
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
input[type=text], input[type=email], textarea { font: inherit; font-size: 16px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); -webkit-appearance: none; appearance: none; caret-color: var(--teal); }
input:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(1, 117, 138, .16); }
::placeholder { color: #8A8A8C; }
textarea { min-height: 104px; resize: vertical; line-height: 1.4; }
.btn { font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 999px; padding: 13px 22px; cursor: pointer; background: var(--lime); color: var(--ink); min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; }
.btn.ghost { background: transparent; color: var(--lime-ink); box-shadow: inset 0 0 0 2px var(--lime); }
.btn.block { width: 100%; }
.linkbtn { font: inherit; border: 0; background: none; color: var(--teal); font-weight: 700; padding: 10px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; justify-self: center; }

/* votes */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale button { font: inherit; font-weight: 700; font-size: 22px; min-height: 54px; border-radius: 14px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; }
.scale button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.choices { display: grid; gap: 8px; }
.choices button { font: inherit; font-weight: 700; text-align: left; padding: 14px 16px; min-height: 54px; border-radius: 14px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink); cursor: pointer; display: flex; align-items: center; gap: 12px; }
.choices button::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rule); flex: none; }
.choices button[aria-pressed="true"] { border-color: var(--teal); background: rgba(1, 117, 138, .06); }
.choices button[aria-pressed="true"]::before { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 3px #fff; }
.qgroup { display: grid; gap: 8px; }
.qgroup + .qgroup { padding-top: 14px; border-top: 1px solid var(--rule); }

/* anonymous / named */
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--ground); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 999px; padding: 10px 8px; background: transparent; color: var(--ink-2); cursor: pointer; min-height: 44px; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(22, 22, 22, .16); }
.seg button:disabled { color: #9A9A9C; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row h3 { margin: 0; font-size: 17px; }

/* posts: the wall's card language */
.sortbar { display: flex; gap: 6px; }
.sortbar button { font: inherit; font-size: 13px; font-weight: 700; border: 0; box-shadow: inset 0 0 0 1.5px var(--rule); background: #fff; border-radius: 999px; padding: 7px 12px; min-height: 36px; cursor: pointer; color: var(--ink-2); }
.sortbar button[aria-pressed="true"] { background: var(--ink); box-shadow: none; color: #fff; }
.posts { display: grid; gap: 10px; }
.post { position: relative; background: var(--card); border-radius: 16px; padding: 18px 14px 12px; box-shadow: var(--shadow); display: grid; gap: 10px; overflow: hidden; }
.post::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--lime); }
.post:nth-child(3n+2)::before { background: var(--teal); }
.post:nth-child(3n)::before { background: var(--amber); }
.post p { margin: 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.post .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.post .who { font-weight: 500; color: var(--ink-2); }
.post .mine { color: var(--teal); font-weight: 700; }
.post.answered { opacity: .6; }
.react { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 8px 14px; min-height: 40px; border: 0; box-shadow: inset 0 0 0 2px var(--lime); background: #fff; color: var(--lime-ink); cursor: pointer; white-space: nowrap; }
.react[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.badge-ok { color: var(--lime-ink); font-weight: 700; }

/* commands */
.cmdlist { display: grid; gap: 12px; }
.cmditem { display: grid; gap: 6px; }
.cmditem .lab { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.cmdbox { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; background: var(--ink); border-radius: 12px; overflow: hidden; }
.cmdbox code { display: block; background: none; border: 0; color: #F1F3F1; padding: 12px; font-family: 'Roboto Mono', ui-monospace, monospace; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmdbox.prose { background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule); }
.cmdbox.prose code { color: var(--ink); font-family: 'Roboto', system-ui, sans-serif; font-size: 15px; }
.cmdbox.trap { box-shadow: inset 0 0 0 2px var(--amber); }
.cmdbox button { font: inherit; font-size: 13px; font-weight: 700; border: 0; background: #2C2C2E; color: #E6F0C8; padding: 0 14px; cursor: pointer; min-width: 84px; }
.cmdbox.prose button { background: var(--ground); color: var(--lime-ink); }
.cmdbox button.done { color: var(--lime); }

/* lists */
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.steps li { padding: 12px 0; border-top: 1px solid var(--rule); }
.steps li:first-child { border-top: 0; padding-top: 2px; }
.steps b { display: block; }
.steps span { color: var(--ink-2); font-size: 15px; }
.sched { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sched li { display: grid; grid-template-columns: 100px 1fr; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 15px; }
.sched li .tm { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sched li.brk { color: var(--muted); }
.sched li.cur { background: rgba(157, 189, 56, .2); font-weight: 700; }
.sched li.cur .tm { color: var(--lime-ink); }
.series { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.series li { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: baseline; font-size: 15px; }
.series li .n { font-weight: 900; color: var(--lime-ink); }
.series li small { display: block; color: var(--muted); font-size: 13px; }
.series li.cur { font-weight: 700; }
.countdown { font-weight: 900; font-size: 56px; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; }
.bigq { font-size: 22px; line-height: 1.25; font-weight: 900; margin: 0; text-wrap: balance; }
.who-tag { justify-self: start; display: inline-flex; align-items: center; font-size: 14px; font-weight: 500; color: var(--lime-ink); box-shadow: inset 0 0 0 2px var(--lime); border-radius: 999px; padding: 5px 12px; }

/* join */
.join-wrap { min-height: calc(100vh - 40px); min-height: calc(100dvh - 40px); display: grid; align-content: center; gap: 16px; }
.join-hero { display: grid; gap: 10px; }
.join-hero .zel-mark { width: 48px; height: 48px; }
.join-hero h1 { margin: 0; font-size: 34px; line-height: 1.05; font-weight: 900; padding-left: 14px; border-left: 8px solid var(--lime); }
.join-hero p { margin: 0; color: var(--ink-2); font-size: 17px; }
.privacy { font-size: 13px !important; color: var(--muted) !important; line-height: 1.45; }
.nudge { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.nudge button { margin-left: auto; flex: none; font: inherit; font-weight: 700; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); padding: 9px 14px; min-height: 40px; cursor: pointer; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--rule); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { font: inherit; font-size: 12px; font-weight: 700; border: 0; background: none; color: var(--muted); padding: 6px 2px; display: grid; justify-items: center; gap: 3px; cursor: pointer; border-radius: 12px; min-height: 54px; }
.tabs button svg { width: 24px; height: 24px; }
.tabs button[aria-selected="true"] { color: var(--ink); background: rgba(157, 189, 56, .22); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
