/* dsignz media Secret Santa: charcoal ground, signature green (#71BF44), white cards, pill buttons. */
:root {
  --pine: #1c1a1a; --pine-2: #262323;
  --cran: #71BF44; --cran-dark: #5aa232; --green-ink: #3f7a1f;
  --gold: #71BF44; --paper: #ffffff; --ink: #222222; --muted: #6e6a6a; --line: #e6e4e4;
  --ok: #2f8f5b; --wait: #b7791f; --danger: #c0392b;
  --display: "Instrument Sans", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--pine); color: var(--paper); font-family: var(--body); font-size: 16px; line-height: 1.5;
  background-image:
    radial-gradient(circle at 15% 0%, rgba(113,191,68,.16) 0, transparent 40%),
    radial-gradient(circle at 95% 100%, rgba(113,191,68,.10) 0, transparent 45%),
    repeating-radial-gradient(circle at 50% 10%, rgba(255,255,255,.025) 0 1px, transparent 1px 46px);
  background-attachment: fixed;
}
canvas#snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--cran); }
.card a:not(.btn):not(.plink) { color: var(--green-ink); font-weight: 600; }

/* Header */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--paper); text-decoration: none; }
.brand svg { flex: none; }
.brand-sep { width: 1px; height: 26px; background: rgba(255,255,255,.25); }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #cfd9d4; }
.who form { margin: 0; }

