:root { --bg: #0f1220; --panel: #181c30; --line: #2a3050; --text: #eef0fa; --muted: #9aa3c7; --accent: #7c5cff; --good: #3ddc84; --bad: #ff6b81; --warn: #ffc24b; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { margin: 0 0 4px; font-size: 1.7rem; } h2 { margin: 0 0 10px; font-size: 1.15rem; } h3 { margin: 14px 0 6px; font-size: 1rem; }
.sub, .muted { color: var(--muted); } .small { font-size: 0.86rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 14px 0; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
label { display: block; margin: 8px 0 3px; color: var(--muted); font-size: 0.9rem; }
input, select, textarea { width: 100%; background: #0c0f1c; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; }
input[type=checkbox] { width: auto; margin-right: 6px; } input[type=color] { padding: 2px; height: 38px; }
textarea { min-height: 150px; font-family: ui-monospace, Consolas, monospace; font-size: 0.9rem; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 9px 15px; font: inherit; font-weight: 600; cursor: pointer; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); } button.bad { background: var(--bad); } button.good { background: var(--good); color: #062; }
button:disabled { opacity: 0.45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #232949; font-size: 0.82rem; color: var(--muted); }
.pill.live { background: #12361f; color: var(--good); } .pill.judging { background: #3b2d0a; color: var(--warn); }
.prompt { font-size: 1.7rem; line-height: 1.35; font-weight: 700; padding: 22px; background: #fff; color: #111; border-radius: 14px; }
.prompt .blank { display: inline-block; min-width: 4.5em; border-bottom: 3px solid #111; margin: 0 2px; }
.prompt .fill { color: #5b3df5; border-bottom: 3px solid #5b3df5; }
.timer { font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 700; }
.subs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sub { background: #fff; color: #111; border-radius: 12px; padding: 14px; font-weight: 600; position: relative; }
.sub .n { position: absolute; top: -8px; left: -8px; background: var(--accent); color: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.9rem; }
.sub.win { outline: 4px solid var(--good); } .sub .who { display: block; margin-top: 8px; font-size: 0.8rem; color: #555; font-weight: 500; }
.hand { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.hcard { background: #1f2544; border: 2px solid var(--line); border-radius: 10px; padding: 10px; font-size: 0.92rem; position: relative; min-height: 70px; }
.hcard.played { border-color: var(--good); } .hcard b { color: var(--accent); margin-right: 4px; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); } th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; } .tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tabs button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.err { color: var(--bad); } .ok { color: var(--good); }
code, .cmd { background: #0c0f1c; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #232949; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; display: none; max-width: 90vw; z-index: 9; }
.sr { position: absolute; left: -9999px; }
.pack { display: block; margin: 8px 0; line-height: 1.4; } .pack input { width: auto; margin-right: 6px; }
