/* Audience page: phone-first, one column, big tap targets (44px+), high contrast. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--paper); }

.vtop {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--navy); color: #fff;
}
.vtop .brand img { width: 34px; height: 34px; }
.vtop .brand .name em { color: #7fd3cf; }
.vtop .sub { color: var(--sand); max-width: 56vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8em; }
.lang-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.32); background: transparent; color: #fff; font-size: 0.92em; flex-shrink: 0; }
.lang-btn:hover { background: rgba(255, 255, 255, 0.1); }
/* join + message screens: a light header */
body.joining .vtop { background: transparent; color: var(--ink); position: static; padding-top: max(20px, env(safe-area-inset-top)); }
body.joining .vtop .brand img { width: 40px; height: 40px; }
body.joining .vtop .brand .name { font-size: 1.12em; }
body.joining .vtop .brand .name em { color: var(--teal); }
body.joining .vtop .sub { display: none; }
body.joining .lang-btn { border-color: var(--line-strong); background: #fff; color: var(--ink); }
body.joining .progress { display: none; }

.progress { height: 4px; background: var(--line); }
.progress > div { height: 100%; width: 0; background: var(--teal); transition: width 0.5s; }

.conn-bar { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px; font-weight: 600; font-size: 0.9em; }

main { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 22px 20px 120px; }
body.joining main { padding-bottom: 32px; }
.panel.center { text-align: center; padding-top: 9vh; }
h1 { font-size: 1.6em; line-height: 1.22; margin: 0 0 8px; overflow-wrap: anywhere; font-weight: 700; }
.lead { font-size: 1.05em; color: var(--muted); margin: 0; line-height: 1.5; }
.eyebrow.teal { color: var(--teal); margin: 0 0 10px; }
.big-logo { width: 88px; height: 88px; margin-bottom: 18px; }

/* join */
.join { padding-top: 6vh; }
.join h1 { font-size: 2.1em; line-height: 1.12; }
.join-form { display: flex; flex-direction: column; margin-top: 30px; }
.join-form .label { margin-bottom: 8px; }
.join-form input {
  height: 72px; border-radius: 18px; border: 2px solid var(--navy); background: #fff; text-align: center;
  font-size: 2.2em; font-weight: 700; letter-spacing: 0.16em; font-variant-numeric: tabular-nums; padding: 0 12px;
}
.join-form .err { margin: 6px 0 8px; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--muted); font-size: 0.95em; }
.facts li { display: flex; gap: 12px; align-items: center; }
.facts svg { color: var(--teal); flex-shrink: 0; }
html[dir='rtl'] .flip { transform: scaleX(-1); }

/* the navy star band under the join and message screens */
.band { display: none; position: relative; min-height: 120px; margin-top: auto; background: var(--navy); color: var(--sand); padding: 0 24px 26px; padding-bottom: max(26px, env(safe-area-inset-bottom)); align-items: flex-end; overflow: hidden; }
body.joining .band { display: flex; }
.band::before {
  content: ''; position: absolute; inset: 0; opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='%23e4dcc8' stroke-width='1.2'%3E%3Crect x='12' y='12' width='20' height='20'/%3E%3Crect x='12' y='12' width='20' height='20' transform='rotate(45 22 22)'/%3E%3C/g%3E%3C/svg%3E");
}
.band p { position: relative; margin: 0; width: 100%; text-align: right; font-size: 0.95em; line-height: 1.6; }

.dots { display: flex; justify-content: center; gap: 8px; margin: 22px 0; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); animation: dot 1.4s infinite ease-in-out; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
#msg-leave { margin-top: 18px; }

/* slide */
.slide-head { margin-bottom: 18px; }
.slide-meta { display: flex; gap: 8px; align-items: center; min-height: 1.6em; margin-bottom: 10px; }
.slide-meta .pos { font-size: 0.85em; font-weight: 600; color: var(--muted); margin-inline-end: auto; }
.slide-meta .chip { font-size: 0.88em; font-variant-numeric: tabular-nums; }
.slide-head .sub { color: var(--muted); margin: 0; font-size: 1.02em; overflow-wrap: anywhere; }
.body { white-space: pre-wrap; font-size: 1.1em; overflow-wrap: anywhere; line-height: 1.55; }

