body { min-height: 100dvh; display: flex; flex-direction: column; font-size: 17px; }
header { padding: 16px 20px 8px; display: flex; justify-content: space-between; align-items: center; }
header .brand { font-weight: 700; letter-spacing: .2px; }
header .live { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
header .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
header .live.off i { background: var(--hot); }
#tbar { height: 6px; margin: 0 20px; border-radius: 99px; background: var(--line); overflow: hidden; visibility: hidden; }
#tbar.on { visibility: visible; }
#tbar div { height: 100%; background: var(--accent); width: 100%; transition: width .25s linear; }
#tbar.warn div { background: var(--hot); }
main { flex: 1; padding: 18px 20px 120px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; animation: in .35s ease-out; }
@keyframes in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.prompt { font-family: var(--serif); font-size: 26px; line-height: 1.2; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.secs { float: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 20px; }
.secs.warn { color: var(--hot); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { text-align: left; padding: 16px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); font-size: 18px; transition: all .15s; }
.opt:active { transform: scale(.98); }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.scale .opt { text-align: center; font-size: 22px; font-weight: 700; padding: 18px 0; }
.ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; gap: 16px; }
.ends span:last-child { text-align: right; }
.guess { font-size: 64px; font-weight: 700; text-align: center; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 36px; }
textarea { width: 100%; font: inherit; font-size: 18px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); resize: none; min-height: 96px; }
textarea:focus { outline: none; border-color: var(--accent); }
.count { font-size: 13px; color: var(--muted); text-align: right; margin-top: 4px; }
.primary { width: 100%; margin-top: 14px; padding: 16px; border-radius: 14px; border: 0; background: var(--ink); color: #fff; font-size: 18px; font-weight: 600; }
.primary:disabled { opacity: .4; }
.ghost { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 10px 0; }
.done { text-align: center; padding: 34px 22px; }
.done .big { font-size: 46px; margin-bottom: 6px; }
.done h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 8px; }
.done p { color: var(--muted); margin: 0; }
.mine { margin-top: 14px; font-size: 15px; color: var(--accent-ink); background: var(--accent-soft); padding: 10px 14px; border-radius: 12px; display: inline-block; }
.msg { color: var(--hot); font-size: 14px; margin-top: 10px; min-height: 18px; }
#askbtn { position: fixed; left: 20px; right: 20px; bottom: max(18px, env(safe-area-inset-bottom)); padding: 15px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
#sheet { position: fixed; inset: 0; background: rgba(23,23,27,.35); display: none; z-index: 10; }
#sheet.open { display: block; }
#sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; overflow: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 20px 20px 30px; animation: up .25s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.qrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.vote { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; font-weight: 700; min-width: 64px; }
.vote.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
a { color: var(--accent); }
