.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { max-height: 44px; max-width: 200px; object-fit: contain; }
.brand span { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conn { font-size: .85rem; color: var(--text-2); padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); }
.main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px 0; }
.foot { text-align: center; font-size: .8rem; color: var(--text-3); min-height: 1em; }

.panel { animation: rise .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.kicker { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: .5em; }
.qtitle { font-size: clamp(1.45rem, 6vw, 1.9rem); font-weight: 700; line-height: 1.2; margin: 0 0 .4em; overflow-wrap: anywhere; }
.hint { color: var(--text-2); margin: 0 0 1.1em; }
.center { text-align: center; }
.welcome { color: var(--text-2); font-size: 1.1rem; line-height: 1.5; white-space: pre-line; }
.pulse { width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%; background: var(--accent-soft); position: relative; }
.pulse::before, .pulse::after { content: ''; position: absolute; inset: 18px; border-radius: 50%; background: var(--accent); }
.pulse::after { inset: 0; background: transparent; box-shadow: 0 0 0 2px var(--accent); animation: ring 2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

.opts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 12px 16px; text-align: left; border: 0; border-radius: var(--radius-s);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 1.05rem; font-weight: 600; transition: box-shadow .2s, background .2s; }
.opt .mark { flex: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--text-3); display: grid; place-items: center; transition: background .2s, box-shadow .2s; }
.opt.multi .mark { border-radius: 7px; }
.opt[aria-checked="true"] { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.opt[aria-checked="true"] .mark { background: var(--accent); box-shadow: none; }
.opt[aria-checked="true"] .mark::after { content: ''; width: 7px; height: 12px; border: solid var(--accent-fg); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.opt:disabled { cursor: default; }
.opt:disabled:not([aria-checked="true"]) { opacity: .55; }

.scale { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.scale button { aspect-ratio: 1; min-height: 44px; min-width: 0; border: 0; border-radius: var(--radius-s); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; transition: background .2s, box-shadow .2s, color .2s; }
.scale button[aria-checked="true"] { background: var(--accent); color: var(--accent-fg); box-shadow: none; }
.scale-ends { display: flex; justify-content: space-between; gap: 1em; color: var(--text-3); font-size: .9rem; margin-bottom: 18px; }

.row { display: flex; gap: 8px; }
.row .field { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip { padding: 8px 14px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--text); font-weight: 600; animation: rise .35s var(--ease) both; }
.counter { color: var(--text-3); font-size: .9rem; margin-top: 8px; display: flex; justify-content: space-between; }
.mine { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mine .card { margin: 0; }

.done { text-align: center; padding: 8px 0 4px; }
.check { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; animation: pop .5s var(--ease) both; }
.check::after { content: ''; width: 14px; height: 26px; border: solid var(--accent-fg); border-width: 0 4px 4px 0; transform: translateY(-3px) rotate(45deg); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done h2 { margin: 0 0 .3em; font-size: 1.4rem; }
.done p { margin: 0; color: var(--text-2); }
.res { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.res h3 { margin: 0 0 14px; font-size: 1rem; color: var(--text-2); font-family: var(--font-body); font-weight: 700; }
.res .cloud { --cloud-h: 220px; height: 220px; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.join { text-align: center; }
.join h1 { font-size: 2rem; margin: 0 0 18px; }
.join .field { text-align: center; text-transform: uppercase; letter-spacing: .2em; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin-bottom: 12px; }
.err { color: var(--accent-text); margin-top: 12px; min-height: 1.3em; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: var(--radius-pill);
  background: var(--text); color: var(--bg); font-weight: 600; transition: .3s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
