/* Phone pages: make, sent, back others, phones up */

.phone { min-height: 100vh; min-height: 100dvh; background: var(--g-pink); }
.phone .wrap { max-width: 440px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.phone main section { display: flex; flex-direction: column; gap: 16px; }

.top, .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--ink-ground); color: var(--display); padding: 9px 12px; font: 800 15px/1 var(--font-display); text-transform: uppercase; }
.live-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--magenta); }

.title { font-size: clamp(40px, 12vw, 48px); letter-spacing: -0.5px; }
.big-title { font-size: clamp(60px, 18vw, 72px); letter-spacing: -1.5px; }
.lede { margin: 0; font-size: 17px; line-height: 1.45; font-weight: 600; }
.label { font-size: 18px; }
.hint { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 13px; font-weight: 600; }
.fine a { font-weight: 700; }
.center { text-align: center; align-self: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1 1 auto; min-width: 0; }
.group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.group legend { padding: 0; margin-bottom: 8px; }
.big { min-height: 60px; font-size: 26px; }

.icon-btn { flex: none; width: 56px; height: 56px; display: grid; place-items: center; padding: 0; background: var(--display); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; }
.icon-btn.light { width: 44px; height: 44px; background: #fff; }

.preview { display: flex; justify-content: center; padding: 18px 0 6px; min-height: 236px; align-items: flex-start; }
.preview .sign { --pw: 262px; --ph: 168px; --pf: 15px; --sh: 48px; }
.preview .placard .p-word { opacity: var(--word-o, 1); }

.card { margin-top: 8px; background: #fff; border: 2px solid var(--ink); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }

/* back-others deck */
.deck { position: relative; height: 300px; display: grid; place-items: center; }
.deck .shadow-card { position: absolute; width: 270px; height: 220px; border: 3px solid var(--ink); box-shadow: 7px 8px 0 var(--ink); }
.deck .placard { --pw: 290px; --ph: 236px; --pf: 17px; }
.deck .backs-tag { position: absolute; top: -16px; right: -14px; background: var(--ink); color: #fff; padding: 7px 10px; font: 800 15px/1 var(--font-display); text-transform: uppercase; transform: rotate(5deg); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; padding: 30px 0; }

/* phones-up overlay */
.raise { position: fixed; inset: 0; z-index: 50; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); }
.raise-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; }
.raise-top .d { font-size: 28px; color: var(--display); }
.raise-count { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--magenta); color: var(--ink); font: 900 36px/1 var(--font-display); }
.raise-board { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; background: var(--pbg, var(--pink)); color: var(--ink); border: 4px solid var(--display); position: relative; }
.raise-board .p-back, .raise-board .p-now { font: 900 clamp(48px, 18vw, 76px)/0.9 var(--font-display); text-transform: uppercase; }
.raise-board .p-word { font: italic 900 clamp(64px, 26vw, 116px)/0.86 var(--font-display); text-transform: uppercase; letter-spacing: -0.03em; overflow-wrap: anywhere; max-width: 100%; }
.raise-board.w-mid .p-word { font-size: clamp(52px, 20vw, 92px); }
.raise-board.w-long .p-word { font-size: clamp(40px, 15vw, 70px); }
.raise-board .p-sticker { position: absolute; top: 18px; right: 16px; width: 96px; height: 96px; font-size: 22px; transform: rotate(12deg); }
.raise-note { margin: 12px 0 0; text-align: center; font-size: 15px; font-weight: 600; }

h1[tabindex="-1"]:focus { outline: none; }

/* ─── sessions: join, lobby, activities ─── */
#loading { padding: 40px 0; }
.code-input { text-transform: uppercase; letter-spacing: 0.12em; font: 900 34px/1 var(--font-display) !important; height: 72px !important; text-align: center; }
.code-input::placeholder { letter-spacing: 0.04em; font-size: 26px; }
.kind { display: inline-block; align-self: flex-start; background: var(--ink-ground); color: var(--display); padding: 7px 11px; font-size: 15px; }
.q-title { font-size: clamp(32px, 9.5vw, 42px); letter-spacing: -0.5px; line-height: 0.98; overflow-wrap: anywhere; }
.field textarea { width: 100%; padding: 12px 14px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 0; font: 600 18px/1.4 var(--font-body); resize: vertical; }
.field textarea::placeholder { color: var(--violet-700); opacity: 1; font-weight: 400; }

.waiting-dots { display: flex; gap: 12px; padding: 18px 0; }
.waiting-dots span { width: 18px; height: 18px; background: var(--ink); animation: pulse 1.4s ease-in-out infinite; }
.waiting-dots span:nth-child(2) { animation-delay: 0.2s; background: var(--magenta); }
.waiting-dots span:nth-child(3) { animation-delay: 0.4s; background: var(--display); }
@media (prefers-reduced-motion: reduce) { .waiting-dots span { animation: none; } }

/* poll */
.options { display: flex; flex-direction: column; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px 10px 10px; text-align: left; background: #fff; border: 3px solid var(--ink); border-radius: 0; box-shadow: 5px 6px 0 var(--ink); font: 800 22px/1.05 var(--font-display); text-transform: uppercase; }
.opt .letter { flex: none; display: grid; place-items: center; width: 42px; height: 42px; background: var(--violet-200); border: 2px solid var(--ink); font: 900 24px/1 var(--font-display); }
.opt .opt-text { overflow-wrap: anywhere; }
.opt[aria-pressed="true"] { background: var(--display); }
.opt[aria-pressed="true"] .letter { background: var(--ink); color: var(--display); }
.opt:active { transform: translate(3px, 3px); box-shadow: 2px 3px 0 var(--ink); }

/* rating scale */
.scale-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.scale-row.ten { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.num-btn { aspect-ratio: 1; min-height: 52px; background: #fff; border: 3px solid var(--ink); border-radius: 0; font: 900 34px/1 var(--font-display); box-shadow: 4px 5px 0 var(--ink); }
.num-btn[aria-pressed="true"] { background: var(--display); }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; }

/* my answers / questions */
.mine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mine:empty { display: none; }
.mine li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff; border: 2px solid var(--ink); }
.mine-text { font-weight: 700; overflow-wrap: anywhere; }
.mine-status { flex: none; font: 800 14px/1 var(--font-display); text-transform: uppercase; padding: 5px 8px; background: var(--violet-100); }
.mine-status.s-approved { background: var(--display); }
.mine-status.s-hidden { background: var(--rule); }

/* Q&A list */
.qa-list-h { margin-top: 10px; }
.qlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qlist li { display: flex; align-items: stretch; gap: 10px; background: #fff; border: 2px solid var(--ink); padding: 12px 12px 12px 14px; }
.qlist li.is-on { background: var(--display); border-width: 3px; }
.qlist li.is-done { opacity: 0.7; }
.q-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-text { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.q-by { color: var(--violet-700); font-weight: 700; }
.q-tag { align-self: flex-start; background: var(--ink); color: var(--display); padding: 4px 7px; font: 800 13px/1 var(--font-display); text-transform: uppercase; }
.q-tag.done { background: var(--violet-200); color: var(--ink); }
.up-btn { flex: none; width: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--g-pink); border: 2px solid var(--ink); border-radius: 0; font: 900 22px/1 var(--font-display); }
.up-btn[aria-pressed="true"] { background: var(--ink-ground); color: var(--display); }
.up-btn:disabled { cursor: default; opacity: 1; }