main { flex: 1; display: flex; justify-content: center; padding: 32px 16px 48px; }
.wrap { width: 100%; max-width: 880px; display: flex; flex-direction: column; gap: 20px; }
.wrap-wide { max-width: 1280px; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; font-weight: 600; text-transform: uppercase; }
h2 { font-size: 28px; line-height: 1.15; }
h3 { font-size: 20px; }
p { margin: 0; }
.hl { color: var(--gold); }
.lede { color: #cfd9d4; max-width: 60ch; }
.muted { color: #a9bab2; }
.card .muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.eyebrow { display: inline-block; align-self: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 7px 16px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #e9e9e9; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cards & layout */
.card { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.card-foot { border-top: 1px solid var(--line); padding-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.center-items { align-items: center; text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.nowrap, .nowrap { flex-wrap: nowrap; white-space: nowrap; }
.row form { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

/* Buttons */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 12px 22px; font: 600 15px var(--body); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: transform .12s, background .12s, opacity .12s; text-decoration: none; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--cran); color: #fff; box-shadow: 0 8px 24px rgba(113,191,68,.25); }
.btn-primary:hover { background: var(--cran-dark); }
.btn-primary .arr { transition: transform .15s; }
.btn-primary:hover .arr { transform: translateX(3px); }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; opacity: .85; }
.btn-ghost:hover { opacity: 1; }
.btn-ink { color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-center { justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-xs { padding: 6px 14px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: 16px var(--body); background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--cran); box-shadow: 0 0 0 3px rgba(113,191,68,.2); }
textarea { min-height: 90px; resize: vertical; }
.field { display: flex; flex-direction: column; }
.field small { margin-top: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-all { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.err { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 20px; }
.alert { background: #fdecea; color: #8a2a20; border-radius: 14px; padding: 12px 18px; font-weight: 600; font-size: 15px; }

/* Login facts */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }
.fact { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 14px 16px; }
.fact b { display: block; font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--gold); }
.fact span { font-size: 13px; color: #a9bab2; }

/* Draw stage */
.stage { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 8px 0; margin: 0; }
.gift { width: 180px; height: 180px; cursor: pointer; border: 0; background: none; padding: 0; display: grid; place-items: center; }
.gift:hover .lid { transform: translateY(-6px) rotate(-3deg); }
.gift:disabled { cursor: default; }
.lid { transition: transform .25s; transform-origin: 50% 100%; }
.shake { animation: shake .5s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.slot { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 5vw, 44px); color: var(--cran); min-height: 1.3em; line-height: 1.2; }

.reveal { background: var(--paper); color: var(--ink); border-radius: 20px; width: 100%; position: relative; overflow: hidden; border: 1px solid var(--line); padding: 28px 20px; animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.reveal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: repeating-linear-gradient(90deg, var(--cran) 0 18px, var(--paper) 18px 26px, #1c1a1a 26px 44px, var(--paper) 44px 52px); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font: 700 26px var(--body); color: #fff; margin: 0 auto; flex: none; }
.avatar-sm { width: 30px; height: 30px; font-size: 12px; margin: 0; }
.friend-name { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.1; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.tag-xs { font-size: 10px; }
.tag-secret { background: #eaf6e2; color: var(--green-ink); }
.tag-lock { background: #ececec; color: var(--ink); }
.tag-open { background: #e3f3ea; color: var(--ok); }
.sealed { border: 2px dashed var(--line); border-radius: 16px; padding: 28px 16px; background: #f6f8f3; }
.sealed form { margin: 0; }
.wish { background: #f3f5f0; border-radius: 12px; padding: 14px 16px; text-align: left; font-size: 15px; overflow-wrap: anywhere; }
.wlabel { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.plink { display: inline-flex; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; margin: 2px 0; color: var(--green-ink); font-weight: 600; text-decoration: none; font-size: 14px; }
.plink:hover { border-color: var(--cran); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.countdown { font-family: var(--display); font-size: 56px; line-height: 1; color: var(--cran); }

/* Organiser */
.progress { height: 12px; border-radius: 999px; background: #ececec; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.num { font-variant-numeric: tabular-nums; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-done { color: var(--ok); background: #e3f3ea; }
.st-wait { color: var(--wait); background: #fbf0dc; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.kpi b { font-family: var(--display); font-weight: 700; font-size: 32px; display: block; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 13px; color: var(--muted); }
@media (max-width: 480px) { .kpi b { font-size: 26px; } .kpi { padding: 10px; } }
.pin-box { background: #f3f5f0; border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--muted); }
.pin-box b { color: var(--ink); letter-spacing: 3px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.edit-actions { border-top: 1px solid var(--line); padding-top: 14px; }
.bulk summary { cursor: pointer; color: var(--green-ink); font-weight: 600; font-size: 14px; }

/* Header links */
.nav-link { color: #e9e9e9; text-decoration: none; font-weight: 500; }
.nav-link:hover { color: var(--cran); }
.back-link { color: #cfd9d4; text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--cran); }
@media (max-width: 560px) { .who-name { display: none; } }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px dashed var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: 500 13px var(--body); cursor: pointer; color: var(--ink); text-align: left; }
.chip:hover { border-color: var(--cran); }
.chip:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Tasks */
.big-emoji { font-size: 40px; margin: 0; line-height: 1; }
.kpis-2 { grid-template-columns: 1fr 1fr; }
/* ---------- Task board (landing) ---------- */
.board { display: flex; flex-direction: column; gap: 28px; }
.board-hero { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.board-hero h1 { font-size: clamp(36px, 6.4vw, 64px); line-height: 1; }
.board-hero .lede { font-size: 17px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 560px; margin-top: 6px; }
.stat { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(2px); }
.stat b { display: block; font-family: var(--display); font-size: 34px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: #a9bab2; }
.stat-done b { color: #8fd162; }
.stat-miss b { color: #cfcac2; }

/* ---------- Sticky notes ---------- */
.note {
  --paper-c: #fff3a8; --ink-c: #3b3416; --fold: #e9d97c;
  position: relative; color: var(--ink-c);
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 40%), var(--paper-c);
  padding: 34px 22px 18px; border-radius: 3px 3px 3px 3px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 2px 2px rgba(0,0,0,.18), 0 14px 26px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
/* curled bottom-right corner */
.note::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; background: linear-gradient(135deg, var(--paper-c) 50%, var(--fold) 50%); box-shadow: -2px -2px 4px rgba(0,0,0,.06); }
.note-c0 { --paper-c: #fff3a8; --ink-c: #3b3416; --fold: #e9d97c; }   /* yellow */
.note-c1 { --paper-c: #d8f0b8; --ink-c: #26391a; --fold: #b9dc92; }   /* dsignz lime */
.note-c2 { --paper-c: #ffd7c2; --ink-c: #4a2a1c; --fold: #f3b79a; }   /* peach */
.note-c3 { --paper-c: #cfe8f7; --ink-c: #1d3442; --fold: #a8d1ea; }   /* sky */
.note-c4 { --paper-c: #f9d0e0; --ink-c: #45202f; --fold: #eeabc6; }   /* pink */
.tape { position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; margin-left: -46px; background: rgba(244,240,226,.82); border-left: 1px dashed rgba(0,0,0,.1); border-right: 1px dashed rgba(0,0,0,.1); transform: rotate(-3deg); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.note-for { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: .85; }
.note-for b { font-weight: 700; }
.note-task { font-family: "Caveat", "Segoe Print", cursive; font-weight: 700; font-size: 27px; line-height: 1.15; overflow-wrap: anywhere; }
.note-from { font-family: "Caveat", cursive; font-size: 21px; font-weight: 600; opacity: .75; align-self: flex-end; }
.note-label { align-self: flex-start; background: rgba(0,0,0,.08); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.note .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }

/* Spotlight: big note + clock */
.spotlight { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: 10px 6px 0; }
.note-xl { padding: 44px 34px 26px; gap: 16px; transform: rotate(-1.2deg); }
.note-xl .avatar { width: 48px; height: 48px; font-size: 18px; margin: 0; }
.note-xl .note-for { font-size: 16px; }
.note-xl .note-task { font-size: clamp(34px, 4.6vw, 46px); line-height: 1.08; }
.note-xl .tape { width: 130px; margin-left: -65px; height: 30px; top: -14px; }
.spot-clock { color: #fff; display: flex; flex-direction: column; gap: 14px; }
.clock-title { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a9bab2; }
.clock-due { font-size: 14px; color: #cfd9d4; }
.clock { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.clock div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 12px 6px; text-align: center; }
.clock b { display: block; font-family: var(--display); font-size: clamp(30px, 4vw, 42px); line-height: 1; color: var(--cran); font-variant-numeric: tabular-nums; }
.clock span { font-size: 12px; color: #a9bab2; text-transform: uppercase; letter-spacing: .08em; }
.clock.is-up b { color: #cfcac2; }
@media (max-width: 720px) { .spotlight { grid-template-columns: 1fr; gap: 28px; } }

/* Meter: share of the time window used */
.meter { height: 8px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8fd162, var(--cran)); }
.meter-hot i { background: linear-gradient(90deg, #f0b44c, #e2711d); }
.meter-sm { height: 6px; background: rgba(0,0,0,.08); }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { text-decoration: none; display: inline-block; appearance: none; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #e9e9e9; border-radius: 999px; padding: 8px 16px; font: 600 14px var(--body); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.filter span { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.filter:hover { border-color: var(--cran); }
.filter.is-on { background: var(--cran); border-color: var(--cran); color: #fff; }
.filter:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Note cards on the board */
/* 4 x 4 grid: 4 columns on desktop, 2 on tablets, 1 on phones; notes in a row share a height */
.board-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 24px; align-items: stretch; padding-top: 12px; }
@media (max-width: 1000px) { .board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .board-grid { grid-template-columns: 1fr; } }
.note-card { padding: 32px 18px 16px; }
.note-card .note-task { flex: 1; font-size: 23px; }

/* Status pills + person picker */
.board-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.person-filter { margin: 0; }
.person-filter select { appearance: none; -webkit-appearance: none; min-width: 230px; max-width: 100%; padding: 9px 40px 9px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23e9e9e9' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 16px center; color: #e9e9e9; font: 600 14px var(--body); cursor: pointer; }
.person-filter select:hover { border-color: var(--cran); }
.person-filter select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.person-filter option { color: var(--ink); background: #fff; }
/* Combo box */
.combo { position: relative; width: 280px; max-width: 100%; }
.combo-input { width: 100%; height: 42px; padding: 0 64px 0 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font: 600 14px var(--body); transition: border-color .15s, background .15s, box-shadow .15s; }
.combo-input::placeholder { color: #cfd9d4; opacity: 1; font-weight: 500; }
.combo-input:hover { border-color: rgba(113,191,68,.6); }
.combo-input:focus { outline: none; border-color: var(--cran); background: rgba(255,255,255,.1); box-shadow: 0 0 0 3px rgba(113,191,68,.25); }
.combo.has-value .combo-input { border-color: var(--cran); background: rgba(113,191,68,.14); }
.combo-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #a9bab2; pointer-events: none; }
.combo-caret { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #e9e9e9; pointer-events: none; transition: transform .2s; }
.combo.is-open .combo-caret { transform: translateY(-50%) rotate(180deg); }
.combo-clear { display: none; position: absolute; right: 34px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.combo-clear:hover { background: var(--cran); }
.combo.has-value .combo-clear { display: grid; place-items: center; }
.combo.is-loading .combo-input { opacity: .6; }

.combo-list { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; min-width: 280px; max-height: 340px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.04); animation: combo-in .14s ease-out; overscroll-behavior: contain; }
@keyframes combo-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.combo-opt { display: grid; grid-template-columns: 30px 1fr auto 16px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.combo-opt.is-active { background: #eef7e6; }
.combo-opt.is-current .combo-name { font-weight: 700; }
.combo-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 11px var(--body); }
.combo-av-all { background: #f1f3ee; font-size: 15px; }
.combo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-name mark { background: #d8f0b8; color: inherit; border-radius: 3px; padding: 0 1px; }
.combo-count { font-size: 12px; font-weight: 600; color: var(--muted); background: #f3f5f0; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.combo-check { color: var(--cran-dark); font-weight: 800; }
.combo-opt:first-child:has(.combo-av-all) { border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.combo-empty { padding: 14px 12px; color: var(--muted); font-size: 14px; text-align: center; }
@media (max-width: 560px) { .combo, .combo-list { width: 100%; min-width: 0; } }

.person-note { color: #cfd9d4; font-size: 15px; margin-top: -12px; }
.person-note b { color: #fff; }
@media (max-width: 560px) { .person-filter, .person-filter select { width: 100%; } }

/* Pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pager-nums { display: flex; gap: 6px; align-items: center; }
.pager-btn, .pager-num { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); color: #e9e9e9; text-decoration: none; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; transition: border-color .15s, background .15s; }
.pager-num { padding: 0; }
.pager-btn:hover, .pager-num:hover { border-color: var(--cran); }
.pager-num.is-on { background: var(--cran); border-color: var(--cran); color: #fff; }
.pager-btn.is-off { opacity: .35; }
.pager-gap { color: #a9bab2; padding: 0 2px; }
.pager-info { margin-top: -8px; }
.note-card:nth-child(4n+1) { transform: rotate(-1.6deg); }
.note-card:nth-child(4n+2) { transform: rotate(1.2deg); }
.note-card:nth-child(4n+3) { transform: rotate(-.6deg); }
.note-card:nth-child(4n)   { transform: rotate(1.8deg); }
.note-card:hover { transform: translateY(-4px) rotate(0) scale(1.02); box-shadow: 0 2px 2px rgba(0,0,0,.18), 0 22px 38px rgba(0,0,0,.42); z-index: 2; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; padding-top: 8px; border-top: 1px dashed rgba(0,0,0,.15); }
.note-foot > span:first-child { font-family: "Caveat", cursive; font-size: 19px; font-weight: 600; opacity: .75; }
.chip-time { background: rgba(255,255,255,.65); color: var(--green-ink); font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; font-size: 12px; }
.chip-done { color: var(--ok); }
.chip-miss { color: #7a746a; }

/* Completed: green check stamp, note stays bright */
.stamp { position: absolute; top: 18px; right: 12px; transform: rotate(10deg); border: 3px solid #2f8f5b; color: #2f8f5b; font: 800 14px var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 2px 10px; border-radius: 6px; background: rgba(255,255,255,.55); mix-blend-mode: multiply; }
.st-done .note-task { text-decoration: line-through; text-decoration-color: rgba(47,143,91,.55); text-decoration-thickness: 3px; }
/* Missed: faded grey note */
.note.st-expired { --paper-c: #e4e1da; --ink-c: #6b665e; --fold: #cfcac0; }
.stamp-miss { border-color: #8f8a80; color: #8f8a80; }
.filter-empty { padding: 24px 0; }

/* Empty board */
.board-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; border: 2px dashed rgba(255,255,255,.15); border-radius: 24px; }
.board-empty p { max-width: 46ch; }

@media (max-width: 560px) {
  .stat { padding: 10px 12px; }
  .stat b { font-size: 26px; }
  .note-xl { padding: 38px 22px 22px; }
  .note-card:nth-child(n) { transform: rotate(0); }
}
.task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 680px) { .task-grid { grid-template-columns: 1fr; } }
.task { background: var(--paper); color: var(--ink); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.task-grid .task::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: repeating-linear-gradient(90deg, var(--cran) 0 18px, var(--paper) 18px 26px, #1c1a1a 26px 44px, var(--paper) 44px 52px); }
.task-grid .task { padding-top: 24px; }
.task .muted { color: var(--muted); }
.task-for { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.task-for b { font-weight: 600; }
.task-body { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.35; overflow-wrap: anywhere; }
.task-done .task-body, .task-expired .task-body { color: #6e6a6a; }
.task-expired { background: #ecebe8; }
.task-grid .task-expired::before { filter: grayscale(1); opacity: .5; }
.tag-done { background: #e3f3ea; color: var(--ok); }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card .task-list .task { box-shadow: none; border: 1px solid var(--line); padding: 16px; }
.card .task-list .task-body { font-size: 17px; }
details .task-list { margin-top: 10px; gap: 8px; }
details .task-list li { font-size: 14px; color: var(--muted); }

/* Pairings password gate */
.pin-gate { position: relative; }
.pin-gate summary { list-style: none; }
.pin-gate summary::-webkit-details-marker { display: none; }
.pin-gate[open] summary { background: #f3f5f0; }
.pin-gate-form { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 8px; }
.pin-gate-form label { margin: 0; }
td.pairing { font-weight: 600; color: var(--green-ink); white-space: nowrap; }
@media (max-width: 560px) { .pin-gate-form { right: auto; left: 0; } }

/* Draw switch (organiser) */
.draw-switch { border: 2px solid #f0d9a8; }
.draw-switch.is-open { border-color: rgba(113,191,68,.55); }
.draw-waiting { padding: 26px 16px; }

.demo-banner { background: #f0b44c; color: #1c1a1a; text-align: center; font-weight: 700; font-size: 14px; padding: 8px 16px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 5; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; }

@media (max-width: 560px) {
  .topbar { padding: 12px 16px; }
  .brand svg { width: 110px; height: auto; }
  .brand { gap: 10px; font-size: 16px; }
  .card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
