/* One Body — one stylesheet for the volunteer pages and the organizer dashboard.
   Colors come from CSS variables only. The defaults below are the "Classic Red" theme;
   themes.css overrides them per <html data-theme="…">. Utilities live in utilities.css. */
:root {
  --line-3: #ddd6cb;            /* stronger borders (inputs) */
  --red-line: #f3caca;
  --sheen: #ffffff;             /* top highlight on raised buttons */
  --glow-1: #f6dcd2; --glow-2: #fbe9d7;   /* soft background glows */
  --verse-ink: #3f2a24;
  --accent-ink-soft: #7a4a40;
  --pending: #f0b45a;
  --inverse: #1c1917;           /* dark surfaces: toasts, code */
  --wa-bubble: #e7fbd8;
  --hero-1: #6f0e00; --hero-2: #bd3c2b;   /* gradient for hero bands */
  --scheme: light;
  --violet: #7c3aed;
  --bg: #f5f2ed;
  --surface: #ffffff;
  --surface-2: #fbf9f6;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --faint: #a8a29e;
  --line: #ece7df;
  --line-2: #f3efe9;
  --accent: #bd3c2b;
  --brand-dark: #6f0e00;
  --brand-blush: #fce8e1;
  --accent-ink: #ffffff;
  --green: #15803d;  --green-bg: #e9f7ee;
  --amber: #b45309;  --amber-bg: #fdf3e2;
  --red: #b91c1c;    --red-bg: #fdecec;
  --blue: #1d4ed8;   --blue-bg: #eaf0fe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 4px 16px rgba(28, 25, 23, .05);
  --shadow-lg: 0 10px 40px rgba(28, 25, 23, .16);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 14px/1.2 var(--font); cursor: pointer; text-decoration: none !important;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
  background: var(--accent); color: var(--accent-ink); white-space: nowrap;
}
.btn:hover { box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 22px; font-size: 16px; border-radius: 14px; width: 100%; }
.btn-sm { padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-3); box-shadow: none; background: var(--surface-2); }
.btn-dark { background: var(--inverse); }
.btn-dark:hover { box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--red-line); }
.btn-danger:hover { background: var(--red-bg); box-shadow: none; }
.btn-green { background: var(--green); }
.btn-link { background: none; border: 0; color: var(--accent); padding: 0; font-weight: 600; cursor: pointer; font-size: inherit; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-3);
  background: var(--surface); font: 15px/1.35 var(--font); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
textarea { min-height: 84px; resize: vertical; }
input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line-3); border-radius: 10px; background: var(--surface); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 760px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pills / avatars ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 650; white-space: nowrap; line-height: 1.5;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-accepted { background: var(--green-bg); color: var(--green); }
.pill-pending  { background: var(--amber-bg); color: var(--amber); }
.pill-open     { background: var(--blue-bg); color: var(--blue); }
.pill-rejected { background: var(--red-bg); color: var(--red); }
.pill-swapped, .pill-cancelled { background: var(--line-2); color: var(--muted); }
.avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--av, var(--accent)); letter-spacing: .02em;
}
.avatar-open { background: transparent; border: 1.5px dashed var(--line-3); color: var(--faint); font-size: 16px; }

/* ---------- flash ---------- */
.flashes { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(560px, calc(100% - 24px)); }
.flash {
  padding: 12px 16px; border-radius: 12px; background: var(--inverse); color: var(--accent-ink); box-shadow: var(--shadow-lg);
  font-weight: 550; display: flex; gap: 10px; align-items: center; animation: drop .25s ease;
}
.flash-error { background: var(--red); }
.flash-warning { background: var(--amber); }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* =================================================================== VOLUNTEER PAGES */
.v-wrap { max-width: 560px; margin: 0 auto; padding: 28px 16px 48px; min-height: 100vh; }
.v-brand { display: flex; align-items: center; gap: 10px; margin: 0 4px 18px; font-size: 13px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.v-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.v-card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.v-band { height: 6px; background: var(--accent); }
.v-body { padding: 26px 22px 24px; }
.v-eyebrow { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.v-title { font-size: 27px; font-weight: 780; letter-spacing: -.02em; line-height: 1.15; }
.v-sub { color: var(--ink-2); margin-top: 8px; font-size: 16px; }
.v-details { margin: 22px 0 0; border: 1px solid var(--line); border-radius: 16px; }
.v-detail { display: flex; gap: 12px; padding: 13px 15px; align-items: flex-start; }
.v-detail + .v-detail { border-top: 1px solid var(--line-2); }
.v-detail .ic { width: 22px; text-align: center; font-size: 17px; line-height: 1.35; }
.v-detail strong { font-weight: 650; }
.v-note { margin-top: 14px; background: var(--surface-2); border-radius: 14px; padding: 13px 15px; color: var(--ink-2); font-size: 14px; white-space: pre-line; }
.v-note b { display: block; color: var(--ink); margin-bottom: 2px; }
.v-actions { display: grid; gap: 10px; margin-top: 24px; }
.v-team { margin-top: 22px; }
.v-team h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.v-team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.v-team li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.v-team li .trole { color: var(--muted); margin-left: auto; font-size: 13px; }
.v-foot { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 22px; }
.v-status { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; }
.v-status.ok { background: var(--green-bg); color: var(--green); }
.v-status.warn { background: var(--amber-bg); color: var(--amber); }
.v-status.no { background: var(--line-2); color: var(--ink-2); }
.v-hero { text-align: center; padding: 34px 22px 8px; }
.v-hero .big { font-size: 54px; line-height: 1; margin-bottom: 14px; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.v-hero p { color: var(--ink-2); margin-top: 8px; font-size: 16px; }
.v-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.v-link-row { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .confetti, .v-hero .big { animation: none; display: none; } }

/* =================================================================== ADMIN */
.topbar {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 780; color: var(--ink); text-decoration: none !important; font-size: 15px; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--brand-dark)); display: grid; place-items: center; color: var(--accent-ink); font-size: 15px; }
.nav { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.nav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: rgba(0,0,0,.04); }
.nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.topbar .me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) { .topbar .me span { display: none; } .logo .name { display: none; } }

.page { max-width: 1180px; margin: 0 auto; padding: 26px 20px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card + .card { margin-top: 16px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: block; color: inherit; text-decoration: none !important; border: 1.5px solid transparent; }
.stat:hover { border-color: var(--line); }
.stat .n { font-size: 28px; font-weight: 780; letter-spacing: -.02em; }
.stat .l { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

.range-nav { display: flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.range-nav a { padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.range-nav a:hover { background: var(--surface-2); }
.range-nav .lbl { padding: 0 8px; font-weight: 650; font-size: 14px; }

/* date group */
.day { margin-top: 30px; scroll-margin-top: 80px; }
.day-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.day-head h2 { font-size: 20px; }
.day-head .rel { font-size: 13px; font-weight: 650; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); padding: 2px 9px; border-radius: 999px; }
.day-head .spacer { flex: 1; }
.event { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.event + .event { margin-top: 12px; }
.event-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); border-left: 4px solid var(--c, var(--accent)); }
.event-head h3 { font-size: 16px; }
.event-head .meta { color: var(--muted); font-size: 13px; }
.event-head .progress { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bar { width: 90px; height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.roles { display: grid; }
.role { display: grid; grid-template-columns: 210px 1fr auto; gap: 12px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line-2); }
.role:first-child { border-top: 0; }
.role-name { font-weight: 600; font-size: 14px; display: flex; gap: 9px; align-items: center; }
.role-name .ic { width: 22px; text-align: center; }
.role-name small { display: block; font-weight: 500; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font: inherit; color: inherit;
  transition: border-color .15s, background .15s, box-shadow .15s; text-align: left;
}
.chip:hover { border-color: var(--line-3); background: var(--surface); box-shadow: var(--shadow); }
.chip .nm { font-weight: 600; font-size: 14px; }
.chip .st { font-size: 12px; font-weight: 650; }
.chip.s-accepted .st { color: var(--green); }
.chip.s-pending .st { color: var(--amber); }
.chip.s-open { border-style: dashed; background: transparent; }
.chip.s-open .nm { color: var(--muted); font-weight: 550; }
.chip .avatar { width: 28px; height: 28px; font-size: 11px; }
.chip.s-accepted .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--green); }
.chip.s-pending .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--pending); }
.declined { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.declined s { color: var(--faint); }
.role-add { opacity: 0; transition: opacity .15s; }
.role:hover .role-add, .role-add:focus-visible { opacity: 1; }
@media (hover: none) { .role-add { opacity: 1; } }
@media (max-width: 760px) {
  .role { grid-template-columns: 1fr auto; }
  .role .chips { grid-column: 1 / -1; grid-row: 2; }
  .declined { grid-column: 1 / -1; }
  .event-head .progress .bar { display: none; }
}

.empty { text-align: center; padding: 56px 20px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 420px; }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive td { color: var(--faint); }
.table-wrap { overflow-x: auto; }
.who { display: flex; align-items: center; gap: 10px; }

/* series cards */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.series-card { display: block; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; color: inherit; text-decoration: none !important; border-top: 5px solid var(--c); transition: transform .15s, box-shadow .15s; }
.series-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.series-card .when { color: var(--muted); font-size: 14px; margin-top: 4px; }
.series-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: 12px; padding: 3px 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }

/* role editor */
.slot-row { border-top: 1px solid var(--line-2); padding: 16px 20px; }
.slot-row:first-child { border-top: 0; }
.slot-top { display: flex; align-items: center; gap: 12px; }
.slot-top .t { font-weight: 650; }
.slot-top .actions { margin-left: auto; display: flex; gap: 6px; }
.rotation { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.rot-item { display: inline-flex; align-items: center; gap: 7px; padding: 3px 6px 3px 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 550; }
.rot-item .avatar { width: 22px; height: 22px; font-size: 10px; }
.rot-item .n { color: var(--faint); font-size: 11px; font-weight: 700; }
.rot-item form { display: inline; }
.rot-item button { background: none; border: 0; cursor: pointer; color: var(--faint); padding: 0 3px; font-size: 14px; line-height: 1; }
.rot-item button:hover { color: var(--ink); }
.slot-edit { margin-top: 14px; padding: 16px; background: var(--surface-2); border-radius: 12px; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* dialog */
dialog {
  border: 0; padding: 0; border-radius: 20px; width: min(640px, calc(100% - 24px)); box-shadow: var(--shadow-lg);
  color: var(--ink); max-height: calc(100vh - 40px);
}
dialog::backdrop { background: rgba(28, 25, 23, .38); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .2s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dlg-head { padding: 20px 22px 14px; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line-2); }
.dlg-head .x { margin-left: auto; background: var(--surface-2); border: 0; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--muted); }
.dlg-body { padding: 16px 22px 22px; }
.dlg-section { padding: 14px 0; border-top: 1px solid var(--line-2); }
.dlg-section:first-child { border-top: 0; padding-top: 4px; }
.dlg-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dlg-row { display: flex; gap: 8px; align-items: center; }
.dlg-row > select, .dlg-row > input { flex: 1; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv { display: grid; grid-template-columns: 90px 1fr; gap: 4px 10px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background:
  radial-gradient(1200px 500px at 10% -10%, var(--glow-1) 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, var(--glow-2) 0, transparent 60%), var(--bg); }
.login .card { width: min(400px, 100%); padding: 30px 28px; }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--inverse); color: #e7e5e4; padding: 12px 14px; border-radius: 10px; overflow-x: auto; white-space: pre; }
.badge-count { background: var(--red); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; margin-left: 4px; }
.tip { display: flex; gap: 12px; padding: 14px 16px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 14px; font-size: 14px; color: var(--ink-2); }

/* =================================================================== v2: icons, tabs, settings */
.i { flex: none; vertical-align: -3px; }
label .i { vertical-align: -2px; color: var(--muted); margin-right: 2px; }
.btn .i { vertical-align: middle; margin: -2px 0; }
.logo-mark.emoji { background: var(--surface); box-shadow: var(--shadow); font-size: 17px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; }
.nav a .i { color: var(--muted); }
.nav a.on .i { color: var(--accent); }
@media (max-width: 900px) { .nav a .lbl, .topbar .me .lbl { display: none; } .nav a { padding: 9px 11px; } }
.flash { align-items: flex-start; }
.flash .i { margin-top: 1px; }

.stat { display: flex; align-items: center; gap: 14px; }
.stat .ic-badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); flex: none; }
.stat .l::before { display: none; }

.ic-badge { width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--surface)); flex: none; }
.emoji-badge { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c, var(--accent)) 12%, #fff); flex: none; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.meta-row span { display: inline-flex; align-items: center; gap: 5px; }
.meta-row .i { width: 14px; height: 14px; }

/* Icon picker */
.icon-picker { position: relative; display: flex; gap: 8px; align-items: center; flex: none; }
.ip-current { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-3); background: var(--surface); font-size: 22px; cursor: pointer; flex: none; }
.ip-current:hover { border-color: var(--accent); }
.ip-input { max-width: 110px; }
.ip-pop { position: absolute; z-index: 40; top: 50px; left: 0; width: 320px; max-height: 300px; overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 12px; border: 1px solid var(--line); }
.ip-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 2px 4px; }
.ip-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ip-row button { border: 0; background: none; font-size: 21px; padding: 5px 0; border-radius: 8px; cursor: pointer; }
.ip-row button:hover { background: var(--surface-2); transform: scale(1.12); }

/* Settings layout */
.settings { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.tabs { position: sticky; top: 78px; display: grid; gap: 4px; }
.tab-group > summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
  color: var(--ink-2); font-family: var(--font-ui); font-weight: 600; font-size: 14px;
  cursor: pointer; list-style: none; user-select: none; transition: background .15s, color .15s;
}
.tab-group > summary::-webkit-details-marker { display: none; }
.tab-group > summary:hover { background: rgba(0,0,0,.035); }
.tab-group > summary .i { color: var(--muted); flex: none; }
.tab-group > summary .tg-chev { margin-left: auto; color: var(--faint); transition: transform .18s ease; }
.tab-group[open] > summary .tg-chev { transform: rotate(90deg); }
.tab-group.has-on > summary { color: var(--ink); }
.tab-group.has-on > summary > .i:first-child { color: var(--accent); }
.tab-sub { display: grid; gap: 2px; margin: 2px 0 6px 20px; padding-left: 10px; border-left: 2px solid var(--line); }
.tabs a { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 10px; color: var(--ink-2); font-weight: 550; font-size: 13.5px; text-decoration: none; }
.tabs a .i { color: var(--muted); flex: none; }
.tabs a:hover { background: rgba(0,0,0,.035); }
.tabs a.on { background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-weight: 650; }
.tabs a.on .i { color: var(--accent); }
.tabs a small { margin-left: auto; }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; }
  .tabs { position: static; display: grid; gap: 4px; }
}
.set-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.set-card + .set-card { margin-top: 16px; }
.set-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px 0; }
.set-head h2 { font-size: 17px; }
.set-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.set-body { padding: 18px 22px 22px; }
.set-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 6px 20px; padding: 14px 0; border-top: 1px solid var(--line-2); align-items: start; }
.set-row:first-child { border-top: 0; padding-top: 0; }
.set-row > div:first-child label { margin: 10px 0 0; font-size: 14px; color: var(--ink); }
.set-row > div:first-child .hint { margin-top: 2px; }
@media (max-width: 700px) { .set-row { grid-template-columns: 1fr; } }
.set-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--ink-2); margin: 8px 0 0; }
.switch input { position: absolute; opacity: 0; }
.switch .tr { width: 42px; height: 24px; border-radius: 99px; background: var(--line-3); position: relative; transition: background .2s; flex: none; }
.switch .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .tr { background: var(--green); }
.switch input:checked + .tr::after { transform: translateX(18px); }
.switch input:focus-visible + .tr { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.inline-num { display: inline-flex; align-items: center; gap: 8px; }
.inline-num input { width: 80px; }
.status-hero { display: flex; gap: 16px; align-items: center; padding: 20px 22px; }
.status-dot { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.status-dot.ok { background: var(--green-bg); color: var(--green); }
.status-dot.warn { background: var(--amber-bg); color: var(--amber); }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 13.5px; color: var(--ink-2); }
.how b { display: flex; align-items: center; gap: 7px; color: var(--ink); margin-bottom: 4px; font-size: 14px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; } }
.preview-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-vars code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; font-size: 12px; cursor: pointer; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line-2); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .acts { display: flex; gap: 6px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--faint); }
.steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); }
.steps li.on { color: var(--ink); } .steps li.on span { background: var(--accent); color: var(--accent-ink); }
.steps li.done { color: var(--green); } .steps li.done span { background: var(--green-bg); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red-line); background: var(--red-bg); }

/* =================================================================== v3: pager, tabs, repeat builder */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px; font-size: 13.5px; }
.pager .pages { display: inline-flex; gap: 4px; align-items: center; }
.pager .pages a, .pager .pages span { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; display: inline-grid; place-items: center; font-weight: 650; color: var(--ink-2); text-decoration: none; }
.pager .pages a { background: var(--surface); border: 1px solid var(--line); }
.pager .pages a:hover { border-color: var(--accent); color: var(--accent); }
.pager .pages .cur { background: var(--accent); color: var(--accent-ink); }
.pager .pages .off { color: var(--faint); }
.pager .pages .gap { min-width: 20px; color: var(--faint); }
.seg-tabs { display: inline-flex; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.seg-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; font-weight: 650; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.seg-tabs a.on { background: var(--accent); color: var(--accent-ink); }
.seg-tabs a.on .i { color: var(--accent-ink); }
.seg-tabs .count { font-size: 12px; opacity: .75; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chips label { margin: 0; }
.day-chips input { position: absolute; opacity: 0; }
.day-chips span { display: inline-grid; place-items: center; width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--line-3); background: var(--surface); font-weight: 650; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.day-chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day-chips input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.repeat-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.repeat-box .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.repeat-box select, .repeat-box input[type=number] { width: auto; padding: 8px 10px; }
.next-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.next-dates span { font-size: 12.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--ink-2); }
.summary-line { display: flex; gap: 8px; align-items: center; font-weight: 650; color: var(--accent); font-size: 14px; margin-top: 10px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl { display: flex; gap: 10px; align-items: center; padding: 12px; background: var(--surface); border: 1px dashed var(--line-3); border-radius: 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; }
.tpl:hover { border-style: solid; border-color: var(--accent); box-shadow: var(--shadow); }
.tpl small { display: block; color: var(--muted); font-size: 12px; }

/* =================================================================== v3: typography + premium controls */
:root {
  --font: "Average Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Exo 2", var(--font);
  --font-ui: "Varela Round", var(--font);
  --font-label: "Actor", var(--font);
}
body { font-size: 15.5px; letter-spacing: .005em; }
h1, h2, h3, .v-title, .stat .n, .logo, .day-head h2 { font-family: var(--font-head); letter-spacing: -.005em; }
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }
.stat .n { font-weight: 800; }
.btn, .nav a, .tabs a, .seg span, .seg-tabs a, .pill, .chip, .tag, .pager, .flash, .cb-btn, .day-chips span, .rel, .badge-count { font-family: var(--font-ui); }
label, .hint, .meta-row, .muted, small, .stat .l, .ip-group, .table th, .dlg-section h4, .v-eyebrow, .kv dt { font-family: var(--font-label); letter-spacing: .01em; }
input, select, textarea { font-family: var(--font); font-size: 15.5px; }
.code, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Buttons */
.btn {
  border-radius: 12px; font-weight: 400; letter-spacing: .01em; padding: 10px 17px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, var(--surface)) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 88%, #000) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 75%, #000);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(28,25,23,.18), 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
  text-shadow: 0 1px 0 rgba(0,0,0,.12);
  transition: transform .15s cubic-bezier(.2,.8,.2,1), box-shadow .2s, filter .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); filter: saturate(1.08) brightness(1.03); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 2px 4px rgba(28,25,23,.14), 0 10px 22px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn:active { transform: translateY(0); filter: brightness(.97); box-shadow: inset 0 2px 4px rgba(0,0,0,.18); }
.btn-lg { padding: 15px 22px; font-size: 16.5px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn-ghost {
  color: var(--ink-2); text-shadow: none;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line-3);
  box-shadow: inset 0 1px 0 var(--sheen), 0 1px 2px rgba(28,25,23,.06), 0 2px 6px -2px rgba(28,25,23,.06);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--line-3); color: var(--ink); box-shadow: inset 0 1px 0 var(--sheen), 0 2px 4px rgba(28,25,23,.08), 0 8px 18px -10px rgba(28,25,23,.25); filter: none; }
