:root { --bg:#f6f7f9; --card:#fff; --text:#222; --muted:#667; --line:#dde1e6; --accent:#2f6fed; --o:#1a9d4a; --t:#d98a00; --x:#c0392b; --best:#fff6d6; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#14161a; --card:#1e2127; --text:#e8eaed; --muted:#9aa0aa; --line:#323741; --best:#3a3317; }
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.6 system-ui,-apple-system,"Hiragino Sans","Noto Sans JP",sans-serif; }
main { max-width:900px; margin:0 auto; padding:24px 16px 64px; }
h1 { font-size:1.5rem; margin:0 0 4px; }
h1 a { color:inherit; text-decoration:none; }
h2 { font-size:1.1rem; margin:0 0 12px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:20px; margin-top:20px; }
.muted { color:var(--muted); font-size:.9rem; }
label { display:block; font-weight:600; margin:14px 0 4px; }
input, textarea { width:100%; padding:9px 10px; font:inherit; color:inherit; background:var(--bg); border:1px solid var(--line); border-radius:6px; }
textarea { min-height:140px; resize:vertical; }
button { font:inherit; cursor:pointer; padding:9px 18px; border-radius:6px; border:1px solid var(--line); background:var(--card); color:inherit; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
button.danger { color:var(--x); }
.actions { display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.error { color:var(--x); margin-top:10px; min-height:1.4em; }
.table-wrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
th, td { border:1px solid var(--line); padding:8px 10px; text-align:center; white-space:nowrap; }
th { background:var(--bg); font-weight:600; }
th.name button { all:unset; cursor:pointer; color:var(--accent); }
td.cand { text-align:left; font-weight:600; }
tr.best td { background:var(--best); }
.o { color:var(--o); font-weight:700; } .t { color:var(--t); font-weight:700; } .x { color:var(--x); }
.choices { display:flex; flex-direction:column; gap:8px; }
.choice { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.choice .label { flex:1 1 160px; font-weight:600; }
.seg { display:inline-flex; }
.seg button { border-radius:0; padding:7px 16px; margin-left:-1px; }
.seg button:first-child { border-radius:6px 0 0 6px; margin-left:0; }
.seg button:last-child { border-radius:0 6px 6px 0; }
.seg button[aria-pressed="true"] { color:#fff; border-color:transparent; }
.seg button[data-v="o"][aria-pressed="true"] { background:var(--o); }
.seg button[data-v="t"][aria-pressed="true"] { background:var(--t); }
.seg button[data-v="x"][aria-pressed="true"] { background:var(--x); }
.share { display:flex; gap:8px; } .share input { flex:1; }
.comment { font-size:.85rem; color:var(--muted); white-space:normal; max-width:12em; }
.calendar { max-width:360px; }
.cal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.cal-head button { padding:4px 14px; }
.grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
.dow { font-size:.8rem; color:var(--muted); }
.day { padding:8px 0; }
.day.today { border-color:var(--accent); }
.day[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:700; }
.day:disabled { opacity:.35; cursor:default; }
#selected { margin-top:14px; display:flex; flex-direction:column; gap:8px; }
.sel-row { display:flex; gap:8px; align-items:center; }
.sel-date { flex:0 0 5.5em; font-weight:600; }
.sel-row button { padding:6px 12px; }
.notice { font-size:.9rem; }
