:root {
  color-scheme: light;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #25213a;
  background: #f3f2fb;
  --muted: #625d76;
  --accent: #5938c4;
  --border: #e1dcec;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at top left, #e9e1ff, transparent 65%);
}
.brand, main, footer { max-width: 760px; margin: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 10px 2px 22px; }
.brand strong { font-size: 20px; }
.brand-name { border-left: 1px solid #cfc5e1; padding-left: 12px; color: var(--muted); font-size: .9rem; }
.mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: white; background: #5938c4; font-size: 23px; box-shadow: 0 6px 16px #5331ab30; }
main { display: grid; gap: 14px; }
body.participant main, body.participant .brand, body.participant footer { max-width: 560px; }
.card { min-width: 0; padding: clamp(18px, 4vw, 32px); background: #fff; border: 1px solid var(--border); border-radius: 22px; box-shadow: 0 8px 30px #2d194909; overflow-wrap: anywhere; }
h1, h2 { margin: 0 0 12px; line-height: 1.28; }
h1 { font-size: clamp(1.45rem, 6vw, 2.15rem); letter-spacing: -.035em; }
h2 { font-size: 1.2rem; }
p { line-height: 1.65; margin: 0 0 12px; }
.muted, small, footer { color: var(--muted); }
.muted { font-size: .91rem; }
footer { padding: 20px 2px 4px; font-size: .82rem; text-align: center; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 650; }
input, textarea, select, button, .button { font: inherit; }
input, textarea, select { min-width: 0; width: 100%; min-height: 46px; border: 1px solid #cfc7de; border-radius: 10px; padding: 10px 12px; background: #fff; color: inherit; font-size: 1rem; }
textarea { resize: vertical; }
button, .button { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid #d6cce9; border-radius: 11px; background: #f7f4ff; color: #49329a; text-decoration: none; font-weight: 650; cursor: pointer; text-align: center; }
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.danger { color: #9e2742; background: #fff2f5; border-color: #efc3ce; }
button:disabled { opacity: .64; cursor: wait; }
:focus-visible { outline: 3px solid #8364da; outline-offset: 3px; }
.wide { width: 100%; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.status { display: inline-block; padding: 5px 10px; border-radius: 99px; color: #49329a; background: #efe8ff; font-size: .85rem; font-weight: 700; }
.status[data-phase="done"] { color: #16604a; background: #dff7ec; }
.count { font-size: 2.15rem; font-variant-numeric: tabular-nums; font-weight: 750; }
.meter { width: 100%; height: 12px; accent-color: var(--accent); }
.participant-title { margin: 14px 0 9px; }
.list { padding-left: 1.55rem; margin: 10px 0 16px; }
.list li { padding: 6px 0; border-bottom: 1px solid #efebf5; }
.list small { margin-left: 6px; }
.rooms { display: grid; gap: 8px; margin: 12px 0; }
.rooms a { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #3a276d; padding: 12px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; min-width: 0; }
.rooms a strong { overflow-wrap: anywhere; }
.rooms a small { text-align: right; flex-shrink: 0; }
.notice { max-width: 760px; margin: 14px auto 0; background: #fff; color: #4d387b; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; overflow-wrap: anywhere; }
.notice.error { background: #fff2f5; color: #872238; border-color: #efc3ce; }
.notice:focus { outline: none; }
.qr { display: block; margin: 10px auto 0; max-width: 100%; width: 190px; height: auto; image-rendering: pixelated; }
.poster { display: block; max-width: 100%; height: auto; margin: 10px auto; border-radius: 12px; }
details { margin-top: 14px; }
summary { cursor: pointer; padding: 7px 0; }
.roster-panel, .member-row { padding: 13px; border: 1px solid var(--border); border-radius: 12px; }
.member-row { margin-top: 8px; }
.member-row code { overflow-wrap: anywhere; font-size: .92rem; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; min-height: auto; }
@media (max-width: 380px) {
  .two { gap: 8px; }
  .rooms a { align-items: flex-start; flex-direction: column; gap: 4px; }
}
.probability-row{display:grid;grid-template-columns:minmax(0,1fr) 110px 90px;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e6e1ef}.probability-row strong{overflow-wrap:anywhere}.probability-row small{display:block}.probability-row input{width:100%}.probability-admin .row>input{min-width:0;flex:1}.probability-admin textarea{width:100%}@media(max-width:400px){.probability-row{grid-template-columns:minmax(0,1fr) 80px 70px;gap:6px}.probability-row span{font-size:12px}}
.option-edit-row{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px;border-bottom:1px solid #e6e1ef;padding:12px 0}.option-edit-row input[type=number]{width:100%}