.btn-ghost .i { color: var(--accent); }
.btn-dark { background: linear-gradient(180deg, #3a3330 0%, #1c1917 100%); border-color: #0f0d0c; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 6px 16px -8px rgba(0,0,0,.6); }
.btn-green { background: linear-gradient(180deg, #22a052 0%, #15803d 100%); border-color: #11652f; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px -6px rgba(21,128,61,.6); }
.btn-danger { background: linear-gradient(180deg, var(--surface) 0%, var(--red-bg) 100%); color: var(--red); border-color: var(--red-line); text-shadow: none; box-shadow: inset 0 1px 0 var(--sheen), 0 1px 2px rgba(185,28,28,.08); }
.btn-danger:hover { background: var(--red-bg); filter: none; }
.icon-btn { border-radius: 10px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); box-shadow: inset 0 1px 0 var(--sheen), 0 1px 2px rgba(28,25,23,.06); transition: transform .15s, box-shadow .2s, color .15s; }
.icon-btn:hover { transform: translateY(-1px); color: var(--accent); box-shadow: 0 6px 14px -8px rgba(28,25,23,.35); }
.chip { font-size: 14px; }
.seg-tabs a.on, .pager .pages .cur { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, var(--surface)), var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px -6px var(--accent); }
.card, .event, .stat, .set-card, .series-card { box-shadow: 0 1px 2px rgba(28,25,23,.04), 0 8px 24px -12px rgba(28,25,23,.12); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], input[type=url], select, textarea {
  border-radius: 11px; border-color: var(--line-3); box-shadow: inset 0 1px 2px rgba(28,25,23,.04);
}

/* Searchable select (combo.js) */
.cb { position: relative; width: 100%; min-width: 0; }
.dlg-row > .cb, .dlg-row > select { flex: 1; }
.cb-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100% !important; }
.cb-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line-3); background: var(--surface); color: var(--ink); font-size: 15px; cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(28,25,23,.04); transition: border-color .15s, box-shadow .15s;
}
.cb-btn .cb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-btn svg { flex: none; color: var(--muted); transition: transform .2s; }
.cb.placeholder .cb-btn .cb-label { color: var(--faint); }
.cb-btn:hover { border-color: var(--line-3); }
.cb.open .cb-btn, .cb-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.cb.open .cb-btn svg { transform: rotate(180deg); }
.cb.invalid .cb-btn { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.cb-pop { display: none; position: fixed; z-index: 1000; left: var(--cb-left, 0); top: var(--cb-top, 0); width: var(--cb-width, 260px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--ink) 35%, transparent); overflow: hidden; animation: cb-in .14s ease; }
.cb.up .cb-pop { transform: translateY(-100%); animation: none; }
@keyframes cb-in { from { opacity: 0; transform: translateY(-4px); } }
.cb-nosearch .cb-search { display: none; }
.cb-opt.cb-multi { justify-content: flex-start; }
.cb-opt.cb-multi::before { content: ""; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-3); flex: none; display: grid; place-items: center; font-size: 12px; color: #fff; }
.cb-opt.cb-multi.sel { font-weight: 400; }
.cb-opt.cb-multi.sel::before { content: "✓"; background: var(--accent); border-color: var(--accent); }
.cb-opt.cb-multi.sel::after { content: none; }
.cb-done { display: flex; justify-content: flex-end; padding: 8px 10px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.cb.disabled .cb-btn { opacity: .6; cursor: not-allowed; }
.cb.w-auto { width: auto !important; min-width: 150px; }
.cb.w-auto .cb-btn { min-width: 150px; }
.cb.open .cb-pop { display: block; }
.cb-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); color: var(--faint); }
.cb-search input { border: 0 !important; box-shadow: none !important; padding: 2px 0 !important; font-size: 15px; background: transparent; }
.cb-list { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow-y: auto; }
.cb-opt { padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cb-opt.active { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--ink); }
.cb-opt.sel { font-weight: 700; }
.cb-opt.sel::after { content: "✓"; color: var(--accent); }
.cb-opt.cb-none { color: var(--muted); font-style: italic; }
.cb-group { font-family: var(--font-label); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 11px 4px; }
.cb-empty { padding: 14px; color: var(--faint); text-align: center; font-size: 14px; }
.rotation .cb { width: auto; min-width: 170px; }
.rotation .cb-btn { padding: 5px 12px; font-size: 13px; border-radius: 999px; border-style: dashed; }

/* =================================================================== v4: Indian Bible Church branding */
.logo-img { flex: none; border-radius: 9px; box-shadow: 0 1px 2px color-mix(in srgb, var(--brand-dark) 25%, transparent), 0 4px 10px -4px color-mix(in srgb, var(--accent) 45%, transparent); object-fit: cover; background: var(--surface); }
.logo { gap: 11px; }
.logo .name { display: flex; flex-direction: column; line-height: 1.1; }
.logo .name .n1 { font-family: var(--font-head); font-weight: 800; font-size: 15px; letter-spacing: .01em; color: var(--ink); text-transform: uppercase; }
.logo .name .n2 { font-family: var(--font-label); font-size: 12px; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.topbar { border-top: 3px solid var(--accent); }
.v-brand { gap: 10px; }
.v-brand .logo-img { width: 30px; height: 30px; border-radius: 8px; }
.brand-preview { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow); background: var(--surface); border: 1px solid var(--line); }
.brand-preview.favicon { width: 32px; height: 32px; border-radius: 7px; image-rendering: auto; }
.empty .big .logo-img { border-radius: 16px; }
.login { background:
  radial-gradient(1100px 520px at 0% -10%, color-mix(in srgb, var(--accent) 16%, transparent) 0, transparent 60%),
  radial-gradient(900px 500px at 110% 110%, var(--brand-blush) 0, transparent 60%), var(--bg); }
.ic-badge { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.tabs a.on .i, .nav a.on .i { color: var(--accent); }
@media (max-width: 900px) { .logo .name { display: none; } }

/* Verses & serving tips */
.v-verse { margin: 18px 0 0; padding: 16px 18px; border-left: 4px solid var(--accent); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), #fff); border-radius: 0 14px 14px 0; }
.v-verse blockquote { margin: 0; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 16.5px; line-height: 1.55; color: var(--verse-ink); }
.v-verse figcaption { margin-top: 6px; font-family: var(--font-ui); font-size: 13px; color: var(--accent); letter-spacing: .02em; }
.v-verse figcaption span { color: var(--faint); }
.v-tips { margin-top: 20px; border: 1px dashed var(--line-3); border-radius: 14px; padding: 14px 16px; }
.v-tips h3 { font-size: 14px; margin-bottom: 6px; }
.v-tips ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }
.verse-row blockquote { margin: 2px 0 0; font-family: Georgia, serif; font-style: italic; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.me-link { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--ink-2); font-family: var(--font-ui); font-size: 14px; text-decoration: none !important; }
.me-link:hover, .me-link.on { background: var(--surface); box-shadow: var(--shadow); }
[hidden] { display: none !important; }
.wa-link { display: inline-flex; align-items: center; gap: 5px; color: #128c4a; font-size: 13.5px; }
.btn-wa { background: linear-gradient(180deg, #2fdc72 0%, #1ebe5a 55%, #18a34c 100%); border-color: #138a3f; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px -6px rgba(30,190,90,.6); }
.btn-wa .wa-i path:first-child { fill: #fff; } .btn-wa .wa-i path:last-child { fill: #1ebe5a; }
.req { color: var(--accent); font-weight: 700; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 28px; height: 28px; font-size: 10.5px; box-shadow: 0 0 0 2px var(--surface); margin-left: -6px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar.more { background: var(--surface-2); color: var(--ink-2); }
.subteams { display: grid; gap: 6px; margin-top: 12px; }
.subteam { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; text-decoration: none !important; }
.subteam:hover { border-color: var(--accent); color: var(--ink); }
.team-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.team-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, #000); white-space: nowrap; text-decoration: none !important; }
.team-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; max-height: 210px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.team-checks .sub { padding-left: 18px; }
@media (max-width: 640px) { .team-checks { grid-template-columns: 1fr; } }
input[type=url] { width: 100%; padding: 11px 12px; border: 1px solid var(--line-3); background: var(--surface); font: 15px/1.35 var(--font); color: var(--ink); }
@media (max-width: 1400px) { .topbar .me .lbl { display: none; } .nav a { padding: 8px 10px; } }
@media (max-width: 1180px) { .nav a .lbl { display: none; } }

/* =================================================================== v5: messages, account, volunteer page polish */
.log-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 18px 14px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-family: var(--font-ui); font-size: 14.5px; text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.pill-tab span { font-size: 12px; color: var(--faint); }
.pill-tab:hover { border-color: var(--line-3); box-shadow: var(--shadow); }
.pill-tab.on { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, var(--surface)), var(--accent)); color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 80%, #000); box-shadow: 0 6px 14px -8px var(--accent); }
.pill-tab.on span, .pill-tab.on .i { color: rgba(255,255,255,.85); }
.log-search { position: relative; min-width: 260px; flex: 0 1 340px; }
.log-search span { position: absolute; left: 12px; top: 12px; color: var(--faint); }
.log-search input { padding-left: 38px; border-radius: 12px; }
.log-table th { background: var(--surface-2); }
.log-table td { padding-top: 16px; padding-bottom: 16px; }
.chan { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--font-ui); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.chan-wa { background: #eafaf0; border-color: #c9ecd6; color: #138a3f; }
.pill-wa { background: #fdeeea; color: #b4331f; }
.wa-bubble { background: var(--wa-bubble); border-radius: 4px 14px 14px 14px; padding: 12px 14px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.08); }

/* My account */
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: stretch; }
.acct-grid .set-card { margin: 0; display: flex; flex-direction: column; }
.acct-grid .set-card form { display: flex; flex-direction: column; flex: 1; }
.acct-grid .set-card .set-body { flex: 1; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: 1fr; } }
.signins td { white-space: nowrap; }

/* Volunteer page (respond.php) */
.vr-head { display: flex; gap: 14px; align-items: center; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.vr-head .logo-img { width: 44px; height: 44px; border-radius: 11px; }
.vr-head b { font-family: var(--font-head); font-size: 17px; display: block; }
.vr-head small { color: var(--muted); font-size: 13.5px; }
.vr-hi { font-family: var(--font-label); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 6px; }
.vr-title { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.15; letter-spacing: -.01em; }
.vr-when { color: var(--muted); font-size: 16px; margin-top: 6px; }
.vr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 14px; text-decoration: underline; text-underline-offset: 2px; box-shadow: inset 0 1px 0 var(--sheen), 0 1px 2px rgba(28,25,23,.05); }
.vr-chip:hover { border-color: var(--accent); color: var(--accent); }
.vr-role { margin-top: 18px; background: var(--brand-blush); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--surface)); border-radius: 14px; padding: 16px 18px; }
.vr-role .lbl { font-family: var(--font-label); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); }
.vr-role .name { font-family: var(--font-head); font-weight: 800; font-size: 24px; margin-top: 6px; display: flex; align-items: center; gap: 10px; }
.vr-role .st { color: var(--brand-dark); font-size: 14.5px; margin-top: 6px; }
.vr-role .more { color: var(--accent-ink-soft); font-size: 13.5px; margin-top: 6px; }
.vr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.vr-actions form, .vr-actions .btn { margin: 0; }
.vr-actions .btn { width: 100%; padding: 15px 16px; font-size: 16px; border-radius: 12px; }
@media (max-width: 420px) { .vr-actions { grid-template-columns: 1fr; } }
.vr-guest { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.vr-guest > summary { padding: 14px 16px; color: var(--brand-dark); font-family: var(--font-ui); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.vr-guest > summary::before { content: "▶"; font-size: 12px; transition: transform .15s; }
.vr-guest[open] > summary::before { transform: rotate(90deg); }
.vr-guest .body { padding: 0 16px 16px; }
.vr-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.vr-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 520px) { .vr-row3, .vr-row2 { grid-template-columns: 1fr; } }
.vr-tips { margin-top: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.vr-tips h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vr-tips ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; display: grid; gap: 4px; }
.vr-verse { margin: 20px 0 0; border-left: 4px solid var(--accent); padding: 4px 0 4px 16px; }
.vr-verse blockquote { margin: 0; font-family: Georgia, serif; font-style: italic; color: var(--verse-ink); font-size: 16px; line-height: 1.55; }
.vr-verse figcaption { margin-top: 6px; color: var(--muted); font-size: 13.5px; }

/* =================================================================== v6: requests portal */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--font-ui); font-size: 14px; margin-bottom: 14px; }
.grid-gap { display: grid; gap: 16px; }
.req-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.req-type { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s; }
.req-type:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--accent) 60%, transparent); }
.req-type-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--brand-blush); flex: none; }
.req-type-txt { flex: 1; min-width: 0; }
.req-type-txt strong { display: block; font-family: var(--font-head); font-size: 15px; }
.req-type-txt small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req-type-go { color: var(--faint); transition: transform .15s, color .15s; }
.req-type:hover .req-type-go { color: var(--accent); transform: translateX(3px); }
.req-stats { margin-bottom: 18px; }
.req-search { display: flex; gap: 8px; align-items: center; flex: 0 1 520px; }
.req-search .log-search { flex: 1; min-width: 180px; }
.req-search select { width: auto; flex: none; border-radius: 12px; }
.req-list { display: grid; padding: 0 12px 8px; }
.req-row { display: flex; gap: 14px; align-items: center; padding: 14px 10px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; border-radius: 12px; transition: background .15s; }
.req-row:first-child { border-top: 0; }
.req-row:hover { background: var(--surface-2); }
.req-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c) 13%, var(--surface)); flex: none; }
.req-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.req-title { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; }
.req-meta { display: flex; gap: 6px 14px; flex-wrap: wrap; color: var(--muted); font-family: var(--font-label); font-size: 13px; }
.req-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.req-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.req-row.prio-urgent { box-shadow: inset 3px 0 0 var(--red); }
.req-row.prio-high { box-shadow: inset 3px 0 0 var(--amber); }
.rq-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-family: var(--font-ui); font-size: 12.5px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.rq-pill-ghost { background: transparent !important; border: 1px solid currentColor; }
.tone-muted { color: var(--muted) !important; background: var(--surface-2) !important; }
.tone-violet { color: var(--violet) !important; background: color-mix(in srgb, var(--violet) 12%, var(--surface)) !important; }
.req-hero { display: flex; gap: 16px; align-items: flex-start; padding: 22px; border-radius: 20px; margin-bottom: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, var(--surface)), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow); }
.req-hero-ic { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; font-size: 29px; background: var(--surface); box-shadow: var(--shadow); flex: none; }
.req-hero-kicker { font-family: var(--font-label); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.req-hero h1 { font-size: 24px; margin: 2px 0 10px; overflow-wrap: anywhere; }
.req-hero-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.req-card { padding: 20px 22px; }
.req-author { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.req-details { font-size: 16px; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.req-h { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 24px 0 12px; }
.req-h .i { color: var(--accent); }
.req-none { padding: 4px 2px 10px; }
.timeline { display: grid; gap: 12px; margin-bottom: 14px; }
.tl-comment { display: flex; gap: 10px; align-items: flex-start; }
.tl-comment.is-me { flex-direction: row-reverse; }
.tl-bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 14px; max-width: 85%; line-height: 1.55; overflow-wrap: anywhere; box-shadow: var(--shadow); }
.tl-comment.is-me .tl-bubble { background: var(--brand-blush); border-color: color-mix(in srgb, var(--accent) 18%, var(--line)); border-radius: 16px 4px 16px 16px; }
.tl-who { font-size: 13px; margin-bottom: 2px; }
.tl-event { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); padding-left: 6px; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); flex: none; }
.req-reply { padding: 14px; display: grid; gap: 10px; }
.req-reply textarea { border-radius: 12px; }
.req-reply-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.req-reply-foot select { width: auto; flex: 0 1 260px; }
.req-kv { padding: 0 22px 18px; }
.req-type-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.rtp { margin: 0; cursor: pointer; }
.rtp input { position: absolute; opacity: 0; }
.rtp span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-ui); font-size: 14px; color: var(--ink-2); transition: border-color .15s, background .15s; }
.rtp span b { font-weight: 400; font-size: 17px; }
.rtp input:checked + span { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }
.rtp input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 760px) {
  .req-row { align-items: flex-start; flex-wrap: wrap; }
  .req-side { flex-direction: row; width: 100%; padding-left: 58px; align-items: center; }
  .req-hero { flex-wrap: wrap; padding: 16px; }
  .req-hero .toolbar { width: 100%; }
  .req-quick { grid-template-columns: 1fr; }
  .req-search, .req-search .log-search { width: 100%; min-width: 0; flex: 1 1 100%; }
  .tl-bubble { max-width: 100%; }
}