/* answers */
.hint { color: var(--muted); font-size: 0.95em; margin: 0 0 14px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; padding: 12px 16px;
  border-radius: 16px; border: 2px solid var(--line-strong); background: #fff; font-size: 1.06em; font-weight: 500;
  min-height: 60px; overflow-wrap: anywhere; color: var(--ink); transition: border-color 0.15s, background 0.15s;
}
.opt:hover { border-color: var(--navy); }
.opt .key { flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; background: var(--sand-soft); color: var(--muted); display: grid; place-items: center; font-size: 0.85em; font-weight: 700; }
.opt.multi .key { border-radius: 7px; }
.opt.sel { border-color: var(--teal); background: var(--teal-soft); font-weight: 600; }
.opt.sel .key { background: var(--teal); color: #fff; }
.opt:disabled { opacity: 0.6; cursor: default; }
.opt:disabled:hover { border-color: var(--line-strong); }
.opt.sel:disabled { opacity: 0.85; border-color: var(--teal); }
.opt .rank { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--sand-soft); color: var(--muted); }
.opt.sel .rank { background: var(--teal); color: #fff; }

.scale-q { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.scale-q:last-of-type { border-bottom: 0; }
.scale-q .st { font-weight: 600; margin-bottom: 10px; overflow-wrap: anywhere; }
.scale-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.scale-btns button { min-height: 50px; border-radius: 12px; border: 2px solid var(--line-strong); background: #fff; font-weight: 700; font-size: 1.05em; color: var(--ink); }
.scale-btns button.sel { background: var(--teal); border-color: var(--teal); color: #fff; }
.scale-q .scale-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.82em; margin-top: 6px; gap: 10px; }

.words { display: flex; flex-direction: column; gap: 10px; }
.words input, .entry textarea { font-size: 1.08em; padding: 13px 14px; border-radius: 14px; border-width: 2px; }
.entry { display: flex; flex-direction: column; gap: 8px; }
.entry .count { align-self: flex-end; }
.actions { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.status { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.status svg { flex-shrink: 0; }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.bad { background: var(--danger-soft); color: var(--danger); }
.status button { margin-inline-start: auto; }

.mine { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.mine:empty { display: none; }
.mine .it { background: var(--sand-soft); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 10px 14px; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--muted); }
.mine .it small { display: block; color: var(--warn); font-weight: 600; margin-bottom: 2px; }

.qa-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 12px; gap: 10px; }
.qa-head .seg button { min-height: 36px; padding: 0 12px; font-size: 0.85em; }
#qa-list .qa-item { padding: 12px 14px; border-radius: 16px; }

.results { margin-top: 22px; padding: 20px 18px; border-radius: 20px; background: var(--navy); }
.res-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; gap: 10px; }
.res-head .eyebrow { color: var(--sand); }
.res-total { color: var(--sand); font-size: 0.9em; }
.results .cloud { height: 240px; }
.results .wall { columns: 1; }
.next-hint { text-align: center; color: var(--muted); margin: 20px 0 0; font-size: 0.95em; }

.sum-list { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.sum-card { border-radius: 18px; padding: 16px 18px; background: var(--navy); }
.sum-card h3 { margin: 0 0 12px; font-size: 1.05em; overflow-wrap: anywhere; color: #fff; }
.sum-card .cloud { height: 200px; }
.sum-card .wall { columns: 1; }
.sum-card .tot { color: var(--sand); font-size: 0.85em; margin-top: 10px; }

/* reactions */
.reacts {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; gap: 8px;
  padding: 10px 12px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px);
}
.reacts button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; transition: transform 0.12s, background 0.12s; }
.reacts button.text { width: auto; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 1em; color: var(--ink); }
.reacts button:active, .reacts button.pop { transform: scale(1.2); background: var(--teal-soft); }
.reacts .r-like { color: var(--blue); }
.reacts .r-love { color: #b4483f; }
.reacts .r-clap { color: var(--teal); }
.reacts .r-idea { color: var(--warn); }

@media (min-width: 600px) {
  main { padding-top: 34px; }
}
.join-form input::placeholder { color: #c3c8d0; }
