:root { --accent: #f4a261; --bg: #121214; --fg: #f3f3f3; --card: #1e1e22; --muted: #9a9aa3; --ok: #2a9d8f; --ng: #e63946; --team: #444; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
#top, main, #tabs { max-width: 560px; margin-inline: auto; width: 100%; }
html, body { margin: 0; height: 100%; }
body { font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif; background: var(--bg); color: var(--fg); display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
body.has-team { background: linear-gradient(180deg, color-mix(in srgb, var(--team) 35%, var(--bg)) 0, var(--bg) 220px); }
#top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); }
#brand { display: flex; align-items: center; gap: 8px; font-weight: 700; } #logo { height: 24px; }
#me { display: flex; align-items: center; gap: 6px; font-weight: 700; background: rgba(0,0,0,.35); padding: 4px 12px; border-radius: 999px; }
#me small { opacity: .6; font-weight: 400; }
.team { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--team); }
main { flex: 1; padding: 8px 16px 90px; }
.screen { animation: fade .25s; } @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h1 { font-size: 26px; margin: 12px 0 18px; } h2 { font-size: 21px; margin: 8px 0 12px; line-height: 1.35; } h3 { font-size: 15px; margin: 18px 0 8px; opacity: .8; }
label { display: block; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
input, textarea { width: 100%; font: inherit; font-size: 18px; padding: 14px; border-radius: 12px; border: 1px solid #333; background: #0b0b0d; color: var(--fg); margin-top: 6px; }
#pin { font-size: 28px; letter-spacing: .3em; text-align: center; }
button { font: inherit; font-size: 17px; width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: var(--card); color: var(--fg); padding: 12px 16px; cursor: pointer; margin-bottom: 10px; text-align: left; display: flex; align-items: center; gap: 12px; transition: transform .08s; }
button:active { transform: scale(.98); }
button.primary { background: var(--accent); color: #000; font-weight: 700; justify-content: center; }
button.ghost { background: transparent; border: 1px solid #333; justify-content: center; }
button.choice .idx { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); font-weight: 700; flex: none; }
button.choice.sel { outline: 3px solid var(--accent); }
button.choice.correct { background: var(--ok); color: #fff; } button.choice.wrong { background: var(--ng); color: #fff; }
button:disabled { opacity: .55; }
.scale { display: flex; gap: 8px; } .scale button { justify-content: center; font-weight: 700; font-size: 22px; min-height: 64px; }
.scale-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.row { display: flex; gap: 8px; } .row input { margin: 0; } .row button { width: auto; margin: 0; min-height: 0; }
.center { text-align: center; padding-top: 10vh; }
.pulse { color: var(--accent); font-size: 28px; animation: pulse 1.4s infinite; } @keyframes pulse { 50% { opacity: .2; transform: scale(.8); } }
.check { font-size: 64px; color: var(--ok); animation: pop .4s; } @keyframes pop { from { transform: scale(.4); opacity: 0; } }
.muted { color: var(--muted); font-size: 14px; }
.err { color: var(--ng); font-size: 14px; min-height: 1.2em; }
.chip { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.12); }
.qhead { display: flex; justify-content: space-between; align-items: center; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 20px; } .timer.urgent { color: var(--ng); animation: pulse .5s infinite; }
.card { background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; line-height: 1.6; }
.mono b { color: var(--accent); }
.big { font-size: 56px; font-weight: 800; line-height: 1.1; margin: 8px 0; }
.big.ok { color: var(--ok); } .big.ng { color: var(--ng); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.stats div { background: var(--card); border-radius: 12px; padding: 10px 6px; }
.stats b { display: block; font-size: 22px; } .stats span { font-size: 12px; color: var(--muted); }
.delta-up { color: var(--ok); } .delta-down { color: var(--ng); }
.explain { text-align: left; background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 15px; margin-top: 12px; }
#tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #0b0b0d; border-top: 1px solid #222; padding-bottom: env(safe-area-inset-bottom); }
#tabs button { flex: 1; margin: 0; border-radius: 0; background: transparent; justify-content: center; min-height: 54px; font-size: 14px; color: var(--muted); position: relative; }
#tabs button.on { color: var(--accent); font-weight: 700; }
.badge { position: absolute; top: 8px; right: calc(50% - 34px); background: var(--ng); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 999px; }
#qa-list { list-style: none; padding: 0; margin: 12px 0; }
#qa-list li { background: var(--card); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; }
#qa-list li.answered { opacity: .5; }
#qa-list li .like { width: auto; min-height: 0; margin: 0; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 14px; flex: none; }
#qa-list li .like.on { background: var(--accent); color: #000; }
#conn { position: fixed; top: 0; left: 0; right: 0; background: var(--ng); color: #fff; text-align: center; font-size: 13px; padding: 4px; z-index: 10; }
.wc-count { font-size: 13px; color: var(--muted); margin-top: -4px; }
.pw-meter { height: 8px; border-radius: 4px; background: #333; overflow: hidden; margin: 8px 0; } .pw-meter div { height: 100%; width: 0; transition: width .3s; }
.ended { text-align: center; padding-top: 20vh; }