/* =================================================================== v6: email design picker */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.design-card { margin: 0; cursor: pointer; position: relative; }
.design-card input { position: absolute; opacity: 0; }
.dc-in { display: block; padding: 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s; height: 100%; }
.design-card:hover .dc-in { transform: translateY(-2px); box-shadow: var(--shadow); }
.design-card input:checked + .dc-in { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.dc-name { display: block; font-family: var(--font-head); font-weight: 700; margin-top: 8px; }
.dc-desc { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
/* tiny drawings of each design */
.dc-thumb { position: relative; display: block; height: 96px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.dc-thumb i, .dc-thumb b, .dc-thumb em { position: absolute; display: block; }
.dc-thumb b { left: 22%; right: 22%; height: 5px; border-radius: 3px; background: var(--line-3); }
.dc-thumb b:nth-of-type(1) { top: 44px; } .dc-thumb b:nth-of-type(2) { top: 54px; right: 34%; }
.dc-thumb em { left: 22%; right: 22%; top: 70px; height: 12px; border-radius: 4px; background: var(--accent); }
.dc-thumb i { left: 14%; right: 14%; top: 12px; bottom: 0; background: var(--surface); border-radius: 8px 8px 0 0; border-top: 4px solid var(--accent); }
.dc-banner i { left: 0; right: 0; top: 0; height: 34px; border: 0; border-radius: 0; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); }
.dc-banner b, .dc-banner em { left: 18%; right: 18%; } .dc-banner em { border-radius: 99px; }
.dc-banner::after { content: ""; position: absolute; left: calc(50% - 10px); top: 24px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); }
.dc-elegant i { border: 1px solid var(--line-3); outline: 3px solid var(--surface); border-radius: 0; top: 10px; bottom: 6px; }
.dc-elegant b { left: 30%; right: 30%; height: 3px; } .dc-elegant em { left: 32%; right: 32%; height: 10px; border-radius: 0; }
.dc-elegant::before { content: "✦"; position: absolute; top: 20px; width: 100%; text-align: center; color: var(--accent); font-size: 10px; z-index: 1; }
.dc-modern i { top: 10px; border-top: 14px solid var(--ink); border-left: 3px solid var(--accent); border-radius: 6px 6px 0 0; }
.dc-modern b { left: 20%; right: 30%; height: 7px; } .dc-modern em { left: 20%; right: 20%; border-radius: 3px; }
.dc-letter { background: var(--surface); }
.dc-letter i { left: 12%; right: 12%; top: 14px; height: 2px; bottom: auto; border: 0; background: var(--accent); }
.dc-letter b { left: 12%; right: 20%; height: 4px; } .dc-letter b:nth-of-type(1) { top: 30px; } .dc-letter b:nth-of-type(2) { top: 40px; }
.dc-letter em { left: 12%; right: auto; width: 36%; top: 56px; height: 12px; }
.preview-device { border-radius: 18px; padding: 10px; background: var(--surface-2); border: 1px solid var(--line); }

/* =================================================================== v6: Excel export / import */
.xl-block h4 { display: flex; align-items: center; gap: 6px; }
.xl-steps { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.xl-steps a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.xl-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; border: 2px dashed var(--line-3); border-radius: 14px; background: var(--surface-2); color: var(--muted); cursor: pointer; text-align: center; margin: 0; transition: border-color .15s, background .15s; }
.xl-drop:hover { border-color: var(--accent); background: var(--brand-blush); color: var(--ink-2); }
.xl-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.xl-drop span { font-family: var(--font-ui); font-size: 14px; }

/* =================================================================== v7: roomier New request form */
dialog.dlg-wide { width: min(860px, calc(100% - 24px)); }
/* Every dialog: header and buttons stay put, the middle scrolls */
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog > form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); min-height: 0; flex: 1; }
dialog .dlg-body { overflow-y: auto; min-height: 0; }
#dlg-person { width: min(940px, calc(100% - 24px)); }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 20px 20px; }
.rq-body { padding: 6px 26px 18px; display: grid; gap: 4px; }
.rq-step { padding: 16px 0 18px; border-top: 1px solid var(--line-2); }
.rq-step:first-of-type { border-top: 0; }
.rq-step h3 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; margin-bottom: 12px; }
.rq-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-blush); color: var(--accent); font-family: var(--font-ui); font-size: 12.5px; flex: none; }
.rq-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rq-type { margin: 0; cursor: pointer; }
.rq-type input { position: absolute; opacity: 0; }
.rq-type span { display: flex; align-items: center; gap: 8px; height: 100%; min-height: 46px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-ui); font-size: 13px; line-height: 1.25; color: var(--ink-2); text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.rq-type span b { font-size: 19px; flex: none; font-weight: 400; line-height: 1; }
.rq-type:hover span { border-color: var(--line-3); transform: translateY(-1px); }
.rq-type input:checked + span { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }
.rq-type input:focus-visible + span, .rq-aud input:focus-visible + span, .team-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.rq-aud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rq-aud label { margin: 0; cursor: pointer; display: block; height: 100%; }
.rq-aud input { position: absolute; opacity: 0; }
.rq-aud span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; align-content: center; align-items: start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); height: 100%; }
.rq-aud span .i { grid-row: span 2; align-self: center; color: var(--muted); }
.rq-aud b { font-family: var(--font-ui); font-weight: 400; font-size: 14.5px; line-height: 1.3; color: var(--ink); overflow-wrap: break-word; }
.rq-aud small { color: var(--muted); font-size: 12.5px; line-height: 1.35; overflow-wrap: break-word; }
.rq-aud input:checked + span { border-color: var(--accent); background: var(--brand-blush); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 20%, transparent); }
.rq-aud input:checked + span .i { color: var(--accent); }
.team-pick { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.team-pick label { margin: 0; cursor: pointer; }
.team-pick input { position: absolute; opacity: 0; }
.team-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-ui); font-size: 13.5px; color: var(--ink-2); }
.team-pick span i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.team-pick label.sub span { font-size: 12.5px; padding: 5px 10px; }
.team-pick input:checked + span { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); }
.team-pick input:checked + span::before { content: "✓"; color: var(--accent); font-weight: 700; }
.team-pick-sm span { font-size: 12.5px; padding: 5px 10px; }
.rq-opts { display: flex; gap: 14px 22px; flex-wrap: wrap; margin-top: 14px; }
.rq-opts .field label:first-child { font-size: 12.5px; color: var(--muted); }
.rq-count { margin: 12px 0 0; font-size: 13.5px; color: var(--ink-2); min-height: 20px; }
.rq-more { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); margin-top: 6px; }
.rq-more summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-family: var(--font-ui); font-size: 14px; color: var(--ink-2); list-style: none; }
.rq-more summary::-webkit-details-marker { display: none; }
.rq-more summary::after { content: "＋"; margin-left: auto; color: var(--muted); }
.rq-more[open] summary::after { content: "－"; }
.rq-more-in { padding: 0 14px 14px; }
@media (max-width: 640px) {
  .rq-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rq-aud { grid-template-columns: minmax(0, 1fr); }
  .rq-body { padding: 4px 16px 14px; }
  .dlg-foot { border-radius: 0; }
  .rq-opts .seg { flex-wrap: wrap; overflow: visible; }
}

