/* /demo: the sample event inside a phone on wide screens, full screen on phones.
   event.css styles the guest page; the team page parts below copy plan.css and results.css
   (scoped to .v-team, because plan.css and event.css both use .status, .bar and .next). */

/* The demo always shows in light colours, like the home page, whatever the device is set to.
   event.css has a dark mode; this puts its light values back. */
html { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #faf6ef; --card: #ffffff; --ink: #1d1a16; --muted: #6b6258; --line: #e7dfd3; --brand: var(--ocean);
    --accent: #8a3d1c; --accent-soft: #f3e4d8; --hibiscus: #c8203a; --shadow: 0 1px 2px rgba(29, 26, 22, .06), 0 4px 16px rgba(29, 26, 22, .05); }
  .btn.solid { color: #fff; }
  .game .field { background: #e3edf6; color: var(--ocean); }
}

/* The sample event's own colours, like an Event Plus theme: Sina's 21st in teal and gold, the same as
   the promo screenshots (marketing/screenshots-21st). The band is the theme band (lib/event.js). */
.screen, .pk-21st {
  --ocean: #00494a; --ocean-2: #00797a; --shade: 0, 43, 44; --accent: #00797a; --accent-soft: #dff2ef;
  --hero-title: #f7b733;
  --siapo: url("/assets/pattern-triangles.png") 0 0 / auto 18px, #00494a;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.13' stroke-width='2'%3E%3Cpath d='M22 2l20 20-20 20L2 22z'/%3E%3Cpath d='M22 13l9 9-9 9-9-9z'/%3E%3C/g%3E%3C/svg%3E");
  --spot: #f7b733;
}
/* Lani & Sione's wedding in navy and rose: the same theme as the live sample page /e/demo-wedding
   (events/demo-wedding.json). The picker's wedding card wears it too. */
.dm-wedding .screen, .pk-wedding {
  --ocean: #2b3a55; --ocean-2: #4a5d80; --shade: 20, 28, 43; --accent: #b5656b; --accent-soft: #f6e3e4;
  --hero-title: #f3d9b1;
  --siapo: url("/assets/pattern-triangles.png") 0 0 / auto 18px, #2b3a55;
  --spot: #b5656b;
}
/* Mafutaga's own asks (make your own page, the Language link) are always the brand green, the
   home page's --green, whichever sample is showing (owner, 2026-11-07). */
body.dm { --dm-cta: #0e6b34; }

/* ---------- Page around the phone ---------- */
html, body.dm { height: 100%; }
body.dm { background: radial-gradient(90% 70% at 75% 40%, #f1e6d6 0%, var(--bg) 70%) fixed; }
.dm-page {
  min-height: 100dvh; display: grid; grid-template-columns: minmax(300px, 420px) auto;
  justify-content: center; align-items: center; gap: clamp(32px, 6vw, 88px); padding: 20px 32px;
}
.dm-side { max-width: 420px; }
.dm-logo img { display: block; height: 34px; width: auto; }
.dm-side h1 { margin: 18px 0 6px; font-size: clamp(30px, 4.2vh, 40px); line-height: 1.05; letter-spacing: -.02em; }
.dm-lead { margin: 0 0 16px; color: var(--muted); font-size: 17px; }

.dm-switch { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.dm-switch button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.dm-switch button[aria-pressed="true"] { background: #0b3150; color: #fff; }

.dm-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.dm-steps .dm-group { margin: 10px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dm-steps .dm-group:first-child { margin-top: 0; }
.dm-steps button {
  display: flex; gap: 12px; align-items: flex-start; width: calc(100% + 20px); padding: 5px 10px; margin: 0 -10px;
  border: 0; border-radius: 12px; background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.dm-steps button:hover { background: rgba(0, 0, 0, .04); }
.dm-steps .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted);
}
.dm-steps b { font-weight: 600; }
.dm-steps .d { display: block; margin-top: 2px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.dm-steps .on button { background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); }
.dm-steps .on .n { background: #0b3150; border-color: #0b3150; color: #fff; }
.dm-steps .ok .n { background: #2e7d32; border-color: #2e7d32; color: transparent; position: relative; }
.dm-steps .ok .n::after { content: "✓"; position: absolute; color: #fff; }

.dm-nav { display: flex; gap: 8px; margin-top: 14px; }
.dm-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid #0b3150; background: #0b3150; color: #fff;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.dm-btn.plain { background: transparent; color: var(--ink); border-color: var(--line); }
.dm-btn:disabled { opacity: .4; cursor: default; }
.dm-btn.solid { background: var(--dm-cta); border-color: var(--dm-cta); color: #fff; }

/* Which sample: a row of two links beside the phone (wide screens). */
.dm-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
.dm-pick-l { margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dm-pick a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 15px; font-weight: 600; text-decoration: none;
}
.dm-pick a:hover { border-color: var(--muted); }
.dm-pick a[aria-current="page"] { background: #0b3150; border-color: #0b3150; color: #fff; }

/* The first screen: pick a sample. Each card wears its event's own colours. */
.v-pick .scroll { display: flex; }
.pk { margin: auto 0; width: 100%; padding: 28px 20px 32px; }
.pk-logo, .pk-lang { display: none; }
.pk-logo img { display: block; height: 24px; width: auto; }
.pk-lang { margin: 18px 0 0; text-align: center; }
.pk-k { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pk h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.pk-lead { margin: 0 0 20px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.pk-card {
  display: block; margin: 0 0 14px; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.pk-card:hover, .pk-card:focus-visible { border-color: var(--accent); }
.pk-top {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 112px; padding: 14px 16px;
  color: #fff; background: var(--pattern) center / 44px, var(--ocean);
}
.pk-21st .pk-top {
  background: linear-gradient(180deg, rgba(var(--shade), .05) 20%, rgba(var(--shade), .85)), url("/assets/head-21st.webp") 70% 35% / cover, var(--ocean);
}
.pk-kind { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.pk-top b { font-size: 22px; line-height: 1.15; color: var(--hero-title); }
.pk-sub { display: block; padding: 12px 16px 14px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.pk-sub::after { content: " →"; color: var(--accent); font-weight: 700; }
.dm-cta { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- The phone ---------- */
.phone {
  position: relative; height: min(860px, calc(100dvh - 40px)); aspect-ratio: 417 / 876;
  padding: 11px; border-radius: 62px; background: #16181b;
  box-shadow: 0 0 0 2px #3a3d42, 0 30px 60px -20px rgba(20, 20, 30, .45), 0 18px 36px -18px rgba(0, 0, 0, .35);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 4px; border-radius: 2px; background: #2b2e33; }
.phone::before { left: -5px; top: 22%; height: 70px; box-shadow: 0 90px 0 #2b2e33; }
.phone::after { right: -5px; top: 28%; height: 100px; }
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 51px; background: var(--bg);
  display: flex; flex-direction: column; isolation: isolate;
}
.sbar {
  flex: none; height: 50px; padding: 0 30px 0 36px; display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--ink); background: var(--bg); position: relative; z-index: 3;
}
.screen[data-view="guest"] .sbar, .screen[data-view="chat"] .sbar { color: #fff; }
.screen[data-view="guest"] .sbar { background: var(--ocean); }
.screen[data-view="chat"] .sbar { background: #1f5c52; }
.island { position: absolute; left: 50%; top: 11px; width: 108px; height: 31px; margin-left: -54px; border-radius: 20px; background: #000; }
.batt { width: 25px; height: 12px; border: 1.5px solid currentColor; border-radius: 4px; padding: 1.5px; opacity: .9; position: relative; }
.batt::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; }
.batt i { display: block; width: 70%; height: 100%; border-radius: 1.5px; background: currentColor; }

.mdemo, .mbar, .mtour { display: none; }
.views { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.view .scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.view .scroll::-webkit-scrollbar { display: none; }
.dm-noscript { padding: 24px; }

/* Wide screens: the tabs inside the phone mustn't use the page's 680px width rules. */
.v-guest .hero { padding-top: 24px; }
.v-guest .hero h1 { font-size: 34px; }

/* The step being explained gets a soft gold ring. */
.dm-spot { animation: spot 2.4s ease-out; border-radius: 16px; }
@keyframes spot {
  0%, 60% { box-shadow: 0 0 0 3px var(--spot), 0 0 0 9px color-mix(in srgb, var(--spot) 30%, transparent); }
  100% { box-shadow: 0 0 0 3px transparent, 0 0 0 9px transparent; }
}
@media (prefers-reduced-motion: reduce) { .dm-spot { animation: none; box-shadow: 0 0 0 3px var(--spot); } }

/* ---------- Group chat (where the link arrives) ---------- */
.v-chat { background: #ece5dd; }
.wa-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 10px; background: #1f5c52; color: #fff; }
.wa-top b { display: block; font-size: 16px; }
.wa-top small { display: block; font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.wa-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #e7c27d; color: #3a2414; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.wa-body { padding: 10px 12px 16px; }
.wa-day { text-align: center; margin: 4px 0 10px; }
.wa-day span { display: inline-block; padding: 3px 10px; border-radius: 8px; background: #e1f2fb; color: #4a5b66; font-size: 12px; }
.msg {
  position: relative; max-width: 86%; margin: 0 0 8px; padding: 6px 9px 18px; border-radius: 10px 10px 10px 2px;
  background: #fff; color: #111b21; font-size: 15px; line-height: 1.38; box-shadow: 0 1px .5px rgba(0, 0, 0, .13);
}
.msg.out { margin-left: auto; border-radius: 10px 10px 2px 10px; background: #d9fdd3; }
.msg time { position: absolute; right: 8px; bottom: 3px; font-size: 11px; color: #667781; }
.wa-name { display: block; font-size: 13px; margin-bottom: 1px; }
.lp {
  display: block; margin: 6px 0 4px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .05);
  color: inherit; text-decoration: none; cursor: pointer;
}
.lp-img {
  display: block; height: 120px;
  background: url("/assets/head-21st.webp") 70% center / cover, var(--ocean);
}
/* The wedding has no cover photo (like its live page): its pattern on navy. */
.dm-wedding .lp-img { background: var(--pattern) center / 44px, var(--ocean); }
.lp-t, .lp-d, .lp-u { display: block; padding: 0 10px; }
.lp-t { padding-top: 8px; font-weight: 700; font-size: 14px; }
.lp-d { font-size: 13px; color: #556; }
.lp-d::first-letter { text-transform: uppercase; } /* a Spanish date starts the line */
.lp-u { padding-bottom: 8px; font-size: 12px; color: #889; }
.wa-url { color: #027eb5; text-decoration: underline; word-break: break-all; }
.wa-hint { margin: 18px auto 0; max-width: 260px; text-align: center; font-size: 14px; color: #54656f; }
.wa-input { flex: none; padding: 8px 10px 14px; }
.wa-input span { display: block; padding: 10px 16px; border-radius: 999px; background: #fff; color: #8696a0; font-size: 15px; }

/* ---------- Guest page additions ---------- */
.dm-next {
  display: block; width: 100%; margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 0;
  background: var(--accent-soft); color: var(--accent); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.dm-next::after { content: " →"; }
/* "Get your own free page": Mafutaga's own band in its navy, set apart from the event's colours. */
.dm-own { margin: 0; padding: 30px 20px 32px; text-align: center; background: #0b3150; color: #fff; }
.dm-own-k { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.dm-own h2 { display: block; margin: 0 0 8px; font-size: 22px; line-height: 1.2; color: #fff; }
.dm-own p { max-width: 320px; margin: 0 auto 18px; font-size: 16px; line-height: 1.45; opacity: .9; }
.dm-own .btn.light { background: var(--dm-cta); border-color: var(--dm-cta); color: #fff; }
a.mt-go { background: var(--dm-cta); }
.dm .langlink { color: var(--dm-cta); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dm-foot { max-width: none; padding: 16px 16px 20px; text-align: center; font-size: 13px; color: var(--muted); background: var(--bg); }
.dm-foot p { margin: 0; }
.dm-foot a { color: var(--muted); }

/* ---------- Team page (from plan.css) ---------- */
.v-team .plan { max-width: 680px; margin: 0 auto; padding: 18px 16px 24px; }
.v-team .kind { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.v-team h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.2; }
.v-team .whoami { margin: 0 0 16px; }
.v-team .count .big { margin: 0; color: var(--muted); }
.v-team .count .days { font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1; margin-right: 4px; }
.pbar { height: 8px; margin: 12px 0 0; border-radius: 4px; background: var(--line); overflow: hidden; }
.pbar span { display: block; height: 100%; width: 0; background: var(--ocean-2); transition: width .3s; }
.v-team .urgent {
  display: block; width: 100%; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 600;
}
.v-team .urgent.soon { background: #fdf0d5; border-color: #ecc77a; color: #6b4500; }
.v-team .chips, .whos { display: flex; gap: 6px; margin: 0 -16px 12px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.whos { flex-wrap: wrap; margin: 0 0 4px; padding: 0; overflow: visible; }
.v-team .chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ocean-2); border-color: var(--ocean-2); color: #fff; }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; }
.step { position: relative; padding-left: 16px; margin-bottom: 4px; }
.step::before {
  content: ""; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
}
.step.current::before { border-color: var(--ocean-2); background: var(--ocean-2); }
.step.done::before { border-color: #2e7d32; background: #2e7d32; }
.step summary { display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 0; list-style: none; cursor: pointer; }
.step summary::-webkit-details-marker { display: none; }
.step summary .st { font-weight: 700; }
.step summary .sd { color: var(--muted); font-size: 15px; }
.step summary .count { margin-left: auto; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.step.done summary .st { color: var(--muted); }
.tasks { list-style: none; margin: 0 0 8px; padding: 0; }
.flatcard { padding-top: 4px; padding-bottom: 4px; }
.flatcard .tasks { margin: 0; }
.task {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 0;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 16px; text-align: left; cursor: pointer;
}
.task .tt { flex: 1; }
.task .meta { font-size: 13px; color: var(--muted); max-width: 42%; text-align: right; }
.tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.s-sorted .tick { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.s-sorted .tick::after { content: "✓"; }
.s-sorted .tt, .s-skip .tt { color: var(--muted); text-decoration: line-through; }
.s-help .tick { border-color: #d08a00; color: #a06a00; }
.s-help .tick::after { content: "?"; }
.s-help .meta { color: #a06a00; font-weight: 600; }
.s-skip .tick { border-style: dashed; }
.addtask {
  display: block; width: 100%; min-height: 44px; margin: 0 0 8px; padding: 0; text-align: left;
  background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer;
}
.committee { margin-top: 16px; }
.committee summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.committee summary span { color: var(--muted); font-weight: 400; }
.dlist { list-style: none; margin: 8px 0 8px; padding: 0; }
.dlist li { padding: 8px 0; border-top: 1px solid var(--line); }
.dlist small { color: var(--muted); }
.dlist li.new { background: var(--accent-soft); margin: 0 -16px; padding: 8px 16px; }
.newtag { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 2px; }
.mlist { list-style: none; margin: 8px 0 12px; padding: 0; }
.mlist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.mlist .who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.mlist small { color: var(--muted); flex: none; font-size: 13px; }
.wabtn { flex: none; display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: #1f8f4e; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ctags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.ctag { --c: var(--accent); display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 15px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.tabbar { flex: none; display: flex; background: var(--card); border-top: 1px solid var(--line); }
.tabbar button {
  flex: 1; min-height: 56px; border: 0; background: none; color: var(--muted);
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
}
.tabbar [aria-current="page"] { color: var(--ocean-2); box-shadow: inset 0 3px 0 var(--ocean-2); }

/* ---------- Sheets and toast, inside the phone ---------- */
.dm-sheetwrap { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; background: rgba(10, 20, 30, .45); }
.dm-sheet {
  width: 100%; max-height: 90%; overflow-y: auto; padding: 12px 20px 24px; border-radius: 20px 20px 0 0;
  background: var(--card); color: var(--ink); animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .dm-sheet { animation: none; } }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.dm-sheet h2 { margin: 0; font-size: 20px; display: block; }
.dm-sheet .small { margin-top: 4px; }
.dm-sheet .lbl { margin: 4px 0 8px; font-size: 15px; }
.dm-sheet label { display: block; margin: 10px 0 0; font-weight: 600; font-size: 15px; }
.dm-sheet textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 12px; min-height: 44px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit;
}
.sstat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.sstat button {
  min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.sstat [data-status="sorted"][aria-pressed="true"] { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.sstat [data-status="help"][aria-pressed="true"] { background: #fdf0d5; border-color: #d08a00; color: #6b4500; }
.sstat [data-status="skip"][aria-pressed="true"] { background: var(--line); border-color: var(--muted); }
.dm-sheet .btn.wa, .dm-shares .btn { width: 100%; }
.btn.wa { margin-top: 14px; background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn.plain { background: transparent; border-color: var(--line); color: var(--ink); }
.dm-sheet .row { display: flex; gap: 8px; margin-top: 14px; }
.dm-sheet .row .btn { flex: 1; margin-top: 0; }
.dm-shares { display: grid; gap: 8px; margin-top: 14px; }
.dm-shares .btn.wa { margin-top: 0; }
.wa-preview { margin: 14px 0 0; padding: 12px; border-radius: 12px; background: #ece5dd; }
.wa-preview .msg { max-width: 92%; margin: 0 0 0 auto; }
.dm-toast {
  position: absolute; left: 14px; right: 14px; bottom: 74px; z-index: 40; padding: 12px 16px; border-radius: 14px;
  background: #1d1a16; color: #fff; font-size: 15px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: up .2s ease-out;
}

/* ---------- Phones and small tablets: no frame, the demo is the screen ---------- */
@media (max-width: 899px) {
  html, body.dm { overflow: hidden; }
  body.dm { background: var(--bg); }
  .dm-page { display: block; min-height: 0; padding: 0; }
  .dm-side { display: none; }
  .phone { height: 100dvh; width: 100%; aspect-ratio: auto; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .phone::before, .phone::after, .sbar { display: none; }
  .screen { border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  .mbar {
    flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px; z-index: 3;
    background: var(--card); border-bottom: 1px solid var(--line);
  }
  .mlogo img { display: block; height: 19px; width: auto; }
  .dm-switch.sm button { min-height: 32px; padding: 0 12px; font-size: 14px; }
  .mtour {
    flex: none; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; z-index: 3;
    background: #fff8e6; border-bottom: 1px solid #f0dca8; font-size: 14px; line-height: 1.4; color: #3d2f0a;
  }
  .mtour:has(.mt-show) { padding: 4px 12px; justify-content: flex-end; background: var(--card); border-color: var(--line); }
  .mt-txt { flex: 1; min-width: 0; }
  .mt-txt b { display: inline; }
  .mt-txt span:last-child { display: block; color: #6b5a2a; }
  .mt-n { font-variant-numeric: tabular-nums; font-weight: 700; color: #a06a00; }
  .mt-act { flex: none; display: flex; align-items: center; gap: 4px; }
  .mt-go, .mt-back, .mt-show {
    min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; font: inherit; font-size: 14px; font-weight: 700;
    background: #0b3150; color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  }
  .mt-back { background: none; color: #6b5a2a; padding: 0 8px; }
  .mt-show { background: none; color: var(--muted); font-weight: 600; padding: 0 4px; }
  .mt-go.ready { animation: nudge 1.4s ease-in-out infinite; }
  @keyframes nudge { 50% { box-shadow: 0 0 0 5px rgba(11, 49, 80, .2); } }
  .mt-x { width: 30px; height: 30px; border: 0; background: none; color: #8a7a4a; font-size: 20px; line-height: 1; cursor: pointer; }
  .dm-toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ---------- Smaller phones: less padding everywhere, so more of the event fits ---------- */
@media (max-width: 899px) {
  .mbar { gap: 6px; padding: 6px 10px; justify-content: space-between; }
  /* One red line across the top, so nobody mistakes the sample for a real event. */
  .mdemo {
    display: flex; justify-content: center; gap: 10px; flex: none; margin: 0; padding: calc(4px + env(safe-area-inset-top)) 10px 4px; z-index: 3;
    background: #c8203a; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .02em;
    white-space: nowrap;
  }
  .mdemo span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .mdemo a { flex: none; color: #fff; text-decoration: underline; text-underline-offset: 2px; }
  .pk { padding: 22px 16px 28px; }
  .pk-logo, .pk-lang { display: block; }
  .pk-logo { margin: 0 0 22px; }
  .pk h1 { font-size: 24px; }
  .mtour { gap: 8px; padding: 7px 10px; font-size: 13px; line-height: 1.35; }
  .mt-txt span:last-child { margin-top: 1px; }
  .mt-go, .mt-back { min-height: 30px; padding: 0 12px; font-size: 13px; }
  .mt-x { width: 26px; height: 26px; font-size: 18px; }

  /* Guest page */
  .v-guest .hero { padding: 18px 14px 18px; }
  .v-guest .hero h1 { font-size: clamp(26px, 8vw, 32px); margin-bottom: 6px; }
  .v-guest .kicker { margin-bottom: 8px; }
  .v-guest .hero .when { font-size: 16px; }
  .v-guest .hero .where { margin-bottom: 14px; }
  .v-guest .actions { gap: 8px; }
  .v-guest .btn { min-height: 40px; padding: 0 16px; }
  .v-guest .tabs a { padding: 11px 4px 9px; }
  .v-guest main { padding: 2px 14px 8px; }
  .v-guest section { margin-top: 22px; }
  .v-guest h2 { font-size: 19px; margin-bottom: 10px; }
  .v-guest .intro { font-size: 16px; margin-top: 16px; }
  .v-guest .card, .v-guest .poll { padding: 14px; margin-bottom: 12px; }
  .v-guest .rsvp label { margin-bottom: 10px; }
  .v-guest .rsvp .yn { margin-bottom: 10px; gap: 8px; }
  .v-guest .choice { min-height: 46px; }
  .v-guest .opt { min-height: 44px; margin-bottom: 6px; }
  .v-guest .schedule li { grid-template-columns: 64px 1fr; gap: 8px; padding: 6px 0 6px 12px; }
  .v-guest .schedule .t { white-space: nowrap; } /* "11:30pm" on one line */
  .v-guest .goal .nums strong { font-size: 26px; }
  .dm-own { padding: 26px 16px 28px; }
  .dm-own h2 { font-size: 20px; }

  /* Team page */
  .v-team .plan { padding: 14px 14px 18px; }
  .v-team h1 { font-size: 22px; }
  .v-team .whoami { margin-bottom: 12px; }
  .v-team .card { padding: 12px 14px; margin-bottom: 12px; }
  .v-team .count .days { font-size: 34px; }
  .v-team .urgent { padding: 8px 12px; }
  .v-team .chips { margin: 0 -14px 10px; padding: 0 14px; }
  .chip { min-height: 32px; padding: 0 10px; }
  .dlist li { padding: 6px 0; }
  .dlist li.new { margin: 0 -14px; padding: 6px 14px; }
  .committee { margin-top: 12px; }
  .task { min-height: 44px; padding: 6px 0; gap: 10px; font-size: 15px; }
  .tabbar button { min-height: 50px; }

  /* Sheets */
  .dm-sheet { padding: 10px 16px 18px; }
  .dm-sheet textarea { min-height: 40px; padding: 6px 10px; border-radius: 10px; }
  .sstat { margin: 12px 0; gap: 6px; }
  .sstat button { min-height: 46px; font-size: 14px; }
  .dm-sheet .btn { min-height: 42px; }
}
@media (max-width: 380px) {
  .screen { font-size: 16px; }
  .mlogo img { height: 16px; }
  .dm-switch.sm { padding: 3px; }
  .dm-switch.sm button { min-height: 28px; padding: 0 10px; font-size: 13px; }
  .mt-back { display: none; }
  .v-guest .hero .actions .btn { padding: 0 14px; }
  .v-guest .tabs a { font-size: 15px; }
  .task .meta { font-size: 12px; }
}

/* Team view dashboard (2026-11-04), same look as plan.css's dashboard. */
.v-team .btn.plain { background: var(--card); border-color: var(--line); color: var(--ink); }
.v-team .dhead { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; }
.v-team .dhead .dtext { flex: 1; min-width: 0; }
.v-team .dhead h1 { margin: 0; font-size: 22px; }
.v-team .dhead .when { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.v-team .dhead .when::first-letter { text-transform: uppercase; }
.v-team .dhead .togo { margin: 6px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.v-team .pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--line); }
.v-team .editlink { flex: 0 1 auto; max-width: 8em; text-align: right; border: 0; background: none; padding: 6px 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: underline; cursor: pointer; }
.v-team .whoami { margin: -4px 0 14px; }
.v-team button.card.progress { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.v-team .progress .lbl { display: flex; justify-content: space-between; gap: 8px; margin: 0; }
.v-team .progress .pct { font-weight: 400; color: var(--muted); }
.v-team .progress .pbar { display: block; margin: 10px 0 8px; }
.v-team .progress .small { display: block; margin: 0; }
.v-team .agh { margin: 12px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.v-team .agh:first-of-type { margin-top: 4px; }
.v-team .agh.a-help { color: #8a5a00; }
.v-team .alist { list-style: none; margin: 0; padding: 0; }
.v-team .arow { display: block; width: 100%; padding: 8px 0 8px 12px; border: 0; border-left: 3px solid var(--line); background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.v-team .alist li + li .arow { margin-top: 6px; }
.v-team .arow b { display: block; font-weight: 600; }
.v-team .arow small { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.v-team .arow.a-help { border-left-color: #d08a00; }
.v-team .arow.a-soon { border-left-color: var(--accent); }
.v-team .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.v-team .quick .btn { width: 100%; padding: 0 10px; font-size: 15px; }
.v-team .sumlist { list-style: none; margin: 0; padding: 0; }
.v-team .sumlist li { padding: 6px 0; border-top: 1px solid var(--line); }
.v-team .sumlist li:first-child { border-top: 0; padding-top: 0; }
.v-team .sumlist.dates li { display: flex; gap: 12px; align-items: baseline; }
.v-team .sumlist.dates .cd { flex: none; min-width: 7.5em; font-size: 14px; color: var(--muted); }
.v-team .sumlist.dates li.theday b { color: var(--accent); }
/* Replies card and Talk your notes (2026-11-07 order, like plan.css). */
.v-team .replies .rcount { font-weight: 400; color: var(--muted); }
.v-team .replies .rtotal { margin: 0; font-size: 17px; font-weight: 700; }
.v-team .replies .rfold { margin-top: 8px; }
.v-team .replies .rfold summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 6px 0; }
.v-team .replies .rcopy { margin-top: 4px; font-weight: 600; }
.v-team .notes p { margin: 0; }
.v-team .notes .row { display: flex; gap: 8px; margin-top: 12px; }
.v-team .plan > .card, .v-team .plan > .quick { margin: 0 0 16px; }
.v-team .plan > .teamsum { margin-top: 24px; }
.v-team .sech { margin: 24px 0 10px; font-size: 19px; }
/* More (2026-11-07): the real More tab's menu, help topics and Need a hand (plan.css). */
.dm-more .sech { margin-top: 4px; }
.dm-more .morelist { padding-top: 4px; padding-bottom: 4px; }
.dm-more .menu { list-style: none; margin: 0; padding: 0; }
.dm-more .menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 0;
  border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.dm-more .menu button::after { content: "→"; flex: none; color: var(--accent); font-weight: 700; }
.dm-more .helpcard .lbl { margin: 0 0 4px; }
.dm-more .fgroup { border-top: 1px solid var(--line); }
.dm-more .fgroup > summary { min-height: 48px; padding: 12px 0; font-weight: 700; cursor: pointer; }
.dm-more .fgroup[open] > summary { padding-bottom: 4px; }
.dm-more .faq { margin-left: 18px; border-top: 1px solid var(--line); padding: 4px 0; }
.dm-more .faq summary { font-weight: 500; cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.dm-more .faq p { margin: 0 0 10px; color: var(--muted); }
.dm-more .fgroup .faq:last-child { margin-bottom: 8px; }
.dm-more .support { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.dm-more .support p { margin: 0; flex: 1 1 220px; }
.dm-more .support .row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
@media (max-width: 380px) {
  .v-team .sumlist.dates li { flex-direction: column; gap: 0; }
}
