:root {
  --bg: #f7f5f0;
  --card: #ffffff;
  --ink: #1f1d1a;
  --ink-2: #6b675f;
  --ink-3: #9c978c;
  --line: #e5e1d8;
  --purple: #534AB7;
  --purple-bg: #EEEDFE;
  --purple-dark: #3C3489;
  --teal: #0F6E56;
  --teal-bg: #E1F5EE;
  --teal-mid: #1D9E75;
  --amber: #BA7517;
  --amber-bg: #FAEEDA;
  --red: #A32D2D;
  --red-bg: #FCEBEB;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.5; }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }

header.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.logo .die { width: 34px; height: 34px; background: var(--purple); color: #fff; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; transform: rotate(-8deg); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin-bottom: 12px; }
.muted { color: var(--ink-2); font-size: 13px; }
.tiny { color: var(--ink-3); font-size: 12px; }

.campaign-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.campaign-head .left { display: flex; align-items: center; gap: 12px; }
.cicon { width: 44px; height: 44px; border-radius: 10px; background: var(--purple-bg); color: var(--purple); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.badge.confirmed { background: var(--teal-bg); color: var(--teal); }
.badge.pending { background: var(--amber-bg); color: var(--amber); }
.badge.risk { background: var(--red-bg); color: var(--red); }

.session-box { background: #faf9f5; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.session-box .when { font-weight: 600; font-size: 15px; }

.quorum { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.quorum .bar { flex: 1; height: 8px; background: #ece9e1; border-radius: 999px; overflow: hidden; }
.quorum .fill { height: 100%; background: var(--teal-mid); border-radius: 999px; transition: width .3s; }

table.party { width: 100%; border-collapse: collapse; font-size: 14px; }
table.party td { padding: 10px 4px; border-bottom: 1px solid var(--line); }
table.party tr:last-child td { border-bottom: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-right: 8px; vertical-align: middle; }
.av-ok { background: var(--teal-bg); color: var(--teal); }
.av-warn { background: var(--red-bg); color: var(--red); }
.status-in { color: var(--teal); font-weight: 600; font-size: 13px; }
.status-wait { color: var(--amber); font-weight: 600; font-size: 13px; }
.status-out { color: var(--red); font-weight: 600; font-size: 13px; }
.streak { color: var(--ink-2); font-size: 13px; text-align: right; }
.streak .flame { color: var(--amber); }

.dates { display: flex; flex-direction: column; gap: 8px; }
.date-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.date-row .d { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.heat { display: flex; gap: 3px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ece9e1; }
.dot.on { background: var(--teal-mid); }

button.btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
button.btn:hover { background: #faf9f5; }
button.btn.primary { background: var(--purple); border-color: var(--purple); color: #fff; }
button.btn.primary:hover { background: var(--purple-dark); }
button.btn.small { padding: 5px 10px; font-size: 12px; }
button.btn.danger { color: var(--red); }
button.btn:disabled { opacity: .5; cursor: default; }

input.field, select.field, textarea.field { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); }
input.field:focus, select.field:focus, textarea.field:focus { outline: 2px solid var(--purple-bg); border-color: var(--purple); }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: center; background: #fff; transition: all .12s; }
.pick:hover { border-color: var(--ink-3); }
.pick.sel { border-color: var(--teal-mid); background: var(--teal-bg); }
.pick .dd { font-weight: 700; font-size: 14px; }
.pick .tt { font-size: 12px; color: var(--ink-2); }
.pick.sel .tt { color: var(--teal); }

.lockin { border: 1.5px solid var(--purple); background: var(--purple-bg); border-radius: var(--radius); padding: 14px 16px; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lockin .t { font-weight: 700; font-size: 14px; color: var(--purple-dark); }
.lockin .s { font-size: 13px; color: var(--purple); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 50; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; }

.notice { background: var(--amber-bg); border: 1px solid #edd9b0; color: #7a5410; border-radius: var(--radius); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }
.notice.err { background: var(--red-bg); border-color: #eec7c7; color: var(--red); }

.hidden { display: none; }
footer { text-align: center; margin-top: 24px; }
.spinner { text-align: center; padding: 40px 0; color: var(--ink-3); font-size: 14px; }