/* =================================================================== v7: ages and dates on people */
.person-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 3px; font-family: var(--font-label); font-size: 12.5px; color: var(--muted); }
.age-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); font-family: var(--font-ui); font-size: 11.5px; }
.age-pill.is-child { background: var(--amber-bg); color: var(--amber); }
.field .age-pill { margin-top: 6px; }

/* =================================================================== v8: roles */
.role-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-family: var(--font-ui); font-size: 12px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.role-pill.role-super_admin { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); color: var(--violet); border-color: transparent; }
.role-pill.role-admin { background: var(--brand-blush); color: var(--accent); border-color: transparent; }
.role-pill.role-editor { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.role-pill.role-contributor { background: var(--green-bg); color: var(--green); border-color: transparent; }
.role-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; padding: 4px 22px 8px; }
.role-card { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--surface-2); }
.role-card p { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 6px; }

/* =================================================================== v8: grouped menu */
.nav { overflow: visible; }
.navg { position: relative; }
.navg > summary, .nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-family: var(--font-ui); font-size: 14.5px; cursor: pointer; list-style: none; text-decoration: none !important; white-space: nowrap; user-select: none; }
.navg > summary::-webkit-details-marker { display: none; }
.navg > summary .i, .nav-link .i { color: var(--muted); }
.navg > summary .chev { width: 13px; height: 13px; transition: transform .15s; }
.navg[open] > summary .chev { transform: rotate(180deg); }
.navg > summary:hover, .nav-link:hover, .navg[open] > summary { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.navg.on > summary, .nav-link.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.navg.on > summary .i, .nav-link.on .i { color: var(--accent); }
.navg-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 300px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; gap: 2px; animation: rise .15s ease; }
.navg-pop a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none !important; }
.navg-pop a:hover { background: var(--surface-2); }
.navg-pop a.on { background: var(--brand-blush); }
.navg-pop .ni { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.navg-pop a.on .ni { background: var(--surface); }
.navg-pop .nt { flex: 1; display: grid; }
.navg-pop .nt b { font-family: var(--font-ui); font-weight: 400; font-size: 14.5px; }
.navg-pop .nt small { font-size: 12.5px; color: var(--muted); }
.navg-pop .badge-count { margin-left: auto; }
@media (max-width: 1180px) { .navg > summary .lbl, .nav-link .lbl { display: inline !important; } }
@media (max-width: 980px) { .navg > summary .lbl, .nav-link .lbl { display: none !important; } .navg > summary, .nav-link { padding: 8px 10px; } }
.tb-sheet-title { display: flex; align-items: center; gap: 8px; padding: 6px 10px 10px; font-family: var(--font-head); font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.tb-sheet .nt { display: grid; flex: 1; }
.tb-sheet .nt b { font-weight: 400; }
.tb-sheet .nt small { font-size: 12px; color: var(--muted); }

/* =================================================================== v8: people profile & care */
.person-link { color: inherit; text-decoration: none !important; }
.person-link:hover strong { color: var(--accent); }
.prof-hero { display: flex; gap: 18px; align-items: center; padding: 22px; border-radius: 20px; background: linear-gradient(135deg, var(--brand-blush), var(--surface)); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 18px; flex-wrap: wrap; }
.prof-av { width: 66px !important; height: 66px !important; font-size: 22px !important; }
.prof-hero h1 { font-size: 26px; overflow-wrap: anywhere; }
.prof-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.cols-aside-main { grid-template-columns: 340px minmax(0, 1fr); }
@media (max-width: 900px) { .cols-aside-main { grid-template-columns: minmax(0, 1fr); } }
.fam-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; color: var(--ink); text-decoration: none !important; }
.fam-row:hover { background: var(--surface-2); }
.fam-row small { display: block; color: var(--muted); font-size: 12px; }
.care-form { padding: 18px 20px; display: grid; gap: 12px; }
.care-head { display: flex; gap: 12px; align-items: center; }
.care-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.care-kinds label { margin: 0; cursor: pointer; }
.care-kinds input { position: absolute; opacity: 0; }
.care-kinds span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-ui); font-size: 13px; color: var(--ink-2); }
.care-kinds span b { font-weight: 400; }
.care-kinds input:checked + span { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); }
.care-kinds input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.care-form .field { margin: 0; }
.care-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.care-fu { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.care-item { align-items: flex-start; }
.care-item.is-overdue { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.care-done { display: flex; gap: 6px; align-items: center; flex: 0 1 280px; }
.care-done input { padding: 7px 10px; font-size: 13.5px; }
.tl { list-style: none; margin: 0; padding: 4px 22px 22px; display: grid; gap: 0; }
.tl li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.tl li:first-child { border-top: 0; }
.tl-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); font-size: 16px; }
.tl-care .tl-ic { background: var(--brand-blush); }
.tl-h { display: flex; gap: 10px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; }
.tl-txt { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.tl-resp { padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; }
.tl-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
@media (max-width: 760px) { .care-done { flex: 1 1 100%; } .prof-hero .toolbar { width: 100%; } }

/* =================================================================== v8: attendance */
.att-pick { display: flex; gap: 12px; flex-wrap: wrap; padding: 14px 18px; align-items: flex-end; }
.att-pick .field { flex: 1 1 200px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; padding: 0 18px 16px; }
.att-item { margin: 0; cursor: pointer; }
.att-item input { position: absolute; opacity: 0; }
.att-in { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color .12s, background .12s; }
.att-in b { display: block; font-weight: 400; font-family: var(--font-ui); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-in small { display: block; font-size: 11.5px; color: var(--muted); }
.att-tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-3); display: grid; place-items: center; color: transparent; flex: none; }
.att-item input:checked + .att-in { border-color: var(--green); background: var(--green-bg); }
.att-item input:checked + .att-in .att-tick { background: var(--green); border-color: var(--green); color: #fff; }
.att-item input:focus-visible + .att-in { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.att-foot { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); position: sticky; bottom: 0; }
.att-trend { display: flex; gap: 8px; align-items: flex-end; height: 170px; padding: 6px 22px 18px; }
.att-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; color: var(--muted); text-decoration: none !important; }
.att-bar i { display: block; width: 100%; max-width: 34px; height: var(--w); min-height: 4px; border-radius: 8px 8px 3px 3px; background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.att-bar.on i { background: var(--accent); }
.att-bar .att-v { font-family: var(--font-ui); font-size: 12px; color: var(--ink-2); }
.att-bar small { font-size: 11px; white-space: nowrap; }
@media (max-width: 760px) { .att-grid { grid-template-columns: minmax(0, 1fr); padding: 0 12px 12px; } .att-foot { bottom: calc(70px + env(safe-area-inset-bottom)); } }

/* =================================================================== v8: families */
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fam-card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; transition: transform .15s, box-shadow .15s; }
.fam-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px color-mix(in srgb, var(--ink) 40%, transparent); }
.fam-top { display: flex; gap: 12px; align-items: center; }
.fam-top strong { display: block; font-family: var(--font-head); }
.fam-top small { color: var(--muted); font-size: 12.5px; }
.fam-members { display: flex; flex-wrap: wrap; gap: 10px; }
.fam-m { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.fam-m small { display: block; font-size: 11px; color: var(--muted); }
.fam-row-wrap { display: flex; align-items: center; gap: 4px; }

/* =================================================================== v8: send an email */
.cmp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 20px; align-items: start; }
.cmp-step { padding: 18px 20px; }
.cmp-step h3 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; margin-bottom: 12px; }
.cmp-aud { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cmp-prev { position: sticky; top: 90px; }
.cmp-prev .preview-frame { height: 700px; }
.cmp-send { display: flex; justify-content: flex-end; }
.row-hl td { background: var(--brand-blush); }
@media (max-width: 1000px) { .cmp-grid { grid-template-columns: minmax(0, 1fr); } .cmp-prev { position: static; } .cmp-aud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cmp-aud { grid-template-columns: minmax(0, 1fr); } }

/* =================================================================== v9: themed calendar (datepicker.js) */
.dp { position: relative; width: 100%; min-width: 0; }
.dp-native { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; width: 100% !important; }
.dp-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 34px 10px 12px; border-radius: 11px; border: 1px solid var(--line-3); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; box-shadow: inset 0 1px 2px rgba(28,25,23,.04); transition: border-color .15s, box-shadow .15s; }
.dp-btn svg { color: var(--accent); flex: none; }
.dp-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp.placeholder .dp-label { color: var(--faint); }
.dp-btn:hover { border-color: var(--line-3); }
.dp.open .dp-btn, .dp-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.dp.invalid .dp-btn { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.dp-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; display: grid; place-items: center; }
.dp-clear:hover { background: var(--line-2); color: var(--ink); }
.dp-pop { display: none; position: fixed; z-index: 1000; left: var(--dp-left, 0); top: var(--dp-top, 0); width: 300px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 22px 50px -16px color-mix(in srgb, var(--ink) 40%, transparent); animation: cb-in .14s ease; color: var(--ink); }
.dp.up .dp-pop { transform: translateY(-100%); animation: none; }
.dp.open .dp-pop { display: block; }
.dp-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.dp-nav { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer; }
.dp-nav:hover { background: var(--brand-blush); color: var(--accent); }
.dp-title { border: 0; background: none; font-family: var(--font-head); font-weight: 700; font-size: 15.5px; color: var(--ink); cursor: pointer; padding: 6px 10px; border-radius: 10px; }
.dp-title span { font-size: 10px; color: var(--muted); }
.dp-title:hover:not(.static) { background: var(--surface-2); }
.dp-title.static { cursor: default; }
.dp-grid { display: grid; gap: 3px; }
.dp-days { grid-template-columns: repeat(7, 1fr); }
.dp-months { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dp-years { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dp-dow { text-align: center; font-family: var(--font-label); font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.dp-out { text-align: center; padding: 8px 0; font-size: 13.5px; color: var(--line-3); }
.dp-day, .dp-cell { border: 0; background: none; border-radius: 10px; padding: 8px 0; font: inherit; font-family: var(--font-ui); font-size: 14px; color: var(--ink); cursor: pointer; }
.dp-cell { padding: 12px 0; }
.dp-day:hover:not([disabled]), .dp-cell:hover, .dp-day:focus-visible { background: var(--brand-blush); color: var(--accent); outline: none; }
.dp-day.today, .dp-cell.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dp-day.sel, .dp-cell.sel { background: var(--accent); color: var(--accent-ink); }
.dp-day[disabled], .dp-cell[disabled] { color: var(--line-3); cursor: not-allowed; background: none !important; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.dp-link { border: 0; background: none; color: var(--accent); font-family: var(--font-ui); font-size: 14px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.dp-link:hover { background: var(--brand-blush); }
.dp.w-auto { width: auto !important; min-width: 190px; }

/* =================================================================== v9: even card grids, single-line toolbars */
/* Cards in a grid share the same width and height */
.series-grid, .fam-grid, .req-quick, .tpl-grid, .stats, .design-grid, .theme-grid, .role-legend, .occ-pick, .rq-types, .rq-aud { grid-auto-rows: 1fr; align-items: stretch; }
.series-grid > *, .fam-grid > *, .stats > *, .req-quick > *, .tpl-grid > * { height: 100%; min-width: 0; }
.series-card { display: flex; flex-direction: column; }
.series-card > :nth-last-child(2) { margin-bottom: 14px; }
.series-card > .series-foot { margin-top: auto; }
.fam-card { align-content: start; }
.stat { min-width: 0; }
.stat .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Side-by-side panels line up at the top and match heights */
.cel-grid { align-items: stretch; }
.cel-grid > .card { display: flex; flex-direction: column; margin-top: 0; }
.cel-grid > .card > .log-bar { min-height: 76px; }
.cel-grid > .card > .empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; }
.cel-grid > .card > .hint { margin-top: auto; }
.log-bar { min-height: 72px; }

/* Page heads: title on the left, actions on one line on the right */
.page-head { flex-wrap: nowrap; align-items: center; }
.page-head > div:first-child { flex: 1 1 auto; min-width: 0; }
.page-head > .toolbar { flex: 0 0 auto; flex-wrap: nowrap; }
.toolbar form { margin: 0; }
/* Filter rows under a page head (search + selects) stay on one line */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; padding: 12px 14px; margin-bottom: 16px; }
.filter-bar .log-search, .filter-bar .fb-search { flex: 1 1 280px; min-width: 0; position: relative; }
.filter-bar .cb, .filter-bar .dp { flex: 0 1 220px; width: auto; }
.fb-search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.fb-search input { padding-left: 38px; border-radius: 12px; }
.att-tools { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.att-tools .log-search { min-width: 0; flex: 0 1 260px; }
@media (max-width: 1100px) { .page-head { flex-wrap: wrap; } .page-head > .toolbar { flex-wrap: wrap; } }
@media (max-width: 760px) { .filter-bar { flex-wrap: wrap; } .filter-bar .cb, .filter-bar .dp { flex: 1 1 45%; } }

/* v9b: stat tiles never push the page wider on phones */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat > div { min-width: 0; }
.stat .l { overflow-wrap: anywhere; }

/* v10: disabled icon buttons keep their place, so rows line up */
.icon-btn[disabled] { opacity: .35; cursor: default; transform: none !important; box-shadow: none; color: var(--faint); }

/* v10: themed file pickers (no grey browser button) */
input[type=file] { font: 14.5px/1.3 var(--font); color: var(--muted); max-width: 100%; padding: 6px; border: 1.5px dashed var(--line-3); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
input[type=file]:hover { border-color: var(--accent); }
input[type=file]::file-selector-button {
    font: 600 14px/1 var(--font); color: var(--ink-2); margin-right: 12px; padding: 10px 16px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(180deg, var(--surface), var(--surface-2));
    box-shadow: inset 0 1px 0 var(--sheen), 0 1px 2px rgba(28,25,23,.06); transition: color .15s, border-color .15s;
}
input[type=file]:hover::file-selector-button { color: var(--accent); border-color: var(--line-3); }
.xl-drop input[type=file] { border: 0; background: none; padding: 0; }

/* v10: organizers — role tiles, title chips, numbered steps */
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); grid-auto-rows: 1fr; gap: 10px; margin-bottom: 16px; }
.role-tile { --rc: var(--accent); position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; margin: 0; transition: border-color .15s, box-shadow .15s, background .15s; }
.role-tile.role-super_admin { --rc: var(--violet); }
.role-tile.role-admin { --rc: var(--accent); }
.role-tile.role-coordinator { --rc: var(--amber); }
.role-tile.role-editor { --rc: var(--blue); }
.role-tile.role-contributor { --rc: var(--green); }
.role-tile input { position: absolute; opacity: 0; pointer-events: none; }
.role-tile:hover { border-color: var(--line-3); }
.role-tile:has(input:checked) { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 7%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 16%, transparent); }
.role-tile:has(input:focus-visible) { outline: 2px solid var(--rc); outline-offset: 2px; }
.rt-head { display: flex; align-items: center; gap: 8px; }
.rt-head b { font-size: 14.5px; color: var(--ink); }
.rt-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; color: var(--rc); background: color-mix(in srgb, var(--rc) 13%, var(--surface)); }
.rt-check { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-3); color: transparent; }
.role-tile:has(input:checked) .rt-check { background: var(--rc); border-color: var(--rc); color: #fff; }
.rt-desc { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.role-pill.role-coordinator { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.role-card.role-coordinator { border-color: var(--line); }
.tchip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tchip { font: 600 12.5px/1 var(--font-ui, var(--font)); padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.tchip:hover { border-color: var(--accent); color: var(--accent); }
.org-step { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; font-size: 15px; }
.org-step:first-child { margin-top: 2px; }
.org-step .step-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--brand-blush); flex: none; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group input { flex: 1; min-width: 0; }
.input-group .btn { white-space: nowrap; }
.org-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.org-form .grid-2, .org-form .grid-3 { margin-bottom: 4px; }

/* v10: installer */
.login .install-card { width: min(720px, 100%); padding: 32px 34px; }
.start-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 640px) { .start-pick { grid-template-columns: 1fr; } }
.start-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; margin: 0; }
.start-tile input { position: absolute; opacity: 0; }
.start-tile .st-ic { font-size: 24px; }
.start-tile b { font-size: 14.5px; }
.start-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.start-tile:has(input:checked) { border-color: var(--accent); background: var(--brand-blush); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.restore-file { display: none; }
form:has(input[name=start][value=restore]:checked) .restore-file { display: block; }

/* ------------------------------------------------------------------ v10: Carols */
.span-2 { grid-column: span 2; }
@media (max-width: 760px) { .span-2 { grid-column: auto; } }
.mr-auto { margin-right: auto !important; }
.p-16 { padding: 16px; }
.p-0-16-16 { padding: 0 16px 16px; }
.w-90 { width: 90px !important; flex: none; }
.pill-neutral { background: var(--surface-2); color: var(--ink-2); }
.pill-info { background: var(--blue-bg); color: var(--blue); }
.pill-visited { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); color: var(--violet); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin: 0; }
.card-head h3 .i { color: var(--accent); }
.carol-h { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 12px; }
.carol-h .i { color: var(--accent); }
.carol-h-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.carol-h-row .carol-h { margin: 0 auto 0 0; }
.season-bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.season-bar .emoji-badge { font-size: 22px; }
.carol-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .carol-cols { grid-template-columns: 1fr; } }
.night-grid { display: grid; gap: 10px; }
.night-card { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: inherit; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.night-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.night-card > .i { color: var(--faint); }
.nc-date { width: 58px; flex: none; text-align: center; border-radius: 14px; background: var(--brand-blush); padding: 7px 0; line-height: 1.1; }
.nc-date span, .nc-date small { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.nc-date b { display: block; font-family: var(--font-head); font-size: 24px; color: var(--ink); }
.nc-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 8px 0 5px; overflow: hidden; }
.nc-bar span { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--green), color-mix(in srgb, var(--green) 70%, var(--accent))); border-radius: 99px; }
.fam-checks { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding-right: 4px; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.check-row:has(input:checked) { border-color: var(--accent); background: var(--brand-blush); }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.check-row span { display: flex; flex-direction: column; min-width: 0; }
.check-row small { color: var(--muted); font-size: 12.5px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: 0; }
.mini-row b { display: block; }
.tip-card { padding: 16px 18px; }
.tip-card h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; }
.tip-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.meta-row.lg { font-size: 14.5px; margin-top: 6px; }
.note-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; margin-bottom: 14px; background: var(--amber-bg); color: var(--ink-2); }
.status-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.stop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.stop { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; }
.stop-time { position: relative; text-align: right; padding-top: 12px; }
.stop-time b { display: block; font-family: var(--font-head); font-size: 17px; }
.stop-time small { display: block; color: var(--muted); font-size: 12.5px; }
.stop-n { position: absolute; right: -27px; top: 12px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.stop:not(:last-child) .stop-time::after { content: ""; position: absolute; right: -15px; top: 40px; bottom: -24px; width: 2px; background: var(--line-3); }
.st-visited .stop-n { background: var(--violet); }
.st-confirmed .stop-n { background: var(--green); }
.st-change .stop-n { background: var(--amber); }
.st-skipped .stop-n { background: var(--faint); }
.st-skipped .stop-card { opacity: .6; }
.stop-card { margin-left: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; }
.st-change .stop-card { border-color: var(--amber); }
.stop-head { display: flex; align-items: flex-start; gap: 12px; }
.stop-head strong { font-size: 16px; }
.song-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.song-chip { --lc: var(--accent); display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: color-mix(in srgb, var(--lc) 85%, var(--ink)); background: color-mix(in srgb, var(--lc) 11%, var(--surface)); }
.lang-telugu { --lc: var(--green); }
.lang-hindi { --lc: var(--amber); }
.lang-tamil, .lang-malayalam, .lang-kannada { --lc: var(--violet); }
.lang-other { --lc: var(--blue); }
.stop-notes { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.family-reply, .visit-notes { font-size: 13.5px; padding: 9px 12px; border-radius: 12px; display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.family-reply { background: var(--blue-bg); color: var(--ink-2); }
.family-reply small { color: var(--muted); margin-left: auto; }
.visit-notes { background: var(--surface-2); color: var(--ink-2); }
.stop-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.btn-visited { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-visited:hover { filter: brightness(1.08); }
.btn-visited .i { color: #fff; }
.crew-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.crew-row b { display: block; font-size: 14px; }
.crew-row small { color: var(--muted); font-size: 12.5px; }
.crew-add { display: grid; gap: 8px; margin-top: 12px; }
.song-num { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent); background: var(--brand-blush); }
.wa-list { display: grid; }
.icon-btn.copied { color: var(--green); border-color: var(--green); }
.carol-band { background: linear-gradient(90deg, #b91c1c, #15803d, #b91c1c); }
.carol-reply { margin-top: 16px; }
.print-only { display: none; }
@media print {
  .topbar, .tabbar, .no-print, .flash, .flash-wrap, footer { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff; }
  .run-sheet h1 { font-size: 20px; margin-bottom: 4px; }
  .run-sheet h2 { font-size: 15px; margin: 16px 0 4px; }
  .run-sheet table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
  .run-sheet th, .run-sheet td { border: 1px solid #999; padding: 6px 7px; text-align: left; vertical-align: top; }
  .run-sheet th { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 640px) {
  .stop { grid-template-columns: 1fr; gap: 6px; }
  .stop-time { text-align: left; padding: 0 0 0 36px; display: flex; gap: 8px; align-items: baseline; }
  .stop-n { left: 0; right: auto; top: -3px; }
  .stop:not(:last-child) .stop-time::after { display: none; }
  .stop-card { margin-left: 0; }
}
.carol-cols > * { min-width: 0; }
.carol-h-row { flex-wrap: wrap; }
/* Themed confirmation modal */
dialog.dlg-confirm { width: min(440px, calc(100% - 24px)); padding: 0; }
dialog.dlg-confirm .dlg-head { border-bottom: 0; padding: 22px 22px 18px; align-items: flex-start; }
dialog.dlg-confirm .dlg-head h2 { font-size: 17px; margin: 0; }
dialog.dlg-confirm .cf-msg { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
dialog.dlg-confirm .ic-badge.tone-red { background: var(--red-bg); color: var(--red); }
.btn-danger-solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger-solid:hover { box-shadow: 0 2px 10px color-mix(in srgb, var(--red) 35%, transparent); }

/* Missing details: one look everywhere (icon + amber text, same size) */
.miss { display: inline-flex; align-items: center; gap: 5px; color: var(--amber); font-size: 13.5px; font-weight: 550; white-space: nowrap; }
.miss .i { flex: none; }
.table td .miss + br + .miss, .table td .miss + br + a { margin-top: 2px; }

/* Settings menu sits on its own card, like the content beside it */
.settings > .tabs { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; max-height: calc(100vh - 100px); overflow-y: auto; }
.settings > .tabs .tab-group > summary:hover, .settings > .tabs a:hover { background: var(--surface-2); }
.settings > .tabs a.on { background: var(--brand-blush); box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); }
.settings > .tabs .tab-sub { border-left-color: var(--line); }
@media (max-width: 860px) { .settings > .tabs { max-height: none; } }

/* ------------------------------------------------------------------ v11: gender badges, themed tooltips, info icons */
.g-badge { --gc: var(--blue); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-left: 6px; vertical-align: -4px; color: var(--gc); background: color-mix(in srgb, var(--gc) 14%, var(--surface)); flex: none; }
.g-badge.g-female { --gc: #d6336c; }
.g-badge svg circle, .g-badge svg path { fill: currentColor; stroke: none; }
.fam-m .g-badge, .fam-row .g-badge { width: 16px; height: 16px; margin-left: 4px; vertical-align: -3px; }
.prof-hero .g-badge { width: 26px; height: 26px; vertical-align: -6px; }

.tt-pop {
    position: fixed; left: var(--tt-x, 0); top: var(--tt-y, 0); z-index: 1000; max-width: 280px; pointer-events: none;
    padding: 8px 11px; border-radius: 10px; background: var(--ink); color: var(--surface);
    font: 550 12.5px/1.4 var(--font-ui, var(--font)); letter-spacing: .005em; text-align: left;
    box-shadow: 0 10px 28px -10px rgba(0,0,0,.45); opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease;
}
.tt-pop.below { transform: translateY(-4px); }
.tt-pop.on { opacity: 1; transform: none; }
.tt-pop::after { content: ""; position: absolute; left: var(--tt-arrow, 50%); top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.tt-pop.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 4px; vertical-align: -3px; border-radius: 50%; color: var(--faint); cursor: help; }
.info:hover, .info:focus-visible { color: var(--accent); outline: none; background: var(--brand-blush); }
.miss[data-tip], .stat[data-tip], .pill[data-tip] { cursor: help; }
@media print { .tt-pop { display: none !important; } }

/* v12: role tiles — title on its own line, tick in the corner, three per row */
.role-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .role-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .role-pick { grid-template-columns: minmax(0, 1fr); } }
.role-tile { padding: 14px 16px; gap: 8px; }
.role-tile .rt-head { flex-direction: column; align-items: flex-start; gap: 8px; padding-right: 26px; }
.role-tile .rt-head b { line-height: 1.25; }
.role-tile .rt-check { position: absolute; top: 12px; right: 12px; margin: 0; }

/* v12: soft navigation */
.soft-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent); opacity: 0; pointer-events: none; }
.soft-bar.run { opacity: 1; animation: soft-run 8s cubic-bezier(.1,.8,.2,1) forwards; }
.soft-bar.done { opacity: 0; width: 100%; transition: opacity .3s ease .1s, width .15s ease; }
@keyframes soft-run { 0% { width: 0; } 10% { width: 35%; } 100% { width: 92%; } }
.soft-focus:focus { outline: none; }
.soft-hl { animation: soft-hl 1.8s ease; border-radius: var(--radius); }
@keyframes soft-hl { 0%, 35% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.clean-opts { display: grid; gap: 6px; }
.clean-opts .check-row b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* v12: carol homes — family / person / someone else, meals */
.who-seg { margin-top: 2px; }
form:has(.who-seg input[value=family]:checked) .who-person,
form:has(.who-seg input[value=person]:checked) .who-family,
form:has(.who-seg input[value=other]:checked) .who-family,
form:has(.who-seg input[value=other]:checked) .who-person { display: none; }
form:has(.who-seg input[value=other]:checked) .who-family ~ .span-2 { grid-column: span 3; }
.meal-box { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--amber) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amber) 22%, var(--line)); margin-bottom: 6px; }
form:has(.meal-box input[value=none]:checked) .meal-note { display: none; }
.meal-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--amber); background: var(--amber-bg); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }
.meal-pill.meal-dinner { color: #fff; background: var(--amber); border-color: var(--amber); }
.meal-line { font-size: 13.5px; padding: 8px 12px; border-radius: 12px; background: var(--amber-bg); color: var(--ink-2); }
.pill-meal { background: var(--amber-bg); color: var(--amber); }
.stop-head { flex-wrap: wrap; }

/* v12: songbook — language tabs and song words */
.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; padding: 4px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); width: fit-content; max-width: 100%; }
.lang-tab { --lc: var(--accent); border: 0; background: none; padding: 9px 16px; border-radius: 10px; font: 600 14px/1 var(--font-ui, var(--font)); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.lang-tab span { font-size: 12px; padding: 2px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.lang-tab:hover { background: var(--surface-2); }
.lang-tab.on { background: color-mix(in srgb, var(--lc) 12%, var(--surface)); color: color-mix(in srgb, var(--lc) 80%, var(--ink)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--lc) 40%, transparent); }
.lang-tab.on span { background: var(--surface); color: inherit; }
.song-open { all: unset; cursor: pointer; display: block; box-sizing: border-box; }
.song-open strong { font-size: 15.5px; }
.song-open .meta-row { margin-top: 4px; }
.song-open:hover strong { color: var(--accent); }
.song-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.lyrics { display: grid; gap: 18px; font-size: 16px; line-height: 1.65; }
.ly-block p { margin: 0; color: var(--ink); }
.ly-label { font: 800 12px/1 var(--font-ui, var(--font)); text-transform: uppercase; letter-spacing: .09em; color: var(--accent); margin-bottom: 6px; }
.ly-chorus { padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--brand-blush); }
.ly-chorus p { font-weight: 750; }
.ly-again { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.lyrics-input { font-family: var(--font); line-height: 1.5; }
.lyrics-page { background: var(--bg); }
.lyrics-sheet { width: min(760px, 100% - 32px); margin: 24px auto 60px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 34px; }
.lyrics-top { display: flex; justify-content: space-between; margin-bottom: 14px; }
.lyrics-head { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.lyrics-head h1 { font-size: 22px; margin: 0; }
.lyrics-head p { color: var(--muted); margin: 2px 0 0; }
.lyrics-song { padding: 6px 0 22px; break-inside: avoid-page; }
.lyrics-song + .lyrics-song { border-top: 1px dashed var(--line-3); padding-top: 20px; }
.lyrics-song h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 0; }
.ly-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff; background: var(--accent); flex: none; }
.ly-meta { color: var(--muted); font-size: 13.5px; margin: 4px 0 12px 38px; }
.lyrics-song .ly-block { margin: 0 0 12px 38px; }
@media print {
  .lyrics-sheet { box-shadow: none; margin: 0; width: 100%; padding: 0; }
  .ly-chorus { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Members list: gender · age · birthday stay on one line under the name */
.person-sub { flex-wrap: nowrap; white-space: nowrap; gap: 4px 8px; }
.person-sub .g-badge { margin-left: 0; width: 20px; height: 20px; vertical-align: middle; }
.table .wa-link, .table a[href^="mailto:"] { white-space: nowrap; }
.who .person-link strong { white-space: nowrap; }

/* v12: registrations & subscribers (dashboard) */
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-tab.on { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); }
.pill-tab .badge-count { margin-left: 2px; }
.mx-16 { margin-left: 16px; margin-right: 16px; }
.fs-16 { font-size: 16px !important; }
.text-center { text-align: center; }
.share-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 900px) { .share-grid { grid-template-columns: 1fr; } }
.share-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.share-card strong { display: block; }
.share-card small { display: block; color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.share-card code { display: block; font-size: 12.5px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.reg-list { display: grid; gap: 14px; }
.reg-item { padding: 0; overflow: hidden; }
.reg-item.st-new { border-left: 4px solid var(--amber); }
.reg-head { display: flex; gap: 12px; align-items: center; padding: 16px 18px 6px; }
.reg-head .avatar { width: 44px; height: 44px; }
.reg-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; padding: 8px 18px 14px; }
@media (max-width: 860px) { .reg-body { grid-template-columns: 1fr; } }
.reg-kv { grid-template-columns: 130px minmax(0, 1fr); row-gap: 8px; }
.reg-side h4 { display: flex; align-items: center; gap: 6px; font-size: 13.5px; margin: 0 0 6px; color: var(--ink-2); }
.reg-side h4:not(:first-child) { margin-top: 12px; }
.reg-fam { display: flex; flex-wrap: wrap; gap: 6px; }
.reg-fm { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 13.5px; }
.reg-fm .g-badge { margin: 0; }
.reg-fm small { color: var(--muted); }
.reg-quote { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; color: var(--ink-2); }
.reg-match { margin: 0 18px 12px; padding: 9px 12px; border-radius: 12px; background: var(--amber-bg); color: var(--ink-2); font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reg-match .i { color: var(--amber); }
.reg-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.reg-note { display: flex; gap: 8px; align-items: flex-end; padding: 0 18px 14px; background: var(--surface-2); }
.reg-note textarea { flex: 1; }

/* v12: public registration & subscribe pages */
.public-page .v-wrap.reg-wrap { max-width: 760px; }
.reg-card .v-body { padding-top: 6px; }
.reg-hero { text-align: center; padding: 18px 0 10px; }
.reg-hero .big { font-size: 46px; line-height: 1; }
.reg-hero h1 { font-size: 26px; margin: 10px 0 6px; }
.reg-hero p { color: var(--muted); margin: 0 auto; max-width: 480px; }
.reg-sec { padding: 18px 0 6px; border-top: 1px solid var(--line); margin-top: 12px; }
.reg-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 12px; }
.reg-sec h2 small { font-weight: 500; color: var(--muted); font-size: 13px; }
.reg-sec .step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--brand-blush); flex: none; }
.reg-seg { margin-bottom: 14px; }
.reg-sec .seg .g-badge { margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fam-list { display: grid; gap: 10px; margin-bottom: 10px; }
.fam-row { position: relative; padding: 12px 44px 2px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.fam-row .fam-x { position: absolute; top: 10px; right: 10px; }
.grid-reg { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }

.chip-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { margin: 0; cursor: pointer; }
.chip-pick input { position: absolute; opacity: 0; }
.chip-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chip-pick input:checked + span { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); }
.chip-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.public-page .check-row { margin-bottom: 8px; align-items: flex-start; }
.public-page .check-row input { margin-top: 3px; }
.check-row.consent { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.sub-prefs { margin-top: 6px; }
.share-grid > .card, .reg-list > .card { margin: 0; }
.check-row span.req, .check-row b span { display: inline; }
.grid-reg { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-reg > .field:nth-child(1), .grid-reg > .field:nth-child(2) { grid-column: span 3; }
.grid-reg > .field:nth-child(n+3) { grid-column: span 2; }
@media (max-width: 560px) { .grid-reg > .field:nth-child(n) { grid-column: span 6; } }

/* v13: carol visit programme */
form:has(input[name=meal][value=none]:checked) .meal-note { display: none; }
.prog { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.prog-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.prog-row b { font-weight: 700; margin-right: 6px; }
.prog-ic { width: 22px; flex: none; text-align: center; line-height: 1.5; }
.prog-min { flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 2px 8px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.prog-meal { background: var(--amber-bg); }
.prog-meal .prog-min { background: var(--surface); color: var(--amber); }
.prog-total { padding: 7px 12px; font-size: 12.5px; font-weight: 700; color: var(--accent); background: var(--brand-blush); text-align: right; }
.prog .song-chips { margin-top: 6px; }
.song-chip .chip-x { display: inline; margin: 0 0 0 2px; }
.song-chip .chip-x button { border: 0; background: none; padding: 0 2px; font-size: 15px; line-height: 1; color: inherit; opacity: .55; cursor: pointer; }
.song-chip .chip-x button:hover { opacity: 1; color: var(--red); }
.add-song { display: inline-block; margin: 0; }
.add-song .cb { min-width: 170px; }
.add-song .cb-btn { padding: 4px 10px; min-height: 0; font-size: 13px; border-style: dashed; border-radius: 99px; }
.time-lock { display: inline-flex; margin-top: 6px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; font-weight: 700; color: var(--amber); cursor: pointer; }
.time-lock:hover { border-color: var(--amber); }
.time-box { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 12px; display: grid; gap: 10px; }
.time-fixed { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.time-fixed .hint { grid-column: 1 / -1; }
.time-box:has(input[name=retime]:checked) .time-fixed { display: none; }
.msg-box { display: grid; grid-template-columns: minmax(0, 1.3fr) 110px minmax(0, 1.5fr); gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line)); background: color-mix(in srgb, var(--blue) 5%, var(--surface)); margin-bottom: 12px; align-items: start; }
@media (max-width: 640px) { .msg-box, .time-fixed { grid-template-columns: 1fr; } }

/* gender choice: the badge inside a segmented button must not pick up the button padding */
.seg span.g-badge { color: var(--gc); padding: 0; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; margin: 0; gap: 0; box-shadow: none; background: color-mix(in srgb, var(--gc) 14%, var(--surface)); }
.seg input:checked + span .g-badge { background: var(--gc); color: #fff; }
.song-link { color: inherit; text-decoration: none; }
.song-link:hover { text-decoration: underline; }
.g-badge .i, label .g-badge .i { color: inherit; margin: 0; vertical-align: middle; }
.prog-total.is-short { background: var(--amber-bg); color: var(--amber); }
.stop-time .drive { display: block; font-size: 11px; font-weight: 700; color: var(--faint); margin: -2px 0 4px; white-space: nowrap; }
@media (max-width: 640px) { .stop-time .drive { display: none; } }

/* v14: leaders */
.leader-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: var(--amber); background: var(--amber-bg); }
.rq-pill.tone-amber { background: var(--amber-bg); color: var(--amber); }
.prog-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prog-who b { margin-right: 0; }
.pick-person { display: inline-block; margin: 0; }
.pick-person .cb { min-width: 210px; }
.pick-person .cb-btn { padding: 4px 10px; min-height: 0; font-size: 13px; border-radius: 99px; }
.pick-person .cb.placeholder .cb-btn { border-style: dashed; color: var(--amber); }
.msg-box > .field:nth-child(4) { grid-column: 1 / 2; }

/* v15: community carols */
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 10px; }
@media (max-width: 560px) { .kind-pick { grid-template-columns: 1fr; } }
form:has(input[name=kind][value=homes]:checked) .kind-community { display: none; }
form:has(input[name=kind][value=community]:checked) .kind-homes-only { display: none; }
.community-card { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; border-left: 4px solid var(--accent); }
.community-card .meta-row a { color: inherit; }
.ready-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 14px; color: var(--ink-2); }
.ready-track { flex: 0 0 160px; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.ready-track span { display: block; height: 100%; width: var(--w); }
.ready-track .r-ready { background: var(--green); }
.ready-track .r-prac { background: var(--amber); }
.prog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prog-item { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; align-items: start; }
.pi-time { text-align: center; padding-top: 12px; line-height: 1.1; }
.pi-time b { display: block; font-size: 17px; }
.pi-time small { color: var(--muted); font-size: 11px; font-weight: 600; }
.pi-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; display: grid; gap: 6px; }
.prog-item.st-ready .pi-card { border-left-color: var(--green); }
.prog-item.st-practicing .pi-card { border-left-color: var(--amber); }
.prog-item.st-idea .pi-card { border-left-style: dashed; }
.pi-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pi-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-kind { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--brand-blush); color: var(--ink-2); white-space: nowrap; }
.seg-sm { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.seg-sm form { display: contents; }
.seg-btn { border: 0; background: transparent; padding: 4px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg-btn:hover { background: var(--surface); }
.seg-btn.on.s-idea { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.seg-btn.on.s-practicing { background: var(--amber-bg); color: var(--amber); }
.seg-btn.on.s-ready { background: var(--green-bg); color: var(--green); }
.pill-community { background: var(--brand-blush); color: var(--ink-2); font-size: 11px; vertical-align: middle; }
.night-card.is-community { border-left: 4px solid var(--accent); }
.series-card.carol-ev { border-top-color: var(--green); }
.series-card.carol-ev.is-community { border-top-color: var(--accent); }
.series-card.is-off { opacity: .6; }
@media (max-width: 560px) { .prog-item { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; } .pi-head { flex-wrap: wrap; } .pi-head strong { white-space: normal; } }
@media print { .prog-list, .ready-bar, .community-card { display: none; } }
.community-card .meta-row a { display: inline-flex; align-items: center; gap: 5px; }
.bring-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bring-list li { display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--line); }
.bring-list li.st-ready { border-left-color: var(--green); }
.bring-list li.st-practicing { border-left-color: var(--amber); }
.bring-list small { color: var(--muted); font-size: 12.5px; }
.pill-community::before { display: none; }

/* v16: roles right on the schedule */
.role-tools { display: flex; align-items: center; gap: 6px; }
.role-edit { opacity: 0; transition: opacity .15s; }
.role:hover .role-edit, .role-edit:focus-visible { opacity: 1; }
@media (hover: none) { .role-edit { opacity: 1; } }
.role.role-new-row { display: block; padding: 8px 18px 12px; }
.role-new { display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed var(--line-3, var(--line)); background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 99px; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.role-new:hover { border-color: var(--accent); color: var(--accent); background: var(--brand-blush); }
.role-new small { font-weight: 500; color: var(--amber); }
.role-fields { display: grid; grid-template-columns: 72px minmax(0, 1fr) 140px 96px; gap: 12px; }
.emoji-in { text-align: center; font-size: 20px; }
@media (max-width: 640px) { .role-fields { grid-template-columns: 64px minmax(0, 1fr); } }
.ra-sec { margin-bottom: 14px; }
.ra-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.ra-picks { max-height: 168px; overflow-y: auto; padding: 2px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--ink); }
.chip-btn.on { border-color: var(--accent); background: var(--brand-blush); color: var(--ink); }
.role-danger { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.rd-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 10px; }
.rd-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-acts form { margin: 0; }
.tag-once { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--amber-bg); color: var(--amber); font-size: 11px; font-weight: 650; vertical-align: 1px; }

/* v17: carol night cards can be edited, copied and deleted in place */
.night-wrap { position: relative; }
.night-wrap:has(.nc-acts) .night-card { padding-right: 140px; }
.night-wrap:has(.nc-acts) .night-card > .i:last-child { display: none; }
.nc-acts { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); display: flex; gap: 4px; opacity: .55; transition: opacity .15s; }
.night-wrap:hover .nc-acts, .nc-acts:focus-within { opacity: 1; }
@media (hover: none) { .nc-acts { opacity: 1; } }
@media (max-width: 640px) { .night-wrap:has(.nc-acts) .night-card { padding-right: 16px; padding-bottom: 52px; } .nc-acts { top: auto; bottom: 10px; right: 12px; transform: none; } }
.start-pick .start-tile-wide { grid-column: 1 / -1; }
.start-pick:has(.start-tile-wide) { grid-auto-rows: auto; }
