:root {
  --bg: #F4F4F4;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5b5b5b;
  --primary: #7a1f3d;
  --primary-dark: #5c132d;
  --primary-soft: #fbeff3;
  --border: #d9d2c7;
  --ok: #1e7a3c;
  --warn: #b26a00;
  --err: #b3261e;
  --radius: 12px;
}
* { box-sizing: border-box; }
/* Hidden means hidden, whatever display a component's own rule gives it. */
[hidden] { display: none !important; }
/* Numbers drawn level and even everywhere (the serif's old-style "0" reads as an "o"). */
html { font-variant-numeric: lining-nums; }
.stat .n, .num, td.num, .desk-tally, .h-sum { font-variant-numeric: lining-nums tabular-nums; }
/* Tick boxes and round choices in the app's colour, not the browser's blue. */
input[type=checkbox], input[type=radio], input[type=range], progress { accent-color: var(--primary); }
/* A fieldset never grows wider than its column (it would make a phone page scroll sideways). */
fieldset { min-width: 0; }
html { font-size: 20px; }
/* Organizer pages (signed in, body.admin; views/partials/head.ejs marks <html class="org">): the usual size of a website, as the
   owner asked; guests' pages keep the large text for the elders. */
html.org { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 760px; margin: 0 auto; padding: 16px; }
body.admin .container { max-width: 1240px; }
h1 { font-size: 1.7rem; margin: .5rem 0 1rem; line-height: 1.25; }
h2 { font-size: 1.3rem; margin: 1.6rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
p { margin: .4rem 0; }
a { color: var(--primary); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.card.highlight { border-color: var(--primary); background: var(--primary-soft); }

.btn {
  display: inline-block; min-height: 56px; padding: 12px 22px; font-size: 1.05rem; font-weight: 600;
  border-radius: var(--radius); border: 2px solid var(--primary-fill); background: var(--primary-fill); color: #fff;
  text-decoration: none; cursor: pointer; text-align: center; line-height: 1.4; font-family: inherit;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.secondary { background: var(--card); color: var(--primary); }
.btn.secondary:hover { background: var(--primary-soft); }
.btn.danger { background: var(--card); color: var(--err); border-color: var(--err); }
.btn.danger:hover { background: var(--err-soft); }
.btn.block { display: block; width: 100%; }
.btn.small { min-height: 42px; padding: 7px 14px; font-size: .9rem; }
.btn.link { background: none; border-color: transparent; color: var(--primary); text-decoration: underline; min-height: 0; padding: 4px 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
label .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time],
input[type=password], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 2px solid var(--border);
  border-radius: 10px; background: var(--card); color: var(--text); min-height: 56px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus, a:focus { outline: 3px solid #f0b429; outline-offset: 2px; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 18px 18px; margin: 20px 0; background: var(--card); }
legend { font-weight: 700; font-size: 1.1rem; padding: 0 8px; }

.check { display: flex; align-items: center; gap: 12px; font-weight: 500; margin: 10px 0; cursor: pointer; }
.check input { width: 28px; height: 28px; min-height: 0; flex: none; }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label {
  flex: 1 1 140px; margin: 0; border: 2px solid var(--border); border-radius: 10px; padding: 12px;
  display: flex; align-items: center; gap: 10px; cursor: pointer; background: var(--card); font-weight: 500;
}
.choice input { width: 26px; height: 26px; min-height: 0; flex: none; }
.choice label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

.flash { padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; border: 2px solid; font-weight: 600; }
.flash > span { white-space: pre-line; }   /* a message in lines (a room's: who and where, the nights, anything to know) */
.flash.undo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.flash.undo-bar form { margin: 0; }
.flash.ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.flash.err { background: var(--err-soft); border-color: var(--err); color: var(--err); }

.topbar { background: var(--chrome); color: #fff; padding: 0 16px; position: sticky; top: 0; z-index: 20; }
.topbar .inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 6px; min-height: 60px; }
.topbar a { color: #fff; }
.topbar .brand { font-weight: 700; font-size: 1.15rem; text-decoration: none; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .sub { font-size: .85rem; font-weight: 400; opacity: .9; }
/* Stays inline (not flex) so a long event name still ends in "…" on phones. */
.mark-tile { display: inline-flex; vertical-align: middle; margin: -4px 8px 0 0; width: 32px; height: 32px; border-radius: 9px; background: var(--soft); align-items: center; justify-content: center; }
.mark-tile .mark { width: 28px; height: 28px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: rgba(255,255,255,.15); }
.nav a.active { background: rgba(255,255,255,.25); }
.menu-btn { background: rgba(255,255,255,.12); color: #fff; border: 2px solid rgba(255,255,255,.5); border-radius: 8px; font: inherit; font-weight: 600; padding: 6px 12px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.menu-btn:hover { background: rgba(255,255,255,.22); }
.drawer-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw); background: var(--card); z-index: 31; transform: translateX(100%); transition: transform .2s ease; box-shadow: -4px 0 20px rgba(0,0,0,.2); overflow-y: auto; padding: 8px 0 20px; display: flex; flex-direction: column; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px 10px 20px; color: var(--primary); font-size: 1.05rem; }
.menu-close { background: none; border: 0; font-size: 1.4rem; color: var(--muted); cursor: pointer; min-width: 44px; min-height: 44px; }
.drawer a { display: block; padding: 14px 20px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 1.05rem; border-left: 5px solid transparent; }
.drawer a:hover { background: var(--primary-soft); }
.drawer a.active { border-left-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.drawer hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.drawer .nav-group { padding: 14px 20px 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.drawer .nav-later { margin-top: 6px; }
.drawer .nav-later summary { padding: 12px 20px; cursor: pointer; color: var(--muted); font-weight: 600; }
.drawer .nav-later a { font-weight: 500; color: var(--muted); }
body.menu-open .drawer { transform: none; }
body:not(.menu-open) .drawer { box-shadow: none !important; }   /* closed: no shadow showing at the page's edge */
body.menu-open .drawer-backdrop { display: block; }
body.menu-open { overflow: hidden; }
@media (max-width: 760px) {
  .nav.primary { display: none; }
  .menu-btn span:not(.bell-n) { display: none; }   /* the button's word goes; the bell's count stays */
  .menu-btn { font-size: 1.3rem; padding: 2px 12px; }
  .topbar .sub { display: none; }
}

.guest-header { text-align: center; padding: 20px 10px 8px; }
.guest-header .event-name { font-size: 1.9rem; font-weight: 700; color: var(--primary); margin: 0; line-height: 1.2; }
.guest-header .welcome { font-size: 1.15rem; margin-top: 8px; }

.fn { display: flex; gap: 16px; align-items: flex-start; }
.fn .date { flex: none; width: 88px; text-align: center; background: var(--primary-fill); color: #fff; border-radius: 10px; padding: 8px 4px; }
.fn .date .d { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.fn .date .m { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.fn .date .w { font-size: .8rem; opacity: .9; }
.fn .body { flex: 1; min-width: 0; }
.fn h3 { font-size: 1.3rem; }
.fn .time { font-weight: 700; font-size: 1.1rem; }
.fn .meta { color: var(--muted); }
/* Import: picked phone contacts to check before adding */
.pick-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pick-row > input[type=checkbox] { width: 26px; height: 26px; min-height: 0; flex: none; margin-top: 12px; }
.pick-fields { flex: 1; min-width: 0; }
.pick-fields input { margin: 0 0 6px; }
.pick-fields .pick-name { font-weight: 600; }
.pick-sub { display: flex; gap: 8px; }
.pick-n-wrap { display: flex; flex-direction: column; align-items: center; flex: none; margin: 0; font-weight: 400; }
.pick-sub .pick-n { width: 76px; margin: 0; }

/* Dashboard on the wedding days: now and next */
.day-now { border: 2px solid var(--primary); }
.day-now .next-when { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary); }
.day-now .next-name { font-size: 1.35rem; margin: 4px 0 0; }
.day-fn + .day-fn, .day-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.day-block h4 { margin: 0 0 6px; font-size: 1.02rem; }
.day-run { list-style: none; margin: 0; padding: 0; }
.day-run li { padding: 4px 0; }
.day-run .t { display: inline-block; min-width: 72px; font-weight: 700; }
.day-run li.due .t { color: var(--primary); }

/* Search */
.search-btn { margin-left: auto; margin-right: 8px; text-decoration: none; display: inline-flex; align-items: center; }
.search-btn .ic { width: 1.3em; height: 1.3em; }
.search-form { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; position: sticky; top: 60px; z-index: 5; padding: 10px 0; background: var(--bg); }
.search-form .back-arrow { flex: none; }
.search-form .search-box { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; }
.search-form .search-box > .ic { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-form input { flex: 1; margin: 0; padding-left: 38px; border-radius: 999px; }
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; cursor: pointer; background: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1a11 11 0 1 1 0 22a11 11 0 0 1 0-22zM8.7 7.3l-1.4 1.4L10.6 12l-3.3 3.3 1.4 1.4 3.3-3.3 3.3 3.3 1.4-1.4L13.4 12l3.3-3.3-1.4-1.4L12 10.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 1a11 11 0 1 1 0 22a11 11 0 0 1 0-22zM8.7 7.3l-1.4 1.4L10.6 12l-3.3 3.3 1.4 1.4 3.3-3.3 3.3 3.3 1.4-1.4L13.4 12l3.3-3.3-1.4-1.4L12 10.6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.search-hint { margin: 4px 4px 0; }
.search-h { margin: 20px 0 8px; font-size: 1.15rem; }
.search-list { padding: 6px 0; }
.search-list a { display: flex; flex-direction: column; padding: 10px 18px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.search-list a:last-of-type { border-bottom: 0; }
.search-list a:hover { background: var(--primary-soft); }
.search-list p { padding: 0 18px; }

/* File pickers: a big, clear button instead of the browser's small one */
input[type=file] { font: inherit; font-size: 1rem; width: 100%; padding: 6px 0; border: 0; background: none; min-height: 0; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; padding: 12px 20px; margin-right: 12px; border-radius: 999px; border: 2px solid var(--btn-border); background: var(--card); color: var(--primary); cursor: pointer; }

/* Guests' shared album */
fieldset.plain { border: 0; padding: 0; margin: 16px 0 0; background: none; }
fieldset.plain legend { padding: 0; font-size: 1rem; margin-bottom: 8px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.album figure { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.album img { width: 100%; height: 160px; object-fit: cover; display: block; }
.album figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.album-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.album-acts .btn.link { padding: 2px 0; margin-right: 8px; }
.danger-text { color: var(--err) !important; }
.album-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.album-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.album .hosts-pill { align-self: flex-start; }
.link-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.link-form h3 { margin: 0 0 4px; font-size: 1.1rem; }
.album-link { border-bottom: 1px solid var(--line); }
.album-link:last-child { border-bottom: 0; }
.album-link > a { border-bottom: 0 !important; }
.album-link .album-acts { padding: 0 18px 10px; align-items: center; gap: 10px; }

.album-tabs { margin-bottom: 12px; }
.fn-pick { margin: 0; }
.fn-pick select { min-height: 36px; padding: 4px 8px; font-size: .95rem; margin: 2px 0 0; width: auto; max-width: 100%; }
.btn.link.starred { color: #b8860b; }
.btn.link.muted { color: var(--muted); }
.reported { color: var(--err); font-weight: 600; }
.nudge-card .actions { margin-top: 8px; }
.album .cap { font-size: .95rem; }
.album figure { position: relative; }
.similar-badge { position: absolute; top: 8px; left: 8px; max-width: calc(100% - 60px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; text-decoration: none; }
.pro-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.pro-card .ic { width: 1.8em; height: 1.8em; color: var(--primary); flex: none; }
.pro-card > span { display: flex; flex-direction: column; }
/* Linked albums (Photos): who sees one, when linking it and in the list. */
.linked-h { margin: 22px 0 6px; font-size: 1rem; }
.album-links .sees { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-basis: 100%; }
.album-links .sees .ic { width: 1.1em; height: 1.1em; color: var(--muted); flex: none; }
fieldset.audience { box-shadow: none; background: none; }
.audience .aud-some { margin: 10px 0 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--line); }
.audience .aud-label { margin: 10px 0 6px; font-weight: 600; }
.audience .aud-except { margin-top: 14px; }
.audience .aud-except summary { cursor: pointer; font-weight: 600; }
.audience .aud-except input[type=search] { margin: 6px 0; }
.aud-list { max-height: 240px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px; }
.aud-list label { display: flex; align-items: center; gap: 10px; padding: 6px 0; margin: 0; font-weight: 500; cursor: pointer; border-bottom: 1px solid var(--line); }
.aud-list label:last-child { border-bottom: 0; }
.aud-list label[hidden] { display: none; }
.aud-list input { width: 24px; height: 24px; min-height: 0; flex: none; }
.keep-note { display: flex; gap: 8px; align-items: flex-start; background: var(--primary-soft); border-radius: 8px; padding: 8px 10px; }
.keep-note .ic { flex: none; margin-top: 2px; }
.cap-form { display: flex; gap: 6px; margin: 4px 0 0; }
.cap-form input { margin: 0; min-height: 36px; font-size: .95rem; flex: 1; min-width: 0; }
.search-list a.sharer { flex-direction: row; align-items: center; gap: 12px; }
.search-list a.sharer img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.search-list a.sharer > span { display: flex; flex-direction: column; }
.lightbox .lb-cap { color: #fff; text-align: center; margin-top: 8px; font-size: 1rem; max-width: 100%; }
.lightbox .lb-send, .lightbox .lb-ask { background: #fff; }
.album-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.select-bar { position: sticky; bottom: 0; z-index: 5; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
body.select-mode .album figure { cursor: pointer; outline: 3px solid transparent; }
body.select-mode .album figure.picked { outline-color: var(--primary); }
body.select-mode .album figure.picked::after { content: '✓'; position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
body.select-mode .album .similar-badge, body.select-mode .album-acts, body.select-mode .cap-form, body.select-mode .fn-pick, body.select-mode .report-form { display: none; }

/* The album's full-screen view */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.97); z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100% - 70px); object-fit: contain; border-radius: 6px; }
.lightbox .lb-close { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 1.4rem; cursor: pointer; }
.lightbox .lb-bar { color: #fff; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; text-align: center; font-size: .95rem; }
.lightbox .lb-save { background: #fff; }
.lightbox .lb-step, dialog.pv .pv-step { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(20, 14, 16, .5); color: #fff; font: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox .lb-prev, dialog.pv .pv-prev { left: 8px; }
.lightbox .lb-next, dialog.pv .pv-next { right: 8px; }
.lightbox .lb-step[hidden], dialog.pv .pv-step[hidden] { display: none; }
body.lb-open { overflow: hidden; }

/* "Made with GaZumZum" at the foot of free guest pages */
.made-with { text-align: center; font-size: .85rem; color: var(--muted); margin: 6px 0 22px; }
.made-with a { color: inherit; text-decoration: none; }
.made-with strong { color: var(--primary); }

/* Paid features (Settings) and the album's plan line (Photos) */
.plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.plan-row .plan-who { flex: 1 1 200px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plan-row input[type=text] { flex: 1 1 200px; margin: 0; }
.plan-row .plan-until { display: block; margin: 0; flex: 1 1 100%; min-width: 0; }
.plan-row .plan-until input { margin: 4px 0 0; width: 100%; max-width: 100%; box-sizing: border-box; }
.plan-note { display: flex; gap: 10px; align-items: flex-start; background: var(--primary-soft); border-radius: 10px; padding: 10px 12px; }
.plan-note .ic { flex: none; margin-top: 3px; color: var(--primary); }

/* Invitations, one by one */
.send-card .send-left { color: var(--muted); font-size: .95rem; }
.send-card .send-name { margin: 6px 0 2px; }
.send-msg { white-space: normal; background: var(--primary-soft); border-radius: 10px; padding: 12px 14px; margin: 10px 0 4px; font-size: .95rem; max-height: 260px; overflow: auto; }
.send-done { color: var(--ok); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.send-done form { margin: 0; }
.send-btn { font-size: 1.1rem; }
.send-box { margin: 4px 0; }
.send-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 6px; }
.send-opts .check { margin: 0; }
.send-opts select { width: auto; margin: 0; min-height: 0; padding: 6px 30px 6px 10px; }
.send-box .actions { margin-top: 6px; }
/* What to send (views/partials/send_card.ejs): four choices as tappable pills, the message in a box to change. */
.send-what { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.send-what legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.send-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: .92rem; }
.send-pick input { margin: 0; }
.send-pick:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.send-box textarea[data-send-text] { font-size: .95rem; line-height: 1.45; }
.send-linkonly { background: var(--primary-soft); border-radius: 10px; padding: 10px 14px; word-break: break-all; }
.send-box [hidden] { display: none !important; }   /* the button styles would show them anyway */
.send-box [data-send-keepwrap] { align-items: flex-start; }
.send-status:empty { display: none; }

/* Guest page: what's next (the function on now or coming up, and their own pickup or drop) */
.next-card { border: 2px solid var(--primary); }
.next-card .next-when { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.next-card .next-name { font-size: 1.45rem; margin: 4px 0 2px; }
.next-card .time { font-weight: 700; font-size: 1.1rem; }
.next-card .meta { color: var(--muted); }
.next-trip { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.next-card > .next-trip:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.next-trip p { margin: 6px 0; }
.next-done { color: var(--ok); font-weight: 700; }
.cal-add h2 { margin-top: 0; font-size: 1.2rem; }
.fn .you { margin-top: 6px; font-weight: 600; color: var(--ok); }

.update .when { color: var(--muted); font-size: .85rem; }
.update.pinned { border-color: var(--warn); }
.update .pin { color: var(--warn); font-size: .85rem; font-weight: 700; }

dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; font-weight: 500; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; background: var(--card); font-size: .95rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--head); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tfoot td { font-weight: 700; background: var(--soft); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; text-decoration: none; color: inherit; }
.stat .n { font-size: 2rem; font-weight: 700; color: var(--primary); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .9rem; }
.stat.warn .n { color: var(--warn); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.pill.yes { background: var(--ok-soft); color: var(--ok); }
.pill.no { background: var(--err-soft); color: var(--err); }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.maybe { background: var(--maybe-soft); color: var(--maybe); }
.pill.grey { background: var(--grey-soft); color: var(--muted); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.fn-miss { font-size: .75rem; white-space: normal; margin-left: 4px; }

.muted { color: var(--muted); }
.small { font-size: .9rem; }
.big-code { font-size: 2rem; letter-spacing: .25em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; font-weight: 700; }
.code-input { text-transform: uppercase; letter-spacing: .15em; font-size: 1.4rem; text-align: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tabs a { padding: 10px 16px; border: 2px solid var(--border); border-radius: 999px; text-decoration: none; font-weight: 600; background: var(--card); color: var(--text); }
.tabs a.active { background: var(--primary-fill); border-color: var(--primary-fill); color: #fff; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters label { margin-top: 0; }
.inline-form { display: inline; }
pre.msg { white-space: pre-wrap; background: var(--soft); border: 1px solid var(--border); border-radius: 10px; padding: 14px; font: inherit; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 0 12px; }

@media (max-width: 700px) {
  html { font-size: 18px; }
  .container { padding: 12px; }
  h1 { font-size: 1.45rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 10px 6px; }
  .stat .n { font-size: 1.6rem; }
  .btn { padding: 10px 16px; }
  .actions .btn { flex: 1 1 auto; }
  th, td { padding: 8px 6px; font-size: .9rem; }
  .guest-header .event-name { font-size: 1.6rem; }
  .row, .row3, .filters { grid-template-columns: 1fr; }
  dl.info { grid-template-columns: 1fr; gap: 0; }
  dl.info dd { margin-bottom: 8px; }
  .fn .date { width: 74px; }
}
@media print {
  .topbar, .no-print, .flash, .tabs { display: none !important; }
  body { background: var(--card); }
  html, html.org { font-size: 13px; }
  .table-wrap { overflow: visible; border: 0; }
}
.code-input::placeholder { text-transform: none; letter-spacing: normal; font-size: 1rem; color: #8a8a8a; }
td.nowrap { white-space: nowrap; }

/* ---- icons ---- */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.22em; margin-right: .4em; flex: none; }
.nav a, .menu-btn, .drawer a, .btn { display: inline-flex; align-items: center; justify-content: center; }
.drawer a { display: flex; justify-content: flex-start; }   /* one row each, also in the folded groups */
.drawer .ic { width: 1.35em; height: 1.35em; margin-right: .7em; color: var(--primary); }
.drawer a.active .ic { color: var(--primary); }
h2 .ic, legend .ic { color: var(--primary); width: 1.1em; height: 1.1em; }
.menu-btn .ic { margin-right: .35em; }
@media (max-width: 760px) { .menu-btn .ic { margin-right: 0; width: 1.3em; height: 1.3em; } }
.fn .meta .ic { width: 1em; height: 1em; margin-right: .3em; color: var(--muted); }

/* ---- calendar ---- */
.cal-week-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin-bottom: 10px; }
.cal-week { display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(240px, 1fr)); min-width: max-content; }
.cal-corner { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--head); }
.cal-corner.small { font-size: .75rem; color: var(--muted); padding: 4px; text-align: right; }
.cal-dayhead { text-align: center; padding: 8px 4px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--head); }
.cal-dayhead .w { font-size: .8rem; color: var(--muted); text-transform: uppercase; }
.cal-dayhead .d { font-weight: 700; font-size: 1.05rem; }
.cal-dayhead.today .d { color: var(--primary); }
.cal-allday { min-height: 30px; padding: 3px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.cal-axis { position: relative; border-right: 1px solid var(--border); }
.cal-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: .75rem; color: var(--muted); }
.cal-hour:first-child { transform: none; top: 2px !important; }
.cal-col { position: relative; border-right: 1px solid var(--border); background-image: linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px); background-size: 100% var(--hour, 56px); }
.cal-col.today { background-color: var(--today); }
.cal-item { display: block; border-radius: 6px; padding: 3px 6px; font-size: .8rem; line-height: 1.25; text-decoration: none; color: var(--text); overflow: hidden; border-left: 4px solid; }
.cal-col .cal-item { position: absolute; left: 3px; right: 3px; box-sizing: border-box; }
.cal-col .cal-item.arrival, .cal-col .cal-item.departure { left: 52%; padding: 2px 5px; }
.cal-col .cal-item.arrival .t, .cal-col .cal-item.departure .t { font-size: .72rem; font-weight: 700; }
.cal-col .cal-item.arrival .n, .cal-col .cal-item.departure .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; }
.cal-col .cal-item.function { right: 50%; }
.cal-col:not(:has(.arrival, .departure)) .cal-item.function { right: 3px; }
.cal-item.function { background: var(--primary-soft); border-color: var(--primary); }
.cal-item.function.open { border-bottom: 2px dashed var(--primary); }
.cal-item.function .t { font-size: .72rem; color: var(--muted); }
.cal-item.function .n { font-weight: 700; }
.cal-item.function .s { font-size: .72rem; color: var(--muted); }
.cal-item b { background: var(--primary-fill); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; margin-left: 2px; white-space: nowrap; }
.cal-item.arrival { background: var(--ok-soft); border-color: var(--ok); }
.cal-item.departure { background: var(--warn-soft); border-color: var(--warn); }
.cal-item .s { color: var(--muted); }
a.cal-item:hover { filter: brightness(.95); }

.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--card); margin-bottom: 20px; }
.cal-dow { background: var(--head); text-align: center; font-size: .8rem; font-weight: 700; padding: 6px 2px; border-bottom: 1px solid var(--border); }
.cal-cell { min-height: 96px; padding: 4px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--soft); display: flex; flex-direction: column; gap: 3px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.in { background: var(--card); }
.cal-cell.empty { background: var(--soft2); }
.cal-cell .n { font-size: .85rem; color: var(--muted); }
.cal-cell.in .n { font-weight: 700; color: var(--text); }
.cal-cell.today .n { color: var(--primary); }
.cal-cell .cal-item { font-size: .75rem; padding: 2px 5px; }
.cal-cell .cal-item .t { color: var(--muted); }
@media (max-width: 700px) {
  .cal-cell { min-height: 70px; padding: 2px; }
  .cal-cell .cal-item { font-size: .65rem; padding: 1px 3px; border-left-width: 3px; }
  .cal-cell .cal-item .t, .cal-item b { display: none; }
}
.fnrow { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 0 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.fnrow:last-child { border-bottom: 0; }
.fnrow label { margin: 0; }
.fnrow input[type=number], .fnrow input[type=text] { min-height: 46px; padding: 8px 10px; font-size: .95rem; }
.fnrow .check { margin: 0; }
@media (max-width: 700px) { .fnrow { grid-template-columns: 1fr 1fr; } .fnrow > :first-child { grid-column: 1 / -1; } }
.fn-head { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 0 12px; font-size: .8rem; color: var(--muted); padding: 8px 0 2px; }
@media (max-width: 700px) { .fn-head { display: none; } }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; flex-wrap: wrap; }
.steps li { flex: 1 1 160px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 2px solid var(--border); color: var(--muted); background: var(--card); font-weight: 600; }
.steps li .num { width: 30px; height: 30px; border-radius: 50%; background: var(--border); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.steps li.current { border-color: var(--primary); color: var(--primary); }
.steps li.current .num { background: var(--primary-fill); }
.steps li.done { color: var(--ok); }
.steps li.done .num { background: var(--ok); }
/* ---- place picker & contacts ---- */
.place-pick { position: relative; }
.suggest { position: absolute; left: 0; right: 0; z-index: 10; background: var(--card); border: 2px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; margin-top: 4px; }
.s-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; font: inherit; cursor: pointer; line-height: 1.3; }
.s-item:last-child { border-bottom: 0; }
button.s-item:hover, button.s-item:focus { background: var(--primary-soft); outline: none; }
.s-item small { font-size: .8rem; }
.place-chip { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.contact-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr auto; gap: 8px; align-items: center; margin: 8px 0; }
.contact-row input { min-height: 48px; padding: 8px 10px; }
.contact-row .btn { min-height: 48px; }
@media (max-width: 700px) { .contact-row { grid-template-columns: 1fr auto; } .contact-row > input { grid-column: 1 / -1; } .contact-row .btn { grid-column: 2; justify-self: end; } }
.contacts-list .c { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border); }
.contacts-list .c:last-child { border-bottom: 0; }
.contacts-list .c .who { flex: 1; min-width: 160px; }
.contacts-list .c .label { color: var(--muted); font-size: .9rem; }

.onboard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .onboard { grid-template-columns: 1fr; } }
.row.aligned { align-items: end; }
.row.aligned.wide-right { grid-template-columns: 1fr 1.6fr; }
.row.aligned label:not(.check) { white-space: nowrap; }
@media (max-width: 700px) { .row.aligned label:not(.check) { white-space: normal; } }   /* a long label wraps on a phone */
.row > *, .row3 > * { min-width: 0; }   /* a column keeps its share; a long word or box can't push the page wider */
.row.aligned .check { min-height: 56px; }
.hint-list { color: var(--muted); font-size: .9rem; margin: 8px 0 4px; padding-left: 20px; }
.hint-list li { margin: 2px 0; }
/* ---- date fields (DD/MM/YYYY) ---- */
.date-wrap { position: relative; display: flex; align-items: stretch; gap: 6px; }
.date-wrap input[type=text] { flex: 1; min-width: 0; }
.date-btn { flex: none; width: 60px; border: 2px solid var(--border); border-radius: 10px; background: var(--card); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 2px 0; color: var(--muted); }
.date-btn .m { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; }
.date-btn .d { font-size: 1.25rem; font-weight: 700; }
.date-btn .w { font-size: .6rem; }
.date-btn.set { border-color: var(--primary); color: var(--primary); }
.date-btn.set .m { background: var(--primary-fill); color: #fff; width: 100%; text-align: center; border-radius: 6px 6px 0 0; padding: 2px 0; }
.date-btn:hover { background: var(--primary-soft); border-color: var(--primary); }
/* The date box (public/dates.js): one button reading 'Fri, 27 Nov 2026' that opens the calendar; the typed box
   under it stays in the form (hidden) and comes forward with 'Type it instead', the button then only its icon. */
.date-wrap.face-mode > input[type=text] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; min-height: 0; opacity: 0; pointer-events: none; }
.date-wrap.face-mode.typing > input[type=text] { position: static; opacity: 1; pointer-events: auto; flex: 1; width: auto; height: auto; min-height: 56px; }
.date-face { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; border: 1.5px solid var(--input-border); border-radius: 12px;
  background: var(--field, var(--card)); box-shadow: var(--well); color: var(--text); font: inherit; font-size: 1.05rem; text-align: left; cursor: pointer; }
.date-face .ic { flex: none; width: 22px; height: 22px; margin: 0; color: var(--primary); }
.date-face .df-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-face .df-v.empty { color: var(--muted); }
.date-face:hover { border-color: var(--primary); }
.date-face:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.date-face.bad { border-color: var(--err); }
.date-wrap.typing .date-face { flex: none; width: 56px; justify-content: center; padding: 0; }
.date-wrap.typing .df-v { display: none; }
.dp-foot .dp-type { white-space: nowrap; border: 0; background: none; padding: 0 4px; font: inherit; font-size: .92rem; font-weight: 600; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pp-dates-in .date-face { min-height: 40px; padding: 4px 8px; font-size: .95rem; }
.pp-dates-in .date-wrap.typing > input[type=text] { min-height: 40px; }
.role-cell { display: flex; flex-direction: column; gap: 6px; }
.role-cell select, .role-cell input { min-height: 48px; padding: 8px 10px; }
/* ---- ceremonies & auxiliary events ---- */
.ceremonies { list-style: none; padding: 0; margin: 6px 0; border-left: 3px solid var(--border); }
.ceremonies li { padding: 2px 0 2px 10px; font-size: .95rem; }
.ceremonies .t { display: inline-block; min-width: 72px; font-weight: 600; color: var(--muted); font-size: .85rem; }
.ceremonies .cer-remove { display: inline; margin-left: 4px; }
.ceremonies .cer-remove .btn { min-height: 0; padding: 0 6px; font-size: 1.1rem; line-height: 1; text-decoration: none; }
.remove-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.cal-item.function.aux { background: var(--card); border-left-style: dashed; }
.cal-item.function .c { margin-top: 3px; font-size: .7rem; color: var(--text); border-top: 1px dashed var(--border); padding-top: 2px; }
/* ---- time fields (hh:mm + AM/PM) ---- */
.time-wrap { position: relative; display: flex; align-items: stretch; gap: 8px; }
.time-wrap .time-text { flex: 1; min-width: 0; }
.time-wrap .ampm-seg { flex: none; margin: 0; align-items: stretch; overflow: visible; }
.time-wrap .ampm-seg > button { flex: none; min-width: 52px; padding: 0 12px; font-size: 1rem; }
.time-native { position: absolute; left: 0; top: 100%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* ---- dress colours ---- */
.dress { width: 1.3em; height: 1.3em; vertical-align: -0.3em; margin-right: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.swatches label { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 6px; cursor: pointer; font-size: .9rem; background: var(--card); }
.swatches label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.swatches input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatches .sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); flex: none; }
.custom-colour { display: flex; align-items: center; gap: 8px 10px; margin-top: 6px; flex-wrap: wrap; }
.custom-colour input[type=text] { width: 14em; margin: 0; }
.custom-colour input[type=color] { width: 56px; height: 44px; padding: 2px; border: 2px solid var(--border); border-radius: 8px; background: var(--card); }
.time-mode { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.time-mode label { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--border); border-radius: 999px; padding: 6px 14px; cursor: pointer; background: var(--card); font-weight: 600; }
.time-mode label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.time-mode input { position: absolute; opacity: 0; width: 0; height: 0; }
.cal-item.function.approx { background-image: repeating-linear-gradient(135deg, transparent 0 6px, var(--hatch) 6px 8px); }
/* ---- page transitions ---- */
/* Sequence: old page exits (0-160ms) while the shared card + heading glide (0-340ms); new page enters after (100-360ms). */
@keyframes vt-fade-out { to { opacity: 0; transform: translateY(-10px) scale(.985); } }
@keyframes vt-slide-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes vt-slide-out { to { opacity: 0; transform: translateX(40px); } }
@keyframes vt-fade-in { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes vt-shared-out { 0% { opacity: 1; } 25% { opacity: 1; } 65% { opacity: 0; } 100% { opacity: 0; } }
@keyframes vt-shared-in { 0% { opacity: 0; } 25% { opacity: 0; } 65% { opacity: 1; } 100% { opacity: 1; } }
@keyframes card-arrive { 0% { box-shadow: 0 0 0 0 rgba(122,31,61,0); } 30% { box-shadow: 0 0 0 4px rgba(122,31,61,.35); } 100% { box-shadow: 0 0 0 0 rgba(122,31,61,0); } }
::view-transition-old(root) { animation: vt-fade-out .16s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: vt-slide-in .26s cubic-bezier(.2,.8,.2,1) .10s both; }
html[data-vt="back"]::view-transition-old(root) { animation: vt-slide-out .18s cubic-bezier(.4,0,1,1) both; }
html[data-vt="back"]::view-transition-new(root) { animation: vt-fade-in .26s cubic-bezier(.2,.8,.2,1) .10s both; }
::view-transition-group(card), ::view-transition-group(heading) { animation-duration: .34s; animation-timing-function: cubic-bezier(.2,.8,.2,1); z-index: 2; }
::view-transition-image-pair(card), ::view-transition-image-pair(heading) { isolation: auto; }
::view-transition-old(card), ::view-transition-old(heading) { animation: vt-shared-out .34s linear both; mix-blend-mode: normal; }
::view-transition-new(card), ::view-transition-new(heading) { animation: vt-shared-in .34s linear both; mix-blend-mode: normal; }
::view-transition-group(card) { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-sizing: border-box; }
::view-transition-image-pair(card) { border-radius: var(--radius); overflow: hidden; }
::view-transition-old(card), ::view-transition-new(card) { height: 100%; object-fit: cover; object-position: top left; }
.vt-flat { border-color: transparent !important; box-shadow: none !important; outline: none !important; }
::view-transition-old(heading), ::view-transition-new(heading) { height: 100%; object-fit: contain; object-position: left center; }
::view-transition-group(tools) { animation: none; }
::view-transition-old(tools) { animation: vt-slide-out .20s cubic-bezier(.4,0,1,1) both; }
.card.arrived { animation: card-arrive .9s ease-out .4s both; }
.tools { margin-left: 10px; display: inline-flex; gap: 6px; vertical-align: middle; }
.stat.program { text-align: left; position: relative; display: block; }
.stat.program .edit { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); background: var(--card); border: 1px solid var(--border); }
.stat.program .edit:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.stat.program .edit .ic { margin: 0; width: 1em; height: 1em; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root), ::view-transition-group(*) { animation: none !important; } }
.back-arrow { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--border); color: var(--primary); background: var(--card); text-decoration: none; margin-right: 10px; vertical-align: middle; }
.back-arrow:hover { background: var(--primary-soft); border-color: var(--primary); }
.back-arrow .ic { margin: 0; width: 1.2em; height: 1.2em; }
.pill.private { background: var(--warn-soft); color: var(--warn); }
/* ---- tasks ---- */
.task { display: flex; gap: 14px; align-items: flex-start; }
.task .tick { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary); background: var(--card); color: var(--primary); font-size: 1.1rem; font-weight: 700; cursor: pointer; flex: none; }
.task.done { opacity: .6; }
.task.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.task .body { flex: 1; min-width: 0; }
/* ---- rooms ---- */
.roomtype { border-top: 1px solid var(--border); padding: 8px 0; }
.roomnums { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.roomnum { border: 1px solid var(--border); background: var(--card); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: .85rem; cursor: pointer; }
/* Not available for guests (rooms.blocked): a big ✕ from corner to corner, on the room numbers, the layout's rooms
   and their legend. */
:root { --x-line: color-mix(in srgb, var(--err) 70%, transparent); }
.roomnum.blocked, .pitem.blocked, .plan-legend .lg.blocked, .lg.blocked {
  background-color: var(--card);
  background-image: linear-gradient(to top right, transparent calc(50% - 1px), var(--x-line) calc(50% - 1px), var(--x-line) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--x-line) calc(50% - 1px), var(--x-line) calc(50% + 1px), transparent calc(50% + 1px));
  color: var(--muted); border-color: var(--x-line); }
.roomnum.x-sample { display: inline-block; cursor: default; padding: 0 6px; font-size: .78rem; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* A room number's menu (views/admin/stay.ejs). */
.roomchip { position: relative; display: inline-block; }
.roomchip > summary { list-style: none; display: inline-block; }
.roomchip > summary::-webkit-details-marker { display: none; }
.roomchip[open] > summary { outline: 2px solid var(--primary); outline-offset: 1px; }
.roomchip-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(330px, calc(100vw - 32px)); box-sizing: border-box; padding: 10px 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.2)); }
.roomchip-pop p { margin: 6px 0; }
.roomchip-pop form { margin: 6px 0 0; }
.roomchip-pop label { margin: 4px 0 2px; }
.roomchip-pop input[type=text] { margin-bottom: 6px; }
.roomchip-more { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); }
.roomnums-hint { margin: 8px 0 0; }
/* A stay to change on Allot rooms (views/admin/allot_board.ejs). */
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 800px) { .row4 { grid-template-columns: 1fr 1fr; } }
.allot-edit { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: var(--card); }
.allot-edit-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.allot-edit .actions { margin-top: 8px; }
.allot-more { margin-top: 12px; }
.allot-more > summary { cursor: pointer; padding: 6px 0; }
.addnums { display: inline-flex; gap: 6px; }
.addnums input { min-height: 40px; padding: 6px 10px; font-size: .9rem; width: 240px; }
table.nights td.over { background: var(--err-soft); color: var(--err); }
table.nights td.full { background: var(--warn-soft); }
tr.focus td { background: var(--primary-soft); }
/* ---- installed app & offline ---- */
.offline-bar { position: sticky; top: 0; z-index: 60; background: var(--warn-soft); color: #6b4000; border-bottom: 2px solid var(--warn); padding: 10px 16px; font-weight: 600; text-align: center; }
.offline-bar.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f1f1f; color: #fff; padding: 14px 18px; border-radius: 12px; z-index: 100; max-width: min(520px, 92vw); box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translate(-50%, 10px); }
html.is-app [data-install], html.is-app [data-install-wrap] { display: none !important; }
.install-now { display: none; }
html.can-install .install-now { display: block; }
.install-mine .install-block h3 { margin-top: 0; }
.install-others { margin-top: 6px; }
.install-others-in { padding: 0 14px 6px; }
.install-others-in .install-block { box-shadow: none; border: 1px solid var(--line); }
.install-block ol li { margin: 6px 0; font-size: 1.05rem; }
@media (display-mode: standalone) { .topbar { padding-top: env(safe-area-inset-top); } }
/* ---- goods & gifts ---- */
.tabs .count { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--warn); color: #fff; font-size: .75rem; line-height: 1.6; text-align: center; margin-left: 4px; }
.bar { height: 8px; background: var(--bar); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.small-bar { height: 5px; margin: 4px 0 8px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.group-head h3 { margin: 0; }
.status-select { min-height: 40px; padding: 4px 8px; font-size: .9rem; }
tr.st-bought td, tr.st-packed td, tr.st-at_venue td, tr.st-given td { background: var(--ok-tint); }
tr.st-ordered td { background: var(--warn-tint); }
details.card > summary { cursor: pointer; list-style: none; font-size: 1.05rem; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: '▸ '; color: var(--primary); }
details.card[open] > summary::before { content: '▾ '; }
.combo-new { margin-top: 6px; }
tr.subhead td { background: var(--head); font-weight: 700; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 10px; }
.tone-sw { width: 34px; height: 18px; border-radius: 9px; border: 1px solid rgba(0,0,0,.2); flex: none; }
/* ---- catering, host family, duplicates ---- */
.meal-row { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); align-items: start; }
.meal-row .big { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
@media (max-width: 760px) { .meal-row { grid-template-columns: 1fr; } }
.meal-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.meal-pill { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: 10px; border: 2px solid var(--border); text-decoration: none; color: var(--text); background: var(--card); }
.meal-pill.st-within { border-color: var(--ok); background: var(--ok-soft); }
.meal-pill.st-tight { border-color: var(--warn); background: var(--warn-soft); }
.meal-pill.st-short { border-color: var(--err); background: var(--err-soft); }
.text-err { color: var(--err); }
.warn-box { border: 2px solid var(--warn); background: var(--warn-tint); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.warn-box h3 { margin-top: 0; }
.similar-row { margin: 6px 0; }
.warn-btn { border-color: var(--warn); color: #8a5300; }
.tabs .count.grey { background: #8a8a8a; }
.dupe-head { margin-bottom: 8px; }
.dupe-side { padding: 6px 0; }
/* ---- invitations ---- */
.pill.invited { background: var(--info-soft); color: var(--info); }
.bulk-bar { position: sticky; bottom: 0; z-index: 30; border: 2px solid var(--primary); box-shadow: 0 -6px 20px rgba(0,0,0,.12); }
.bulk-head { margin-bottom: 4px; }
.log-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.funnel { display: flex; flex-wrap: wrap; gap: 8px; }
.f-step { flex: 1 1 130px; text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--card); font-size: .9rem; }
.f-step .n { font-size: 1.4rem; font-weight: 700; color: var(--primary); display: block; }
.f-step.warn .n { color: var(--warn); }
.f-step:hover { border-color: var(--primary); }
/* ---- people, groups, folds ---- */
.filters2 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 760px) { .filters2 { grid-template-columns: 1fr 1fr; } }
#search, #ps-search { font-size: 1.1rem; }
.bulk-actions { margin-bottom: 8px; }
.gpick { position: relative; }
.gpick-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.gchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--primary-soft); border: 2px solid var(--primary); color: var(--primary); font-weight: 600; font-size: .95rem; }
.gchip .ic { margin: 0; width: 1.05em; height: 1.05em; }
.gchip button { border: 0; background: none; color: var(--primary); font-size: 1.1rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.gchip.static { padding: 4px 12px; background: var(--card); border-color: var(--border); color: var(--text); font-weight: 500; }
.gpick-list { position: absolute; left: 0; right: 0; z-index: 20; background: var(--card); border: 2px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 300px; overflow-y: auto; margin-top: 4px; }
.gopt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--border); font: inherit; text-align: left; cursor: pointer; }
.gopt .ic { margin: 0; color: var(--primary); width: 1.2em; height: 1.2em; }
.gopt small { color: var(--muted); }
.gopt:hover, .gopt.on { background: var(--primary-soft); }
.gopt.new { color: var(--primary); font-weight: 600; }
.gopt.picked { background: var(--primary-soft); font-weight: 600; }
.gopt.picked:hover, .gopt.picked.on { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.gopt > span { flex: 1 1 auto; min-width: 0; }
.gopt-tick { flex: none; color: var(--primary); font-size: 1.1em; }
.grp { display: inline-flex; align-items: center; gap: 4px; }
.grp .ic { margin: 0; width: 1em; height: 1em; }
details.fold { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); margin: 14px 0; }
details.fold > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '▸'; margin-left: auto; color: var(--primary); }
details.fold[open] > summary::after { content: '▾'; }
/* The Payments page's How it was paid (views/admin/budget_payments.ejs): a card per method, folded until opened. */
.how-fold > summary .how-names { font-weight: 500; }
.how-fold .how-cards { margin: 0; padding: 0 14px 14px; }
details.fold > fieldset { border: 0; margin: 0; padding-top: 0; }
/* ---- duplicate pairs ---- */
.dupe-pair { background: var(--card); border: 2px solid var(--border); border-left: 8px solid var(--warn); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 28px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.dupe-pair.likely { border-left-color: var(--err); }
.dupe-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.dupe-num { font-weight: 700; color: var(--primary); }
.dupe-body { display: flex; flex-direction: column; align-items: stretch; background: var(--soft); border-radius: 10px; padding: 10px; }
.dupe-person { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); }
.dupe-person:hover { border-color: var(--primary); }
.dupe-name { font-size: 1.15rem; font-weight: 700; }
.dupe-name mark { background: #ffe8a3; color: inherit; border-radius: 4px; padding: 0 2px; }
.dupe-open { color: var(--primary); }
.dupe-vs { text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--warn); line-height: 1.4; }
.log-add { margin-top: 12px; padding-top: 4px; border-top: 1px dashed var(--border); }
.f-step .n { display: inline; margin-right: 4px; }
.f-step > .small.muted:first-child { display: block; }
.card-people { margin-top: 10px; color: var(--text); }
.count-tile .l.top { font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.count-tile .l.top { min-height: 2.8em; display: flex; align-items: center; justify-content: center; line-height: 1.3; }
/* ---- function status chips & meal editing ---- */
.fchips { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 10px; }
.fchip { flex: 1 1 auto; text-align: center; white-space: nowrap; text-decoration: none; font-size: .82rem; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; color: var(--text); }
.fchip b { font-size: 1rem; margin-right: 2px; }
.fchip.coming { background: var(--ok-soft); border-color: #b9dfc4; }
.fchip.awaiting { background: var(--info-soft); border-color: #c3d0f2; }
.fchip.none { background: var(--soft2); border-color: #e0d9cc; color: var(--muted); }
.fchip.travel { background: var(--warn-soft, #fff6e5); border-color: #ecd3a4; color: var(--warn, #8a5a00); white-space: normal; }
.fchip:hover { filter: brightness(.95); border-color: var(--primary); }
@media (max-width: 420px) { .fchips { flex-wrap: wrap; } }
.meal-edit { border-top: 1px solid var(--border); padding: 10px 0; }
.meal-edit-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.meal-edit-row { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr .8fr; gap: 10px; }
.meal-edit-row input, .meal-edit-row select { min-height: 46px; padding: 8px 10px; }
@media (max-width: 700px) { .meal-edit-row { grid-template-columns: 1fr 1fr; } }
.fchips-wide { max-width: 520px; }
/* "Prepare for up to N" under a function's tiles (views/partials/fn_prep.ejs). */
.fn-prep { display: block; margin-top: 8px; padding: 6px 10px; border-radius: 8px; border: 1px dashed var(--border); color: var(--text); text-decoration: none; font-size: .88rem; }
.fn-prep b { font-size: 1.05rem; }
.fn-prep:hover { border-color: var(--primary); }
/* A number split by side at a wedding (views/partials/side_split.ejs): under a tile's number, or after a line. */
.side-split { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; font-size: .74rem; font-weight: 500; opacity: .85; white-space: nowrap; }
.side-split b { font: inherit; font-weight: 700; margin: 0; }
.fn-prep .side-split, .meal-nums .side-split { display: inline-flex; justify-content: flex-start; }
.fn-prep .side-split { display: flex; margin-top: 2px; }
td.num .side-split { justify-content: flex-end; }
.side-day { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: -4px 0 8px; }
/* A tile's split by side as a thin bar along its foot (views/partials/side_bar.ejs); each side keeps its colour on every
   card, and the dots on the Prepare-for line are the key. */
.fchip { position: relative; overflow: hidden; }
.fchip:has(> .side-bar) { padding-bottom: 10px; }
.side-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; display: flex; gap: 1px; }
.side-bar i, .side-split .sd { background: var(--side-x); }
.side-split .sd { display: inline-block; width: .6em; height: .6em; border-radius: 50%; margin-right: 4px; vertical-align: .05em; }
.t-0 { --side-x: #c2457a; } .t-1 { --side-x: #3c6fd1; } .t-2 { --side-x: #d08a1e; } .t-3 { --side-x: #2e9a8a; } .t-x { --side-x: #8a63c4; } .t-none { --side-x: #a49c92; }
.fchips-wide + .fn-prep { max-width: 520px; box-sizing: border-box; }
/* status chips: three equal columns that always fit inside the card */
.fchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; flex-wrap: initial; }
.fchip { display: flex; flex-direction: column; align-items: center; justify-content: center; white-space: normal; min-width: 0; padding: 6px 4px; line-height: 1.2; overflow-wrap: anywhere; }
.fchip b { font-size: 1.15rem; margin: 0; }
.fchip { font-size: .8rem; }
@media (max-width: 420px) { .fchips { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fchip { overflow-wrap: normal; word-break: normal; hyphens: none; }
.stats:has(> .stat.program) { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* Public front page (views/landing.ejs) */
.landing { max-width: 560px; }
.landing-brand { text-align: center; padding: 28px 0 8px; }
.landing-mark { display: inline-flex; width: 84px; height: 84px; }
.landing-mark .mark { width: 84px; height: 84px; }
.landing-dev { margin: 10px 0 0; color: #E8920C; font-weight: 600; font-size: 1.15rem; letter-spacing: .5px; }
.landing-name { margin: 0; font-size: 2.6rem; line-height: 1.1; color: var(--primary); letter-spacing: -.5px; }
.landing-name span { color: #E8920C; }
.landing-tag { margin: 12px auto 14px; max-width: 30em; color: var(--muted, #5d5257); font-size: 1.05rem; }
.demo-bar { background: #E8920C; color: #2b1a10; text-align: center; font-size: .9rem; font-weight: 600; padding: 6px 12px; }
.demo-bar a { color: inherit; }

/* =====================================================================================
   Theme: D · Blend (Oct 2026). Modern-luxe cards and spacing, a maroon header band with a
   faint jaali pattern, Cormorant serif headings and Inter text. Drafts: docs/design/.
   Body text stays large and high-contrast for older guests.
   ===================================================================================== */
:root {
  /* The canvas and the cards are neutral greys and white; maroon and gold stay on text, lines, icons and controls. */
  --bg: #F4F4F4;
  --card: #FFFFFF;
  --field: #FFFFFF;   /* text boxes and drop-downs: as they were */
  --text: #1F1B1C;
  --muted: #625A5D;
  --primary: #5E1730;
  --primary-dark: #4A1025;
  --primary-soft: #F7EEF1;
  --border: #E4DED6;
  --gold: #B08A4E;
  --gold-soft: #E8B867;
  --tile: #F1F1F1;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(31,27,28,.04), 0 8px 24px rgba(31,27,28,.06);
  --serif: 'Cormorant Garamond', 'Tiro Devanagari Hindi', Georgia, serif;
  --sans: 'Inter', 'Mukta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Named tints (light values); dark mode below swaps them. */
  --primary-fill: #5E1730;
  --ok-soft: #e8f5ec; --err-soft: #fdecea; --warn-soft: #fff4e0; --maybe-soft: #efe9f7; --maybe: #5b3f8c; --info-soft: #e8eefc; --info: #2f4fa0;
  --head: #EEEEEE; --soft: #F8F8F8; --soft2: #F2F2F2; --gold-tint: #fbf1dd; --bar: #eee5da; --today: #fffbf2; --warn-tint: #fffaf0; --ok-tint: #f3faf5;
  --hl: #F7F7F7; --hl-ring: #E9D3DA; --hover: #F8F8F8; --grey-soft: #eee; --none-soft: #eef2ee; --none: #4d5f50;
  --line: #EFEAE3; --input-border: #DCD4CA; --btn-border: #DCCFD3;
  --exp-soft: #e6f1f4; --exp: #22606f;
  --chrome: #5E1730; --grid-line: #e6e0d6; --hatch: rgba(122,31,61,.06);
  color-scheme: light;
}
/* Dark mode: follows the phone or laptop (Auto), or the choice in the menu (public/theme.js sets data-theme). */
:root[data-theme="dark"] {
  --bg: #141414; --card: #1F1F1F; --field: #221b1e; --text: #F1E8E4; --muted: #B3A7A4;
  --primary: #EBA2BA; --primary-dark: #F5C3D3; --primary-soft: #3A2530; --primary-fill: #8C2A4D;
  --border: #3B3135; --gold: #D6B06B; --gold-soft: #9C7A3E; --tile: #2A2A2A;
  --ok: #7FD49A; --err: #FF9D91; --warn: #F0B65A;
  --ok-soft: #1D3226; --err-soft: #3E2222; --warn-soft: #3A2C16; --maybe-soft: #2F2741; --maybe: #CDB7F2; --info-soft: #222B44; --info: #AFC2F6;
  --head: #282828; --soft: #1A1A1A; --soft2: #252525; --gold-tint: #3A2E1B; --bar: #33292C; --today: #2A2219; --warn-tint: #2B2416; --ok-tint: #1C2A21;
  --hl: #262626; --hl-ring: #5A3344; --hover: #282828; --grey-soft: #33292C; --none-soft: #233026; --none: #A9C4AE;
  --line: #31282B; --input-border: #4A3E42; --btn-border: #5A4249;
  --exp-soft: #1C2F35; --exp: #8FCFDD;
  --chrome: #4E1429; --grid-line: #2E2629; --hatch: rgba(235,162,186,.08);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}
body { font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, legend, .event-name { font-family: var(--serif); font-weight: 700; letter-spacing: .2px; font-variant-numeric: lining-nums; color: var(--primary); }
h1 { font-size: 2.1rem; line-height: 1.15; }
h2 { font-size: 1.6rem; margin-top: 1.8rem; }
h3 { font-size: 1.35rem; }
h2 .ic, legend .ic { color: var(--gold); }
a { color: var(--primary); text-underline-offset: 3px; }

/* cards and surfaces: white, borderless, soft shadow */
.card, .stat, .table-wrap, fieldset, details.fold, .dupe-pair, .cal-month, .cal-week-wrap { border: 0; box-shadow: var(--shadow); border-radius: var(--radius); }
fieldset { background: var(--card); }
.card.highlight { background: var(--hl); box-shadow: inset 0 0 0 1.5px var(--hl-ring), var(--shadow); }
.update.pinned { box-shadow: inset 4px 0 0 var(--gold), var(--shadow); }
th, .cal-dayhead, .cal-corner, .cal-dow, tr.subhead td { background: var(--tile); }

/* buttons: pills */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: .1px; }
.btn.secondary { background: var(--card); color: var(--primary); border-color: var(--btn-border); }
.btn.secondary:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn.danger { border-color: #E8C3BF; }
.tabs a { border-width: 1.5px; }

/* form fields */
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time],
input[type=password], input[type=url], input[type=search], select, textarea { border: 1.5px solid var(--input-border); border-radius: 12px; }
input:focus, select:focus, textarea:focus, .btn:focus, a:focus { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.choice label, .swatches label, .time-mode label { border-width: 1.5px; }

/* top bar: maroon with a faint jaali pattern and a fine gold edge */
.topbar {
  background-color: var(--chrome);
  background-image: radial-gradient(circle at 10px 10px, rgba(255,214,150,.12) 1.6px, transparent 2px), radial-gradient(circle at 30px 30px, rgba(255,214,150,.07) 1.6px, transparent 2px);
  background-size: 40px 40px; border-bottom: 2px solid var(--gold-line, #C9A25E);
}
.topbar .brand { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .3px; }
.topbar .sub { font-family: var(--sans); }
.nav a { border-radius: 999px; }

/* maroon header band (views/partials/hero.ejs) */
.hero {
  position: relative; overflow: hidden; text-align: center; color: #FFF7EC; padding: 34px 20px 36px;
  background-color: var(--chrome);
  background-image: radial-gradient(circle at 10px 10px, rgba(255,214,150,.14) 2px, transparent 2.5px), radial-gradient(circle at 30px 30px, rgba(255,214,150,.08) 2px, transparent 2.5px);
  background-size: 40px 40px; border-bottom: 2px solid var(--gold-line, #C9A25E);
}
.hero.has-photo { background-image: linear-gradient(var(--hero-tint-a, rgba(74,16,37,.55)), var(--hero-tint-b, rgba(74,16,37,.88))), var(--hero-photo); background-size: cover; background-position: center 30%; padding: 70px 20px 40px; }
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero-eyebrow { margin: 0 0 6px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--gold-soft); }
.hero-title { margin: 0; color: #FFF7EC; font-size: 2.5rem; line-height: 1.12; }
.hero-sub { margin: 10px 0 0; color: #EFD9C6; }
.hero-sub a { color: var(--gold-soft); }
/* The countdown in the header band (views/partials/countdown.ejs): four numbers that tick. */
.countdown { margin: 18px auto 0; }
.cd-to { margin: 0 0 8px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--gold-soft); overflow-wrap: anywhere; }
.cd-tiles { display: flex; justify-content: center; gap: 8px; }
.cd-tile { flex: 0 1 78px; min-width: 0; padding: 8px 4px 7px; border-radius: 12px; border: 1px solid rgba(232,184,103,.38); background: rgba(255,247,236,.09); }
.cd-n { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1.05; color: #FFF7EC; font-variant-numeric: lining-nums tabular-nums; }
.cd-w { display: block; margin-top: 2px; font-size: .68rem; letter-spacing: .06em; color: #EFD9C6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero.has-photo .cd-tile { background: rgba(40,8,20,.42); }
@media (max-width: 380px) { .cd-tiles { gap: 6px; } .cd-n { font-size: 1.6rem; } }
@media print { .countdown { display: none; } }
/* On the organizers' dashboard the header reads from the left: the numbers under the dates on a phone, on the right of the band on a wide screen. */
.cd-tile { text-align: center; }
body.admin .hero .cd-tiles { justify-content: flex-start; }
@media (min-width: 860px) {
  body.admin .hero-inner:has(> .countdown[data-countdown]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; align-items: center; }
  body.admin .hero-inner:has(> .countdown[data-countdown]) > * { grid-column: 1; }
  /* kept clear of the flourish in the band's corner, which sits beside the text until the screen is wider than it */
  body.admin .hero-inner > .countdown[data-countdown] { grid-column: 2; grid-row: 1 / span 3; margin: 0 clamp(0px, calc(130px - (100vw - 1240px) / 2), 130px) 0 0; text-align: center; }
  body.admin .hero-inner > .countdown[data-countdown] .cd-tiles { justify-content: center; }
  body.admin .hero-inner > .countdown[data-countdown] .cd-tile { flex: 0 0 84px; }
}
/* The small one in the organizers' top bar: "86d 04:27:53"; on a phone "86d", or "04:27" on the last day. */
.topbar .top-cd { flex: none; display: inline-flex; align-items: baseline; gap: 6px; margin-right: 4px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(232,184,103,.45); background: rgba(255,247,236,.08);
  color: #FFF7EC; font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; line-height: 1.3; }
.topbar .top-cd:hover { background: rgba(255,255,255,.16); }
.topbar .top-cd[hidden] { display: none; }
.top-cd.cd-last-day .top-cd-d { display: none; }
@media (max-width: 640px) {
  .topbar .top-cd { padding: 4px 8px; margin: 0 2px 0 4px; font-size: .78rem; }
  .top-cd:not(.cd-last-day) .top-cd-t, .top-cd-s { display: none; }
  /* room for it on a phone: light and dark is in the menu too */
  .topbar .inner:has(.top-cd:not([hidden])) .theme-flip { display: none; }
}
@media (max-width: 380px) { .topbar .inner:has(.top-cd:not([hidden])) .brand { font-size: 1.2rem; } .topbar .top-cd.cd-last-day { padding: 4px 5px; margin-left: 2px; } }
@media (max-width: 359px) { .topbar .top-cd { display: none; } .topbar .inner:has(.top-cd) .theme-flip { display: inline-flex; } .topbar .inner:has(.top-cd) .brand { font-size: 1.35rem; } }
.hero-orn { position: absolute; top: 0; width: 120px; height: 120px; color: rgba(232,184,103,.55); pointer-events: none; }
.hero-orn.tl { left: 0; }
.hero-orn.tr { right: 0; transform: scaleX(-1); }
.hero-orn .orn { width: 100%; height: 100%; }
body.admin .hero { text-align: left; }
body.admin .hero .hero-orn.tl { display: none; }
body.admin .hero-title { font-size: 2.2rem; }
@media (max-width: 700px) {
  .hero { padding: 28px 16px 30px; }
  .hero-title { font-size: 2rem; }
  .hero-orn { width: 84px; height: 84px; }
}

/* invitation: welcome, portraits, divider, gallery */
.guest-welcome { text-align: center; padding: 18px 8px 0; }
.guest-welcome .welcome { font-size: 1.15rem; margin: 0; }
.divider { color: var(--gold); margin: 14px auto 6px; width: min(260px, 80%); }
.divider .orn { width: 100%; height: auto; display: block; }
.portraits { display: flex; justify-content: center; align-items: flex-start; gap: 14px; margin: -46px auto 0; position: relative; padding: 0 16px; }
.portrait { margin: 0; text-align: center; width: 132px; }
.portrait img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--gold-line, #C9A25E), 0 8px 20px rgba(31,27,28,.18); background: var(--tile); }
.portrait figcaption { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--primary); margin-top: 6px; line-height: 1.2; }
.portraits .amp { font-family: var(--serif); font-size: 2rem; color: var(--gold); align-self: center; margin-top: 30px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gallery a { display: block; text-decoration: none; color: var(--muted); font-size: .85rem; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; box-shadow: var(--shadow); }
.gallery a span { display: block; margin-top: 4px; }
.gallery.admin { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.gallery.admin .g-item img { margin-bottom: 6px; }
.gallery.admin form { display: flex; gap: 6px; margin-top: 6px; }
.gallery.admin input { min-height: 42px; padding: 6px 10px; font-size: .9rem; }
.photo-preview.wide { width: 100%; max-height: 260px; object-fit: cover; border-radius: 14px; display: block; margin-bottom: 10px; }
.photo-preview.round { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 6px; box-shadow: 0 0 0 2px var(--gold-line, #C9A25E); }
.portrait-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.portrait-grid .card { margin-bottom: 0; }
.upload-status { font-size: .9rem; }

/* programme cards: beige date tile with serif numerals */
.fn .date { background: var(--tile); color: var(--primary); border-radius: 14px; }
.fn .date .d { font-family: var(--serif); font-size: 2.1rem; font-variant-numeric: lining-nums; }
.fn .date .m { color: var(--gold); font-weight: 700; letter-spacing: .14em; font-size: .78rem; }
.fn .date .w { color: var(--muted); }
.fn h3 { font-size: 1.5rem; }
.fn .time { font-weight: 600; }
.ceremonies { border-left-color: #E8DCC8; }

/* numbers and tiles */
.stat .n, .f-step .n, .meal-row .big, .fchip b { font-family: var(--serif); font-variant-numeric: lining-nums; }
.stat .n { font-size: 2.5rem; color: var(--primary); }
.stat .l { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 600; }
.count-tile .l.top { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.fchip { border-radius: 12px; }
.fchip b { font-size: 1.35rem; }
.pill { font-weight: 600; }

/* menu drawer */
.drawer-head { font-family: var(--serif); font-size: 1.25rem; }
.drawer a { font-weight: 500; }
.drawer .ic { color: var(--gold); }

/* front page */
.landing-hero { padding-bottom: 40px; padding-top: 72px; }
.landing-top { position: absolute; top: 14px; right: 48px; left: 16px; z-index: 2; display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; }
.landing-top .lt-link { color: #EFD9C6; font-weight: 600; text-decoration: none; margin-right: 6px; }
.landing-top .lt-link:hover { color: #FFF7EC; text-decoration: underline; }
.landing-top .lt-login { margin-left: 10px; color: #FFF7EC; }
@media (max-width: 480px) { .landing-hero { padding-top: 64px; } }   /* "Have an invitation?" on its own line above Log in and Sign up */
.landing-hero .landing-mark { display: inline-flex; width: 88px; height: 88px; border-radius: 26px; background: var(--soft); align-items: center; justify-content: center; box-shadow: 0 0 0 2px #C9A25E; }
.landing-hero .landing-mark .mark { width: 74px; height: 74px; }
.landing-hero .landing-dev { color: var(--gold-soft); font-family: 'Tiro Devanagari Hindi', var(--serif); margin: 12px 0 0; }
.landing-hero .landing-name { font-family: var(--serif); color: #FFF7EC; font-size: 3.4rem; margin: 0; letter-spacing: .3px; }
.landing-hero .landing-name span { color: var(--gold-soft); }
.landing-hero .soon { display: inline-block; margin: 14px 0 0; padding: 4px 14px; border: 1px solid rgba(232,184,103,.6); border-radius: 999px; color: var(--gold-soft); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; }
.landing { padding-top: 22px; }
.back-arrow { border-radius: 999px; border-width: 1.5px; }
.btn, .tools, .pill, .menu-btn, input, select, textarea { font-family: var(--sans); }
.stat.program > a > div:first-child strong { font-family: var(--serif); font-size: 1.4rem; color: var(--primary); letter-spacing: .2px; }
body.admin .hero-inner { max-width: 1208px; }

/* ---- plain rows (fewer boxes): one white surface, items divided by hairlines ---- */
.rows { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.row-item:last-child { border-bottom: 0; }
a.row-item:hover, .row-item a.row-main:hover .row-title { background: var(--hover); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
a.row-item.row-main { flex-direction: row; align-items: center; }
a.row-item.row-main .row-title, a.row-item.row-main .row-sub { display: block; }
a.row-item.row-main > .row-title { flex: 1; }
.row-title { font-weight: 600; }
.row-sub { color: var(--muted); font-size: .9rem; }
a.row-item.row-main { flex-wrap: wrap; }
a.row-item.row-main .row-sub { flex-basis: 100%; order: 3; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); border: 1.5px solid #DCCFD3; }
.icon-btn .ic { margin: 0; }
.h-sum { font-family: var(--sans); font-size: .95rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.checklist-offer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.checklist-offer .ic { color: var(--gold); }
.tag-text { font-family: var(--serif); font-size: 1.3rem; color: var(--primary); overflow-wrap: anywhere; }
.hashtag-line { margin: 10px 0 0; color: var(--muted); }
.hashtag-line strong { color: var(--primary); font-family: var(--serif); font-size: 1.2rem; }
.slug-field { display: flex; align-items: center; gap: 6px; }
.slug-field input { flex: 1; min-width: 0; }

/* ---- planning hub (dashboard): icon + label, no boxes, in the spirit of a quiet index page ---- */
.hub { margin: 22px 0 8px; }
.hub-title { margin: 0 0 12px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; }
.hub-item { display: flex; align-items: center; gap: 14px; padding: 12px 6px; text-decoration: none; color: var(--text); border-radius: 12px; }
.hub-item:hover { background: var(--card); }
.hub-item .ic { width: 34px; height: 34px; margin: 0; color: var(--text); flex: none; stroke-width: 1.6; }
.hub-item:hover .ic { color: var(--primary); }
.hub-label { display: block; font-weight: 600; font-size: 1.05rem; }
.hub-sub { display: block; color: var(--muted); font-size: .85rem; line-height: 1.3; }
/* the less-used sections, folded under a name and the list of what is inside */
.hub-group { border-top: 1px solid var(--border); }
.hub-group:last-of-type { border-bottom: 1px solid var(--border); }
.hub-group > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 14px 6px; min-height: 56px; }
.hub-group > summary::-webkit-details-marker { display: none; }
.hub-group > summary::before { content: '▸'; color: var(--primary); width: 1em; }
.hub-group[open] > summary::before { content: '▾'; }
.hub-group-name { font-weight: 700; font-size: 1.05rem; }
.hub-group-list { color: var(--muted); font-size: .85rem; flex-basis: 100%; padding-left: calc(1rem + 12px); }
.hub-group > .hub-grid { padding: 0 0 10px; }
.hub > .hub-grid { margin-bottom: 10px; }
@media (max-width: 700px) {
  .hub-grid { grid-template-columns: 1fr 1fr; gap: 2px 10px; }
  .hub-item { gap: 10px; padding: 10px 2px; }
  .hub-item .ic { width: 28px; height: 28px; }
  .hub-label { font-size: .98rem; }
}
/* thinner, larger, ink-coloured icons beside page headings and menu items */
h2 .ic { width: 1.05em; height: 1.05em; }
.drawer .ic { color: var(--text); }
.drawer a.active .ic { color: var(--primary); }
.fn-ic .ic { color: var(--gold); width: .95em; height: .95em; margin-right: .35em; vertical-align: -0.12em; stroke-width: 1.6; }


/* Join the team (one-time invitation link) */
.container.narrow { max-width: 520px; }
.join-mark { text-align: center; margin: 18px 0 4px; }
.join-mark .mark-tile { width: 60px; height: 60px; margin: 0; }
.join-mark .mark-tile .mark { width: 48px; height: 48px; }
.lead { font-size: 1.12rem; line-height: 1.55; }
input.digits { font-size: 1.6rem; letter-spacing: .4em; max-width: 9em; text-align: center; }

/* Team: invitations and activity */
.invite-new { border-left: 3px solid var(--gold); }
.invite-new .link-box, .link-box { font-family: ui-monospace, monospace; font-size: .85rem; word-break: break-all; background: var(--tile); padding: 10px 12px; border-radius: 8px; margin: 8px 0 12px; }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.invite-row:last-child { border-bottom: 0; }
.invite-row .who { flex: 1 1 220px; }
.activity { list-style: none; padding: 0; margin: 0; }
.activity li { padding: 9px 0; border-bottom: 1px solid var(--border); line-height: 1.45; }
.activity li:last-child { border-bottom: 0; }
.activity .when { display: block; font-size: .85rem; color: var(--muted); }

/* Permissions (Team › a person › Permissions, and Role defaults): one row per section with a switch */
.perm-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.perm-row:last-child { border-bottom: 0; }
.perm-label strong { display: block; }
.perm-label .small { display: block; line-height: 1.35; margin-top: 2px; }
.perm-row.changed .perm-label strong { color: var(--primary); }
.changed-note { color: var(--gold) !important; font-weight: 600; }
.seg { display: flex; margin-top: 10px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg label { flex: 1; margin: 0; position: relative; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--border); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; text-align: center; padding: 10px 4px; font-size: .95rem; font-weight: 500; }
.seg input:checked + span { background: var(--primary-fill); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--gold-soft); outline-offset: -3px; }
@media (min-width: 760px) {
  .perm-row { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: center; }
  .seg { margin-top: 0; }
}

/* "What was sent / How / When / By": one per row on a phone, two per row from tablet width up */
.invite-fields { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.invite-fields > div { min-width: 0; }
.invite-fields select, .invite-fields > div > input { width: 100%; }
@media (min-width: 640px) { .invite-fields { grid-template-columns: 1fr 1fr; } }

/* Calendar on a phone: two days side by side without sideways dragging */
@media (max-width: 600px) {
  .cal-week { grid-template-columns: 46px repeat(var(--cols), minmax(150px, 1fr)); min-width: 0; }
  .cal-week-wrap { margin-left: -8px; margin-right: -8px; }
  .cal-item { font-size: .76rem; }
}

/* Invitations page */
.stage-list { display: flex; flex-direction: column; gap: 4px; }
.stage-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 14px; margin: 0 -14px; border-radius: 12px; text-decoration: none; color: var(--text); }
.stage-row.active { background: var(--primary-soft); }
.stage-row .stage-name { font-weight: 700; }
.stage-row.active .stage-name { color: var(--primary); }
.stage-row .bar { display: block; height: 8px; border-radius: 99px; background: var(--tile); overflow: hidden; }
.stage-row .bar span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.stage-row.active .bar { background: var(--card); }
.stage-row.active .bar span { background: var(--primary-fill); }
@media (min-width: 640px) { .stage-row { grid-template-columns: 160px 1fr 200px; align-items: center; } }
.list-search { margin: 6px 0 8px; }
.invite-table { width: 100%; border-collapse: collapse; }
.invite-table td { padding: 12px 4px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.invite-table tr:last-child td { border-bottom: 0; }
.invite-table td.tick { width: 36px; }
.invite-table td.tick input { width: 24px; height: 24px; min-height: 0; margin: 0; accent-color: var(--primary); }
.invite-table .sub { display: block; margin-top: 2px; }
.invite-table td.acts { text-align: right; white-space: nowrap; }
.invite-table td.acts .btn { margin: 2px 0 2px 4px; }
@media (max-width: 480px) { .invite-table td.acts { white-space: normal; width: 104px; } .invite-table td.acts .btn { display: block; width: 100%; margin: 3px 0; } }
.sticky-actions { position: sticky; bottom: 0; background: var(--card); padding: 10px 0 4px; margin-bottom: 0; }
/* Arrival / departure tags: time on one line; the names show when there is room (and on hover) */
.cal-col .cal-item.arrival .t, .cal-col .cal-item.departure .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-col .cal-item.arrival, .cal-col .cal-item.departure { padding-top: 3px; padding-bottom: 1px; }

/* Function times: "Roughly" tick under each time, and the small switch to part-of-day */
.check.rough { margin: 6px 0 0; font-weight: 500; }
.check.rough input { width: 22px; height: 22px; }
.link-btn { background: none; border: 0; padding: 6px 0; margin: 4px 0 8px; color: var(--primary); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cal-item.function.rough-start { border-top: 2px dashed var(--primary); }

/* Dashboard function cards: date, time and place on top; the guest list line sits with its count boxes
   at the bottom, so it reads as one group and lines up across cards. */
.stat.program { display: flex; flex-direction: column; }
.stat.program .fn-main { display: flex; flex-direction: column; flex: 1; }
.stat.program .fn-list { margin-top: auto; padding-top: 16px; }
.stat.program .fchips { margin-top: 8px; }
.stat.program .fn-main > div:first-child { padding-right: 40px; }   /* long names don't run under the edit button */

/* A heading inside a form section ("Invitations sent" under Invitation & reply) */
.sub-head { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 1.02rem; }
.fchip.doubtful { background: var(--maybe-soft); border-color: #d6c8ec; }
.fchips:has(> a:nth-of-type(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* with a doubtful box: two by two */

/* Invitations: replies row, reply picker on each guest, bulk buttons */
.replies-row { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 14px; }
.reply-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.tick-all { margin: 4px 0 2px; font-weight: 600; }
.pill-select { display: inline-block; width: auto; min-height: 0; margin-top: 6px; padding: 4px 30px 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; border: 1px solid var(--border); background-color: var(--tile); }
.pill-select.yes { background-color: var(--ok-soft); color: var(--ok); }
.pill-select.no { background-color: var(--err-soft); color: var(--err); }
.pill-select.pending { background-color: var(--warn-soft); color: var(--warn); }
.pill-select.maybe { background-color: var(--maybe-soft); color: var(--maybe); }
.sticky-actions { flex-wrap: wrap; align-items: center; gap: 8px; }
.sticky-actions .bulk-label { flex-basis: 100%; }

/* Guest list: compact search row, and column filters opened from the table header */
.filter-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 14px; align-items: end; }
.filter-row > div label { margin-top: 0; }
@media (max-width: 640px) { .filter-row { grid-template-columns: 1fr 1fr; } .filter-row .fr-search { grid-column: 1 / -1; } }
.th-filter { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-height: 0; margin-left: 4px; padding: 0; vertical-align: middle;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.th-filter .ic { width: 16px; height: 16px; margin: 0; }
.th-filter:hover { border-color: var(--border); background: var(--card); }
.th-filter.on { color: #fff; background: var(--primary-fill); border-color: var(--primary-fill); }
.filter-pop { position: fixed; z-index: 60; width: 300px; max-height: min(70vh, 520px); display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(31,27,28,.18); padding: 14px 16px 12px; }
.filter-pop[hidden] { display: none; }
.filter-pop .fp-title { font-size: 1.02rem; margin-bottom: 6px; }
.filter-pop .fp-body { overflow-y: auto; flex: 1; }
.filter-pop .fp-sec { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 10px 0 2px; }
.filter-pop .check { margin: 6px 0; font-weight: 500; }
.filter-pop .check input { width: 22px; height: 22px; }
.filter-pop .fp-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 8px; }
@media (max-width: 640px) { .filter-pop { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; border-radius: 18px 18px 0 0; padding-bottom: 18px; } }
.active-filters { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--text); }
.active-filters .ic { width: 15px; height: 15px; color: var(--primary); }
.active-filters .af { background: var(--primary-soft); border-radius: 999px; padding: 1px 10px; font-size: .9rem; }

/* Sortable table headers (public/tablesort.js) */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover .th-label, th.sortable:hover { color: var(--primary); }
th.sortable .sort-ind { display: inline-block; width: 1em; margin-left: 3px; color: var(--muted); font-size: .8em; }
th.sortable[aria-sort="ascending"] .sort-ind, th.sortable[aria-sort="descending"] .sort-ind { color: var(--primary); }
th.sortable:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: -3px; }

/* Date picker (public/dates.js): opens on the event's month, function days marked, one-tap suggestion */
.dp { position: fixed; z-index: 70; width: 344px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(31,27,28,.2); padding: 12px 14px 14px; }
.dp[hidden] { display: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head strong { font-family: var(--serif); font-size: 1.25rem; color: var(--primary); }
.dp-nav { width: 40px; height: 40px; min-height: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--card); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dp-dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.dp-day { height: 40px; min-height: 0; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; font-size: .95rem; cursor: pointer; color: var(--text); position: relative; }
.dp-day:hover { background: var(--tile); }
.dp-day.fn { display: block; gap: 0; background: var(--gold-tint); border-color: var(--gold-soft); font-weight: 700; }   /* not the programme's .fn card */
.dp-day.fn::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }
.dp-day.today { border-color: var(--primary); }
.dp-day.sel { background: var(--primary-fill); border-color: var(--primary-fill); color: #fff; }
.dp-day.sel::after { background: var(--card); }
.dp-legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.dp-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--gold-tint); border: 1px solid var(--gold-soft); }
.dp-sugg { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dp-sugg .btn { display: block; text-align: left; white-space: normal; }
.dp-sugg .btn span { font-weight: 400; opacity: .85; }
.dp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .dp { left: 0; right: 0; bottom: 0; top: auto; width: auto; border-radius: 18px 18px 0 0; padding-bottom: 20px; } .dp-day { height: 46px; } }

/* The entry you just came back from (public/app.js) */
@keyframes just-edited { from { background-color: var(--gold-tint); } to { background-color: transparent; } }
tr.just-edited > td, .just-edited { animation: just-edited 2.6s ease-out; }
/* An explicit "doesn't need" (no pickup / no drop / no room): clearly marked, but quieter than a need */
.pill.none { background: var(--none-soft); color: var(--none); border: 1px dashed #b9c7bb; }
.need-choice { margin-top: 8px; }
.need-choice .choice { margin-top: 4px; }

/* Hotel form: "Same place as the venue" */
.same-venue { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 14px; margin: -4px 0 6px; background: var(--primary-soft); border-radius: 12px; }
.same-venue .check { margin: 0; }
.same-venue select { width: auto; min-width: 180px; }

/* Appearance switch (menu drawer and the foot of guest pages) */
.theme-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.theme-switch .ts-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.theme-switch .ts-label .ic { width: 20px; height: 20px; }
.theme-switch .ts-opts { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--card); }
.theme-switch button { border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 600; padding: 8px 14px; min-height: 0; cursor: pointer; color: var(--text); }
.theme-switch button + button { border-left: 1px solid var(--border); }
.theme-switch button[aria-pressed="true"] { background: var(--primary-fill); color: #fff; }
.theme-foot { padding-top: 0; padding-bottom: 24px; }
.theme-switch.compact { justify-content: center; padding: 8px 0; }
.theme-switch.compact .ts-label { font-weight: 500; color: var(--muted); font-size: .9rem; }

/* Dark mode details the colour tokens don't cover */
:root[data-theme="dark"] .fchip.coming { border-color: #2F5A3C; }
:root[data-theme="dark"] .fchip.awaiting { border-color: #34436B; }
:root[data-theme="dark"] .fchip.none { border-color: #3B3135; }
:root[data-theme="dark"] .fchip.doubtful { border-color: #4A3D66; }
:root[data-theme="dark"] .fchip.travel { border-color: #5C4A26; }
:root[data-theme="dark"] .pill.none { border-color: #3D5243; }
:root[data-theme="dark"] .portrait img { border-color: var(--card); }
:root[data-theme="dark"] .mark-tile, :root[data-theme="dark"] .landing-hero .landing-mark { background: #F3ECE6; }   /* the marigold logo keeps its light tile */
:root[data-theme="dark"] .dupe-name mark { background: #5A4A1E; }
:root[data-theme="dark"] img:not(.portrait img) { filter: brightness(.92); }
:root[data-theme="dark"] input::placeholder, :root[data-theme="dark"] textarea::placeholder { color: #8C7F7C; }
:root[data-theme="dark"] .offline-bar { color: var(--warn); }
:root[data-theme="dark"] .btn.danger { color: var(--err); }

/* 'Expected (no RSVP)': local guests who weren't asked to reply */
.pill.expected, .pill-select.expected { background-color: var(--exp-soft); color: var(--exp); }
.fchip.expected { background: var(--exp-soft); border-color: #bcdbe3; }
:root[data-theme="dark"] .fchip.expected { border-color: #2E5560; }
.inline-pct { display: flex; align-items: center; gap: 10px; }
.fchips:has(> a:nth-of-type(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Ideas (mood boards) */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 10px; }
.board-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.board-card:hover { border-color: var(--primary); }
.board-cover { display: flex; align-items: center; justify-content: center; height: 150px; background: var(--tile); color: var(--gold); }
.board-cover img { width: 100%; height: 100%; object-fit: cover; }
.board-cover .ic { width: 44px; height: 44px; }
.board-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }
.board-body strong { font-family: var(--serif); font-size: 1.25rem; color: var(--primary); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.idea-add > strong { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.idea-add input[type=file] { padding: 10px; min-height: 0; }
.idea-grid { columns: 3 260px; column-gap: 14px; margin: 6px 0 18px; }
.idea { break-inside: avoid; position: relative; margin-bottom: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.idea.final { border: 2px solid var(--ok); }
.idea.short { border: 2px solid var(--gold); }
.idea-media { display: block; position: relative; background: var(--tile); }
.idea-media img { display: block; width: 100%; height: auto; }
.idea-link { min-height: 120px; text-decoration: none; }
.idea-link .link-site { display: flex; align-items: center; justify-content: center; gap: 8px; height: 120px; color: var(--muted); font-weight: 600; }
.idea-link .link-open { display: block; padding: 8px 12px; font-size: .85rem; font-weight: 600; color: var(--primary); border-top: 1px solid var(--border); background: var(--card); }
.idea-mark { position: absolute; top: 10px; left: 10px; border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 700; background: var(--card); box-shadow: var(--shadow); }
.idea-mark.final { color: var(--ok); }
.idea-mark.short { color: var(--gold); }
.idea-note { margin: 0; padding: 8px 10px 0; }
.idea-note input { min-height: 0; padding: 8px 10px; font-size: .92rem; border-width: 1px; }
.idea-acts { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 10px 4px; }
.idea-acts .inline-form { display: inline-flex; gap: 6px; margin: 0; }
.idea-by { display: block; padding: 0 12px 10px; }
.idea-text { margin: 0; padding: 10px 12px 12px; }
@media (max-width: 560px) { .idea-grid { columns: 2 150px; column-gap: 10px; } .board-cover { height: 120px; } }

/* Invitation messages editor */
.msg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .msg-pair { grid-template-columns: 1fr; } }
.msg-card { margin-bottom: 0; }
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.msg-text { font-size: .98rem; line-height: 1.5; min-height: 220px; }
.msg-text[lang="hi"] { font-family: 'Mukta', var(--sans); font-size: 1.05rem; }
.fill-ins { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.chip { border: 1px solid var(--border); background: var(--tile); color: var(--text); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .82rem; min-height: 0; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.msg-preview summary { cursor: pointer; font-weight: 600; color: var(--primary); margin-top: 8px; }
.msg-preview pre.msg { margin-top: 8px; }

/* Reply reminders */
.remind-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--warn-soft); border: 1.5px solid var(--warn); color: var(--text); text-decoration: none; }
.remind-banner > .ic { width: 26px; height: 26px; color: var(--warn); flex: none; }
.remind-banner > span:first-of-type { flex: 1 1 220px; }
.remind-banner .btn { flex: none; }
.not-reminded { color: var(--warn); font-weight: 600; }

/* Readiness */
.ready-banner { background: var(--err-soft); border-color: var(--err); }
.ready-banner > .ic { color: var(--err); }
.ready-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -4px 0 4px; }
.ready-top p { margin: 0; }
.ready-top .seg { margin: 0; }
.ready-h { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin: 22px 0 8px; }
.ready-h.now { color: var(--err); }
.ready-h.soon { color: var(--warn); }
.ready-h.ok { color: var(--ok); font-size: 1.1rem; margin: 0; }
.ready-ok > summary { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; }
.inset-row.ready-row { border-left: 4px solid transparent; padding-left: 12px; }
.inset-row.ready-row.lvl-now { border-left-color: var(--err); }
.inset-row.ready-row.lvl-soon { border-left-color: var(--warn); }
.inset-row.ready-row.lvl-ok { border-left-color: var(--ok); }
.ready-mark { flex: none; display: inline-flex; color: var(--ok); }
.ready-mark .ic { width: 20px; height: 20px; }
.inset-list .ready-own { color: var(--primary); }
.inset-list .ready-own .ic { color: var(--primary); }

/* Run sheets */
.run-sub { margin-top: -6px; }
.run-eyebrow { margin: 0; }
.run-page h1 { margin-top: 4px; }
.run-time { white-space: nowrap; }
.run-card { padding: 4px 6px; }
.run-list { list-style: none; margin: 0; padding: 0; }
.run-item { display: grid; grid-template-columns: 78px 1fr auto; gap: 4px 12px; align-items: start; padding: 12px 10px; border-bottom: 1px solid var(--border); border-left: 4px solid transparent; }
.run-item:last-child { border-bottom: 0; }
.run-time { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; padding-top: 2px; }
.run-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.run-what { font-size: 1.05rem; }
.run-who { display: inline-flex; align-items: center; gap: 5px; font-size: .92rem; color: var(--text); }
.run-who .ic { width: 16px; height: 16px; color: var(--gold); }
.run-notes { font-size: .9rem; color: var(--muted); }
.run-done { color: var(--ok); font-weight: 600; }
.run-item.done .run-what { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.run-item.now { border-left-color: var(--primary); background: var(--primary-soft); }
.run-item.now .run-time::after { content: 'Now'; display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.run-item.next { border-left-color: var(--gold); }
.run-item.next .run-time::after { content: 'Next'; display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.run-tick { width: 44px; height: 44px; padding: 0; font-size: 1.2rem; justify-content: center; }
.run-edit { grid-column: 2 / -1; }
.run-edit summary { cursor: pointer; color: var(--primary); font-weight: 600; display: inline-block; }
.run-edit form { margin-top: 8px; }
@media (max-width: 560px) { .run-item { grid-template-columns: 62px 1fr auto; gap: 4px 8px; } }
@media print {
  .topbar, .drawer, .no-print, .flash, .back-arrow, .theme-foot, .demo-bar { display: none !important; }
  .run-item { break-inside: avoid; }
  .run-card { border: 0; box-shadow: none; }
}

/* Arrivals desk */
.desk-tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 14px; }
.desk-tally > div { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px 6px; text-align: center; }
.desk-tally b { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--primary); line-height: 1.1; }
.desk-tally span { font-size: .8rem; color: var(--muted); }
.desk-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.desk-card { background: var(--card); border: 1px solid var(--border); border-left: 5px solid var(--gold); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.desk-card.all-done { border-left-color: var(--ok); opacity: .85; }
.desk-top { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: start; }
.desk-time { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.desk-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.desk-who a { display: inline-flex; align-items: center; gap: 4px; }
.desk-who .ic, .desk-driver .ic, .desk-stay .ic { width: 16px; height: 16px; color: var(--gold); }
.desk-driver, .desk-stay { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.desk-driver select { width: auto; min-height: 40px; padding: 6px 10px; font-size: .92rem; }
.desk-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.desk-steps .inline-form { flex: 1 1 0; min-width: 96px; margin: 0; }
.desk-step { width: 100%; min-height: 52px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 8px; }
.desk-step small { font-weight: 500; font-size: .75rem; opacity: .9; }
.desk-step.on { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.desk-name { padding-bottom: 12px; }
@media (max-width: 480px) { .desk-tally b { font-size: 1.5rem; } .desk-top { grid-template-columns: 62px 1fr auto; } }

/* Front page (views/landing.ejs) */
.landing-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.landing-cta .btn.secondary { background: transparent; color: #FFF7EC; border-color: rgba(255,247,236,.6); }
.show { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: center; margin: 40px 0; }
.show.flip { grid-template-columns: 300px 1fr; }
.show.flip .show-text { order: 2; }
.show-text h2 { margin-top: 0; font-size: 1.9rem; }
.show-text p { font-size: 1.08rem; line-height: 1.6; color: var(--text); }
.phone { width: 300px; max-width: 78vw; margin: 0 auto; padding: 10px; border-radius: 38px; background: #1F1B1C; box-shadow: 0 18px 50px rgba(31,27,28,.25); }
.phone img { display: block; width: 100%; height: auto; border-radius: 28px; }
.made-for h2 { font-size: 1.7rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 1.05rem; }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--gold); font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  .show, .show.flip { grid-template-columns: 1fr; gap: 16px; margin: 30px 0; text-align: center; }
  .show.flip .show-text { order: 0; }
  .show-text h2 { font-size: 1.6rem; }
}
.landing.landing-wide { max-width: 980px; }
.landing-wide > .card, .landing-wide > .flash { max-width: 640px; margin-left: auto; margin-right: auto; }
.landing-cta .btn:not(.secondary) { background: var(--gold-soft); border-color: var(--gold-soft); color: #2B1A10; }
.landing-cta .btn:not(.secondary):hover { filter: brightness(1.05); }
:root[data-theme="dark"] .landing-hero .landing-mark { background: #F3ECE6; }

/* English / हिन्दी on the guest pages */
.lang-switch { display: flex; justify-content: flex-end; gap: 6px; margin: 10px 0 4px; }
.lang-switch a { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); background: var(--card); font-weight: 600; font-size: .95rem; }
.lang-switch a.active { background: var(--primary-fill); border-color: var(--primary-fill); color: #fff; }
/* More than three languages: a drop-down instead of a row of links */
.lang-select select { padding: 6px 32px 6px 12px; border: 1.5px solid var(--border); border-radius: 999px; background-color: var(--card); color: var(--text); font-weight: 600; font-size: .95rem; width: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang-choice { flex-wrap: wrap; }
/* Shagun by UPI on the invitation page */
.shagun-list { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; }
.shagun-one { text-align: center; max-width: 260px; flex: 1 1 200px; }
.shagun-qr svg { width: 100%; max-width: 200px; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.shagun-sent { margin-top: 12px; }
.shagun-sent summary { display: inline-flex; list-style: none; cursor: pointer; }
.shagun-sent summary::-webkit-details-marker { display: none; }
/* Tickets and IDs (guest details page, person page) */
.doc-list { list-style: none; padding: 0; margin: 8px 0; }
.doc-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.docs-card { margin: 10px 0; }
.plan-note.warn { border-color: #c77a00; background: #fff6e5; }
.delete-album { margin-top: 10px; }
.delete-album summary { cursor: pointer; }
#select-me { cursor: pointer; }
:lang(hi) body, :lang(hi) input, :lang(hi) textarea, :lang(hi) select, :lang(hi) button { line-height: 1.6; }
/* Spacing letters apart breaks up Devanagari words. */
html:lang(hi) * { letter-spacing: 0 !important; }
html:lang(hi) .cal-hour { white-space: pre-line; font-size: .78rem; line-height: 1.25; }

/* =====================================================================================
   Elevation and touch (Oct 2026). Four layers: the page; resting surfaces (cards); raised
   controls and cards under the pointer; floating parts (top bar, menu, bottom bars, pop-ups,
   toasts). Controls catch light on their top edge, rise a little under the pointer and press in
   when tapped; a chosen option stays pressed in. Only floating parts are frosted glass, so text
   on cards stays solid. Without blur support, or with "reduce transparency" or "more contrast"
   switched on, the glass is solid.
   ===================================================================================== */
:root {
  --e1: 0 1px 2px rgba(31,27,28,.06), 0 2px 8px rgba(31,27,28,.05);
  --e2: 0 1px 3px rgba(31,27,28,.08), 0 8px 20px rgba(31,27,28,.10);
  --e3: 0 2px 6px rgba(31,27,28,.08), 0 14px 36px rgba(31,27,28,.15);
  --e4: 0 4px 10px rgba(31,27,28,.10), 0 28px 64px rgba(31,27,28,.22);
  --rim: inset 0 1px 0 rgba(255,255,255,.9);                                        /* light on the top edge */
  --rim-fill: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -2px 0 rgba(0,0,0,.20);  /* the same on maroon */
  --press: inset 0 2px 5px rgba(31,27,28,.18);
  --well: inset 0 1px 2px rgba(31,27,28,.07);
  --shadow: var(--rim), var(--e1);
  --glass: rgba(255,255,255,.86);
  --glass-edge: rgba(255,255,255,.75);
  --glass-chrome: rgba(94,23,48,.94);
  --blur: saturate(170%) blur(18px);
  --lift: cubic-bezier(.2,.7,.3,1);
}
:root[data-theme="dark"] {
  --e1: 0 1px 2px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.25);
  --e2: 0 1px 3px rgba(0,0,0,.5), 0 8px 22px rgba(0,0,0,.4);
  --e3: 0 2px 6px rgba(0,0,0,.5), 0 16px 40px rgba(0,0,0,.5);
  --e4: 0 4px 12px rgba(0,0,0,.55), 0 30px 70px rgba(0,0,0,.6);
  --rim: inset 0 1px 0 rgba(255,255,255,.06);
  --rim-fill: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.30);
  --press: inset 0 2px 6px rgba(0,0,0,.55);
  --well: inset 0 1px 3px rgba(0,0,0,.35);
  --shadow: var(--rim), var(--e1);
  --glass: rgba(31,31,31,.84);
  --glass-edge: rgba(255,255,255,.08);
  --glass-chrome: rgba(78,20,41,.9);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root, :root[data-theme="dark"] { --glass: var(--card); --glass-chrome: var(--chrome); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root, :root[data-theme="dark"] { --glass: var(--card); --glass-chrome: var(--chrome); --blur: none; }
}

/* controls: raised, pressed in when tapped */
.btn, .tabs a, .choice label, .icon-btn, .dp-nav, .menu-btn, .theme-switch button, input[type=file]::file-selector-button {
  transition: transform .14s var(--lift), box-shadow .14s var(--lift), background-color .15s, border-color .15s;
}
.btn { box-shadow: var(--rim-fill), var(--e1); }
.btn.secondary, .btn.danger, .tabs a, .choice label, .icon-btn, .dp-nav, input[type=file]::file-selector-button { box-shadow: var(--rim), var(--e1); }
.icon-btn { background: var(--card); }
.tabs a.active { box-shadow: var(--rim-fill), var(--e1); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); box-shadow: var(--rim-fill), var(--e2); }
  .btn.secondary:hover, .btn.danger:hover, .tabs a:hover, .icon-btn:hover, .dp-nav:hover, input[type=file]::file-selector-button:hover { transform: translateY(-1px); box-shadow: var(--rim), var(--e2); }
  .choice label:hover { box-shadow: var(--rim), var(--e2); }
}
.btn:active, .btn.secondary:active, .btn.danger:active, .tabs a:active, .icon-btn:active, .dp-nav:active, input[type=file]::file-selector-button:active { transform: translateY(1px); box-shadow: var(--press); }
.choice label:has(input:checked) { box-shadow: var(--press); }
.btn.link, .btn.link:hover, .btn.link:active, .btn:disabled, .btn[disabled] { box-shadow: none; transform: none; }
/* top bar buttons: plain icons in a tight group, a soft round glow under the pointer, pressed in when tapped */
.topbar .menu-btn { border: 0; background: none; border-radius: 999px; min-width: 44px; min-height: 44px; padding: 0 10px; margin: 0; box-shadow: none; }
.topbar .menu-btn .ic { width: 22px; height: 22px; stroke-width: 1.7; }
.topbar .menu-btn:hover { background: rgba(255,255,255,.14); }
.topbar .menu-btn:active { background: rgba(0,0,0,.18); box-shadow: inset 0 2px 5px rgba(0,0,0,.35); }
.topbar .inner { gap: 2px; }
.topbar .nav.primary { margin-right: 14px; }
.topbar .brand { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; }   /* the event's name, cut short with … when the bar is full */
.topbar .brand .mark-tile { flex: none; margin-top: 0; }
.topbar .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .inner > .brand { margin-right: auto; }
.topbar .search-btn.active { background: rgba(255,255,255,.18); }
.set-list .set-theme { padding: 0; }
.set-list .set-theme .theme-switch { flex: 1; padding: 10px 16px; flex-wrap: nowrap; }
.set-list .set-theme .ts-label { font-weight: inherit; }
.set-list .set-theme .ts-label .ic { color: var(--gold); }
.set-list .set-theme .theme-switch button { padding: 7px 11px; }
@media (max-width: 1000px) { .topbar .nav.primary { display: none; } }   /* the page links are in the menu */
/* switches with several options sit in a well; the chosen one stands up out of it */
.seg, .theme-switch .ts-opts { background: var(--tile); box-shadow: var(--well); }
.seg input:checked + span, .theme-switch button[aria-pressed="true"] { box-shadow: var(--rim-fill), var(--e1); border-radius: 999px; }
/* fields are wells */
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time],
input[type=password], input[type=url], input[type=search], select, textarea { box-shadow: var(--well); }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time],
input[type=password], input[type=url], input[type=search], select, textarea { background-color: var(--field, var(--card)); }

/* surfaces you can open lift under the pointer */
.hub-item, .board-card, a.card, .stat.program, a.row-item { transition: transform .18s var(--lift), box-shadow .18s var(--lift), background-color .18s; }
@media (hover: hover) {
  .hub-item:hover { background: var(--card); box-shadow: var(--rim), var(--e2); transform: translateY(-1px); }
  .board-card:hover, a.card:hover, .stat.program:hover { box-shadow: var(--rim), var(--e2); transform: translateY(-2px); }
}
.hub-item:active { transform: none; box-shadow: var(--press); }

/* floating parts: frosted glass */
.topbar { background-color: var(--glass-chrome); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--e2); }
.drawer { background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--e4); border-left: 1px solid var(--glass-edge); }
.drawer-backdrop { background: rgba(31,27,28,.32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.select-bar, .sticky-actions, .suggest, .gpick-list, .filter-pop, .dp {
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge); box-shadow: var(--rim), var(--e3);
}
/* the guest list's action panel holds many buttons over busy rows: solid, but floating */
.bulk-bar { box-shadow: var(--rim), var(--e3); }
/* The bulk bar (guest list, allot rooms): pinned to the foot of the screen, wherever the ticked rows are; a slim line
   ("3 selected · Choose what to do · ✕") until opened, then the actions above it (public/app.js adds the buttons). */
.bulk-bar { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; margin: 0 auto; max-width: 1224px; max-height: 78vh; overflow-y: auto; padding: 10px 14px; }
.bulk-bar:not(.open) > :not(.bulk-head) { display: none; }
.bulk-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.bulk-head .bulk-x { margin-left: auto; }
.bulk-bar.open .bulk-head { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
body:has(.bulk-bar:not([hidden])) .container { padding-bottom: 110px; }
.sticky-actions { padding: 10px 12px; border-radius: 16px; }
.toast { background: rgba(31,27,28,.84); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid rgba(255,255,255,.1); box-shadow: var(--e3); }

@media (prefers-reduced-motion: reduce) {
  .btn, .tabs a, .icon-btn, .dp-nav, .hub-item, .board-card, a.card, .stat.program, input[type=file]::file-selector-button { transform: none !important; transition: none; }
}

/* Light / dark in one tap (views/partials/theme_flip.ejs): the moon in light mode, the sun in dark */
.theme-flip { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.theme-flip .ic { margin: 0; width: 1.3em; height: 1.3em; }
.theme-flip .ic:last-child, :root[data-theme="dark"] .theme-flip .ic:first-child { display: none; }
:root[data-theme="dark"] .theme-flip .ic:last-child { display: block; }

.theme-flip.float {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; z-index: 25; width: 48px; height: 48px; padding: 0;
  border-radius: 50%; border: 1px solid var(--glass-edge); color: var(--primary); background: var(--glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim), var(--e2);
  transition: transform .14s var(--lift), box-shadow .14s var(--lift);
}
.theme-flip.float .ic { width: 24px; height: 24px; stroke-width: 1.8; }
.theme-flip.float:active { transform: translateY(1px); box-shadow: var(--press); }
body:has(.topbar) .theme-flip.float, body:has(.app-bar) .theme-flip.float { display: none; }   /* the top bar has its own */
/* Scrolled down, the corner button steps aside so it never covers a button under it (the foot has the switch too). */
.theme-flip.float { transition: opacity .2s, transform .14s var(--lift), box-shadow .14s var(--lift); }
html.scrolled .theme-flip.float { opacity: 0; pointer-events: none; transform: translateY(-10px); }
/* Pages with neither a top bar nor a header banner: their first lines start below the round button, not under it. */
body:not(:has(.topbar)):not(:has(.hero)) > .container:first-of-type { padding-top: 66px; }
@media print { .theme-flip { display: none !important; } }

/* Guest page: jump links under the welcome, the reply line and −/+ people at the top of "Your travel and stay", finished functions folded */
.jump-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 4px; }
.jump-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; box-shadow: var(--rim), var(--e1); }
.jump-links a:active { box-shadow: var(--press); }
@media (hover: hover) { .jump-links a:hover { color: var(--primary); } }
[id="you"], [id="programme"], [id="updates"], [id="photos"], [id="shagun"], [id="help"], fieldset[id] { scroll-margin-top: 16px; }
body:has(.topbar) [id] { scroll-margin-top: 80px; }
.you-status { margin: 0 0 12px; font-size: 1.1rem; }
.you-status.yes { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.you-status.yes .ic { width: 24px; height: 24px; stroke-width: 2.2; flex: none; }
.stepper { display: inline-flex; align-items: center; gap: 12px; margin: 0; }
/* How many not given yet: a box to type it (views/guest/home.ejs); "These details are correct" under the details. */
.stepper-ask input { width: 90px; margin: 0; text-align: center; }
.confirm-box { margin-top: 14px; padding: 14px; border: 2px solid var(--primary); border-radius: 12px; background: var(--primary-soft, transparent); }
.confirm-box .check { margin: 6px 0 10px; font-size: 1.02rem; }
.confirm-box .small { margin: 8px 0 0; }
.stepper .btn { min-width: 48px; min-height: 48px; padding: 0; font-size: 1.5rem; line-height: 1; border-radius: 999px; }
.stepper output { min-width: 2ch; text-align: center; font-size: 1.35rem; font-weight: 700; }
details.fn-done { background: none; box-shadow: none; margin-top: 18px; }
details.fn-done > summary { padding: 12px 4px; color: var(--muted); }
.stepper-saved { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--ok); font-weight: 600; }
.stepper-saved .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.map-tools { margin-top: 8px; }
details.venue-override { box-shadow: none; border: 1px solid var(--border); }
details.venue-override > summary { font-weight: 600; font-size: 1rem; padding: 10px 14px; }
details.venue-override .opt { font-weight: 400; }
fieldset.address-box { background: none; box-shadow: none; border: 1px solid var(--border); margin: 18px 0; }
/* Tickets and ID, asked for inside "Your travel and stay" and on the details page */
.docs-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 1.1rem; }
.docs-box h3 .ic { color: var(--primary); }
.you-card .docs-box { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.doc-flash { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-weight: 600; }
.doc-flash.ok { color: var(--ok); }
.doc-flash.err { color: var(--err); }
.doc-flash .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.sub-head.first { margin-top: 4px; padding-top: 0; border-top: 0; }
.sub-block { margin-top: 22px; padding-top: 6px; border-top: 1px solid var(--border); }
/* a guest in search: the row opens their details, the button their invitation page */
.search-list .search-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.search-list .search-row:last-of-type { border-bottom: 0; }
.search-list .search-row > a:first-child { flex: 1; min-width: 0; border-bottom: 0; }
.search-list .search-row > .icon-btn { flex: none; margin-right: 10px; }
/* hotel form: name and address taken from the venue are shown, not edited */
form:has(#same-venue:checked) :is(#name, #display_name, #address) { background: var(--grey-soft); color: var(--muted); }
.doc-none { margin: 0 0 6px; color: var(--muted); }
.docs-box h3 .count-chip { font-family: inherit; font-size: .85rem; }
/* the files PIN: four big digits */
input.doc-pin { width: 8.5em; max-width: 100%; font-size: 1.4rem; letter-spacing: .4em; text-align: center; }
.doc-flash[hidden] { display: none; }
.doc-pin-label { margin-top: 12px; }
.doc-pin-hint { margin: 4px 0 0; }
.doc-pin-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-pin-row .doc-pin { margin: 0; }
.doc-unlock { margin: 8px 0 4px; }
.doc-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* ---- guest list: five columns, one card per guest on a phone ---- */
.people-table .who { min-width: 15em; }
.who-name { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; }
.who-name > a { padding-top: 2px; }
.who-links { display: inline-flex; gap: 4px; margin-top: -4px; }
.who-links .icon-btn { width: 30px; height: 30px; min-height: 0; padding: 0; border-width: 1px; }
.who-links .icon-btn .ic { width: 15px; height: 15px; }
/* The bin: at the row's right end; on a phone, the card's top-right corner (away from Share and Open). */
.people-table .rm-col { width: 1%; vertical-align: top; text-align: right; }
.people-table .icon-remove { width: 32px; height: 32px; min-height: 0; padding: 0; border-width: 1px; color: var(--err); }
.people-table .icon-remove .ic { width: 16px; height: 16px; }
.people-table .who > div + div { margin-top: 2px; }
.grp-cell .side { display: block; }
.grp-cell .grp { margin-right: 8px; }
.travel-cell .pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.reply-cell .pill + .small { margin-left: 2px; }
tr.prow[hidden] { display: none !important; }
.people-table .nowrap { white-space: nowrap; }
@media (max-width: 700px) {
  .people-wrap { overflow: visible; background: none; box-shadow: none; border: 0; }
  .people-table, .people-table tbody { display: block; background: none; }
  .people-table thead { display: block; margin-bottom: 10px; }
  .people-table thead tr { display: flex; flex-wrap: wrap; gap: 6px; }
  .people-table th { display: inline-flex; align-items: center; padding: 4px 6px 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: .85rem; }
  .people-table th.pick-col { padding: 4px 10px; }
  .people-table tr.prow { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; margin-bottom: 10px; padding: 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
  .people-table tr.prow td { display: block; grid-column: 2; padding: 2px 0; border: 0; }
  .people-table tr.prow td.pick-col { grid-column: 1; grid-row: 1 / span 6; padding-top: 4px; }
  .people-table tr.prow td:empty { display: none; }
  .people-table tr.prow { position: relative; }
  .people-table tr.prow td.rm-col { position: absolute; top: 8px; right: 8px; width: auto; padding: 0; }
  .people-table tr.prow:has(td.rm-col) td.who { padding-right: 36px; }
  .people-table th.rm-col { display: none; }
  .people-table .who { min-width: 0; padding-bottom: 6px !important; }
  .people-table .grp-cell .side { display: inline; margin-right: 8px; }
  .people-table td[data-label]::before { content: attr(data-label) ': '; color: var(--muted); font-size: .85rem; }
  .people-table .travel-cell br { display: none; }
  .people-table .travel-cell .small { margin-left: 4px; }
}

/* ---- invitation cards ---- */
.cards-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 20px; align-items: start; }
.cards-preview { position: sticky; top: 76px; }
.card-frame { margin: 10px 0 8px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); line-height: 0; }
.cards-preview .card-frame { width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.cards-preview .card-frame svg { max-height: calc(100vh - 290px); min-height: 360px; width: auto; max-width: 100%; }
.card-frame svg, .design-thumb svg, .share-card-thumb svg { width: 100%; height: auto; display: block; }
.design-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.design-tile, .palette-chip { position: relative; }
.design-tile { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 8px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--card); font-weight: 400; }
.design-tile input { position: absolute; opacity: 0; pointer-events: none; }
.design-tile:has(input:checked) { border-color: var(--primary-fill); box-shadow: 0 0 0 2px var(--primary-fill); }
.design-tile:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.design-thumb { border-radius: 6px; overflow: hidden; line-height: 0; margin-bottom: 4px; }
.palette-set { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.palette-set[hidden] { display: none; }
.palette-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px 6px 6px; border: 2px solid var(--border); border-radius: 999px; cursor: pointer; font-weight: 500; background: var(--card); }
.palette-chip input { position: absolute; opacity: 0; pointer-events: none; }
.palette-chip:has(input:checked) { border-color: var(--primary-fill); }
.palette-chip:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.pal-sw { display: inline-flex; align-items: flex-end; justify-content: flex-end; gap: 2px; width: 30px; height: 30px; border-radius: 999px; padding: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.pal-sw span { width: 8px; height: 8px; border-radius: 999px; }
.cards-form fieldset { margin-bottom: 14px; }
.short-input { max-width: 8em; }
.card-fns { display: flex; flex-direction: column; gap: 0; }
.card-fn { padding: 10px 0; border-bottom: 1px solid var(--border); }
.card-fn:last-child { border-bottom: 0; }
.card-fn .check { margin: 0 0 6px; }
.card-fn input[type=text] { margin: 0 0 4px; }
.card-fn .check.small { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.layer-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.layer-head { display: flex; align-items: center; gap: 8px; }
.layer-ic { width: 32px; height: 32px; flex: none; color: var(--muted); }
.layer-ic svg { width: 100%; height: 100%; }
.layer-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; }
.layer-opts select { width: auto; flex: 1 1 200px; margin: 0; }
.layer-size { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1 1 170px; font-weight: 500; }
.layer-size input { flex: 1; min-height: 0; padding: 0; }
.layer-add { display: flex; flex-wrap: wrap; gap: 8px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.sticker-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font: inherit; font-size: .75rem; line-height: 1.2; }
.sticker-grid button:hover { border-color: var(--primary); }
.sticker-grid svg { width: 48px; height: 44px; }
.cards-preview [data-layer] { cursor: grab; touch-action: none; }
.cards-preview [data-layer].dragging { cursor: grabbing; }
.cards-preview .card-svg text { pointer-events: none; }
/* Colours and background (views/admin/look.ejs) */
.look-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 20px; align-items: start; }
@media (max-width: 860px) { .look-layout { grid-template-columns: 1fr; } }
.look-side { position: sticky; top: 76px; }
@media (max-width: 860px) { .look-side { position: static; } }
.look-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.look-theme, .look-pattern { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--card); cursor: pointer; font-weight: 500; }
.look-theme:has(input:checked), .look-pattern:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.look-theme input, .look-pattern input { position: absolute; opacity: 0; pointer-events: none; }
.look-sw { width: 30px; height: 30px; border-radius: 999px; flex: none; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.look-sw span { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 999px; box-shadow: 0 0 0 2px var(--card); }
.look-sw-any { background: conic-gradient(#c62828, #f29a1f, #f2c230, #2e7d32, #1565c0, #6a1b9a, #c62828); }
.look-colours input[type=color] { width: 100%; height: 44px; padding: 2px; border-radius: 10px; }
.look-patterns { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.look-pat { width: 34px; height: 34px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); background-size: 34px 34px; }
.look-preview { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); font-size: .8rem; }
.look-preview .hero { padding: 22px 14px 20px; }
.look-preview .hero-title { font-size: 1.6rem; }
.look-preview .countdown { margin-top: 12px; }
.look-preview .cd-tiles { justify-content: flex-start; gap: 6px; }
.look-preview .cd-tile { flex-basis: 64px; padding: 5px 2px; border-radius: 9px; }
.look-preview .cd-n { font-size: 1.3rem; }
.look-preview .cd-w { font-size: .6rem; letter-spacing: 0; }
.look-preview-body { padding: 4px 14px 14px; }
.look-preview-body h2 { margin-top: .8rem; font-size: 1.2rem; }
.look-preview .card.fn { padding: 10px; }
.look-photo { margin-top: 14px; }
.all-cards { margin-top: 14px; }
.all-cards p { margin-top: 0; }
.share-card { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.share-card-thumb { border-radius: 8px; overflow: hidden; line-height: 0; box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .cards-layout { grid-template-columns: 1fr; }
  .cards-preview { position: static; order: -1; }
  .cards-preview .card-frame { max-width: 420px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 700px) {
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-card { grid-template-columns: 100px 1fr; }
}

/* ---- dashboard headcounts: name and date in one cell, the open counts in another, a bar ---- */
.hc-table .hc-what { min-width: 11em; }
.hc-table .hc-what > span, .hc-table .hc-parts { display: block; }
.hc-table .hc-parts { margin-top: 2px; }
.hc-table .hc-big { font-size: 1.25rem; font-weight: 700; }
.hc-table .hc-travel span { display: block; white-space: nowrap; }
.hc-bar { display: flex !important; height: 6px; margin-top: 8px; border-radius: 999px; overflow: hidden; background: var(--grey-soft); max-width: 16em; }
.hc-bar span { display: block; height: 100%; }
.hc-bar .hc-yes { background: var(--ok); }
.hc-bar .hc-open { background: var(--warn); opacity: .45; }
.hc-bar .hc-no { background: var(--err); opacity: .5; }
@media (max-width: 700px) {
  .hc-table, .hc-table tbody { display: block; }
  .hc-table thead { display: none; }
  .hc-table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 16px; padding: 12px; border-bottom: 1px solid var(--border); }
  .hc-table tr:last-child { border-bottom: 0; }
  .hc-table td { display: block; padding: 0; border: 0; text-align: left; }
  .hc-table td.hc-what { grid-column: 1 / -1; min-width: 0; margin-bottom: 4px; }
  .hc-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .8rem; font-weight: 500; }
  .hc-table .hc-big { font-size: 1.15rem; }
  .hc-bar { max-width: none; }
  .hc-table tr.hc-nofns td:not(.hc-what):not(.hc-travel) { display: none; }
}

/* ---- invitations: what is being sent, sent / still to send, opened ---- */
.rounds-card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.rounds-card > summary::-webkit-details-marker { display: none; }
details.rounds-card > summary::before, details.rounds-card[open] > summary::before { content: none; }
.rounds-card > summary > span:first-child { flex: 1; text-align: left; }
.rounds-card[open] > summary .rounds-change { visibility: hidden; }
.rounds-form { margin-top: 12px; }
.rounds-choice { display: grid; gap: 8px; }
.rounds-choice label { display: flex; align-items: flex-start; gap: 10px; }
.rounds-choice input { margin-top: 4px; }
.sent-tabs { margin-top: -4px; }
.invite-table .opened { color: var(--ok); font-weight: 600; }
.invite-table .not-opened { color: var(--warn); font-weight: 600; }
.mark-note { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: .9rem; }
.mark-note .btn { color: var(--primary); }
.share-wa { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.visit-table td, .visit-table th { font-size: .9rem; }
.visit-table tr.visit-preview td { color: var(--muted); }
@media (max-width: 700px) {
  .visit-table, .visit-table tbody { display: block; }
  .visit-table thead { display: none; }
  .visit-table tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--border); }
  .visit-table td { display: block; padding: 0; border: 0; }
  .visit-table td:first-child { font-weight: 600; }
}
[data-mark-hide][hidden] { display: none !important; }
/* A guest's history (views/partials/guest_history.ejs) and the marks beside the fields it changed. */
.hist-card { margin-top: 20px; }
.hist-list { list-style: none; margin: 12px 0; padding: 0; }
.hist-row { padding: 10px 0 10px 12px; border-left: 3px solid var(--border); margin-bottom: 8px; }
.hist-row.hist-guest { border-left-color: var(--ok); }
.hist-head .pill { margin-right: 4px; white-space: normal; max-width: 100%; }
.hist-changes { margin: 6px 0 0; padding-left: 18px; }
.hist-changes li { margin: 2px 0; overflow-wrap: anywhere; }
.hist-label { color: var(--muted); }
.hist-label::after { content: ': '; }
.hist-more { margin-top: 6px; }
.hist-more summary { cursor: pointer; }
.hist-earlier { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.hist-earlier .hist-row { padding: 6px 0 6px 12px; margin-bottom: 4px; }
.fmark-wrap { white-space: normal; }
.hist-row.hist-unsure { border-left-color: var(--gold-line, #C9A25E); }
.fmark { display: inline-block; font-size: .72rem; font-weight: 600; line-height: 1.4; padding: 0 6px; border-radius: 8px; background: var(--border); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.fmark-guest { background: var(--ok-soft); color: var(--ok); }
.log-filters { align-items: end; }
.log-abroad { align-self: center; }
.log-filters .actions { margin: 0; }
.ip-text { user-select: all; }

/* ---- team: which guests a member sees, activity by person ---- */
.guest-scope { margin-top: 10px; }
.guest-scope .choice { margin-bottom: 6px; }
.guest-scope-row { grid-column: 1 / -1; margin-top: 4px; }
.guest-scope-row > summary { cursor: pointer; color: var(--primary); }
.person-activity { margin-top: 10px; }
.person-activity .activity { margin-top: 6px; }
.inv-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 14px; }
.inv-filters .tabs { margin-bottom: 0; }
.bulk-reply { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bulk-reply select { width: auto; }

/* ---- invitations list: filters inside the card, one line of actions (a slim bar on a phone) ---- */
.list-card .inv-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.list-card .inv-filters .tabs { margin: 0; }
.list-card .inv-filters .list-search { flex: 1 1 220px; margin: 0; }
.card > .inv-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.card > .inv-filters .tabs { margin: 0; }
.card > .inv-filters .list-search { flex: 1 1 220px; margin: 0; }
.list-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.list-top .tick-all { margin: 0; }
.list-top .mark-all { padding: 0; min-height: 0; }
.list-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.list-bar .lb-count { font-size: .9rem; color: var(--muted); font-weight: 600; }
.list-bar .btn.small { padding: 6px 14px; min-height: 0; }
.lb-reply { display: inline-flex; align-items: center; gap: 6px; }
.lb-reply select { width: auto; padding-top: 6px; padding-bottom: 6px; min-height: 0; font-size: .9rem; }
.lb-via { position: relative; }
.lb-via > summary { cursor: pointer; list-style: none; color: var(--primary); }
.lb-via > summary::-webkit-details-marker { display: none; }
.lb-via .lb-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; padding: 10px 12px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.lb-via .lb-pop label:first-child { margin-top: 0; }
@media (max-width: 700px) {
  .list-bar { display: none; position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; margin: 0; padding: 8px 10px; gap: 6px 8px;
    background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
  #list-form.has-ticks .list-bar { display: flex; }
  #list-form.has-ticks { padding-bottom: 72px; }
  .lb-via .lb-pop { right: auto; left: 0; top: auto; bottom: calc(100% + 8px); }
}
@media (max-width: 700px) {
  .list-bar { font-size: .9rem; }
  .list-bar .lb-count { margin-right: auto; }
  .list-bar .lb-reply select { max-width: 9.5em; }
  .list-bar .lb-via { order: 5; }
  .list-bar .lb-clear { order: 6; }
}
.lb-clear[hidden] { display: none !important; }
@media (max-width: 700px) {
  .list-bar .lb-count { flex: 1 1 auto; }
  .list-bar #bulk-btn { order: 1; }
  .list-bar::before { content: ''; order: 2; flex-basis: 100%; height: 0; }   /* "2 ticked · Mark sent", then the rest */
  .list-bar .lb-reply { order: 3; flex: 0 0 auto; }
  .list-bar .lb-reply select { max-width: 8.5em; }
  .list-bar .lb-via { order: 4; font-size: .85rem; }
  .list-bar .lb-via-word { display: none; }
  .list-bar .lb-clear { order: 5; font-size: 0; padding: 0 4px; margin-left: auto; }
  .list-bar .lb-clear::after { content: '×'; font-size: 1.4rem; line-height: 1; }
}
@media (max-width: 700px) {
  .list-bar .lb-reply select { max-width: 7em; padding-left: 8px; padding-right: 22px; }
  .list-bar .lb-via { font-size: .8rem; }
  .list-bar .lb-reply .btn.small { padding: 6px 10px; }
}
@media (max-width: 700px) {
  .list-bar .lb-clear { order: 1; margin-left: 4px; }   /* beside Mark sent */
  .list-bar .lb-reply select { max-width: 8em; }
}
.fchip.declined { background: var(--err-soft); border-color: #ecc5c5; color: var(--muted); }
:root[data-theme="dark"] .fchip.declined { border-color: #5A3236; }
.fchip-gap { flex-basis: 100%; grid-column: 1 / -1; margin-top: 2px; line-height: 1.35; }
.docs-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 6px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.invites-fold { margin: 0 0 6px; }
.invites-fold[open] > summary { margin-bottom: 8px; }
.sub-block > .sub-head:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }   /* the block has its own line above */

@media (max-width: 700px) {
  .list-bar .lb-count { order: 0; }
  .list-bar #bulk-btn { order: 1; }
  .list-bar .lb-clear { order: 2; margin-left: 4px; }
  .list-bar::before { order: 3; }
  .list-bar .lb-reply { order: 4; }
  .list-bar .lb-via { order: 5; }
}

/* ---- invitations: the heading names every list (rounds, reminders, replies); the open one has a light grey background ---- */
.round-heads { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.round-heads a { color: inherit; text-decoration: none; padding: 2px 10px; border-radius: 10px; opacity: .72; }
.round-heads a:hover { opacity: 1; background: var(--grey-soft); }
.round-heads a.on { opacity: 1; background: var(--grey-soft); }
.round-heads .rh-sep { color: var(--muted); opacity: .6; font-weight: 400; }
.round-heads > .ic { margin-right: 4px; }

/* ---- invitations list: Still to send / Sent with the filters; three columns (guest, reply, actions) with the header above them ---- */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg a { padding: 7px 14px; text-decoration: none; color: var(--text); font-weight: 600; font-size: .92rem; }
.seg a + a { border-left: 1px solid var(--border); }
.seg a.on { background: var(--grey-soft); }
.seg .count { color: var(--muted); font-weight: 600; margin-left: 4px; }
.wa-one { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* "Send to everyone" at the top of Invitations (views/partials/send_all.ejs): one row per way of sending. */
.send-all h2 { margin-top: 0; }
.send-ways { display: flex; flex-direction: column; }
.send-way { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.send-way .sw-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.send-way .sw-text strong .ic { margin-right: 6px; vertical-align: -3px; }
.send-way .btn { flex: none; white-space: nowrap; }
.send-way .sw-note { flex: none; }
@media (max-width: 640px) { .send-way { flex-direction: column; align-items: stretch; gap: 10px; } .send-way .btn { text-align: center; } }
/* One link for everyone (views/admin/invite_shared.ejs, views/find.ejs). */
.steps-list { margin: 0 0 10px; padding-left: 20px; }
.steps-list li { margin-bottom: 6px; }
.find-modes { flex-direction: column; align-items: stretch; }
.find-modes label { align-items: flex-start; }
.find-modes label.off { opacity: .6; }
.find-pick { flex-direction: column; }
/* The Wedding page's settings (views/admin/website.ejs): what else the page shows. */
fieldset.wp-more { box-shadow: none; background: none; margin: 14px 0 6px; }
.wp-fns { margin: 0 0 8px 34px; }
label.check.off { opacity: .6; }
/* The sign-up form's page for the team (views/admin/invite_signup.ejs). */
.signup-list { list-style: none; margin: 0 0 12px; padding: 0; }
.signup-list li { padding: 8px 0; border-top: 1px solid var(--border); }
.signup-list li:first-child { border-top: 0; }
.signup-card { display: block; width: 100%; max-width: 300px; border-radius: 10px; box-shadow: var(--shadow); margin: 0 0 12px; }
/* Email, all in one press (views/admin/invite_email.ejs): the message as the guest gets it. */
.email-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; border-radius: 12px; background: var(--soft); margin-bottom: 10px; }
.email-who { list-style: none; margin: 10px 0 0; padding: 0; }
.email-who li { padding: 4px 0; border-top: 1px solid var(--border); }
/* WhatsApp, all in one press (views/admin/invite_wabiz.ejs): where each message stands with WhatsApp. */
.wa-need { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.wa-need td { padding: 6px 8px 6px 0; border-top: 1px solid var(--border); vertical-align: middle; }
.wa-setup { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.wa-one .btn .ic { width: 1em; height: 1em; }
#list-form { --reply-w: 210px; --acts-w: 230px; }
#list-form .invite-table td.reply-col { width: var(--reply-w); padding-left: 8px; }
#list-form .invite-table td.reply-col .pill-select { margin-top: 0; }
#list-form .invite-table td.acts { width: var(--acts-w); }
@media (min-width: 701px) {
  #list-form .list-bar { display: contents; }   /* its parts line up with the table's columns */
  #list-form .list-top { flex-wrap: nowrap; padding-right: 4px; }
  #list-form .lb-count, #list-form .lb-via { white-space: nowrap; }
  #list-form .lb-reply { flex: 0 0 var(--reply-w); margin-left: auto; padding-left: 8px; box-sizing: border-box; }
  #list-form .lb-reply select { flex: 1 1 auto; max-width: none; }
  #list-form .lb-end { flex: 0 0 var(--acts-w); display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
}
@media (max-width: 700px) {
  #list-form .lb-end { display: contents; }
  #list-form .invite-table, #list-form .invite-table tbody { display: block; }
  #list-form .invite-table tr { display: grid; grid-template-columns: 32px 1fr auto; column-gap: 8px; row-gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  #list-form .invite-table td { display: block; padding: 0; border: 0; }
  #list-form .invite-table td.tick { grid-row: 1 / span 2; }
  #list-form .invite-table td.reply-col { grid-column: 2; grid-row: 2; width: auto; padding: 0; }
  #list-form .invite-table td.acts { grid-column: 3; grid-row: 1 / span 2; width: auto; }
}
.seg a { display: inline-flex; align-items: center; white-space: nowrap; }
.seg a .count { display: inline; position: static; padding: 0; background: none; min-width: 0; font-size: inherit; }
#list-form { --acts-w: 262px; }
#list-form .invite-table td.reply-col { box-sizing: border-box; }
#list-form .invite-table td.reply-col .pill-select { max-width: 100%; }
@media (min-width: 701px) {
  #list-form .list-top { column-gap: 0; }
  #list-form .list-top .tick-all, #list-form .lb-count, #list-form .lb-via { margin-right: 14px; }
  #list-form .lb-reply { min-width: 0; gap: 6px; }
  #list-form .lb-reply select { min-width: 0; width: 100%; }
  #list-form .lb-reply .btn { flex: none; }
}
@media (min-width: 701px) { #list-form .lb-reply { flex-basis: calc(var(--reply-w) + 6px); } }
@media (max-width: 700px) { #list-form .invite-table td.acts { min-width: 108px; } #list-form .invite-table td.acts .btn { white-space: nowrap; } }
[data-soft].soft-busy { opacity: .7; transition: opacity .15s .1s; }
/* WhatsApp one by one sits at the right, above the Mark sent buttons (it sends, like them). */
.inv-filters .wa-one { margin-left: auto; align-items: flex-end; text-align: right; }
/* The filters in two lines; the second ends with the sender, at the right above the Mark sent buttons. */
.card > .inv-filters, .list-card .inv-filters { flex-direction: column; align-items: stretch; gap: 10px; }
.inv-filters .if-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.inv-filters .if-row .list-search { flex: 0 1 320px; min-width: 180px; }
.inv-filters .if-row .wa-one { margin-left: auto; }
@media (max-width: 700px) { .inv-filters .if-row .list-search { flex: 1 1 100%; } }
.inv-filters, .inv-filters .if-row { min-width: 0; max-width: 100%; }
.inv-filters .if-row > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 700px) {
  .inv-filters .if-row .list-search { flex: 1 1 100%; width: 100%; min-width: 0; }
}

/* ---- invitations: each guest's own way (icon) and day (calendar badge), under "via WhatsApp, today" ---- */
#list-form { --via-w: 176px; }
#list-form .invite-table td.via-col { width: var(--via-w); box-sizing: border-box; padding-left: 8px; white-space: nowrap; }
.row-via { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; color: var(--primary); vertical-align: middle; background: var(--card); }
.row-via .rv-icon .ic { width: 20px; height: 20px; margin: 0; }
.row-via select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; min-height: 0; padding: 0; }
.row-via:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.row-when { display: inline-block; vertical-align: middle; margin-left: 6px; }
.row-when .date-wrap { display: inline-flex; gap: 0; }
.row-when .date-wrap input[type=text] { display: none; }   /* only the calendar badge */
.row-when .date-btn { transform: scale(.8); transform-origin: left center; margin: -6px -10px -6px 0; }
@media (min-width: 701px) {
  #list-form .lb-via { flex: 0 0 var(--via-w); margin-left: auto; padding-left: 8px; box-sizing: border-box; margin-right: 0 !important; white-space: normal; }
  #list-form .lb-via + .lb-reply { margin-left: 0; }
}
@media (max-width: 700px) {
  #list-form .invite-table td.via-col { grid-column: 2; grid-row: 3; width: auto; padding: 0; }
}
.no-match { margin: 10px 0 2px; }
.flash.flash-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; margin: 0; max-width: min(560px, 92vw); box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.25)); transition: opacity .3s, transform .3s; }
.flash:not(.flash-toast):has(> .flash-x) { position: relative; } .flash:has(> .flash-x) { padding-right: 44px; }
.flash .flash-x { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 1rem; cursor: pointer; opacity: .75; }
.flash .flash-x:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.flash.flash-toast.out { opacity: 0; transform: translate(-50%, 10px); }
/* Invitations filters, line two: small round dropdowns; the ones in use stand out. On a phone they fold
   behind "Filters" unless one is on. */
.inv-filters .if-more { gap: 8px; margin: 0; }
.inv-filters .if-more select { width: auto; max-width: 240px; min-height: 0; padding: 6px 30px 6px 12px; font-size: .92rem; border-radius: 999px; }
.inv-filters .if-more select.on, .if-check.on { border-color: var(--primary); color: var(--primary); background-color: var(--primary-soft); font-weight: 600; }
.if-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border: 1.5px solid var(--input-border); border-radius: 999px; font-weight: 500; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.if-check input { margin: 0; width: auto; min-height: 0; }
.if-check .ic { width: 1em; height: 1em; }
.if-clear { margin-left: 4px; white-space: nowrap; }
.inv-filters .if-toggle { display: none; }
@media (max-width: 700px) {
  .inv-filters .if-toggle { display: inline-flex; flex: 0 0 auto; }
  .inv-filters .if-row .list-search { flex: 1 1 0; width: auto; }
  .inv-filters:not(.open) .if-more { display: none; }
  .inv-filters .if-more select { flex: 1 1 40%; max-width: none; }
}
.lb-via-label { cursor: default; }
.via-col .saved-note { display: block; margin-top: 2px; color: var(--ok); font-weight: 600; }
.via-col .saved-note.err { color: var(--err); }
.invite-table .who-name { display: inline-flex; vertical-align: top; margin-right: 2px; }
.inv-filters .if-row .list-search { flex: 1 1 300px; max-width: 460px; }
@media (max-width: 700px) { .inv-filters .if-row .list-search { flex: 1 1 0; max-width: none; } }
@media (max-width: 700px) { .inv-filters .if-row > .seg { flex: 1 1 100%; } .inv-filters .if-row > .seg a { flex: 1; justify-content: center; } }
/* A hotel's own page (views/hotel_public.ejs) and its box on Hotels & stay. */
.hotel-share { margin-top: 12px; }
.hotel-share .link-box { margin: 10px 0 4px; }
.hotel-pin { font-size: 1.15rem; letter-spacing: .12em; }
.hotel-guests { width: 100%; border-collapse: collapse; }
.hotel-guests th { text-align: left; font-size: .85rem; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.hotel-guests td { vertical-align: top; padding: 12px 8px; border-bottom: 1px solid var(--line, var(--border)); }
.hotel-guests tr:last-child td { border-bottom: 0; }
.hotel-guests .num { text-align: right; }
.hotel-req { color: var(--warn); margin-top: 4px; }
.room-no { margin: 0 0 8px; }
.room-no:last-child { margin-bottom: 0; }
.room-no .small { display: block; }
.room-no-row { display: inline-flex; gap: 6px; align-items: center; }
.room-no input[type=text] { width: 7.5em; min-height: 0; padding: 6px 10px; }
.hotel-dates div + div { margin-top: 26px; }
.hotel-steps form { display: block; margin: 0 0 6px; }
.step-done { color: var(--ok); font-weight: 600; }
.hl-label { display: none; }
.pin-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pin-form label { margin: 0; }
.pin-form input { width: 9em; letter-spacing: .15em; }
.nights-grid .total td { font-weight: 600; border-top: 2px solid var(--border); }
@media (max-width: 700px) {
  .hotel-guests thead { display: none; }
  .hotel-guests, .hotel-guests tbody, .hotel-guests tr, .hotel-guests td { display: block; width: auto; }
  .hotel-guests tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .hotel-guests tr:last-child { border-bottom: 0; }
  .hotel-guests td { border: 0; padding: 4px 0; text-align: left !important; }
  .hl-label { display: inline; color: var(--muted); }
  .hotel-dates div + div { margin-top: 4px; }
  .hotel-steps form { display: inline-block; margin-right: 8px; }
}
@media print { .hotel-guests td { padding: 6px; } .room-no input[type=text] { border: 0; padding: 0; width: auto; } }
.container.hotel-page { max-width: 1120px; }
.hotel-guests .nowrap { white-space: nowrap; }
/* The Reply filter: a dropdown of tick boxes. */
.rf-pick { position: relative; }
.rf-pick > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1.5px solid var(--input-border); border-radius: 999px; font-size: .92rem; background: var(--card); max-width: 260px; }
.rf-pick > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-pick > summary::-webkit-details-marker { display: none; }
.rf-pick > summary::after { content: '▾'; font-size: .8rem; color: var(--muted); }
.rf-pick.on > summary { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.rf-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 25; min-width: 220px; padding: 10px 12px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.rf-pop .check { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.rf-pop .check input { margin: 0; }
.rf-acts { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
@media (max-width: 700px) { .rf-pick { flex: 1 1 100%; } .rf-pick > summary { max-width: none; width: 100%; justify-content: space-between; box-sizing: border-box; } }
.fn-note { margin: 6px 0 4px; padding: 8px 12px; border-left: 3px solid var(--gold, var(--border)); background: var(--soft, transparent); border-radius: 0 8px 8px 0; max-width: 60ch; }
/* Logs: the kind of network behind a visit (how far to trust its place). */
.net-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--grey-soft); }
.net-tag.net-telecom { background: var(--info-soft); color: var(--info); }
.net-tag.net-broadband { background: var(--ok-soft); color: var(--ok); }
.net-tag.net-relay { background: var(--warn-soft); color: var(--warn); }
.place-cell { min-width: 220px; max-width: 320px; }
.log-abroad { display: flex; flex-direction: column; gap: 4px; }
/* A hotel's room layout (views/partials/plan_floor.ejs): a board of shapes, over the plan picture if any.
   Sizes are shares of the board, and the writing grows with the board (container units). */
.plan { margin: 10px 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pb { position: relative; width: 100%; min-width: 720px; container-type: inline-size; background: var(--card);
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 2.5% 4%; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.plan-team .pb, .plan-guest .pb { background-image: none; }
.pb-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: .4; pointer-events: none; user-select: none; }
.plan-guest .pb-pic { opacity: .3; }
.pitem { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-align: center;
  text-decoration: none; color: var(--text); border: 1.5px solid var(--border); border-radius: 6px; background: var(--card); padding: 2px; overflow: hidden; line-height: 1.1;
  font-size: clamp(8px, 1cqw, 16px); }
.pitem .pi-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.pitem .pi-who { font-size: .78em; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* In a room (public/planfit.js sizes its writing to the box): who is in it may take two lines, or one shortened (…). */
.pitem.room .pi-who { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; line-height: 1.1; flex: none; }
.pitem.room .pi-who.one { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; line-clamp: none; }
.pitem.room .pi-ghost { visibility: hidden; }
.pitem .pi-ic { font-size: 1.05em; line-height: 1; }
.pitem .pi-star { font-size: 1em; line-height: 1; }
.pitem.shape { background: var(--tile); color: var(--muted); }
.pitem.shape .pi-name { font-weight: 600; }
.pitem.shape-corridor { background: repeating-linear-gradient(135deg, var(--tile) 0 6px, transparent 6px 12px); border-style: dashed; }
.pitem.shape-area { background: transparent; border: 2px dashed var(--gold, var(--border)); justify-content: flex-start; align-items: flex-start; padding: 4px 8px; color: var(--gold, var(--muted)); }
.pitem.shape-area .pi-name { font-size: 1.1em; }
.pitem.shape-label { background: transparent; border-color: transparent; color: var(--text); }
.pitem.shape-label .pi-name { font-size: 1.15em; }
.pitem.shape-space { border-color: var(--gold, var(--border)); color: var(--text); background: var(--gold-tint, var(--tile)); }
.pitem.shape-pool { background: var(--info-soft); color: var(--info); }
.pitem.shape-garden { background: var(--ok-soft); color: var(--ok); }
.pitem.room.empty { border-style: dashed; color: var(--muted); }
.pitem.taken { background: var(--primary-soft); border-color: var(--primary); }
.pitem.taken .pi-who { color: var(--primary); font-weight: 600; }
.pitem.free { background: var(--ok-soft); border-color: var(--ok); }
.pitem.host, .pitem.taken.host { background: var(--gold-tint, #fbf1dd); border-color: var(--gold, #b08a4e); }
.pitem.mine { background: var(--primary-fill); border-color: var(--primary-fill); color: #fff; box-shadow: 0 0 0 3px var(--gold-soft, #e8b867); z-index: 2; }
/* What is chosen on a plan is blue, as in drawing apps, so it never looks like a room's own edge. */
:root { --sel: #2f7ff0; }
:root[data-theme="dark"] { --sel: #5ea2ff; }
.pitem.sel { outline: 3px solid var(--sel); outline-offset: 1px; z-index: 3; }
a.pitem:hover { filter: brightness(.97); }
/* The whiteboard while drawing (public/planboard.js). */
.pb-editor .pitem { cursor: move; touch-action: none; user-select: none; }
.pb-editor .pitem.room.needs-type { border-color: var(--warn); }
.pb-editor .pitem.shared { box-shadow: inset 0 0 0 2px var(--info-soft); }
.pb-editor .pitem.sel { overflow: visible; }
/* PowerPoint-like handles: four corners and four sides to resize, a round one above to turn it. */
.pb-h { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--card); border: 2px solid var(--sel); border-radius: 50%; touch-action: none; box-sizing: border-box; }
.pb-h[data-h=nw] { left: 0; top: 0; cursor: nwse-resize; } .pb-h[data-h=n] { left: 50%; top: 0; cursor: ns-resize; } .pb-h[data-h=ne] { left: 100%; top: 0; cursor: nesw-resize; }
.pb-h[data-h=e] { left: 100%; top: 50%; cursor: ew-resize; } .pb-h[data-h=se] { left: 100%; top: 100%; cursor: nwse-resize; } .pb-h[data-h=s] { left: 50%; top: 100%; cursor: ns-resize; }
.pb-h[data-h=sw] { left: 0; top: 100%; cursor: nesw-resize; } .pb-h[data-h=w] { left: 0; top: 50%; cursor: ew-resize; }
.pb-r { position: absolute; left: 50%; top: -30px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--card); border: 2px solid var(--sel);
  color: var(--sel); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; cursor: grab; touch-action: none; box-sizing: border-box; }
.pb-r::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 10px; margin-left: -1px; background: var(--sel); }
.pb-r > span { pointer-events: none; }
@media (pointer: coarse) { .pb-h { width: 20px; height: 20px; margin: -10px 0 0 -10px; } .pb-r { width: 28px; height: 28px; margin-left: -14px; top: -38px; } }
/* A room's beds, drawn small and faint under its number (src/hotelplan.js bedIcon). In its corner, putting guests in,
   how many more it can take that night (nothing when it is full); how many it sleeps is in its tooltip and list. */
.pitem .pi-cap, .plan-legend .lg-left { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 999px; font-weight: 700; line-height: 1;
  color: var(--muted); background: var(--card); border: 1px solid var(--border); }
.pitem .pi-cap { position: absolute; top: 1px; right: 1px; min-width: 1.35em; height: 1.35em; padding: 0 .25em; font-size: .6em; z-index: 1; }
.pb-seat .pitem.room, .plan-team .pitem.room { padding-top: .75em; }   /* the corner kept for it, in every room alike */
.plan-legend .lg-left { min-width: 16px; height: 16px; margin-left: 6px; padding: 0 4px; font-size: .7rem; }
.pitem .pi-bed { width: 2.6em; height: 1.15em; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linejoin: round; flex: none; overflow: visible; }
.pitem .pi-bed .pi-beds { opacity: .5; }
/* Who is in it that night: a green tick a person on the beds; an extra bed a small bed beside (the owner's ask). */
.pitem .pi-bed .pi-tick { stroke: var(--ok); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; opacity: 1; }
.pitem .pi-bed .pi-xbed { stroke-dasharray: 1.6 1.1; }
.pp-xb { color: var(--muted); align-self: center; margin-right: 2px; }
/* Connected rooms (src/hotelplan.js bridge): a small soft bar across their shared wall with ⇄, or a faint dotted line
   between rooms that aren't side by side. Quiet, so the rooms stay what the eye goes to. */
.pbridge { position: absolute; box-sizing: border-box; z-index: 4; pointer-events: auto; display: flex; align-items: center; justify-content: center;
  background: var(--gold-tint, #fbf1dd); border: 1px solid var(--gold-line, #C9A25E); border-radius: 4px; color: var(--gold, #8a6a3a); font-size: clamp(7px, .9cqw, 14px); line-height: 1; }
.pbridge > span { font-weight: 700; }
.pbridge-h > span { transform: rotate(90deg); }
.pbridge-line { background: none; border: 0; border-top: 2px dotted var(--gold-line, #C9A25E); border-radius: 0; transform-origin: 50% 50%; z-index: 1; pointer-events: none; }
.pb-editor .pbridge { font-size: 13px; pointer-events: none; }
/* The ⇄ handle on a chosen room (drag it onto a neighbour to connect them), its line while dragging, the room it would join. */
.pb-lk { position: absolute; right: calc(var(--rs, 22px) * var(--inv, 1) * -1.4); top: 50%; width: calc(var(--rs, 22px) * var(--inv, 1)); height: calc(var(--rs, 22px) * var(--inv, 1));
  margin-top: calc(var(--rs, 22px) * var(--inv, 1) / -2); border-radius: 50%; background: var(--gold-tint, #fbf1dd); border: calc(2px * var(--inv, 1)) solid var(--gold-line, #C9A25E);
  color: var(--gold, #8a6a3a); display: flex; align-items: center; justify-content: center; font-size: calc(var(--rs, 22px) * var(--inv, 1) * .6); font-weight: 700; cursor: crosshair; touch-action: none; box-sizing: border-box; }
.pb-lk > span { pointer-events: none; }
.pb-linkline { position: absolute; height: 0; border-top: calc(2px * var(--inv, 1)) dashed var(--gold-line, #C9A25E); transform-origin: 0 0; pointer-events: none; z-index: 6; }
.pb-editor .pitem.link-on { box-shadow: 0 0 0 calc(3px * var(--inv, 1)) var(--gold-line, #C9A25E); }
.pb-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.pb-links select { width: auto; min-width: 9em; padding: 4px 8px; }
.pb-links-hint { flex-basis: 100%; }
.pb-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px 1px 8px; border-radius: 999px; background: var(--gold-tint, #fbf1dd); border: 1px solid var(--gold-line, #C9A25E); font-size: .85rem; }
.pb-extras { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; border: 1px dashed var(--border); border-radius: 10px; padding: 6px 10px; margin: 6px 0; }
.pb-extras legend { padding: 0 4px; }
.pb-extras label:not(.check) { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pb-extras input[type=text] { width: 10em; padding: 4px 8px; }
.pb-extras select { width: auto; padding: 4px 8px; }
.pb-stage { display: flex; gap: 8px; align-items: flex-start; }
.pb-stage .plan { flex: 1 1 auto; min-width: 0; margin: 10px 0; }
.pb-rail { position: sticky; top: 45vh; margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.pb-z { width: 38px; height: 38px; border: 1.5px solid var(--input-border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; }
.pb-z:hover { border-color: var(--primary); color: var(--primary); }
.pb-z.pb-zfit { font-size: .75rem; }
.pb-zv { color: var(--muted); font-size: .72rem; min-width: 38px; text-align: center; }
.pb-turn { display: inline-flex; align-items: center; gap: 4px; }
.pb-turn input { width: 5.5em; }
.pb-toolbox { z-index: 6; padding: 10px 12px; }
@media (min-width: 701px) { .pb-toolbox { position: sticky; top: 64px; } }
.pb-rooms-fold { margin-top: 6px; } .pb-rooms-fold > summary { cursor: pointer; color: var(--muted); }
/* The chosen shape's details: a panel beside it (public/planboard.js placeInsp), only while it is open. */
.pb-insp { position: fixed; left: 12px; top: 12px; z-index: 60; width: min(620px, calc(100vw - 16px)); box-sizing: border-box;
  margin: 0; padding: 10px 14px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.25)); max-height: min(70vh, 560px); overflow-y: auto; }
.pb-guests { margin: 6px 0; }
.pb-insp[hidden] { display: none; }
.pb-insp .actions { margin-top: 6px; }
.pb-editor { padding-bottom: 0; }
.pb-tools { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 701px) { .pb-tools { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; } .pb-tool { flex: 0 0 auto; } }
.pb-tool { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border: 1.5px solid var(--input-border); border-radius: 8px; background: var(--card); color: var(--text);
  font: inherit; font-size: .88rem; font-weight: 600; cursor: grab; touch-action: none; user-select: none; }
.pb-tool:hover { border-color: var(--primary); color: var(--primary); }
.pb-k-room, .pb-room { border-color: var(--primary); }
.pb-rooms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.pb-rooms [data-unplaced] { display: contents; }
.pb-status { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.pb-notes { color: var(--warn); }
.ok-text { color: var(--ok); } .err-text { color: var(--err); }
.pb-ghost { position: fixed; z-index: 100; transform: translate(-50%, -50%); padding: 6px 12px; border-radius: 8px; background: var(--primary-fill); color: #fff; font-weight: 600; pointer-events: none; opacity: .9; }
.pb-insp-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; }
.pb-insp-fields { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; }
.pb-insp-fields label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.pb-insp-fields label.check { flex-direction: row; align-items: center; }
.pb-insp-fields input[type=text] { width: 12em; }
.plan-modes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.plan-night { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.plan-night label { margin: 0; }
.plan-night select { width: auto; }
.plan-legend { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); }
.plan-legend .lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--border); margin-left: 6px; }
.plan-legend .lg.taken { background: var(--primary-soft); border-color: var(--primary); }
.plan-legend .lg.free { background: var(--ok-soft); border-color: var(--ok); }
.plan-legend .lg.host { background: var(--gold-tint, #fbf1dd); border-color: var(--gold, #b08a4e); }
/* Who is where: someone being put in a room, those still needing one (dragged onto a room), a room's list. */
.plan-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 2px solid var(--primary); }
.plan-need-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.need-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card, #fff); color: var(--text); text-decoration: none; font-size: .88rem; cursor: grab; }
.need-chip:hover { border-color: var(--primary); }
.need-chip .muted { font-size: .78rem; }
.plan-team a.pitem.room.drop-on { outline: 3px solid var(--primary); outline-offset: 1px; z-index: 5; }
.plan-panel .pp-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.plan-panel .pp-find { margin: 2px 0 6px; }
.plan-panel .pp-others summary { cursor: pointer; padding: 6px 0; }
.plan-panel .pp-row[hidden] { display: none; }
.plan-panel .pp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line, var(--border)); }
.pal-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.pal-extra input[type=text] { flex: 1 1 200px; width: auto; }
.pal-extra select { flex: 1 1 220px; width: auto; }
.plan-floor-name { margin: 18px 0 4px; }
.plan-floor-head { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; margin-top: 18px; }
.plan-floor-head .plan-floor-name { margin: 0 4px 4px 0; }
.plan-floor-head .plan-floor-name a { color: inherit; text-decoration: none; }
.plan-floor-head form { margin: 0; }
.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .plan { overflow: visible; }
  .pb { min-width: 0; }
  .pitem.taken, .pitem.free, .pitem.host, .pitem.mine, .pitem.blocked { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.plan-legend .lg.mine { background: var(--primary-fill); border-color: var(--primary-fill); }
p.plan-legend { display: flex; gap: 6px; align-items: center; margin: 0 0 10px; }
@media (pointer: coarse) { .pb-keys { display: none; } }
.pb-editor .pb { overflow: visible; }
/* While drawing, the frame is a view onto a board with no edge: the dots fill it, and the shapes' layer moves and zooms
   inside it by a transform (public/planboard.js); handles and lines keep their size on screen (--inv: 1 / zoom). */
.pb-editor .plan { position: relative; display: block; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; padding: 0;
  background-color: var(--card); background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 40px 40px; }
.pb-editor .plan .pb { position: absolute; left: 0; top: 0; margin: 0; min-width: 0; transform-origin: 0 0; background: none; border: 0; border-radius: 0; container-type: normal; }
.pb-editor .pitem { font-size: 16px; }
.pb-editor .pitem.sel { outline-width: calc(3px * var(--inv, 1)); outline-offset: calc(1px * var(--inv, 1)); }
.pb-editor .pb-h { width: calc(var(--hs) * var(--inv, 1)); height: calc(var(--hs) * var(--inv, 1)); margin: calc(var(--hs) * var(--inv, 1) / -2) 0 0 calc(var(--hs) * var(--inv, 1) / -2); border-width: calc(2px * var(--inv, 1)); }
.pb-editor .pb-r { width: calc(var(--rs) * var(--inv, 1)); height: calc(var(--rs) * var(--inv, 1)); margin-left: calc(var(--rs) * var(--inv, 1) / -2); top: calc(var(--rs) * var(--inv, 1) * -1.36);
  border-width: calc(2px * var(--inv, 1)); font-size: calc(var(--rs) * var(--inv, 1) * .6); }
.pb-editor .pb-r::after { width: calc(2px * var(--inv, 1)); height: calc(var(--rs) * var(--inv, 1) * .45); margin-left: calc(-1px * var(--inv, 1)); }
.pb-editor .pb { --hs: 12px; --rs: 22px; }
@media (pointer: coarse) { .pb-editor .pb { --hs: 20px; --rs: 28px; } }
.pb-editor .pb-pic { border: calc(1px * var(--inv, 1)) dashed var(--border); box-sizing: border-box; }
.pb-editor .plan.panning, .pb-editor .plan.panning .pitem { cursor: grabbing; }
.pb-editor .plan { touch-action: none; overscroll-behavior: contain; cursor: grab; }
.pb-editor .plan .pb { cursor: grab; }
.pb-editor .pitem.clash { border-color: var(--err); background: var(--err-soft); color: var(--err); box-shadow: 0 0 0 2px var(--err); }
.pb-rail-gap { height: 1px; width: 70%; background: var(--border); margin: 2px 0; } .pb-z.pb-zu { font-size: 1.1rem; }
.pb-marquee { position: absolute; z-index: 20; border: calc(1.5px * var(--inv, 1)) dashed var(--sel); background: color-mix(in srgb, var(--sel) 10%, transparent); pointer-events: none; }
.pb-editor .plan.boxing, .pb-editor .plan.boxing .pb, .pb-editor .plan.ctrl-held, .pb-editor .plan.ctrl-held .pb { cursor: default; }
.pb-newtype { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; padding: 8px 10px; border: 1px dashed var(--border); border-radius: 10px; }
.pb-newtype[hidden] { display: none; }
.pb-newtype label { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.pb-newtype input[type=number] { width: 6em; }
/* Smart guides, the right-click menu, Space to move the view, the keys and mouse help. */
.pb-guide { position: absolute; z-index: 15; pointer-events: none; background: #e0457b; }
.pb-guide.v { top: -100000px; bottom: -100000px; width: calc(1px * var(--inv, 1)); }
.pb-guide.h { left: -100000px; right: -100000px; height: calc(1px * var(--inv, 1)); }
.pb-editor .plan.space-held, .pb-editor .plan.space-held .pb, .pb-editor .plan.space-held .pitem { cursor: grab; }
.pb-editor .plan.space-held.panning, .pb-editor .plan.space-held.panning * { cursor: grabbing; }
.pb-menu { position: fixed; z-index: 120; min-width: 220px; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.25)); }
.pb-menu button { display: flex; width: 100%; justify-content: space-between; gap: 16px; align-items: center; padding: 7px 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; border-radius: 6px; cursor: pointer; text-align: left; }
.pb-menu button:hover, .pb-menu button:focus-visible { background: var(--primary-soft); color: var(--primary); }
.pb-menu kbd, .pb-help kbd { font: inherit; font-size: .75rem; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; background: var(--tile); }
.pb-help { position: relative; }
.pb-help > summary { list-style: none; display: flex; align-items: center; justify-content: center; }
.pb-help > summary::-webkit-details-marker { display: none; }
.pb-help-pop { position: absolute; right: calc(100% + 8px); bottom: 0; z-index: 40; width: min(420px, 80vw); padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.25)); font-size: .88rem; }
.pb-help-pop ul { margin: 4px 0 10px; padding-left: 18px; }
.pb-help-pop li { margin: 3px 0; }
.pb-rail { z-index: 15; }   /* under the page's top bar (20) as the page scrolls past it, over the board and the toolbox */
.pb-help-pop { max-height: calc(100vh - 140px); overflow-y: auto; }
.pb-help-pop { position: fixed; right: 24px; top: 76px; bottom: auto; max-height: calc(100vh - 96px); z-index: 130; }
/* The same board putting guests in rooms (public/planboard.js, seat): the rooms stay put, a tap opens one's list
   beside it; the pencil at the top of the rail switches to drawing (on: filled). */
.pb-seat .pitem { cursor: grab; }
.pb-seat .pitem.tap { cursor: pointer; }
.pb-seat .plan.panning .pitem { cursor: grabbing; }
/* Every floor on the page (All floors): a swipe up or down moves the page, sideways or two fingers the board. */
.pb-multi .plan, .pb-multi .pitem { touch-action: pan-y; }
.pb-multi + .print-only + .plan-floor-head, .pb-multi + .plan-floor-head { margin-top: 22px; }
.pb-wheelhint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 50; padding: 8px 14px; border-radius: 10px;
  background: rgba(0, 0, 0, .72); color: #fff; font-size: .9rem; pointer-events: none; opacity: 0; transition: opacity .2s; }
.pb-wheelhint.on { opacity: 1; }
.pb-seat .pitem.drop-on { outline: calc(3px * var(--inv, 1)) solid var(--primary); outline-offset: calc(1px * var(--inv, 1)); z-index: 5; }
a.pb-z { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; }
.pb-z .ic { width: 20px; height: 20px; }
.pb-z.pb-mode.on { background: var(--primary-fill); border-color: var(--primary-fill); color: #fff; }
.pb-z:disabled { opacity: .35; cursor: default; border-color: var(--input-border); color: var(--text); }
.pb-editing { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-modes-end { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; }
/* The same height above the board in both (the night's row and "Need a room", or the saving row and the toolbox). */
.plan-modes { min-height: 44px; }
.plan-modes .plan-night { margin: 0; }
.plan-modes .plan-night select { padding-top: 6px; padding-bottom: 6px; min-height: 0; }
.plan-need { padding: 10px 12px; }
.pb-editing .ic { width: 18px; height: 18px; color: var(--primary); }
.plan-panel.pb-insp { width: min(520px, calc(100vw - 16px)); }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pp-head h3 { margin: 0 0 6px; }
@media (max-width: 600px) { .pp-head h3 > span { display: block; margin-top: 2px; } }
.pp-head-btns { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.pp-close { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 1rem; }
.pp-close:hover { background: var(--tile); color: var(--text); }
/* A stay's nights in a room's list on the layout: tapped, a check-in and a check-out to change. */
.pill.host-pill { background: var(--gold-tint, #fbf1dd); color: var(--gold, #8a6a3a); border: 1px solid var(--gold-line, #C9A25E); font-size: .72rem; padding: 0 6px; vertical-align: 1px; }
.pp-group { margin: 12px 0 2px; }
.pp-dates > summary { cursor: pointer; list-style: none; display: inline; }
.pp-dates > summary::-webkit-details-marker { display: none; }
.pp-dates-change { color: var(--primary); text-decoration: underline; margin-left: 4px; }
.pp-dates[open] .pp-dates-change { display: none; }
.pp-dates-in { display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; margin: 6px 0 2px; }
.pp-dates-in label { margin: 0; }
.pp-dates-in input { padding: 4px 8px; }
.pp-dates-in input[type=number] { width: 5.5em; }
.pp-nights { display: block; margin: 0; }
.pp-nights .pp-nights-save { display: none; }
.pp-nights:has(details[open]) .pp-nights-save { display: inline-flex; margin-top: 4px; }
.pp-off { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0 4px; }
.pp-off .lg { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid; vertical-align: -3px; }
.pp-markoff { margin: 10px 0 4px; }
.pp-markoff > summary { cursor: pointer; color: var(--muted); }
.pp-markoff form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.pp-markoff label { margin: 0; }
.pp-markoff input[type=text] { flex: 1 1 180px; width: auto; margin: 0; }
/* The bell in the organizers' top bar and the notifications page (views/partials/admin_nav.ejs, src/notify.js). */
.bell { position: relative; }
.bell > summary { list-style: none; position: relative; display: inline-flex; align-items: center; justify-content: center; }
.bell > summary::-webkit-details-marker { display: none; }
.topbar .bell-btn .ic { margin: 0; }
.bell-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #e0453a; color: #fff;
  font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--primary-fill, #6b2338); }
.bell-pop { position: absolute; right: -60px; top: calc(100% + 8px); z-index: 60; width: min(380px, calc(100vw - 24px)); background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.25)); padding: 6px;
  display: flex; flex-direction: column; max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); box-sizing: border-box; }
/* Never taller than the window: the list scrolls inside, the heading and "Show all" stay in view. */
.bell-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.bell-pop > .bell-head, .bell-pop > .bell-all { flex: none; }
@media (max-width: 760px) { .bell-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); } }
.topbar .bell-pop, .topbar .bell-pop .bell-item, .topbar .bell-pop strong { color: var(--text); font-weight: revert; }
.topbar .bell-pop .bell-item strong, .topbar .bell-pop .bell-head strong { font-weight: 700; }
.topbar .bell-pop .bell-all { color: var(--primary); }
.topbar .bell-pop .muted { color: var(--muted); }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.bell-head form { margin: 0; }
.bell-none { padding: 6px 8px; margin: 0; }
.bell-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .92rem; line-height: 1.35; }
.bell-item:hover { background: var(--primary-soft); }
.bell-item.unread { background: color-mix(in srgb, var(--primary-soft) 70%, transparent); }
.bell-item.unread strong::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: 1px; }
.bell-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--tile); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.bell-ic .ic { width: 16px; height: 16px; margin: 0; }
.bell-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bell-line { overflow-wrap: anywhere; }
.bell-detail { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-at { flex: none; color: var(--muted); font-size: .78rem; padding-top: 2px; white-space: nowrap; }
.bell-day { margin: 8px 8px 2px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bell-day:first-child, .bell-head + .bell-day { margin-top: 2px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title-row > h1 { min-width: 0; white-space: nowrap; }
.title-row > h1 > span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .title-row > h1 { font-size: 1.7rem; } }
.title-row > form { margin: 0; flex: none; }
.bell-all { display: block; text-align: center; padding: 9px; margin-top: 4px; border-top: 1px solid var(--border); font-weight: 600; text-decoration: none; }
.notif-list { padding: 6px; }
.notif-list .bell-item + .bell-item { margin-top: 2px; }
/* Renaming a ticket or ID (person page); naming one while adding it (guest page). */
.doc-rename-btn { padding: 0 4px; min-height: 0; vertical-align: middle; }
.doc-rename-btn .ic { width: 15px; height: 15px; margin: 0; }
.doc-rename { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.doc-rename input { width: min(22em, 70vw); margin: 0; }
.doc-name-step { margin-top: 10px; }
.doc-name-step input[type=text] { width: 100%; box-sizing: border-box; }
.doc-sides { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.doc-name-step .actions { margin-top: 8px; }
/* Budget payments (views/admin/budget_form.ejs, budget_payments.ejs). */
.label-like { display: block; font-weight: 600; margin: 12px 0 6px; }
.paid-sum { margin: 0; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-first { margin-top: 12px; }
.pay-list { display: flex; flex-direction: column; margin-bottom: 10px; }
/* A payment's first fields (partials/pay_fields.ejs): Amount | How, then the date on its own row with Planned beside it. */
.pay-top { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "amt how" "on on"; gap: 0 16px; }
.pay-top .pt-amt { grid-area: amt; min-width: 0; } .pay-top .pt-how { grid-area: how; min-width: 0; }
.pay-top .pt-on { grid-area: on; display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.pay-top .pt-on > label:first-child { flex: 1 0 100%; }
.pay-top .pt-on .date-wrap { flex: 0 1 300px; min-width: 220px; }
.pay-top .pt-on .planned-tick { margin: 6px 0; }
.pay-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 4px 14px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line, var(--border)); }
.pay-row:first-child { border-top: 0; }
.pay-row .pay-edit { grid-column: 1 / -1; }
.pay-when, .pay-what { display: flex; flex-direction: column; gap: 2px; }
.pay-what a .ic { width: 14px; height: 14px; }
.pay-acts { display: flex; gap: 6px; align-items: center; }
.pay-acts form { margin: 0; }
@media (max-width: 560px) { .pay-row { grid-template-columns: 1fr auto; } .pay-when { grid-column: 1 / -1; flex-direction: row; gap: 8px; } }
/* A payment's who paid / who was paid, and the costs it went towards (views/partials/pay_fields.ejs, admin/payment_form.ejs). */
fieldset.pay-who, fieldset.pay-towards { border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px 10px; margin: 10px 0; }
/* A name with a list of people saved before (public/paypick.js). */
.pick { position: relative; }
.pick input { padding-right: 40px; }
.pick-open { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; border-radius: 6px; }
.pick-open:hover { background: var(--soft2, rgba(0,0,0,.05)); color: var(--text); }
.pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; margin: 0; padding: 4px; list-style: none; max-height: 260px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.18)); }
.pick-list li { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 7px; cursor: pointer; line-height: 1.3; }
.pick-list li b { font-weight: 600; }
.pick-list li span { font-size: .8rem; color: var(--muted); }
.pick-list li[hidden] { display: none; }
.pick-list li:hover, .pick-list li.on { background: var(--primary-soft, rgba(122,31,61,.08)); }
.pay-part { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; margin-bottom: 8px; }
.pay-part select, .pay-part input { margin: 0; }
@media (max-width: 560px) { .pay-part { grid-template-columns: minmax(0, 1fr) 110px; }
  fieldset.pay-who .row3 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; } fieldset.pay-who .row3 > :first-child { grid-column: 1 / -1; } }
.pay-add { margin-top: 6px; }

/* "New here? Create an account" under the login form (views/admin/login.ejs). */
.signup-cta { text-align: center; margin: 16px 0 0; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* A function's subtitle under its name: "Traditional swing ceremony" (views/admin/session_form.ejs). */
.fn-sub { margin: 2px 0 6px; font-style: italic; color: var(--muted); }
.stat.program .fn-sub { margin: 2px 0 2px; font-size: .9rem; }

/* Languages on Invitations (panel, the language on each row) and the guest list's Language column. */
.lang-card > summary { list-style: none; cursor: pointer; display: flex; justify-content: flex-start; align-items: center; gap: 10px; }
.lang-card > summary > .rounds-change { margin-left: auto; }
.lang-card > summary::-webkit-details-marker { display: none; }
.lang-counts { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; vertical-align: middle; }
.lang-pill { background: var(--tile); color: var(--text); text-decoration: none; font-weight: 600; }
.lang-pill.on { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.lang-pick { width: auto; min-height: 0; padding: 1px 22px 1px 6px; margin: 0 0 0 4px; font-size: .78rem; border-radius: 999px; vertical-align: middle; background-position: right 6px center; }
.lang-cell { white-space: nowrap; }

/* "Need help?" settings (views/admin/settings.ejs): the venues guests see, each with Edit. */
.help-venues { list-style: none; margin: 0 0 12px; padding: 0; }
.help-venues li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); }
.help-venues li:first-child { border-top: 0; }
/* Photos page: the two jumps at the top (add to the album, tell guests). */
.photo-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.btn > .count { margin-left: 6px; background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 7px; font-size: .85em; }
/* The album page behind the shared link (/a/<token>). */
.pub-album-head { text-align: center; margin: 18px 0 8px; }
.pub-album-head h1 { margin: 0 0 4px; }
.btn[hidden] { display: none !important; }   /* a button's own display would otherwise show it */

/* Videos in the album: a play badge on the still; the viewer plays the video once it has it. */
.play-badge { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .8rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; pointer-events: none; }
.album figure:has(> .play-badge) figcaption { padding-top: 10px; }
.lightbox video { max-width: 100%; max-height: 75vh; background: #000; }
/* The join link on the Photos page: its QR code beside the link. */
.join-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.join-box .qr svg { width: 150px; height: 150px; background: #fff; padding: 6px; border-radius: 8px; }
.join-box > div:last-child { flex: 1; min-width: 220px; }
.setup-steps li.done { color: var(--muted); }

/* A guest's Share page: what has been sent to them, plainly, above the form to log another send (views/admin/person_share.ejs). */
.sent-done { background: var(--ok-soft); border: 2px solid var(--ok); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.sent-done-head { margin: 0 0 6px; font-weight: 700; color: var(--ok); }
.sent-rows { list-style: none; margin: 0; padding: 0; }
.sent-rows li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 5px 0; border-top: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.sent-rows li:first-child { border-top: 0; }
.sent-rows form.inline { margin: 0; display: inline; }
.sent-more > summary { cursor: pointer; padding: 2px 0; }
.sent-more[open] > summary { margin-bottom: 10px; }

/* A ticket read on the phone (public/ticketguest.js, public/ticketteam.js): what it says, then what to fill in. */
.ticket-read, .ticket-team { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 10px 0; background: var(--card-soft, transparent); }
.ticket-read p, .ticket-team p { margin: 4px 0; }
.ticket-head { font-weight: 600; }
.ticket-leg { padding: 8px 0; border-top: 1px solid var(--border); }
.ticket-leg:first-of-type { border-top: 0; }
.ticket-leg select, .ticket-person select { margin-top: 6px; max-width: 100%; }
.ticket-leg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ticket-leg-head select { margin-top: 0; width: auto; }
.ticket-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.ticket-fields label { font-size: .9em; margin: 0; }
.ticket-fields input { margin-top: 4px; }
.ticket-people { display: grid; gap: 8px; }
.ticket-person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: center; margin: 0; font-weight: 400; }
.ticket-person[hidden] { display: none; }
.ticket-pname { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ticket-pname input { margin: 0; }
.ticket-person select { margin-top: 0; }
.ticket-pbin { margin-left: 6px; }
.ticket-pgone { margin: 0; }
@media (max-width: 560px) { .ticket-person { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; } .ticket-person select { grid-column: 1; grid-row: 2; } .ticket-pbin { grid-column: 2; grid-row: 1; } }
.ticket-row { display: block; margin: 6px 0 2px; }
.ticket-covered .ic { color: var(--ok); }
/* Their own display would show them anyway: hidden means hidden. */
.doc-rename[hidden], .ticket-read [hidden], .ticket-team [hidden], .doc-form [data-ticket-fill][hidden] { display: none !important; }

/* Money: a currency beside its amount; the sides' shares of a cost; the settlement (views/admin/settlement.ejs). */
.amt-cur { display: flex; gap: 6px; align-items: stretch; }
.amt-cur select { width: auto; flex: none; margin: 0; }
.amt-cur input { flex: 1; min-width: 0; margin: 0; }
.pay-side { margin-top: 8px; }
.pay-side select { max-width: 20em; }
.split-box .split-custom { margin-top: 10px; }
.split-default { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.split-default input { width: 6em; margin: 0; }
.cur-row { margin-bottom: 6px; }
.settle-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.settle-sum .card { margin: 0; }
.settle-net { font-size: 1.15em; font-weight: 700; }
.settle-table td.num, .settle-table th.num { text-align: right; white-space: nowrap; }
.settle-table .frac { color: var(--muted); font-size: .9em; }

/* A break between months in a table (public/colfilter.js): the first row of each month carries its name. */
tr.month-start > td { border-top: 2px solid var(--primary); padding-top: 22px; position: relative; }
.month-tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); position: absolute; top: 4px; left: 10px; white-space: nowrap; }
.month-tag:empty { display: none; }
@media (max-width: 640px) { tr.month-start > td { padding-top: 10px; } tr.month-start > td:first-child { padding-top: 24px; } .month-tag { position: static; margin-bottom: 4px; } }

/* The Payments cards: the amount by side along each card's foot, and the words under the number. */
.stat { position: relative; overflow: hidden; }
.stat:has(> .side-bar) { padding-bottom: 20px; }
.stat .side-words { color: var(--muted); margin-top: 4px; }
.side-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; background: var(--side-x); }

/* Linking payments already recorded to a cost (views/admin/budget_form.ejs): a plain list with a Link button each. */
.lk-box { border-radius: 12px; }
.lk-list { display: grid; gap: 8px; }
.lk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0; padding: 8px 10px; background: var(--card); border-radius: 10px; font-weight: 400; cursor: pointer; }
.lk-row > input[type=checkbox] { width: 24px; height: 24px; min-height: 0; margin: 0; }
.lk-row:has(> input:checked) { outline: 2px solid var(--primary); }
.lk-part { display: flex; align-items: center; gap: 6px; }
.lk-amt { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--input, var(--card)); padding-left: 8px; }
.lk-amt .lk-sym { color: var(--muted); }
.lk-amt input { width: 7em; margin: 0; border: 0; background: transparent; min-height: 36px; }
@media (max-width: 640px) { .lk-row { grid-template-columns: auto minmax(0, 1fr); } .lk-row .lk-part { grid-column: 2; } }

/* Linking from the Payments list: the drop-down in the Towards column looks like the "Not linked yet" pill. */
.link-pick { margin: 0; display: flex; align-items: center; gap: 6px; }
.pill-select { width: 10.5em; min-height: 0; padding: 3px 24px 3px 10px; font-size: .9em; font-weight: 600; border-radius: 999px; background-color: var(--pending-soft, var(--primary-soft)); color: var(--pending, var(--primary)); border-color: transparent; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.pill-select option { font-weight: 400; color: var(--text); background: var(--card); }

/* The Budget's cost rows: how much is paid, a green bar along the row's foot. */
.row-item:has(> .row-bar) { padding-bottom: 18px; position: relative; }
.row-bar { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 6px; margin: 0; }
/* The filter list's search (public/colfilter.js) hides the rows that don't match: hidden means hidden. */
.filter-pop .check[hidden] { display: none !important; }

.lk-find { flex: 1 1 14em; min-width: 10em; margin: 0; }
.lk-row[hidden] { display: none !important; }
/* Payments' Towards column: a cost a payment is linked to is a green chip; "Not linked yet" is an amber drop-down. */
.chip-link { white-space: normal; text-decoration: none; margin: 2px 0; line-height: 1.35; max-width: 100%; }
a.chip-link:hover { text-decoration: underline; }
.link-pick .pill-select { background-color: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
/* Asked before linking past a cost (public/overlink.js). */
.over-dialog { max-width: min(460px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 14px; padding: 20px; background: var(--card); color: var(--text); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); }
.over-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.over-dialog h2 { margin: 0 0 8px; font-size: 1.2rem; }
.over-dialog p { margin: 0 0 14px; }
.over-dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
/* A transfer between the sides, settling up (Payments, the settlement). */
.pill.settle { background: var(--info-soft); color: var(--info); }
.pay-kind { border: 0; padding: 0; margin: 0 0 12px; }
.pay-kind .check { display: flex; gap: 8px; align-items: baseline; margin: 4px 0; }
[data-not-settle][hidden], [data-settle-only][hidden] { display: none !important; }
.pay-what .pill.settle { align-self: flex-start; }
/* Each budget section's own cards (views/admin/budget.ejs): as the totals at the top, smaller. */
.stats.cat-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.cat-stats .stat { padding: 8px 10px 10px; }
.cat-stats .stat .n { font-size: 1.35rem; }
.cat-stats .stat .l { font-size: .66rem; }
.cat-stats .side-words { font-size: .78rem; }
@media (max-width: 640px) { .stats.cat-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Who can see a cost or payment (views/partials/money_visibility.ejs). */
.seen-box { margin-top: 10px; }
.seen-people { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.seen-people[hidden] { display: none !important; }
.seen-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.seen-list .check { margin: 2px 0; }
.settle-table tfoot th, .settle-table tfoot td { font-weight: 700; border-top: 2px solid var(--border); }
.settle-table tfoot th { text-align: left; }
.settle-table td[data-label="Settled"], .settle-table td[data-label="Balance"] { white-space: normal; }
.settle-table .nowrap { white-space: nowrap; }
.settle-table tfoot th, .settle-table tfoot td { background: transparent; color: inherit; }
/* "Paid in full already" (views/admin/budget_form.ejs). */
.paid-full select { width: auto; display: inline-block; min-height: 0; padding: 4px 28px 4px 10px; margin: 0 4px; }
.paid-full-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 12px; }
/* The settlement table: grouped headings, each side's name in its colour, sentences for who paid / owes whom. */
.settle-table .side-name { color: var(--side-x); font-weight: 700; white-space: nowrap; }
.settle-table .side-name .side-dot { width: 8px; height: 8px; margin-right: 4px; vertical-align: 1px; }
.settle-table thead th.th-group { text-align: center; border-bottom: 1px solid var(--border); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.settle-table .sent-line { display: block; white-space: nowrap; }
.settle-table .sent-amt { display: block; }
.settle-table .sent-amt + .sent-line { margin-top: 6px; }
.settle-table .owe-amt { display: block; font-weight: 700; font-size: 1.05em; }
.settle-table .even-tag { color: var(--ok); font-weight: 600; white-space: nowrap; }
.settle-table .settle-btn { margin-top: 6px; }
.settle-table td[data-label="Still owed"], .settle-table td[data-label="Already settled"] { white-space: normal; min-width: 9.5em; }
.settle-key { margin: 0 0 8px; }
/* The settlement table on a phone: a card per cost, the shares and payments two by two, who owes whom across the foot. */
@media (max-width: 700px) {
  .settle-table, .settle-table tbody, .settle-table tfoot { display: block; }
  .settle-table thead { display: none; }
  .settle-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 12px; border-bottom: 1px solid var(--border); }
  .settle-table td, .settle-table th { display: block; padding: 0; border: 0; text-align: left !important; white-space: normal !important; min-width: 0 !important; }
  .settle-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
  .settle-table td[data-label="Cost"], .settle-table tr > th:first-child { grid-column: 1 / -1; font-size: 1.05rem; }
  .settle-table td[data-label="Cost"]::before, .settle-table td[data-label="Amount"]::before { display: none; }
  .settle-table td[data-label="Already settled"], .settle-table td[data-label^="Still owed"] { grid-column: 1 / -1; padding-top: 8px; border-top: 1px dashed var(--border); }
  .settle-table tfoot tr { border-top: 2px solid var(--border); }
  .settle-table tfoot th[colspan] { grid-column: 1 / -1; }
}
.settle-table .sent-line { white-space: normal; }
.settle-table td[data-label="Still owed"], .settle-table td[data-label="Already settled"] { min-width: 8em; }
.settle-table td, .settle-table th { padding-left: 8px; padding-right: 8px; }
@media (max-width: 700px) { .settle-table td[data-label="Amount"] { grid-column: 1 / -1; } }
/* The settlement's totals, in their own card below the table. */
.settle-totals { margin-top: 16px; border-width: 2px; }
.settle-totals .st-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 18px; }
.settle-totals .st-grid > div { min-width: 0; }
.settle-totals p { margin: 2px 0; }
.settle-totals .st-l { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 6px; }
.settle-totals .st-n { font-weight: 700; font-size: 1.1rem; }
.settle-totals .side-name { color: var(--side-x); font-weight: 700; }
.settle-totals .side-name .side-dot { width: 8px; height: 8px; margin-right: 4px; vertical-align: 1px; }
.settle-totals .sent-line { display: block; }
.settle-totals .sent-amt { display: block; margin-bottom: 6px; }
.settle-totals .owe-amt { display: block; font-weight: 700; font-size: 1.25rem; }
.settle-totals .even-tag { color: var(--ok); font-weight: 600; }
.settle-totals .settle-btn { margin-top: 8px; }
.settle-totals .st-owed { border-left: 2px solid var(--border); padding-left: 16px; }
@media (max-width: 900px) { .settle-totals .st-grid { grid-template-columns: 1fr 1fr; } .settle-totals .st-grid > div:first-child, .settle-totals .st-owed { grid-column: 1 / -1; } .settle-totals .st-owed { border-left: 0; padding-left: 0; border-top: 2px solid var(--border); padding-top: 10px; } }
/* A ticket or ID the team adds for a guest (views/admin/person_edit.ejs). */
.team-doc-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 6px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; }
.team-doc-add select, .team-doc-add input[type=text] { width: auto; min-height: 0; padding: 6px 10px; }
.team-doc-add input[type=file] { max-width: 100%; }
/* Filters on the Budget and Payments pages (views/partials/money_filters.ejs). */
details.money-filters { margin: 4px 0 12px; }
details.money-filters > summary { font-size: 1rem; padding: 10px 14px; }
.mf-form { padding: 0 14px 12px; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
.mf-grid label { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; font-weight: 600; margin: 0; }
.mf-grid select { width: 100%; min-width: 0; }
.mf-grid select.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.mf-on { margin: -4px 0 10px; }
@media (max-width: 640px) { .mf-grid { grid-template-columns: 1fr 1fr; } }
/* A cost's payments (views/admin/budget_form.ejs): a line where each month starts, with that month's total by side;
   each payment tagged with the side that paid it. */
/* Each month a shaded band: the month on the left, its total on the right, each side's part under them; the payments
   plain rows below it, with room before the next band. */
.pay-month { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; margin: 20px 0 2px; padding: 10px 14px; border-radius: 10px; background: var(--tile); color: var(--primary); }
.pay-list > .pay-month:first-child { margin-top: 4px; }
.pay-month > strong { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.pay-month-sum { font-weight: 700; color: var(--text); text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.pay-month-sides { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); }
.pay-month-sides .side-dot { width: 8px; height: 8px; }
.pay-month + .pay-row { border-top: 0; }
.side-tag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: .78rem; font-weight: 700; color: var(--side-x); text-decoration: none; }
.side-tag .side-dot { width: 8px; height: 8px; }
.side-tag.t-none { font-weight: 500; }
@media (max-width: 560px) { .pay-when { align-items: center; flex-wrap: wrap; } }
/* A budget row led by who is paid (views/admin/budget.ejs). */
.row-vendor { font-weight: 800; }
.vendor-files .doc-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.side-left { white-space: nowrap; color: var(--text); }
.side-left .side-dot { width: 8px; height: 8px; }
/* The month line on the Payments table (public/colfilter.js): the month, its total and each side's part. */
tr.month-start > td { padding-top: 34px; border-top-width: 3px; }
.month-tag { top: 8px; display: flex; gap: 12px; align-items: baseline; z-index: 1; }
.month-tag .mt-name { font-size: .78rem; }
.month-tag .mt-sum { color: var(--text); font-size: .9rem; letter-spacing: 0; }
.month-tag .mt-side { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; font-size: .8rem; }
.month-tag .mt-side .side-dot { width: 8px; height: 8px; }
@media (max-width: 640px) { tr.month-start > td, tr.month-start > td:first-child { padding-top: 34px; } .month-tag { position: absolute; top: 8px; margin: 0; gap: 8px; } }
/* The Payments table's month line as a shaded band across the row's top (a computer), and on a phone a band at the head
   of the month's first card: the month on the left, its total on the right, each side's part under them. */
table.pay-table tr.month-start > td { padding-top: 46px; background-image: linear-gradient(var(--tile), var(--tile)); background-size: 100% 36px; background-repeat: no-repeat; }
table.pay-table .month-tag { top: 10px; }
/* Planned payments (not made yet): on the Payments page and on a cost's page. */
.planned-box { border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 12px 2px; margin: 0 0 12px; }
.planned-pays .pay-when .pill, .planned-box .pay-when .pill { align-self: flex-start; }
.planned-tick { margin-top: 4px; font-weight: 500; }
/* Columns a template asks for (style="--wide-cols: 2fr 1fr" with class wide-cols): on wider screens only, so on a phone
   the row stacks as its own class says. */
@media (min-width: 701px) { .wide-cols { grid-template-columns: var(--wide-cols) !important; } }
/* A hotel's room types: the column titles show above the rows on a wide screen, beside each box on a phone. */
.rt-f { display: contents; font-weight: 400; margin: 0; }
.rt-f > span { display: none; }
@media (max-width: 700px) {
  .rt-row { grid-template-columns: 1fr 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .rt-f { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--muted); }
  .rt-f > span { display: block; }
}

/* =====================================================================================================================
   Shared components (docs/design/components.md; seen together at /admin/ui-kit). Calm, familiar, phone first:
   grouped inset lists, segmented controls, bottom sheets, a "…" menu, an ⓘ "How this works" sheet, tables that become
   rows on a phone, a pinned Save bar, one style for deleting, an eyebrow line above a title, upload as soon as picked.
   ===================================================================================================================== */

/* Grouped inset list: rows with a label, an optional value and a chevron when the row opens something. */
.inset-title { margin: 22px 6px 6px; font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.inset-list { list-style: none; margin: 0 0 14px; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.inset-list > li { margin: 0; }
.inset-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; margin: 0; border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--text); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: default; }
.inset-list > :first-child > .inset-row, .inset-list > .inset-row:first-child { border-top: 0; }
.inset-row > .ic, .inset-row .ir-icon { flex: none; color: var(--gold); }
.inset-row .ir-label { flex: 1; min-width: 0; }
.inset-row .ir-sub { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.inset-row .ir-value { flex: none; max-width: 50%; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.inset-row, button.inset-row { cursor: pointer; }
a.inset-row::after, button.inset-row::after { content: '›'; flex: none; margin-left: 2px; color: var(--muted); font-size: 1.4rem; line-height: 1; }
a.inset-row:hover, button.inset-row:hover { background: var(--hover); }
.inset-row.destroy { color: var(--err); justify-content: center; }
.inset-row.destroy::after { content: none; }
.inset-foot { margin: -8px 6px 14px; font-size: .85rem; color: var(--muted); }

/* Segmented control: links (one per view) or radios (one per choice), one line, scrolling sideways when long. */
.seg { display: inline-flex; max-width: 100%; gap: 2px; padding: 3px; margin: 4px 0 12px; border-radius: 999px; background: var(--tile); overflow-x: auto; scrollbar-width: none; vertical-align: middle; }
.seg::-webkit-scrollbar { display: none; }
.seg.block { display: flex; }
.seg > a, .seg > label, .seg > button { flex: 1 0 auto; margin: 0; padding: 7px 16px; border: 0; border-radius: 999px; background: none; color: var(--text);
  font: inherit; font-size: .92rem; font-weight: 600; white-space: nowrap; text-align: center; text-decoration: none; cursor: pointer; }
.seg > a.on, .seg > a[aria-current="page"], .seg > button[aria-pressed="true"], .seg > label:has(input:checked) { background: var(--card); color: var(--primary); box-shadow: var(--rim), var(--e1); }
.seg > label > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg > label:has(input:focus-visible) { outline: 3px solid #f0b429; outline-offset: 1px; }
.seg .seg-n { margin-left: 4px; font-weight: 500; color: var(--muted); }

/* Sheet: a <dialog class="sheet"> opened by a [data-sheet="its id"] button (public/app.js): from the foot of the
   screen on a phone, in the middle on a wide screen; ✕, the backdrop or Escape close it. */
dialog.sheet { width: min(560px, calc(100vw - 32px)); max-height: 88vh; padding: 0; border: 0; border-radius: 20px; background: var(--card); color: var(--text); box-shadow: var(--e4); overflow: hidden; }
dialog.sheet[open] { display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .38); }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; margin: 0; font-size: 1.3rem; }
.sheet-x { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--tile); color: var(--text); font-size: 1rem; cursor: pointer; }
.sheet-body { padding: 4px 18px 18px; overflow-y: auto; }
@media (max-width: 700px) {
  dialog.sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  dialog.sheet[open] { animation: sheet-up .22s var(--lift, ease-out); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* "…" menu: the less used actions of a page or a row. */
details.more { position: relative; display: inline-block; }
details.more > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px;
  border-radius: 999px; border: 1.5px solid var(--btn-border); background: var(--card); color: var(--primary); font-weight: 700; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
.more-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; min-width: 220px; padding: 6px 0; border-radius: 14px; background: var(--card); box-shadow: var(--e3); }
.more-pop > a, .more-pop > button, .more-pop form > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 16px; border: 0; background: none;
  color: var(--text); font: inherit; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.more-pop > a:hover, .more-pop > button:hover, .more-pop form > button:hover { background: var(--hover); }
.more-pop .destroy { color: var(--err); }
.more-pop hr { margin: 6px 0; border: 0; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .more-pop { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; min-width: 0; } }

/* ⓘ: a small round button opening a "How this works" sheet, in place of paragraphs on the page. */
.about-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; margin-left: 6px; vertical-align: middle;
  border: 1.5px solid var(--btn-border); border-radius: 50%; background: var(--card); color: var(--primary); font: 700 .95rem/1 var(--serif); cursor: pointer; }

/* Tables that become rows on a phone: each row a card, its first cell the title, the rest "Label: value" lines from
   each cell's data-label (a cell with data-label="" shows its value alone); the table stays a table on a wide screen. */
@media (max-width: 700px) {
  table.phone-rows, table.phone-rows tbody { display: block; width: 100%; }
  table.phone-rows thead { display: none; }
  table.phone-rows tr { display: block; padding: 12px 14px; border-top: 1px solid var(--line); }
  table.phone-rows tr:first-child { border-top: 0; }
  table.phone-rows td { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; border: 0; text-align: left; white-space: normal; }
  table.phone-rows td:first-child { font-weight: 600; font-size: 1.05rem; }
  table.phone-rows td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: none; min-width: 7.5em; color: var(--muted); font-size: .85rem; font-weight: 500; }
  table.phone-rows td:empty, table.phone-rows td.phone-hide { display: none; }
  .table-wrap:has(> table.phone-rows) { overflow: visible; }
}

/* Save bar: one Save pinned to the foot of a long form while it is on screen. */
.save-bar { position: sticky; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px -18px -18px; padding: 12px 18px;
  background: var(--glass, var(--card)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.save-bar .btn { flex: 0 1 auto; }
.save-bar .muted { font-size: .85rem; }

/* Deleting: red words at the foot of an item's own page (or in its "…" menu), never beside the main action. */
.btn.destroy, button.destroy { background: none; border-color: transparent; color: var(--err); box-shadow: none; text-decoration: none; }
.btn.destroy:hover { background: var(--err-soft); }
.danger-zone { margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }

/* Eyebrow: a small line above a page's title naming where it belongs ("Priya & Rahul's Wedding · Run sheet"). */
.eyebrow { display: block; margin: 0 0 -6px; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* Upload as soon as a file is picked (public/app.js): the picker is the button; the separate Upload button goes. */
.upload-pick { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.upload-pick > input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-pick.busy { opacity: .6; pointer-events: none; }
.share-link .share-stop { display: block; margin-top: 6px; }
.seg > a, .seg > label, .seg > button { border: 0 !important; box-shadow: none; min-height: 0; }
.seg > a.on, .seg > a[aria-current="page"], .seg > button[aria-pressed="true"], .seg > label:has(input:checked) { box-shadow: var(--rim), var(--e1); }

/* ---- The guest invitation on the shared components (views/guest/home.ejs, details.ejs, partials/guest_docs.ejs) ---- */
/* The reply in a line, "Edit details" beside it (wrapping under a long one). */
.you-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 12px; }
.you-top .you-status { flex: 1 1 auto; margin: 0; }
.you-top .you-edit { flex: none; margin: 0 0 0 auto; }
.you-top:not(:has(*)) { display: none; }
/* "Your travel and stay": the details as rows across the card, each opening the form at its part. */
.inset-list.in-card { margin: 0 -18px; background: none; box-shadow: none; border-radius: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: visible; }
.you-card > .you-top:not(:has(*)) + .inset-list.in-card { margin-top: -16px; border-top: 0; }
.you-card > .inset-list.in-card:last-child { margin-bottom: -16px; border-bottom: 0; }
.inset-list.in-card .inset-row { padding-left: 18px; padding-right: 18px; }
.inset-row .ir-k { display: block; margin-bottom: 2px; font-size: .85rem; font-weight: 500; color: var(--muted); }
.inset-row.kv .ir-label { overflow-wrap: anywhere; }
.inset-row .ir-ask { color: var(--primary); font-weight: 600; }
.inset-row.people-row { justify-content: space-between; flex-wrap: wrap; }
.inset-row.people-row .ir-value { max-width: none; color: var(--text); }
.people-ask, .inset-list.in-card .stepper-saved { margin: -6px 18px 10px; }
.stay-one { display: block; }
.stay-one + .stay-one { margin-top: 12px; }
.stay-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 2px; }
.stay-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; font-weight: 600; }
.you-card .inset-list.in-card + .docs-box { border-top: 0; }
/* Tickets and ID: one line with Add; adding and opening in sheets. */
.docs-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.docs-head h3 { margin: 0; }
.docs-sum { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.docs-sum strong { color: var(--text); }
.docs-box > [data-sheet] { margin-top: 10px; }
.doc-form .seg .ic { width: 1.1em; height: 1.1em; margin: 0 6px 0 0; vertical-align: -3px; }
.doc-pick { position: relative; margin: 6px 0 0; cursor: pointer; }
.doc-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.doc-pick:focus-within { outline: 3px solid var(--focus, var(--primary)); outline-offset: 2px; }
.doc-pick [data-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-apart { margin-top: 36px; }
.docs-apart-note { margin: 12px 0 0; }
/* The programme's calendar links and "Add to my phone": quiet links, not rows of big buttons. */
.quiet-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: -4px 0 10px; }
.quiet-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }
.quiet-links.center { justify-content: center; margin: 22px 0 0; }
.welcome-note .hashtag-line { display: block; margin-top: 6px; }
/* Shagun: the pay button first, the QR folded for paying from another phone. */
.shagun-one { display: flex; flex-direction: column; gap: 8px; }
.shagun-label { font-size: 1.05rem; }
.shagun-id { overflow-wrap: anywhere; }
.shagun-qr-fold > summary { display: inline-flex; align-items: center; min-height: 40px; color: var(--primary); font-weight: 600; cursor: pointer; list-style: none; }
.shagun-qr-fold > summary::-webkit-details-marker { display: none; }
.shagun-sent > summary.block { display: flex; width: 100%; justify-content: center; }
/* The details form: real headings over each card; per-function numbers and rides folded; one Save at the foot. */
.guest-form h2[id] { scroll-margin-top: 16px; }
details.fold.in-form { margin: 16px 0 4px; border: 1px solid var(--line); background: none; box-shadow: none; }
details.fold.in-form > summary { padding: 12px 14px; font-size: 1rem; }
details.fold.in-form > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.fold.in-form[open] { padding-bottom: 12px; }
details.fold.in-form > .hint:first-of-type { margin-top: 0; }
.message-card { margin-top: 22px; }
.ride-day { display: block; font-size: .85rem; }
.save-bar.loose { margin: 18px 0 0; border-top: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
/* A guest's page: the save bar is the page's last thing, pinned to the foot all the way down. */
.page-save { margin-top: 18px; }
@media (max-width: 520px) { .page-save { flex-wrap: nowrap; gap: 8px; padding: 10px 12px; } .page-save .btn { padding-left: 14px; padding-right: 14px; white-space: nowrap; } }
@media (max-width: 400px) { .page-save .ps-wide { display: none; } }
.ps-saved { margin: 6px 2px 0; color: var(--muted); }
.ps-saved .btn.link { padding: 0; vertical-align: baseline; }
.travel-ask .ps-saved { margin: 2px 0 0; }
/* "WhatsApp opens": whose chat a send goes to (the guest's, someone who forwards, or one picked). */
.send-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 4px; }
.send-to > label { margin: 0; }
.send-to select { width: auto; max-width: 100%; flex: 0 1 auto; }
.send-fwd-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex-basis: 100%; }
.send-fwd-add input { flex: 1 1 180px; width: auto; margin: 0; }
.send-to-say { flex-basis: 100%; margin: 0; }
.list-card > .send-to { margin: 0 0 10px; }
/* A guest's card beside Send, small, and the Edit card sheet (preview beside the fields on a wide screen). */
.card-quick { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; }
.card-quick[hidden] { display: none; }
.card-quick-thumb { flex: none; width: 64px; aspect-ratio: 1000 / 1414; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); cursor: pointer; }
.card-quick-thumb svg, .card-sheet-pv svg { display: block; width: 100%; height: auto; }
.card-quick-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.card-quick-text .btn.link { padding: 0; }
.card-sheet-pv { width: min(240px, 70vw); aspect-ratio: 1000 / 1414; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.card-sheet-fns { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.card-sheet-fns .check { margin: 0; }
.card-sheet .sub-head { margin: 14px 0 4px; }
.card-sheet-foot { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.card-sheet-foot [data-card-sheet-say]:not(:empty) { flex-basis: 100%; }
@media (min-width: 701px) { dialog.sheet#card-sheet { width: min(780px, calc(100vw - 32px)); } .card-sheet { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; } .card-sheet-pv { margin: 0; position: sticky; top: 0; } }

/* ---- A guest's page (views/admin/person_edit.ejs): the summary on top, short folded sections, one Save at the foot ---- */
.person-caption { margin: -4px 0 14px; }
.person-sum { padding-bottom: 0; }
.ps-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.ps-sub { flex: 1 1 14em; margin: 0; font-weight: 600; }
.ps-acts { display: inline-flex; gap: 8px; }
.ps-reply { margin: 12px 0 14px; }
.ps-reply .seg { margin: 0; }
.person-sum > .inset-list.in-card { margin-bottom: 0; border-bottom: 0; }
.inset-row .ir-value.ir-ask { color: var(--primary); font-weight: 600; }
.person-meta { margin: 24px 0 0; text-align: center; }
.who-box .choice.compact { gap: 8px; }
.who-box .choice.compact label { flex: 0 0 auto; min-height: 40px; padding: 6px 14px; }
.who-box .choice.compact input { width: 20px; height: 20px; }
/* Function rows: the number and ride only for the ticked ones, each with its own word on a phone. */
.fn-f { display: block; margin: 0; }
.fn-f > span { display: none; }
.fnrow:has(> label.check:first-child input:not(:checked)) > .fn-x { visibility: hidden; }
@media (max-width: 700px) {
  .fn-f > span { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
  .fnrow:has(> label.check:first-child input:not(:checked)) > .fn-x { display: none; }
  .fnrow > .fn-x:empty { display: none; }
}
/* "…" on a Save bar opens upwards. */
@media (min-width: 701px) { .save-bar .more-pop { top: auto; bottom: calc(100% + 6px); } }
.save-bar details.more { margin-left: auto; }

/* ---- The guest list (views/admin/people_list.ejs): tabs in one line with one Add; search with one Filters sheet ---- */
.who-top { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.who-top .seg { flex: 0 1 auto; min-width: 0; margin: 0; }
.who-top .seg > a { flex: 0 0 auto; }
.who-top > .btn { flex: none; margin: 0 0 0 auto; }
.banner-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 10px 16px; border-radius: var(--radius);
  background: var(--warn-soft); color: var(--text); font-weight: 600; text-decoration: none; }
.banner-row > span:last-child { color: var(--muted); font-size: 1.3rem; line-height: 1; }
.banner-row > span:first-child:not(:last-child) { color: var(--text); font-size: 1rem; line-height: 1.35; }
.list-search { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.list-search input[type=search] { flex: 1; min-width: 0; margin: 0; }
.list-search .filters-btn { flex: none; margin: 0; }
.list-search .filters-btn.on { border-color: var(--primary); }
.filters-btn .seg-n { margin-left: 6px; }
.fp-rows { margin-top: 16px; }
.list-count { margin: 6px 2px 10px; }
.phone-tools { display: none; }
.sort-pick { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.sort-pick select { width: auto; max-width: 7.5em; min-height: 40px; margin: 0; padding: 4px 8px; font-size: .95rem; }
.phone-tools .check { white-space: nowrap; }
@media (max-width: 700px) {
  .phone-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
  .phone-tools .check { margin: 0; }
  .people-table thead { display: none; }
  .people-table .travel-cell.no-arr:not(:has(.pills)) { display: none; }
  .people-table .travel-cell.no-arr > .muted { display: none; }
  .people-table .travel-cell.no-arr::before { content: none; }
}
/* The summary's values wrap rather than being cut; the five replies fit on two lines on a phone. */
.person-sum .inset-row .ir-value { max-width: 60%; white-space: normal; overflow-wrap: anywhere; }
.ps-reply .seg { flex-wrap: wrap; border-radius: 20px; }
.ps-reply .seg > button { flex: 1 0 auto; }
/* Fold headings: the summary wraps under the title, the arrow stays at the end of the line. */
#person-form details.fold > summary { flex-wrap: nowrap; align-items: flex-start; }
#person-form details.fold > summary > .small { flex: 1 1 auto; min-width: 0; padding-top: 3px; }
/* Adding: the Save bar is pinned only once "More details" makes the form long. */
.save-bar.loose.calm { position: static; }
#person-form:has(#more[open]) .save-bar.calm { position: sticky; }
#person-form details.fold > summary > strong { flex: none; }

/* ---- The dashboard (views/admin/dashboard.ejs): a summary, the full numbers on their own pages ---- */
.hero-edit { display: inline-flex; vertical-align: middle; margin-left: 4px; padding: 4px; border-radius: 50%; }
.hero-edit .ic { margin: 0; width: 1.05em; height: 1.05em; }
.sample-line { margin: 12px 2px 4px; font-size: .9rem; color: var(--muted); }
.hub-sub.warn { color: var(--warn-ink, #9a5b00); font-weight: 600; }
:root[data-theme="dark"] .hub-sub.warn { color: #f0b84d; }
.hub-warn-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--warn); vertical-align: middle; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 1.8rem 0 .75rem; }
.dash-head h2 { margin: 0; }
.dash-head .btn { margin: 0; flex: none; }
.dash-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.next-up .ir-label { font-weight: 600; }
.next-up .ir-value { color: var(--text); text-align: right; }
.next-up .ir-value .ir-sub { color: var(--muted); }
.next-up .fn-ic .ic { width: 22px; height: 22px; }
/* Four numbers in one strip, each opening the list behind it. */
.num-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.num-strip a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; color: var(--text); text-decoration: none; text-align: center; }
.num-strip a + a { border-left: 1px solid var(--line); }
.num-strip b { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; color: var(--primary); font-variant-numeric: lining-nums tabular-nums; }
.num-strip span { font-size: .8rem; color: var(--muted); line-height: 1.2; }
.num-strip a:hover { background: var(--hover); }
.strip-foot { margin: 8px 2px 0; }
.today-row { margin-top: 18px; background: var(--card); box-shadow: var(--shadow); }
.today-row > span:first-child { display: inline-flex; align-items: center; gap: 8px; }

/* ---- Money (views/admin/budget.ejs, budget_payments.ejs, budget_form.ejs): the switch, one main action, filters in a sheet ---- */
.money-tabs { margin: 0 0 12px; }
.money-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.money-tools .btn { margin: 0; }
.money-tools details.more { margin-left: auto; }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -2px 0 12px; }
.fchip-x { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--rim), var(--e1); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 600; }
.fchip-x > span[aria-hidden] { color: var(--muted); font-size: 1.05rem; margin-left: 2px; }
.how-split { margin: 14px 0 0; }
.stat-btn { font: inherit; cursor: pointer; width: 100%; }
.side-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -6px 2px 12px; }
.banner-row.calm { background: var(--card); box-shadow: var(--shadow); }
.banner-row > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.banner-act { color: var(--primary) !important; font-size: 1rem !important; font-weight: 700; }
@media (max-width: 700px) {
  .money-cards { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; }
  .money-cards .stat, .cat-stats .stat { padding: 10px 8px; }
  .cat-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-stats .stat .n { font-size: 1.25rem; }
  .cat-stats .side-words { display: none; }
}
/* A cost's page: the summary first, then its payments; each payment row opens it, its "…" holds Unlink and Remove. */
.cost-sum .ps-sub { margin: 0 0 10px; font-weight: 600; }
.cost-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cost-nums > span { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
.cost-nums b { font-family: var(--serif); font-size: 1.35rem; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.cost-nums .left b { color: var(--warn-ink, #9a5b00); }
.cost-nums .over b { color: var(--err); }
.cost-nums .done b { color: var(--ok); }
:root[data-theme="dark"] .cost-nums .left b { color: #f0b84d; }
.cost-bar { display: block; margin: 10px 0 2px; }
.cost-sum > .inset-list.in-card { margin-top: 12px; margin-bottom: -16px; border-bottom: 0; }
.cost-sum .ir-value { max-width: 62%; white-space: normal; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.pay-head h2 { margin: 0; }
.pay-row:has(> .pay-open) { grid-template-columns: 1fr auto; }
.pay-open { display: grid; grid-template-columns: 130px 1fr; gap: 4px 14px; color: inherit; text-decoration: none; border-radius: 8px; }
.pay-open:hover { background: var(--hover); }
@media (max-width: 560px) { .pay-open { grid-template-columns: 1fr; } .pay-open .pay-when { flex-direction: row; flex-wrap: wrap; gap: 8px; } }
.icon-btn.small-icon { width: 34px; height: 34px; }
.sheet-alt { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
#edit-cost .card.in-fold { margin: 0; box-shadow: none; }
details.more-fields { margin: 14px 0 4px; border-top: 1px solid var(--line); padding-top: 8px; }
details.more-fields > summary { cursor: pointer; font-weight: 600; color: var(--primary); padding: 6px 0; }
.paid-mode { margin: 6px 0 10px; }
/* Payments on a phone: each payment a card (the table's phone-rows), the month a heading over its first one. */
.pay-table .chip-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; border-radius: 8px; }
@media (max-width: 700px) {
  table.pay-table tr.month-start { margin-top: 14px; border-top: 3px solid var(--primary); }
  table.pay-table tr.month-start > td, table.pay-table tr.month-start > td:first-child { padding-top: 2px; border-top: 0; }
  table.pay-table td:first-child { flex-wrap: wrap; }
  table.pay-table tr.month-start > td { background: none; }
  table.pay-table tr.month-start { margin-top: 22px; border-top: 0; }
  table.pay-table .month-tag { position: static; flex-basis: 100%; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: var(--tile); }
  table.pay-table .month-tag .mt-name { flex: 1 1 auto; order: 0; }
  table.pay-table .month-tag .mt-sum { order: 1; margin-left: auto; font-variant-numeric: lining-nums tabular-nums; }
  table.pay-table .month-tag::before { content: ''; flex-basis: 100%; order: 2; }
  table.pay-table .month-tag .mt-side { order: 3; }
  table.pay-table .pill-select { max-width: 100%; }
}
@media (max-width: 700px) {
  .money-cards .stat .n { font-size: 1.45rem; line-height: 1.15; }
  .money-cards .side-words { font-size: .75rem; }
  .stats.cat-stats { grid-template-columns: repeat(3, 1fr); }
  .planned-pays .pay-row { grid-template-columns: 1fr; }
  .planned-pays .pay-acts { justify-content: flex-start; }
}
table.phone-rows td > * { min-width: 0; max-width: 100%; }
.chip-link { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; border-radius: 8px; }
.banner-row { font-size: 1rem; }
.banner-act { white-space: nowrap; }
.cost-sum .inset-row .ir-label { flex: none; white-space: nowrap; }
.cost-sum .inset-row .ir-value { flex: 1 1 auto; min-width: 0; max-width: none; }
#edit-cost > summary .small, #vendor-files-fold > summary .small { font-weight: 400; }
.stats.cat-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.more-fields > summary .small { font-weight: 400; }

/* ---- Settings (views/admin/settings.ejs): grouped rows, each opening in place with its own Save ---- */
.settings-page { max-width: 760px; }
.set-list { margin: 0 0 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.set-list > * + * > .inset-row, .set-list > * + .inset-row, .set-list > * + details > summary, .set-list > * + form > .inset-row { border-top: 1px solid var(--line); }
.set-list > :first-child, .set-list > :first-child > .inset-row, .set-list > :first-child > summary { border-top: 0 !important; }
.set-list .inset-row { border-top: 0; }
.set-list > .inset-row + .inset-row, .set-list > details + .inset-row, .set-list > form + .inset-row, .set-list > .inset-row + form > .inset-row { border-top: 1px solid var(--line); }
details.set-fold > summary.set-sum { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; list-style: none; cursor: pointer; font-weight: 500; }
details.set-fold > summary.set-sum::-webkit-details-marker { display: none; }
details.set-fold > summary.set-sum > .ic { flex: none; color: var(--gold); }
details.set-fold > summary .ir-label { flex: 1; min-width: 0; }
details.set-fold > summary .ir-value { flex: 0 1 auto; max-width: 55%; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.set-fold > summary::after { content: '›'; flex: none; color: var(--muted); font-size: 1.4rem; line-height: 1; transition: transform .15s; }
details.set-fold[open] > summary::after { transform: rotate(90deg); }
details.set-fold[open] > summary { background: var(--hover); }
details.set-fold > summary:hover { background: var(--hover); }
.set-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.set-body > :first-child { margin-top: 12px; }
.set-form-row { margin: 0; }
.set-form-row > .inset-row { border-radius: 0; }
.settings-page .inset-title:first-of-type { margin-top: 8px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; margin: 0; border-bottom: 1px solid var(--line); flex-direction: row-reverse; }
.switch-row:last-of-type { border-bottom: 0; }
/* A tick box drawn as a switch (the Features row). */
input[type=checkbox][role=switch] { appearance: none; -webkit-appearance: none; flex: none; width: 46px !important; height: 28px !important; margin: 0; border-radius: 999px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line); position: relative; cursor: pointer; transition: background .15s; }
input[type=checkbox][role=switch]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
input[type=checkbox][role=switch]:checked { background: var(--primary-fill, var(--primary)); }
input[type=checkbox][role=switch]:checked::after { transform: translateX(18px); }
input[type=checkbox][role=switch]:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.del-events { text-align: left; max-width: 420px; margin: 12px auto 0; }
.del-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.settings-page .danger-zone form { margin: 0; }
.set-list .ir-label { flex: 0 0 auto; max-width: 64%; }
.set-list .ir-value { flex: 1 1 0; min-width: 0; max-width: none !important; }

/* Logs: Openings | Sign-ins | Team; on a phone each entry two lines (who and what, then when, device, place), the
   IP and the rest on a tap; the table on a wide screen. */
.logs-tabs { margin-top: 0; }
.log-intro { margin: 0 0 4px; }
.log-how { margin: 0 0 12px; }
.log-search { margin-bottom: 8px; }
.log-list { display: none; }
.log-item { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 8px; }
.log-item > summary { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; cursor: pointer; list-style: none; }
.log-item > summary::-webkit-details-marker { display: none; }
.log-item .li-main { overflow-wrap: anywhere; }
.log-item .li-sub { color: var(--muted); font-size: .88rem; }
.log-item .li-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.log-item .li-more { padding: 0 14px 12px; border-top: 1px solid var(--line); font-size: .92rem; overflow-wrap: anywhere; }
.log-item .li-more p { margin: 8px 0 0; }
.log-item.visit-preview { opacity: .7; }
@media (max-width: 760px) {
  .visit-wrap { display: none; }
  .log-list { display: block; }
}
/* Logs: each column's name opens its menu (views/admin/logs.ejs, public/logcols.js): sort, then narrow down. The
   names may wrap and a long IP (IPv6) breaks, so every column fits the page. */
.visit-table th { white-space: normal; vertical-align: bottom; }
.visit-table .ip-text { word-break: break-all; }
/* The whole header cell is the button: it lights up top to bottom on hover, even beside a name that wraps to two lines. */
th.col-h { padding: 0; position: relative; white-space: normal; vertical-align: bottom; }
.col-h:hover, .col-h:has(.col-btn[aria-expanded="true"]) { background: var(--primary-soft); }
.col-btn::after { content: ''; position: absolute; inset: 0; }
.col-btn { display: flex; align-items: flex-end; gap: 6px; width: 100%; min-height: 44px; box-sizing: border-box; background: none; border: 0; font: inherit; font-weight: 700;
  color: inherit; text-align: left; padding: 10px 8px; cursor: pointer; }
.col-btn:focus-visible { outline: none; }
.col-btn:focus-visible::after { outline: 2px solid var(--primary); outline-offset: -2px; }
.col-h.on .col-btn { color: var(--primary); }
.col-ind { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; flex: none; font-size: .8em; color: var(--muted); }
.col-h.on .col-ind, .col-h[aria-sort="ascending"] .col-ind, .col-h[aria-sort="descending"] .col-ind { color: var(--primary); }
.col-ind .ic { width: 14px; height: 14px; margin: 0; }
.col-sort { font-size: 1.15em; font-weight: 700; }
/* Logs "By guest" / "By person" (views/partials/visit_table.ejs, views/admin/logs.ejs): one line each, their latest entry;
   "N times" unfolds the others under it, set in a little, the guest's name not repeated. */
.log-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 10px; }
.log-top .seg { margin: 0; }
.log-top .list-count { margin: 0; }
.lg-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
.lg-tog { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 10px 2px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.lg-tog:hover { background: var(--primary-soft); }
.lg-car { display: inline-block; transition: transform .15s; }
.lg-tog[aria-expanded="true"] .lg-car { transform: rotate(90deg); }
.visit-table.log-groups tbody.lg-open { background: var(--tile); }
.visit-table.log-groups tr.lg-more td { border-bottom-style: dashed; }
.visit-table.log-groups tr.lg-more td:first-child { padding-left: 22px; }
.visit-table.log-groups tr.lg-end td { padding-left: 22px; font-weight: 600; }
.log-group .li-more .log-item { box-shadow: none; border: 1px solid var(--line); margin: 8px 0 0; }
.log-group .li-more > p { margin: 10px 0 0; font-weight: 600; }
@media (max-width: 760px) { .log-top .seg { flex: 1 1 100%; } .log-top .seg a { flex: 1; text-align: center; } }
.col-menu { position: fixed; z-index: 70; width: 320px; max-width: calc(100vw - 16px); overflow-y: auto; box-sizing: border-box; padding: 10px 12px;
  background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--e3, 0 8px 24px rgba(0,0,0,.25)); }
.cm-sort { display: flex; gap: 6px; margin-bottom: 8px; }
.cm-s { flex: 1; min-height: 38px; background: var(--tile); border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .9rem; color: var(--text); cursor: pointer; }
.cm-s[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.cm-fields { border-top: 1px solid var(--border); padding-top: 4px; }
.cm-fields label.small, .log-sheet-col label.small { display: block; margin: 8px 0 2px; }
.cm-fields input[type=search], .cm-fields input[type=date] { min-height: 40px; padding: 6px 10px; font-size: .95rem; margin: 0; }
.cm-fields .row { gap: 8px; margin: 0; }
.cm-ticks { display: flex; flex-direction: column; margin: 6px 0 0; }
.cm-ticks .check { margin: 2px 0; gap: 10px; font-size: .92rem; font-weight: 400; }
.cm-ticks .check input { width: 20px; height: 20px; }
.cm-sub { margin: 10px 0 0; }
.cm-acts { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.log-sheet-col { border-top: 1px solid var(--border); padding: 2px 0 8px; }
.log-sheet-col > summary { cursor: pointer; font-weight: 600; padding: 8px 0 2px; }
#log-filters select#lorder { margin-bottom: 10px; }
[data-log-live].log-busy { opacity: .55; transition: opacity .15s; pointer-events: none; }
.who-pick { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.who-pick label { margin: 0; }
.who-pick select { width: auto; max-width: 70vw; margin: 0; }
.inset-list.activity > li.inset-row { padding: 10px 16px; border-bottom: 0; min-height: 0; align-items: baseline; line-height: 1.4; }
.inset-list.activity .ir-label { overflow-wrap: anywhere; }
.inset-list.activity .ir-value { font-size: .85rem; }

/* Calendar: List | Timeline | Month. With no choice made, the list on a phone and the timeline on a wide screen. */
.cal-modes { margin: 0 0 12px; }
.cal-list .cal-list-day.today { color: var(--primary); }
.cal-row .cl-time { flex: none; width: 4.6em; font-size: .88rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-row.function { border-left: 4px solid var(--primary); padding-left: 12px; }
.cal-row.function.aux { border-left-style: dashed; }
.cal-row.arrival { border-left: 4px solid var(--ok); padding-left: 12px; }
.cal-row.departure { border-left: 4px solid var(--warn); padding-left: 12px; }
.cal-row .cl-badge { background: var(--primary-fill); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .8rem; font-weight: 700; max-width: none; }
.cal-travel > summary { list-style: none; cursor: pointer; }
.cal-travel > summary::-webkit-details-marker { display: none; }
.cal-travel > summary::after { content: '›'; flex: none; color: var(--muted); font-size: 1.4rem; line-height: 1; transition: transform .15s; }
.cal-travel[open] > summary::after { transform: rotate(90deg); }
.cal-travel > .inset-row { padding-left: 28px; }
@media (min-width: 761px) { .cal-list.auto { display: none; } .cal-modes.auto .m-week { background: var(--card); color: var(--primary); box-shadow: var(--rim), var(--e1); } }
@media (max-width: 760px) { .cal-week-wrap.auto, .cal-week-wrap.auto + .cal-legend { display: none; } .cal-modes.auto .m-list { background: var(--card); color: var(--primary); box-shadow: var(--rim), var(--e1); } }
.cal-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.cal-pager strong { font-size: 1.05rem; }
.cal-pager .icon-btn { font-size: 1.4rem; line-height: 1; }
.cal-pager .icon-btn:disabled { opacity: .35; }
.cal-week.one-day { grid-template-columns: 46px minmax(0, 1fr); --cols: 1; }
.cal-week.one-day .off { display: none; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 2px 16px; }
.cal-legend .lg { display: inline-block; flex: none; width: 20px; height: 14px; border-radius: 3px; border-left: 4px solid; margin-left: 10px; }
.cal-legend .lg:first-child { margin-left: 0; }
.cal-legend .lg.function { background: var(--primary-soft); border-color: var(--primary); }
.cal-legend .lg.arrival { background: var(--ok-soft); border-color: var(--ok); }
.cal-legend .lg.departure { background: var(--warn-soft); border-color: var(--warn); }
.cal-legend .lg.approx { background: var(--primary-soft) repeating-linear-gradient(135deg, transparent 0 3px, var(--hatch) 3px 5px); border-color: var(--primary); }
.cal-legend .lg-n { background: var(--primary-fill); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; }
.cal-month { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell, .cal-dow { min-width: 0; }
.cal-cell .cal-item .cm-short { display: none; }
/* The month on a phone: dots in each day (functions, arrival, departure), the day tapped listed in full under the month. */
.cal-dots, .cal-daylists { display: none; }
.cal-daylist[hidden] { display: none; }
@media (max-width: 600px) {
  .cal-cell .cal-item { display: none !important; }
  .cal-cell { min-height: 56px; align-items: center; padding: 6px 2px; }
  .cal-cell[data-day] { cursor: pointer; }
  .cal-cell.sel { box-shadow: inset 0 0 0 2px var(--primary); }
  .cal-cell.sel .n { color: var(--primary); }
  .cal-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 100%; }
  .cal-dots i { width: 7px; height: 7px; border-radius: 50%; }
  .cal-dots .function { background: var(--primary); }
  .cal-dots .arrival { background: var(--ok); }
  .cal-dots .departure { background: var(--warn); }
  .cal-daylists { display: block; margin: -8px 0 22px; }
  .cal-daylists .inset-title:first-child { margin-top: 12px; }
}
@media (max-width: 600px) {
  .cal-cell .cal-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cal-cell .cal-item .cm-long { display: none; }
  .cal-cell .cal-item .cm-short { display: inline; }
}
.cal-col:not(:has(.function)) .cal-item.arrival, .cal-col:not(:has(.function)) .cal-item.departure { left: 3px; }
.cal-week.one-day .cal-col .cal-item.arrival, .cal-week.one-day .cal-col .cal-item.departure { left: 46%; }
.cal-week.one-day .cal-col:not(:has(.function)) .cal-item.arrival, .cal-week.one-day .cal-col:not(:has(.function)) .cal-item.departure { left: 3px; }
.cal-week.one-day .cal-col .cal-item.function { right: 55%; }

/* Possible duplicates: a pair as two rows, each with Keep this one; Different people under them. */
.dupe-pair { padding: 12px 14px; margin: 0 0 16px; }
.dupe-list { margin: 0; box-shadow: none; background: var(--soft); }
.dupe-row { gap: 10px; }
.dupe-row > .ir-label { color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.dupe-row > form { flex: none; margin: 0; }
.dupe-name { font-size: 1.05rem; }
.dupe-diff { margin: 6px 0 0; text-align: right; }

/* Groups: a category picked from chips, each with its symbol. */
.cat-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; border: 0; padding: 0; box-shadow: none; background: none; }
.cat-pick legend { font-family: var(--sans); font-size: 1rem; font-weight: 600; margin-bottom: 6px; padding: 0; color: var(--text); }
.cat-pick legend .opt { font-weight: 400; }
.cat-pick label { margin: 0; cursor: pointer; }
.cat-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cat-pick span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--tile); font-size: .92rem; font-weight: 500; }
.cat-pick span .ic { width: 1.05em; height: 1.05em; margin: 0; color: var(--gold); }
.cat-pick input:checked + span { background: var(--primary-fill); color: #fff; }
.cat-pick input:checked + span .ic { color: #fff; }
.cat-pick input:focus-visible + span { outline: 3px solid var(--gold-soft); }

/* A function's guest list: a checklist with the whole row to tap. */
.ps-lead { margin: -8px 0 12px; }
.ps-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin: 4px 0 8px; }
.ps-tools .seg { margin: 0; }
.ps-bulk { display: inline-flex; gap: 12px; }
.ps-list .ps-row { cursor: pointer; }
.ps-list .ps-row input[type=checkbox] { flex: none; width: 24px; height: 24px; margin: 0; accent-color: var(--primary); }
.ps-list .psrow[hidden] { display: none; }
.ps-list .ps-row:has(input:checked) { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }

/* Sending an invitation: the message as a chat bubble, what to send as one switch, the WhatsApp button full width. */
.msg-bubble { position: relative; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 15em; overflow-y: auto; padding: 10px 12px; margin: 2px 0 4px;
  border-radius: 12px 12px 12px 4px; background: #E7F7DD; color: #1d2b17; font-size: .93rem; line-height: 1.45; }
:root[data-theme="dark"] .msg-bubble { background: #1f3a2a; color: #e6f2e6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg-bubble { background: #1f3a2a; color: #e6f2e6; } }
.send-seg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 4px; }
.send-seg-row .seg { position: relative; margin: 0; min-width: 0; max-width: 100%; flex: 0 1 auto; }
.send-box, .share-wa { min-width: 0; max-width: 100%; }
.send-box textarea { max-width: 100%; box-sizing: border-box; }
.send-box .send-btn { width: 100%; }

/* Share with one guest: the code as a caption; Copy message, Copy link and Card ▾ in one quiet row. */
.share-code { margin: -8px 0 12px; }
.share-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; }
/* Sending from a guest's own page: first in Invitation & reply, so no line above; the send box as wide as the card. */
.sub-block.send-here { margin-top: 4px; padding-top: 0; border-top: 0; }
.send-here .share-wa { display: block; }
.send-here .share-more { margin: 4px 0 14px; }
.share-card-more > summary.btn { min-height: 0; min-width: 0; padding: 0; }
.share-card-more .more-pop { left: 0; right: auto; width: 250px; }
.share-card-more .share-card-thumb { margin: 6px 16px 8px; width: 120px; }
.share-card-more [data-card-status] { padding: 0 16px; margin: 0; }
.sent-more { padding: 12px 16px; }

/* Import, step 2: the rows as read; a value out of place marked. */
.import-table td.odd { background: var(--warn-soft); box-shadow: inset 0 -2px 0 var(--warn); }
.odd-note { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--warn-soft); color: var(--text); }
.import-table td:first-child, .import-table th:first-child { width: 36px; }
.import-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); }
@media (max-width: 700px) {
  table.import-table tr { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 6px; }
  table.import-table td { grid-column: 2; }
  table.import-table td:first-child { grid-column: 1; grid-row: 1 / span 6; padding-top: 4px; }
  table.import-table td:nth-child(2) { font-weight: 600; font-size: 1.05rem; }
}
.ps-list + .ps-none + .save-bar, .ps-list ~ .save-bar { justify-content: space-between; }

/* Invitation cards: one part of the form at a time under the switch; a function's line behind Reword. */
.cards-lead { margin: -6px 0 12px; }
.card-parts { margin: 0 0 12px; }
.cards-form fieldset[hidden] { display: none; }
.card-fn-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-fn-top .check { margin: 0; }
.card-fn-more { margin-top: 6px; }
.cards-form .save-bar.calm { position: static; }
.cards-form .save-bar { justify-content: space-between; }

/* Invitation messages: a fold per round, the message as a guest reads it, Edit wording for the words with fill-ins. */
details.msg-round { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 0 0 10px; }
details.msg-round > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; cursor: pointer; list-style: none; font-weight: 600; }
details.msg-round > summary::-webkit-details-marker { display: none; }
details.msg-round > summary > .ic { flex: none; color: var(--gold); }
details.msg-round > summary .ir-label { flex: 1; min-width: 0; }
details.msg-round > summary .ir-value { flex: none; max-width: 50%; color: var(--muted); font-weight: 400; font-size: .9rem; text-align: right; }
details.msg-round > summary::after { content: '›'; flex: none; color: var(--muted); font-size: 1.4rem; line-height: 1; transition: transform .15s; }
details.msg-round[open] > summary::after { transform: rotate(90deg); }
.msg-body { padding: 0 16px 14px; }
.msg-langs { margin: 0 0 8px; }
.msg-as { margin: 0 0 4px; }
.msg-round .msg-bubble { max-height: none; }
.msg-round .msg-bubble[lang="hi"], .msg-round .msg-bubble[lang="mr"] { font-family: 'Mukta', var(--sans); font-size: 1rem; }

/* Reports: one switch for the lists; on a phone each function a card with Coming and Plan for, each arrival a row. */
.rep-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0 0 12px; }
.rep-top .seg { margin: 0; }
.rep-tools { display: inline-flex; gap: 14px; }
.rep-tools .ic { width: 1em; height: 1em; margin-right: 4px; }
.rep-cards, .rep-travel { display: none; }
.rep-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; margin: 0 0 10px; }
.rep-card .rc-name { margin: 0 0 6px; }
.rc-nums { display: flex; gap: 24px; }
.rc-nums span { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); }
.rc-nums b { font-size: 1.8rem; line-height: 1.1; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.rc-line { margin: 6px 0 0; }
.rep-travel .cl-time { flex: none; width: 4.6em; font-size: .88rem; font-weight: 600; color: var(--muted); }
.rep-travel .ir-label { color: var(--text); text-decoration: none; }
.rep-travel .icon-btn { width: 38px; height: 38px; }
.info-tip { vertical-align: middle; }
.info-tip > summary { min-width: 0; min-height: 0; padding: 0 2px; font-weight: 400; color: var(--muted); cursor: pointer; }
.info-tip .more-pop { width: 260px; padding: 10px 14px; text-align: left; font-weight: 400; white-space: normal; }
.info-tip .more-pop p { margin: 0; font-size: .9rem; }
@media (max-width: 700px) {
  .rep-cards, .rep-travel { display: block; }
  .rep-wide { display: none; }
  table.phone-rows tfoot.phone-hide-foot { display: none; }
}
@media print { .rep-wide { display: block !important; } }
@media (max-width: 900px) {
  /* Cards on a phone: the card, then the part switch and the form; everyone's cards at the end. */
  .cards-layout { display: flex; flex-direction: column; }
  .cards-preview { display: contents; }
  .cards-preview > * { order: -1; }
  .cards-preview > .all-cards { order: 1; margin-top: 14px; }
}
.rep-travel .ir-sub .pill { font-size: .75rem; padding: 0 7px; }

/* A payment's page: the costs it went towards right after the amount; on a phone the cost full width, its amount under. */
@media (max-width: 560px) { .pay-part { grid-template-columns: 1fr; gap: 4px; margin-bottom: 12px; } }
.pay-towards { margin-top: 12px; }

/* Settlement: the answer first, each side's share and payments, a row per cost that opens to its detail. */
.settle-answer .settle-net { margin: 0 0 6px; font-size: 1.3rem; font-weight: 600; }
.settle-answer p { margin: 0 0 8px; }
.settle-answer .btn.block { margin-top: 6px; }
.settle-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.settle-sides .card { margin: 0 0 12px; padding: 12px 14px; }
.settle-sides p { margin: 0; line-height: 1.6; }
.settle-sides .ss-name { margin-bottom: 4px; }
details.settle-row > summary { list-style: none; cursor: pointer; }
details.settle-row > summary::-webkit-details-marker { display: none; }
details.settle-row > summary::after { content: '›'; flex: none; color: var(--muted); font-size: 1.4rem; line-height: 1; transition: transform .15s; }
details.settle-row[open] > summary::after { transform: rotate(90deg); }
details.settle-row + details.settle-row > summary { border-top: 1px solid var(--line); }
.settle-list .ir-value { max-width: 48%; white-space: normal; }
.owe-short { color: var(--warn); font-weight: 600; }
.settle-detail { padding: 0 16px 12px; }
.settle-detail p { margin: 4px 0; }
.settle-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px !important; }
.settle-unpaid { margin: 0 0 14px; }
.settle-way { margin: 0 0 12px; }
.settle-for { margin-top: 10px; }

/* Vendors: the status under the name; a vendor's page a summary first, details under Edit details. */
.row-sub .pill { font-size: .75rem; padding: 0 8px; margin-right: 4px; }
.vendor-sum .ps-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.vendor-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vendor-notes { margin: 8px 0 0; white-space: pre-wrap; color: var(--muted); }
.inset-row.add-row, .inset-row.add-row .ic { color: var(--primary); }
.vf-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.vf-pick { cursor: pointer; }
.vf-then { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vf-then p { flex-basis: 100%; margin: 0; }
.vf-then input[type=text] { flex: 1 1 200px; margin: 0; }
details#edit-vendor > summary { display: flex; align-items: center; gap: 8px; }

/* Goods and gifts: Add and a ready-made list as sheets; on a phone each item a row with its status as a tag to change. */
.tasks-tabs { margin: 0 0 12px; }
.items-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.items-sum { padding: 12px 16px; }
.group-head.only h3 { display: none; }
.item-rows { display: none; list-style: none; margin: 6px 0 0; padding: 0; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.item-row:first-child { border-top: 0; }
.item-row > .ir-label { flex: 1; min-width: 0; color: var(--text); text-decoration: none; display: flex; flex-direction: column; }
.item-row .it-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.item-row .ir-sub { font-size: .85rem; color: var(--muted); }
.st-pick > summary.pill { min-height: 0; min-width: 0; padding: 4px 12px; cursor: pointer; }
.st-pick .more-pop { min-width: 160px; }
.st-pick .more-pop button[aria-current] { font-weight: 700; color: var(--primary); }
.qty-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
/* Lists with a bin and Select (goods, gifts we give, tasks, gifts received; views/partials/bulk_select.ejs): a bin at each
   row's right end, apart from what is beside it; Select shows the tick boxes and hides the bins. */
.it-rm { display: inline-flex; margin: 0; }
.item-row .it-rm, .task-row .it-rm, .gift-rows .it-rm { margin-left: 10px; }
.it-rm .icon-remove { width: 32px; height: 32px; min-height: 0; padding: 0; border-width: 1px; color: var(--err); }
.it-rm .icon-remove .ic { width: 16px; height: 16px; }
.row-item .it-rm { margin-left: 8px; }
.row-item > .it-pick { margin-right: -2px; }
/* Budget: a cost's row (a link) with its tick box and bin beside it. */
.rows > .row-wrap { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.rows > .row-wrap:last-child { border-bottom: 0; }
.row-wrap > .row-item { flex: 1; min-width: 0; border-bottom: 0; }
.row-wrap > .it-pick { margin-left: 16px; }
.row-wrap > .it-rm { margin: 0 14px 0 4px; }
/* A row of an inset list (meals, venues) with its bin at the end. */
.ir-rm-wrap { display: flex; align-items: center; border-top: 1px solid var(--line); }
.inset-list > .ir-rm-wrap:first-child { border-top: 0; }
.ir-rm-wrap > .inset-row { flex: 1; min-width: 0; border-top: 0; }
.ir-rm-wrap > .it-rm { margin: 0 12px 0 0; }
/* A card (an update, an idea board, a compared venue, a hotel) with its bin in the top-right corner. */
.bin-host { position: relative; }
.bin-host > .it-rm { position: absolute; top: 10px; right: 10px; z-index: 2; }
.bin-host > a.update-card h3, .hotel-card.bin-host > h3, .vc-card.bin-host > .vc-head { padding-right: 44px; }
.board-grid > .bin-host { display: flex; }
.board-grid > .bin-host > .board-card { flex: 1; }
/* Payments: the tick box before the date; the bin at the row's end, on a phone its card's foot on the right. */
.pay-table td > .it-pick { margin-right: 8px; vertical-align: middle; }
@media (max-width: 700px) {
  table.pay-table tr[data-pick-row] { position: relative; }
  table.pay-table td.rm-cell { position: absolute; right: 12px; bottom: 10px; width: auto; padding: 0; }
}
.rm-col, .sel-col { width: 1%; }
.rm-col { text-align: right; }
.container:not(.selecting) .it-pick, .container:not(.selecting) .sel-col { display: none; }
.selecting .it-rm { visibility: hidden; }
.it-pick { flex: none; width: 20px; height: 20px; margin: 0; }
.it-bulk-row { display: flex; gap: 8px; align-items: center; }
.it-bulk-row select { flex: 1; margin: 0; }
.it-bulk-rm { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.it-bulk-rm.alone { margin-top: 0; padding-top: 0; border-top: 0; }
.task-tools { display: flex; justify-content: flex-end; margin: 0 0 -4px; }
.task-row .it-pick { margin-left: 16px; }
.task-row .it-rm { margin-right: 10px; }
.selecting .task-row [data-task-tick] { display: none; }
.gift-rows .it-pick { margin-right: 10px; }
@media (max-width: 700px) {
  .item-rows { display: block; }
  .item-table { display: none; }
}
.pay-towards legend { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--text); }

/* Gifts received: label over number as elsewhere; a row per gift on a phone with a circle to tick it thanked. */
.gift-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.gift-seg { margin: 0 0 10px; }
.gift-search { margin: 0 0 6px; }
.gift-rows { display: none; }
.gift-rows .ir-label { color: var(--text); text-decoration: none; }
.gift-rows .ir-sub .pill { font-size: .75rem; padding: 0 7px; }
.gift-rows form, .gift-table form { margin: 0; }
.thank-tick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); color: transparent; cursor: pointer; padding: 0; }
.thank-tick .ic { width: 20px; height: 20px; margin: 0; }
.thank-tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 700px) { .gift-rows { display: block; } .gift-table { display: none; } }
@media print { .gift-table { display: block !important; } }

/* Catering: one line of how it stands, a row per meal under its day; a meal's page opens with its numbers. */
.meal-summary { margin: -4px 0 12px; color: var(--muted); }
.meal-summary.warn { color: var(--warn); font-weight: 600; }
.meal-empty { flex-wrap: wrap; }
.meal-quick { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.quiet-form { margin: 4px 0 0; }
.meal-sum p { margin: 8px 0 0; }
.meal-list .ir-value { max-width: none; }

/* Venues: a group per main venue with its halls under it; a venue's form short, the address and map folded. */
.venue-group { margin-bottom: 6px; }
.venue-top .ir-label strong { font-size: 1.05rem; }
.venue-hall .ir-label { font-weight: 500; }
.venue-map { margin: 0 4px 16px; }
.venue-in { margin: 0 0 4px; }
.venue-addr > summary .muted { display: block; font-weight: 400; }

/* Compare venues: a card each on a phone (verdict, key facts, pros and cons, Choose); a table on a wide screen. */
.vc-cards { display: none; }
.vc-card { padding: 12px 14px; }
.vc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.vc-card p { margin: 6px 0 0; }
.vc-facts { font-weight: 500; }
.vc-pro { color: var(--ok); font-weight: 700; }
.vc-con { color: var(--err); font-weight: 700; }
.vc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.vc-acts form { margin: 0; }
.vc-more summary { cursor: pointer; color: var(--primary); margin-top: 4px; }
.vo-status { overflow-x: auto; }
.items-tools .sort-pick { margin-left: auto; }
@media (max-width: 700px) { .vc-cards { display: block; } .vc-table { display: none; } }

/* Hotels & stay: room numbers coloured by state; a number's menu as a sheet on a phone; the hotel's page in a sheet. */
.roomnum.taken { background: var(--ok-soft); border-color: var(--ok); color: var(--text); }
.roomnum.add { border-style: dashed; color: var(--primary); background: none; }
.room-legend { margin: 4px 0 6px; }
.room-legend .x-sample { margin-right: 2px; }
.hotel-line { margin: 4px 0 0; }
.hotel-addr { margin: 2px 0 6px; }
.hotel-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.hotel-card h3 a { color: inherit; text-decoration: none; }
.roomchip-add .roomchip-pop form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.roomchip-add .roomchip-pop label { flex-basis: 100%; }
.roomchip-add .roomchip-pop input { flex: 1 1 150px; margin: 0; }
@media (max-width: 700px) {
  .roomchip[open] > .roomchip-pop { position: fixed; left: 0 !important; right: 0 !important; bottom: 0; top: auto; width: 100vw; max-height: 70vh; overflow-y: auto;
    border-radius: 20px 20px 0 0; padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0,0,0,.25); z-index: 60; }
}
/* A hotel's room types: a small card each with its fields labelled. */
.rt-card { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; }
.rt-c { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: .85rem; font-weight: 500; color: var(--muted); }
.rt-c input { margin: 0; }
.rt-wide { grid-column: 1 / -1; }
.rt-card .rt-remove { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 701px) { .rt-card { grid-template-columns: 2fr 1fr 1fr; } .rt-card .rt-wide:first-of-type { grid-column: auto; } }
.rt-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }

/* The privacy policy: numbered sections with a contents list. */
.privacy-text { max-width: 68ch; font-size: 1.02rem; line-height: 1.6; }
.privacy h2 { font-size: 1.2rem; margin: 26px 0 8px; }
.privacy h3 { font-size: 1rem; margin: 16px 0 4px; }
.privacy li { margin: 4px 0; }
.privacy-toc { background: var(--tile); border-radius: 12px; padding: 8px 16px; margin: 12px 0 4px; }
.privacy-toc ol { margin: 0 0 6px; padding-left: 20px; columns: 2; column-gap: 24px; }
@media (max-width: 560px) { .privacy-toc ol { columns: 1; } }

/* Allot rooms: one switch for who is listed, Select for ticks, the bar at the foot to give rooms together; a person's
   form in a sheet; on a phone a row per person. */
.allot-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 0 0 10px; }
.allot-tools .seg { margin: 0; }
.allot-page:not(.selecting) input.pick, .allot-page:not(.selecting) #select-all { display: none; }
.allot-rows { display: none; }
.allot-rows input.pick { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--primary); }
.allot-rows .ir-label { color: var(--text); text-decoration: none; }
.allot-rows .ir-value { color: var(--primary); font-weight: 600; }
.allot-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  width: min(560px, calc(100vw - 24px)); box-sizing: border-box; background: var(--card); border-radius: 16px; box-shadow: var(--e3, 0 8px 30px rgba(0,0,0,.25)); }
.allot-bar[hidden] { display: none; }
.allot-bar .btn { margin-left: auto; }
.allot-page.selecting .allot-rows .ir-value { display: none; }
@media (max-width: 700px) { .allot-rows { display: block; } .allot-table { display: none; } }

/* Room layout: Plan | List (on a phone the rooms as rows, each opening the room's panel), Print in "…", the shapes behind
   Add a shape when drawing on a phone. */
.plan-modes-end { display: inline-flex; align-items: center; gap: 8px; }
.plan-view { margin: 0; }
.plan-list { margin: 0 0 12px; }
.plan-list .pl-num { flex: none; min-width: 3.2em; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan-list .ir-label { color: var(--text); }
.pl-row.st-taken .pl-num { color: var(--ok); }
.pl-row.st-blocked .ir-label { color: var(--muted); text-decoration: line-through; }
.pb-tools-fold > summary { list-style: none; cursor: pointer; margin-bottom: 8px; }
.pb-tools-fold > summary::-webkit-details-marker { display: none; }
@media (min-width: 701px) { .pb-tools-fold > summary { display: none; } }

/* ---- Arrivals & departures desk on the shared components (views/admin/desk.ejs, partials/desk_head.ejs, desk_rows.ejs) ---- */
.desk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 6px; }
.desk-tools .seg { margin: 0; }
.desk-tools .seg > a { padding: 7px 13px; }
.desk-setup-btn { margin-left: auto; }
.desk-setup-btn .ic { width: 16px; height: 16px; }
.desk-days { display: flex; width: max-content; margin: 4px 0 10px; }
.desk-tally b { font-family: var(--sans); font-weight: 700; font-size: 1.6rem; font-variant-numeric: lining-nums tabular-nums; }
.desk-tally span { display: block; white-space: nowrap; font-size: .78rem; }
.desk-top { grid-template-columns: auto 1fr auto; }
.desk-time { min-width: 62px; white-space: nowrap; }
.desk-card.all-done { opacity: .72; }
.desk-step:disabled { opacity: .6; cursor: progress; }
/* The steps as one bar (partials/desk_rows.ejs): done ones filled green with ✓ and the time; the rest plain. */
.desk-steps { gap: 0; flex-wrap: nowrap; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.desk-steps .inline-form { flex: 1 1 0; min-width: 0; }
.desk-steps .inline-form + .inline-form .desk-step { border-left: 1.5px solid var(--border); }
.desk-step { border: 0; border-radius: 0; min-height: 52px; padding: 6px 4px; white-space: nowrap; font-size: .92rem; color: var(--text); font-weight: 500; }
.desk-step.on { font-weight: 600; }
.desk-guide { margin: 0 0 12px; }
.desk-step span, .desk-step small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Who ticked it: the time on one line, the name under it (never cut to "Ro…" on a phone). */
.desk-step small { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.desk-step.on { background: var(--ok-soft); color: var(--ok); border-color: var(--border); }
@media (max-width: 420px) { .desk-step.on span { font-size: .84rem; } }
/* Your name: the box until typed, then one line. */
.desk-name { margin: 0 0 10px; padding: 0; }
.desk-name-edit[hidden], .desk-you[hidden] { display: none; }
.desk-name-row { display: flex; gap: 8px; align-items: center; }
.desk-name-row input { flex: 1; margin: 0; }
.desk-you { margin: 0; display: flex; align-items: center; gap: 6px; }
html body:not(:has(.theme-flip.float)) > .container.desk-share:first-of-type { padding-top: 22px; }   /* the desk link: no round button to clear */
#desk-setup .inset-title:first-child { margin-top: 12px; }
#desk-setup .desk-drivers .inset-row { min-height: 52px; }
#desk-setup .desk-drivers form { margin: 0; flex: none; }
#desk-setup label.check { margin: 6px 0; }
@media (max-width: 480px) { .desk-tally b { font-size: 1.4rem; } .desk-top { grid-template-columns: auto 1fr auto; } }

/* ---- A function's page (views/admin/session_form.ejs): the type in a line, the dress code as a row opening a sheet ---- */
.kind-line { margin: 0 0 4px; color: var(--muted); font-weight: 600; }
.kind-line .btn.link { vertical-align: baseline; }
.dress-box { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.dress-row { min-height: 52px; }
.dress-row .ir-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dress-dots { display: inline-flex; gap: 3px; flex: none; }
.dress-dots .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }
#dress-sheet .swatches label { font-size: .88rem; }
#dress-sheet .actions { position: sticky; bottom: -18px; margin: 12px -18px -18px; padding: 12px 18px; background: var(--card); border-top: 1px solid var(--line); }

/* "This invitation is for everyone coming with you" under a guest's details, with Send to my family (views/guest/home.ejs). */
.family-share { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.family-share p { margin: 0; color: var(--muted); }
.family-share .btn { flex: none; white-space: nowrap; }
@media (max-width: 640px) { .family-share { flex-direction: column; align-items: stretch; } .family-share .btn { text-align: center; } }

/* ---- Run sheets on the shared components (views/admin/runsheets.ejs, runsheet.ejs, partials/runsheet_rows.ejs) ---- */
.runsheet-list .fn-ic .ic { margin: 0; }
.run-item[data-id] .run-body { cursor: pointer; }
button.run-what { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; font-size: 1.05rem; text-align: left; cursor: pointer; }
button.run-what:hover { color: var(--primary); }
.run-item.done button.run-what { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.run-tick { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 2px solid var(--btn-border); border-radius: 50%; background: var(--card); color: transparent; cursor: pointer; box-shadow: none; }
.run-tick .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.run-tick:hover { border-color: var(--ok); color: var(--ok); }
.run-tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.run-add { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 10px 12px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.run-add .ic { width: 20px; height: 20px; }
.run-add:hover { background: var(--hover); }
#line-remove.danger-zone { margin-top: 18px; }

/* ---- Tasks on the shared components (views/admin/tasks.ejs, task_form.ejs) ---- */
.task-add { padding-bottom: 12px; }
.task-add-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-add-line > input[type=text] { flex: 1 1 220px; margin: 0; }
.task-add-due { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; }
.task-add-due label { margin: 0; font-weight: 500; color: var(--muted); }
.task-add-due input { width: auto; margin: 0; }
.task-add-line .btn { flex: none; }
.task-add .more-fields { margin-top: 10px; }
@media (max-width: 520px) { .task-add-line > input[type=text] { flex-basis: 100%; } .task-add-due { flex: 1; } .task-add-due input { flex: 1; min-width: 0; } }
.inset-title.overdue { color: var(--err); }
.inset-title .seg-n { margin-left: 4px; font-weight: 500; }
.task-list > li.task-row { display: flex; align-items: center; border-top: 1px solid var(--line); }
.task-list > li.task-row:first-child { border-top: 0; }
.task-list .inset-row { border-top: 0; padding-left: 4px; flex: 1; min-width: 0; }
.task-list .inset-row .ir-label { overflow-wrap: anywhere; }
.task-list .inline-form { margin: 0; padding-left: 12px; flex: none; }
.task-tick { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 2px solid var(--btn-border); border-radius: 50%; background: var(--card); color: transparent; cursor: pointer; }
.task-tick .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.task-tick:hover { border-color: var(--ok); color: var(--ok); }
.task-row.done .task-tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.task-row.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-late { color: var(--err); font-weight: 600; }
.task-done-fold > summary { cursor: pointer; list-style: none; }
.task-done-fold > summary::before { content: '▸ '; }
.task-done-fold[open] > summary::before { content: '▾ '; }
.run-item { grid-template-columns: auto 1fr auto; }
.run-time { min-width: 62px; white-space: nowrap; }
@media (max-width: 560px) { .run-item { grid-template-columns: auto 1fr auto; } }
.task-add-due .date-wrap { flex: 1; min-width: 0; display: flex; gap: 6px; margin: 0; }
.task-add-due .date-wrap input { flex: 1; min-width: 0; width: auto; margin: 0; }
@media (max-width: 520px) { .task-add-due { min-width: 0; } }

/* ---- Ideas on the shared components (views/admin/ideas.ejs, idea_board.ejs) ---- */
.title-row .title-acts { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.title-row .title-acts details.more > summary { min-height: 36px; min-width: 40px; }
.title-row > .btn { flex: none; }
.new-board-form .chips-row { margin-bottom: 4px; }
.idea-add-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.idea-add-bar .btn .ic { width: 18px; height: 18px; }
.idea-add-bar .upload-status:empty { display: none; }
.idea-seg { margin-top: 6px; }
.idea-acts { padding: 6px 8px 4px; }
.idea-acts .inline-form { gap: 4px; }
.idea-tog { width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--btn-border); border-radius: 50%; background: var(--card); color: var(--muted); font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.idea-tog.short[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.idea-tog.final[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.idea-acts details.more > summary { min-width: 40px; min-height: 40px; padding: 0 8px; }
.idea-mark[hidden] { display: none; }
.title-row > h1 { flex: 1 1 auto; overflow: hidden; }
@media (max-width: 480px) { .title-acts .share-btn > span { display: none; } .title-acts .share-btn { min-width: 40px; padding: 0 10px; } .title-acts .share-btn .ic { margin: 0; } }

/* ---- Account Roles on the shared components (views/admin/team.ejs, team_member.ejs, permissions.ejs) ---- */
.team-list .pill { font-size: .75rem; padding: 1px 8px; vertical-align: 1px; }
.inset-row.add-row { color: var(--primary); font-weight: 600; }
.inset-row.add-row::after { content: none; }
.inset-row.add-row .ic { width: 20px; height: 20px; }
.inset-list form.inline-form { display: block; margin: 0; }
.invite-item { flex-wrap: wrap; }
.invite-item .ir-label { flex: 1 1 200px; }
.invite-item form { flex: none; }
.role-cap { margin: -6px 0 6px; min-height: 1.4em; }
.member-pw { margin-top: 18px; }
.member-pw > summary { cursor: pointer; font-weight: 600; }
.member-owner { margin: 14px 0 0; }
.quiet-reset { margin: -4px 0 14px; text-align: center; }
.perm-roles { max-width: 420px; }
.perm-seg { margin: 8px 0 0; }
@media (max-width: 700px) {
  .perm-seg { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); width: 100%; }
  .perm-seg > label { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 6px 4px; }
}
@media (max-width: 480px) { .wide-only { display: none; } }
.perm-seg > label { padding: 0; }
.perm-seg > label > span { display: block; width: 100%; padding: 8px 6px; border-radius: 999px; }

/* ---- Colours and background (views/admin/look.ejs): on a phone the preview is a strip pinned at the top ---- */
.look-form .seg.block { margin: 4px 0 8px; }
.look-photo-pick { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.look-photo-pick > span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.look-photo-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; }
.look-photo-pick .btn .ic { width: 16px; height: 16px; }
.look-photo-pick label.busy { opacity: .6; pointer-events: none; }
.look-photo-form { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.look-photo-form .upload-status { position: fixed; }
@media (max-width: 860px) {
  .look-side { order: -1; position: sticky; top: 60px; z-index: 5; }
  .look-side > p.small { display: none; }
  .look-preview { box-shadow: var(--e3, var(--shadow)); }
  .look-preview .hero { padding: 12px 12px 10px; }
  .look-preview .hero-orn, .look-preview .countdown, .look-preview-body h2, .look-preview-body .card.fn { display: none; }
  .look-preview .hero-title { font-size: 1.25rem; }
  .look-preview .hero-eyebrow { margin: 0; font-size: .7rem; }
  .look-preview-body { padding: 8px 12px; }
  .look-preview-body .actions { margin: 0; }
  .look-preview-body .btn { min-height: 32px; padding: 4px 12px; font-size: .8rem; }
}

/* ---- Wedding page settings (views/admin/website.ejs) ---- */
.wp-form .switch-row > span { display: flex; flex-direction: column; flex: 1; min-width: 0; font-weight: 400; }
.wp-form .switch-row strong { font-weight: 600; }
.wp-sub { font-size: .85rem; color: var(--muted); }
.wp-on { border-bottom: 0; padding-top: 0; }
.wp-on strong { font-size: 1.1rem; }
.wp-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; margin: 0 0 6px; border-radius: 12px; background: var(--ok-soft); }
.wp-live > a { flex: 1 1 200px; font-weight: 600; overflow-wrap: anywhere; }
.wp-live .actions { margin: 0; }
.wp-form .switch-row.off { opacity: .7; }
.wp-warn { margin: -2px 0 4px; }
.wp-fns { margin: 0 0 4px; padding: 6px 0 0 12px; border-left: 3px solid var(--line); }
.wp-form .slug-field { margin-bottom: 8px; }

/* ---- Photos in three views (views/admin/photos.ejs) ---- */
.photo-views { margin: 4px 0 12px; }
.plan-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.plan-line .ic { width: 16px; height: 16px; color: var(--gold); }
.tell-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tell-card .btn .count { margin-left: 4px; }
.photo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.photo-tiles.one { grid-template-columns: 1fr; }
.photo-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 480px; }
.photo-tile-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-form { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tile-form .upload-status:empty { display: none; }
.photo-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; margin: 0; padding: 10px;
  border: 2px dashed var(--border); border-radius: 16px; background: var(--tile); color: var(--muted); font-weight: 500; text-align: center; overflow: hidden; cursor: pointer; }
.photo-tile .ic { width: 26px; height: 26px; color: var(--gold); }
.photo-tile.has { border: 0; padding: 0; }
.photo-tile.has img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .tile-over { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: .8rem; }
.photo-tile .tile-over .ic { width: 14px; height: 14px; color: #fff; }
.photo-tile:hover { border-color: var(--primary); }
.photo-tile.upload-pick.busy { opacity: .6; }
.wide .photo-tile { aspect-ratio: 16 / 7; }
.round .photo-tile.has img { border-radius: 50%; }
.round .photo-tile.has { background: none; }
.tile-label { margin: 0 0 4px; }
.tile-name { margin: 0; }
.tile-caption { display: flex; gap: 6px; margin: 0; }
.tile-caption input { flex: 1; min-width: 0; margin: 0; min-height: 36px; padding: 6px 10px; font-size: .9rem; }
.tile-remove { margin: 0; text-align: center; }
.photo-settings .set-body .plan-note { margin-top: 0; }
#add-sheet .upload-pick .ic, #add-sheet .btn .ic { width: 18px; height: 18px; }
.switch-row > span:has(> strong) { display: flex; flex-direction: column; flex: 1; min-width: 0; font-weight: 400; }
.switch-row > span > strong { font-weight: 600; }
.set-switch { margin: 0; }
.set-switch .switch-row { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.plan-line { display: block; }
.plan-line .ic { vertical-align: -3px; margin-right: 4px; }
.look-form > .save-bar { margin: 14px 0 0; border-radius: var(--radius); }
.taken-fold > summary { cursor: pointer; color: var(--primary); list-style: none; }
.taken-fold > summary::-webkit-details-marker { display: none; }
.taken-fold .cap-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.taken-fold .cap-form input { margin: 0; }

/* ---- Updates (views/admin/announcements.ejs, announcement_form.ejs) ---- */
a.update-card { display: block; color: var(--text); text-decoration: none; }
a.update-card:hover { box-shadow: var(--rim), var(--e2); }
.update-card h3 { margin: 0 0 4px; }
.update-body { margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pin-pill { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; background: var(--gold-tint, var(--tile)); color: var(--gold); font-size: .78rem; }
.pin-pill .ic { width: 13px; height: 13px; }

/* ---- Hashtag ideas (views/admin/hashtags.ejs) ---- */
.tag-now { font-family: var(--serif); font-size: 1.25rem; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-mine .btn .ic { width: 15px; height: 15px; }
.tag-picks .inline-form { display: block; margin: 0; }
.tag-pick .tag-text { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.tag-pick::after { content: none !important; }
.tag-pick.on .tag-text { color: var(--primary); }
.tag-check { flex: none; color: var(--primary); font-weight: 700; font-size: 1.15rem; }
.tag-own input { margin: 0; }
.tag-names > summary { cursor: pointer; font-weight: 600; }
/* Each idea: the row picks it; the small link beside it opens it on Instagram (is it taken?). */
.tag-picks > li.tag-li { display: flex; align-items: stretch; }
.tag-li > .inline-form { flex: 1; min-width: 0; }
.tag-ig { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; color: var(--muted); border-left: 1px solid var(--line); }
.tag-ig:hover { color: var(--primary); }
.tag-ig .ic { width: 16px; height: 16px; }
.tag-mine .btn + .btn { margin-left: 6px; }
.tag-names { margin: 6px 0 14px; }
.tag-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 6px; }
.tag-ai .btn .ic { width: 16px; height: 16px; }
.tag-ai .muted { flex: 1 1 200px; }
.tag-moreline { text-align: center; margin: 14px 0 6px; }

/* ---- Event details (partials/event_fields.ejs): plain sections, contacts as rows opening a sheet ---- */
fieldset.ev-sec { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
fieldset.ev-sec > legend { float: left; width: 100%; margin: 0 0 4px; font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
fieldset.ev-sec > legend + * { clear: both; }
fieldset.ev-sec > legend .opt { text-transform: none; letter-spacing: 0; }
.ev-hint { margin: 4px 0 8px; }
.ev-more { margin-top: 12px; }
.ev-more > summary { cursor: pointer; font-weight: 600; }
.ev-contacts { margin: 6px 0 0; box-shadow: none; border: 1px solid var(--line); }
.ev-contacts .inset-row { min-height: 52px; }
.event-form .seg.block, .onboard .seg.block { margin: 4px 0 8px; }
fieldset.ev-sec { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; padding: 14px 0 0; }
.inset-row .ir-sub.tag-now { font-family: var(--serif); font-size: 1.3rem; color: var(--primary); }
.seg.venue-mode > label { flex: 1 1 0; min-width: 0; padding: 7px 4px; font-size: .88rem; }

/* ---- Getting started (setup, sign up, sign in, onboarding) ---- */
.steps-line { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.steps-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 260px; }
.steps-bars > span { height: 5px; border-radius: 999px; background: var(--line); }
.steps-bars > span.on { background: var(--primary-fill, var(--primary)); }
.login-forgot { margin: 12px 0 0; text-align: center; }
.onboard-sample { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin: -4px 0 14px; }
.onboard-sample .inline-form { display: inline; margin: 0; }
.onboard-sample .btn.link { padding: 0; min-height: 0; font-weight: 600; }

/* ---- Keeper's big number, Interested as rows, App admin (views/admin/keeper.ejs, leads.ejs, platform.ejs) ---- */
.keeper-big { margin: 14px 0 4px; font-weight: 600; color: var(--muted); }
.keeper-n { display: block; font-family: var(--sans); font-size: 1rem; }
.keeper-n b { font-size: 2.2rem; color: var(--primary); font-variant-numeric: lining-nums tabular-nums; }
.keeper-bar { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.keeper-bar > span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .4s; }
.keeper-server { margin-top: 14px; }
.keeper-server > summary { cursor: pointer; font-weight: 600; }
.leads-table .btn .ic { width: 15px; height: 15px; }
@media (max-width: 700px) { .leads-table td .btn { margin: 2px 4px 2px 0; } }

/* Guest pages on a phone: the wedding's name clear of the floating light/dark button, and "Edit details" a quiet
   text button so it sits beside "You're coming" instead of under it. */
@media (max-width: 640px) {
  body:not(:has(.topbar)):has(.theme-flip.float) .hero-title { padding: 0 44px; }
  .you-top .you-edit { border: 0; background: none; box-shadow: none; padding: 6px 2px; min-height: 0; text-decoration: underline; text-underline-offset: 3px; }
}

/* "We live nearby" under the travel rows of the invitation (views/guest/home.ejs), and the team's switch for it in
   a guest's summary (views/admin/person_edit.ejs). */
.nearby-form { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.nearby-form .btn.link { padding: 6px 0; min-height: 0; text-align: left; }
.inset-row.travel-ask { display: block; padding-top: 6px; padding-bottom: 6px; }
.inset-row.travel-ask .switch-row { margin: 0; }
/* The guest's calendar: the list on a phone without the timeline's day pager under it; the timeline across a wide screen. */
@media (max-width: 760px) { .cal-pager:has(+ .cal-week-wrap.auto) { display: none !important; } }
.container.cal-page { max-width: 1120px; }
@media (min-width: 761px) { .cal-page .cal-week:not(.one-day) { grid-template-columns: 56px repeat(var(--cols), minmax(170px, 1fr)); } }

/* Where your room is (views/guest/room.ejs): the room number large, then the plan drawn big enough to read (a point
   per unit of the board, writing at least 12px), scrolled in both directions to their room. */
.room-big { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; font-family: var(--serif); font-size: 2.2rem; line-height: 1.1; color: var(--primary); }
.room-big .ic { width: 30px; height: 30px; flex: none; }
.room-where { margin: 0 0 10px; }
.plan.plan-guest { max-height: min(68vh, 620px); overflow: auto; border-radius: 12px; border: 1px solid var(--border); overscroll-behavior: contain; }
.plan-guest .pb { width: max(100%, var(--bw, 1000px)); min-width: 0; border: 0; border-radius: 0; }   /* a point per unit of the board: a room about 100 wide */
.plan-guest .pitem { font-size: clamp(12px, 1cqw, 16px); }
.plan-guest .pitem.mine { box-shadow: 0 0 0 4px var(--gold-soft); }

/* The guest's Photos page (views/guest/photos.ejs): a tile is the picture and one line, its … opening the photo's sheet. */
#album .album figcaption { padding: 6px 10px 8px; }
#album .album figcaption .small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
#album .album .cap { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.ph-more { position: absolute; top: 6px; right: 6px; z-index: 2; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 14, 16, .55); color: #fff;
  font: inherit; font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ph-more:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
body.select-mode .ph-more { display: none; }
/* The family's album tiles (views/admin/photos.ejs): ☆ to highlight on the picture's corner, … for the rest. */
.tile-star { position: absolute; top: 6px; left: 6px; z-index: 2; margin: 0; }
.tile-star button { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 14, 16, .55); color: #fff; font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.tile-star button.starred { color: #f5c542; }
.tile-star button:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
body.select-mode .tile-star { display: none; }
.tile-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#team-photo-sheet form + form, #team-photo-sheet form + p, #team-photo-sheet p + form { margin-top: 16px; }
#team-photo-sheet .ps-remove { padding-top: 14px; border-top: 1px solid var(--line); }
#photo-sheet form + form, #photo-sheet .ps-share { margin-top: 16px; }
#photo-sheet .ps-remove { padding-top: 14px; border-top: 1px solid var(--line); }
.ps-thumb { display: block; width: 88px; height: 88px; object-fit: cover; border-radius: 8px; margin: 0 0 14px; }
.ps-thumb[hidden] { display: none; }
.ps-cap-row { display: flex; gap: 8px; align-items: stretch; }
.ps-cap-row input { flex: 1; min-width: 0; margin: 0; }
#add-sheet .add-fold { margin-top: 14px; }
.album-more { margin-top: 20px; }
.album-more button.inset-row { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
#album .album-count { justify-content: space-between; margin: 6px 0 8px; }

/* The photographer's page (views/guest/photographer.ejs): three numbers in one row; where the photos go as a switch
   whose line under it follows the choice; the downloads allowed and Save on one line. */
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats.three .stat { padding: 12px 6px; }
@media (max-width: 480px) { .stats.three .stat .n { font-size: 1.6rem; } .stats.three .stat .l { letter-spacing: .04em; } }
.where-go .seg { margin-top: 4px; }
.where-go .hint { margin: 6px 2px 0; }
.where-go:has(input[value="1"]:checked) .wg-0, .where-go:not(:has(input[value="1"]:checked)) .wg-1 { display: none; }
.pro-limit-row { display: flex; gap: 8px; align-items: stretch; }
.pro-limit-row input { flex: 0 1 120px; margin: 0; }

/* The public wedding page (views/wedding_page.ejs): the family's message in the header; "Have an invitation?" a light
   row, one box and Open. */
.hero-msg { max-width: 34em; margin: 14px auto 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; color: #FFF7EC; }
.wp-tag { text-align: center; }
.code-row { max-width: 520px; margin: 8px auto 0; }
.code-row > label { font-family: var(--serif); font-size: 1.3rem; color: var(--primary); }
.code-row-in { display: flex; gap: 8px; align-items: stretch; }
.code-row-in input { flex: 1; min-width: 0; margin: 0; }
.code-row-in .btn { flex: none; }
.code-row .hint { margin-top: 6px; }

/* The shared album link (views/album_public.ejs): the photos alone, square, three across on a phone; a tap opens one
   large with its credit, caption and Save; how to add yours at the end. */
.pub-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px; }
.pub-grid figure { border: 0; border-radius: 6px; }
.pub-grid img { height: auto; aspect-ratio: 1; }
.pub-add { margin: 22px 0 6px; padding: 16px; border-radius: var(--radius); background: var(--card); text-align: center; }
.pub-add p { margin: 0 0 10px; }
dialog.pv { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 6, 8, .94); color: #fff; }
dialog.pv[open] { display: flex; flex-direction: column; }
dialog.pv::backdrop { background: rgba(10, 6, 8, .94); }
dialog.pv img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.pv-x { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.1rem; cursor: pointer; }
.pv-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
.pv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .95rem; }
.pv-who { opacity: .8; }

/* The wedding checklist's sheet (views/admin/tasks.ejs): each item a row with its tick, when it is due and the list it
   goes to; the tasks still as added offered to take off at the top. */
.cl-list .cl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 52px; padding: 10px 14px; border-top: 1px solid var(--line); }
.cl-list .cl-row:first-child { border-top: 0; }
.cl-row .ir-label { flex: 1 0 100%; min-width: 0; margin: 0; font-weight: 500; }
.cl-list .cl-row select.cl-to { flex: 0 1 auto; width: auto; min-width: 0; max-width: 12em; margin: 0 0 0 auto; padding: 6px 24px 6px 8px; min-height: 36px; height: auto; font-size: .85rem; }
.cl-row .ir-sub { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.cl-row.has { opacity: .6; }
/* Each item's Skip · Add · Done: a small switch, Done filled, Skip plain (nothing about it reads as ticked off). */
.cl-row .seg.cl-act { flex: none; margin: 0; padding: 2px; gap: 1px; }
.cl-row .seg.cl-act > label { padding: 0; flex: none; }
.cl-row .seg.cl-act span { display: inline-flex; align-items: center; gap: 3px; padding: 6px 8px; font-size: .85rem; font-weight: 600; border-radius: 999px; }
.cl-row .seg.cl-act .ic { width: 14px; height: 14px; }
.cl-row .seg.cl-act .cl-skip input:checked + span { background: var(--card); color: var(--muted); box-shadow: var(--e1, none); }
.cl-row .seg.cl-act .cl-add input:checked + span { background: var(--primary-soft, var(--card)); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.cl-row:has(.cl-skip input:checked) .ir-label { color: var(--muted); }
@media (max-width: 420px) { .cl-row .seg.cl-act .ic { display: none; } }

.cl-off { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.cl-off .btn .ic { width: 16px; height: 16px; }
.cl-lead { margin: 0 0 2px; }
.cl-all { display: flex; gap: 14px; margin: 0; }
.cl-form .inset-title:first-of-type { margin-top: 10px; }
/* Everything to do (views/admin/tasks_all.ejs): each list under its heading with a link to it; goods and gifts as rows
   on every screen. */
.all-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 6px 6px; }
.all-head .inset-title { margin: 0; }
.all-head > a { text-decoration: none; font-weight: 600; white-space: nowrap; }
.all-none { margin: 0 6px 12px; }
.inset-list.item-rows.all-items { display: block; margin: 0 0 14px; padding: 0 14px; }
.all-items .item-row:first-child { border-top: 0; }
/* A goods or gift item's fields (partials/item_fields.ejs): how many, the unit (and the status when editing) on one row;
   small headings over the groups when editing. */
.if-qty { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.if-qty:has(> :nth-child(3)) { grid-template-columns: 1fr 1fr 1.3fr; }
.if-qty > div { min-width: 0; }
@media (max-width: 480px) { .if-qty:has(> :nth-child(3)) { grid-template-columns: 1fr 1fr; } .if-qty > :nth-child(3) { grid-column: 1 / -1; } }
.inset-title.if-head { margin: 22px 0 2px; }
.inset-title.if-head:first-of-type { margin-top: 4px; }

.is-sending button[type=submit], .is-sending .btn { opacity: .6; cursor: progress; }

/* "Who is staying": once the add form is open, its own button goes (views/partials/guest_staying.ejs). */
.staying-add[open] > summary { display: none; }

/* A switch of links wider than the phone (Everyone | Guests | Host family | Team | Vendors): it slides, never cut off. */
nav.seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
nav.seg::-webkit-scrollbar { display: none; }

/* Pages with no round light / dark button (only the foot's switch): no room kept for it above the first line. */
html body:not(:has(.theme-flip.float)) > .container.top-tight:first-of-type { padding-top: 22px; }
/* The error page: the message as plain text; for an invitation not found, the code box right here. */
.err-page .err-msg { font-size: 1.05rem; margin: 0 0 18px; }
.err-page .code-row { margin: 0 0 6px; }
.board-group { margin-top: 18px; }

/* App admin (/app, views/partials/app_nav.ejs): its own plain grey header, no event's name or colours, the sections
   under it scrolling sideways on a phone. The look-inside bar (views/partials/admin_nav.ejs, src/stepin.js) above an
   event's own header when the app's owner is looking at a family's event. */
.app-bar { background: #2B2F36; color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #444a54; }
.app-bar .inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px; }
.app-bar a { color: #fff; }
.app-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; min-width: 0; white-space: nowrap; }
.app-brand .mark-tile { margin: 0; }
.app-name { font-weight: 700; font-size: 1.1rem; }
.app-tag { font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #444a54; color: #e6e8ec; }
.app-who { color: #c9ced6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-bar .theme-flip { background: none; border: 0; color: #fff; width: 40px; height: 40px; border-radius: 10px; }
.app-bar .theme-flip:hover { background: rgba(255,255,255,.1); }
.app-bar .btn.secondary { background: transparent; color: #fff; border-color: #6b7280; }
.app-bar .btn.link { color: #c9ced6; }
.app-bar .app-out { white-space: nowrap; }
.app-bar .app-out.link .ic { width: 1.1em; height: 1.1em; }
.app-look { white-space: nowrap; }
.app-secs { max-width: 1240px; margin: 0 auto; display: flex; gap: 2px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.app-secs::-webkit-scrollbar { display: none; }
.app-secs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; text-decoration: none; color: #c9ced6; font-weight: 600; font-size: .92rem; white-space: nowrap; border-bottom: 3px solid transparent; }
.app-secs a .ic { width: 1.05em; height: 1.05em; margin: 0; }
.app-secs a:hover { color: #fff; }
.app-secs a.on { color: #fff; border-bottom-color: #9db4ff; }
.app-main { padding-top: 18px; }
.app-intro { margin: 0 0 14px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 14px; }
.app-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.app-card h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; margin: 0 0 8px; }
.app-card h2 .ic { margin: 0; }
.app-card h2 a { color: inherit; text-decoration: none; }
.app-card h2 a:hover { text-decoration: underline; }
.app-card h2 .more { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--primary); }
.app-card ul { list-style: none; margin: 0; padding: 0; }
.app-card li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.app-card li:first-child { border-top: 0; }
.app-card li .r { margin-left: auto; }
.app-card .big { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.app-card.wide { grid-column: 1 / -1; }
.role-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.role-list .card { margin: 0; }
.qr-box { display: inline-block; background: #fff; padding: 10px; border-radius: 12px; }
.qr-box svg { display: block; }
.secret-text { font-family: ui-monospace, monospace; letter-spacing: .06em; user-select: all; }
.peek-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px; background: #2B2F36; color: #fff; font-size: .92rem; }
.peek-bar.peek-open { background: #8a3b12; }
.peek-bar .peek-what { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
.peek-bar .peek-what .ic { margin: 0; }
.peek-bar .peek-acts { display: inline-flex; gap: 8px; }
.peek-bar .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
@media (max-width: 700px) {
  .app-who { display: none; }
  .app-bar .inner { gap: 6px; padding: 0 10px; }
  .app-out .long { display: none; }
  .app-bar .theme-flip { display: none; }
  .app-bar .app-out.link .ic { margin: 0; }
  .app-bar .app-out.link { padding-left: 4px; padding-right: 4px; }
  .app-grid { grid-template-columns: 1fr; }
}
.live-inline { display: contents; }

/* Organizer pages (html.org): fields and buttons 44px tall, easy to tap without towering over what they hold (the
   owner's choice, 20 Nov 2026). Guests' pages keep their big ones, for elders. */
html.org :is(input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time], input[type=password], input[type=url], input[type=search], select) { min-height: 44px; padding: 8px 12px; font-size: 1rem; }
html.org .date-face { min-height: 44px; padding: 6px 12px; font-size: 1rem; }
html.org .date-wrap.face-mode.typing > input[type=text] { min-height: 44px; }
html.org .row.aligned .check { min-height: 44px; }
html.org .btn { min-height: 44px; padding: 8px 18px; font-size: 1rem; }
html.org .btn.small { min-height: 36px; padding: 5px 12px; font-size: .9rem; }
html.org .save-bar { margin-top: 20px; }

/* "More details" (views/partials/pay_fields.ejs, item_fields.ejs, budget_form.ejs): a dashed row that can't be
   missed; opened, its fields sit in their own tinted panel with a line down the left, apart from those above. */
.more-box { margin: 16px 0 6px; border: 1.5px dashed var(--border); border-radius: 12px; }
.more-box > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.more-box > summary::-webkit-details-marker { display: none; }
.more-box .mb-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary); }
.more-box .mb-title::before { content: '+'; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); font-size: 1.1rem; line-height: 1; flex: none; }
.more-box > summary:hover .mb-title > span { text-decoration: underline; }
.more-box .mb-sub { padding-left: 30px; color: var(--muted); font-size: .88rem; }
.more-box .mb-less, .more-box[open] .mb-more, .more-box[open] .mb-sub { display: none; }
.more-box[open] .mb-less { display: inline; }
.more-box[open] .mb-title::before { content: '−'; }
.more-box[open] { border: 1px solid var(--line); border-left: 4px solid var(--primary); background: var(--tile); }
.more-box .mb-body { padding: 0 14px 14px; }
.more-box .mb-body > :first-child { margin-top: 0; }
.planned-tick { display: inline-flex; align-items: center; gap: 10px; }

/* Dropdowns on organizer pages (public/selects.js): the select stays in the form, its list opens as frosted glass
   in GaZumZum's style, like the calendar's date picker; a bottom sheet on a phone. */
html.org select.sel-on { cursor: pointer; }
.sel-pop { position: fixed; z-index: 75; min-width: 180px; max-width: min(560px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 14px;
  background: var(--glass, var(--card)); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); border: 1px solid var(--glass-edge, var(--border)); box-shadow: var(--rim), var(--e3); }
.sel-pop[hidden] { display: none; }
.sel-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--text); font-size: .98rem; line-height: 1.35; }
.sel-opt .sel-tick { width: 16px; flex: none; color: var(--primary); font-weight: 700; visibility: hidden; }
.sel-opt[aria-selected="true"] { font-weight: 600; }
.sel-opt[aria-selected="true"] .sel-tick { visibility: visible; }
.sel-opt.active { background: var(--primary-soft); }
.sel-opt[aria-disabled="true"] { opacity: .45; cursor: default; }
.sel-group { padding: 10px 12px 4px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sel-head { display: none; }
@media (max-width: 640px) {
  .sel-pop { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; max-width: none; max-height: 70vh !important; border-radius: 18px 18px 0 0; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); }
  .sel-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 8px; font-weight: 700; }
  .sel-opt { padding: 12px; font-size: 1.02rem; }
}

/* A switch's choice (Costs | Payments | Settlement and the rest) shows its focus ring inside the rounded switch, where
   it isn't cut off; a click shows none, the keyboard does. */
.seg > a:focus, .seg > button:focus, .seg label:focus-within { outline: none; }
.seg > a:focus-visible, .seg > button:focus-visible { outline: 2px solid var(--gold-soft, #f0b429); outline-offset: -3px; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--gold-soft, #f0b429); outline-offset: -3px; }
/* Payments filtered by one cost: its name over the cards. */
.cost-head { margin: 0 0 8px; font-size: 1.05rem; }
.money-tools + [data-log-live] .filter-chips { margin-top: 0; }

/* =====================================================================================
   Dark mode depth (the owner's ask, 20 Nov 2026): in the dark a shadow alone barely shows, so height is told by
   light. Each step up is a little lighter (page, card, a card on a card, a raised control), every raised edge
   catches a faint light along its top, shadows go deeper, and wells (a switch's track, a field) sink darker than
   the card they sit in. Light mode is untouched.
   ===================================================================================== */
:root[data-theme="dark"] {
  --card-2: #272727;                 /* a surface on a card */
  --raised: #313131;                 /* a control standing up: a switch's choice, a secondary button */
  --sink: #0E0E0E;                   /* a well: a switch's track */
  --rim: inset 0 1px 0 rgba(255,255,255,.085), inset 0 0 0 1px rgba(255,255,255,.025);
  --e1: 0 1px 2px rgba(0,0,0,.65), 0 4px 14px rgba(0,0,0,.38);
  --e2: 0 2px 4px rgba(0,0,0,.6), 0 10px 26px rgba(0,0,0,.48);
  --shadow: var(--rim), var(--e1);
  --well: inset 0 2px 4px rgba(0,0,0,.55), inset 0 -1px 0 rgba(255,255,255,.04);
  --sheen: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0) 140px);
}
/* resting surfaces: a faint sheen from the top, lit edge, deeper shadow */
:root[data-theme="dark"] :is(.card, .stat, .table-wrap, fieldset, details.fold, .dupe-pair, .cal-month, .cal-week-wrap, .inset-list, .set-list, .log-item, .app-card, .more-box) {
  background-image: var(--sheen); box-shadow: var(--rim), var(--e1);
}
/* a surface on a card stands a step higher: lighter, with its own lit edge */
:root[data-theme="dark"] :is(.card, .app-card, .sheet, fieldset, .set-body, details.fold) :is(.card, fieldset, .stat, .log-item, .table-wrap, .inset-list),
:root[data-theme="dark"] .log-group .li-more .log-item, :root[data-theme="dark"] .more-box[open], :root[data-theme="dark"] .cm-fields .row {
  background-color: var(--card-2); box-shadow: var(--rim), 0 1px 3px rgba(0,0,0,.5);
}
:root[data-theme="dark"] dialog.sheet { background-image: var(--sheen); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), var(--e4); }
/* switches: the track sinks, the chosen one stands up out of it, lit along its top */
:root[data-theme="dark"] :is(.seg, .theme-switch .ts-opts) { background: var(--sink); box-shadow: var(--well); }
:root[data-theme="dark"] :is(.seg > a.on, .seg > a[aria-current="page"], .seg > button[aria-pressed="true"], .seg > label:has(input:checked), .theme-switch button[aria-pressed="true"]) {
  background: var(--raised); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.7), 0 3px 8px rgba(0,0,0,.45);
}
:root[data-theme="dark"] .seg > a:not(.on):not([aria-current]):hover { background: rgba(255,255,255,.05); }
/* raised controls: secondary buttons and icon buttons a step above the card, lit along their top */
:root[data-theme="dark"] :is(.btn.secondary, .icon-btn, .dp-nav, input[type=file]::file-selector-button) { background-color: var(--card-2); box-shadow: var(--rim), var(--e1); }
:root[data-theme="dark"] .btn { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -2px 0 rgba(0,0,0,.35), var(--e1); }
:root[data-theme="dark"] .btn.link { box-shadow: none; background-color: transparent; }
@media (hover: hover) {
  :root[data-theme="dark"] :is(.btn.secondary, .icon-btn):hover { background-color: var(--raised); }
}
/* fields: wells, a touch darker than the card around them */
:root[data-theme="dark"] :is(input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=time], input[type=password], input[type=url], input[type=search], select, textarea, .date-face) { box-shadow: var(--well); }
/* the table's head a step up from its rows */
:root[data-theme="dark"] .table-wrap thead th { background-color: var(--card-2); box-shadow: inset 0 -1px 0 rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04); }

/* A guest coming back to the front page: their invitation first, a frosted card at the top of the hero (views/landing.ejs). */
.welcome-back { max-width: 420px; margin: 0 auto 28px; padding: 18px 20px 20px; border-radius: 20px; text-align: center;
  background: rgba(255,247,236,.10); border: 1.5px solid rgba(232,184,103,.55); box-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,247,236,.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.welcome-back p { margin: 0; }
.welcome-back .wb-hi { color: var(--gold-soft); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.welcome-back .wb-name { color: #FFF7EC; font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; margin-top: 4px; }
.welcome-back .wb-event { color: #EFD9C6; margin-top: 4px; }
.welcome-back .wb-event strong { color: #FFF7EC; }
.welcome-back .wb-open { display: flex; justify-content: center; gap: 8px; margin-top: 14px; width: 100%; background: var(--gold-soft); border-color: var(--gold-soft); color: #3D0F22; font-weight: 700; }
.welcome-back .wb-open:hover { filter: brightness(1.06); }
/* On a guest's pages: GaZumZum's front page on the left of the language row (views/partials/lang_switch.ejs). */
.lang-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 4px; }
.lang-row .lang-switch { margin: 0; }
.lang-home { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: .95rem; text-decoration: none; padding: 6px 4px; }
.lang-home:hover { color: var(--primary); }
.lang-home .lh-mark { display: inline-flex; width: 26px; height: 26px; }
.lang-home .lh-mark .mark, .lang-home .lh-mark svg { width: 26px; height: 26px; }
/* Under a welcome card: App admin, or "Not you? Forget this device" (views/landing.ejs). */
.welcome-back .wb-also { margin-top: 10px; color: #EFD9C6; font-size: .9rem; }
.welcome-back .wb-also a, .welcome-back .wb-also .linklike { color: #FFF7EC; font: inherit; font-weight: 600; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
.welcome-back + .welcome-back { margin-top: -12px; }
/* The wedding's own team opening a guest's page: marked, quieter, never counted as the guest's (src/visits.js). */
.visit-table tr.visit-team td { color: var(--muted); }
.log-item.visit-team { opacity: .8; }
.team-by { display: inline-block; font-weight: 600; color: var(--text); }
/* Photos › Photographer: their studio's own account (views/partials/photographer_account.ejs). */
.pro-studio { margin: 4px 0 16px; padding: 10px 12px; border-left: 3px solid var(--line); background: var(--soft); border-radius: 0 10px 10px 0; }
.pro-studio .hd-more { margin-top: 8px; }
.pro-studio .hd-more > summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.pro-studio .hs-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.pro-studio .hs-inline > div { flex: 1; min-width: 10em; }
.pro-studio .hs-inline input { margin: 0; }
.pro-studio .hs-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
/* A photographer's studio mark over their photos (views/partials/photo_mark.ejs; stamped onto downloads by public/mark.js). */
.album figure > a:has(> .ph-mark) { position: relative; display: block; }
.ph-mark { position: absolute; right: 6px; bottom: 6px; max-width: 70%; color: #fff; font-size: .72rem; font-weight: 600; line-height: 1.1; opacity: .88; text-shadow: 0 1px 3px rgba(0,0,0,.65); pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-mark img { display: block; height: 22px; width: auto; max-width: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.pv-mark { right: 14px; bottom: 64px; font-size: .95rem; }
.pv-mark img { height: 34px; }

/* Tickets & IDs (views/admin/docs.ejs): each guest a row with their ticket and ID lines, Remind, and Update folded. */
.docs-lead { margin: 0 0 10px; }
.docs-list { display: block; padding: 0; }
.doc-row { padding: 12px 16px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.doc-row:first-child { border-top: 0; }
.doc-row:target { background: var(--primary-soft); }
.doc-who { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.doc-who .doc-wa { margin-left: auto; }
.doc-stat { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.doc-line { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.doc-line a { overflow-wrap: anywhere; }
.doc-k { min-width: 3.6em; font-weight: 600; color: var(--muted); font-size: .85rem; }
.doc-act { margin-top: 6px; }
.doc-act > summary { cursor: pointer; font-weight: 600; color: var(--primary); font-size: .92rem; min-height: 32px; display: inline-flex; align-items: center; }
.doc-up, .doc-mark { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; }
.doc-up select { width: auto; margin: 0; min-height: 40px; }
.doc-up input[type=file] { flex: 0 1 auto; width: auto; max-width: 100%; min-width: 0; margin: 0; }
@media (max-width: 560px) { .doc-up input[type=file] { order: -1; flex: 1 1 100%; width: 100%; } }
.doc-mark .btn .ic { width: 15px; height: 15px; }
.leg-tickets { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 12px 0 2px; }
.leg-k { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.leg-k .ic { width: 16px; height: 16px; }
.leg-ticket { overflow-wrap: anywhere; font-weight: 500; }
.doc-marked { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }
.doc-marked .ic { width: 15px; height: 15px; color: var(--ok); }
/* The eye in every password box (public/app.js): inside the box at its right end. */
.pw-wrap { position: relative; display: block; }
.pw-wrap > input { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.pw-eye:hover { color: var(--text); background: var(--grey-soft); }
.pw-eye[aria-pressed="true"] { color: var(--primary); }
/* Not coming (views/partials/not_coming_sheet.ejs): what they hold, each a tick with its details under it. */
.nc-tick { align-items: flex-start; margin: 8px 0; }
.nc-tick .ir-sub { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }
.nc-still { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); }
.nc-why { margin: 6px 0 0; }
/* Send on Signal and Other apps… under Send on WhatsApp (views/partials/send_card.ejs). */
.send-more { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.send-more .send-alt { flex: 1 1 140px; justify-content: center; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
@media (max-width: 420px) { .send-more .send-alt { font-size: .92rem; } .send-more .send-alt .ic { margin-right: 4px; } }
.tm-note { margin: 4px 0 0; font-size: .7rem; color: var(--muted); opacity: .8; }
.pp-over { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); }
.plan-off-note { margin: 4px 0 8px; padding: 6px 10px; border-radius: 8px; background: var(--warn-soft); display: inline-block; }
.is-busy { opacity: .6; pointer-events: none; cursor: progress; }
/* The room layout's saving (public/plansave.js), as Canva: beside the night, saving, saved, waiting or not kept. */
.save-status { margin-left: 4px; font-weight: 600; transition: opacity .6s; }
.save-status:empty { display: none; }
.save-status.saving { color: var(--muted); }
.save-status.saving::before { content: '☁ '; }
.save-status.ok { color: var(--ok); }
.save-status.faded { opacity: .55; }
.save-status.wait { color: var(--warn); }
.save-status.err { color: var(--err); }
.pp-pending { opacity: .75; }
.pp-going { opacity: .45; text-decoration: line-through; }
/* My itinerary (views/guest/itinerary.ejs): each day a card, its rows a time and what, the day's own first. */
.itin-stay { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0 0 10px; }
.itin-day h2 { margin: 0 0 8px; font-size: 1.15em; }
.itin-day.today { border: 2px solid var(--primary); }
.itin-list { list-style: none; margin: 0; padding: 0; }
.itin-list li { display: grid; grid-template-columns: 6.2em 1fr; gap: 0 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.itin-list li:first-child { border-top: 0; }
.itin-t { font-weight: 600; color: var(--primary); }
.itin-m { display: block; color: var(--muted); font-size: .9em; }
.itin-desk { display: flex; align-items: center; gap: 8px; }

/* ---------- Your own design: bringing one in and the editor (views/admin/design.ejs, public/designedit.js) ---------- */
.dz-page .h1-sub { font-weight: 400; color: var(--muted); font-size: .62em; }
.dz-import input[type=file] { display: block; width: 100%; margin: 4px 0 10px; }
.dz-how { margin: 6px 0 12px; }
.dz-how ul { margin: 8px 0 0; padding-left: 20px; }
.dz-how li { margin: 4px 0; }
.dz-choose { margin: 12px 0; padding: 0; border: 0; }
.dz-choose legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.dz-choose .radio-card { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 8px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); cursor: pointer; }
.dz-choose .radio-card input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.dz-choose .radio-card > span { display: flex; flex-direction: column; gap: 2px; }
.dz-choose .radio-card:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.dz-choose .radio-card.muted { opacity: .55; cursor: not-allowed; }
.dz-note { background: var(--primary-soft); padding: 10px 14px; border-radius: 12px; }
.dz-editor { margin: 8px 0 18px; }
.dz-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0 10px; background: var(--bg); }
.dz-bar .dz-add-field { width: auto; min-height: 42px; max-width: min(300px, 100%); padding: 6px 12px; font-size: .9rem; border-radius: 999px; }
.dz-bar label { margin: 0; }
.dz-hint { background: #FFF6DA; color: #5a4300; padding: 8px 12px; border-radius: 10px; margin: 0 0 10px; }
:root[data-theme="dark"] .dz-hint { background: #3a3220; color: #f3e3b0; }
.dz-seg label span { white-space: nowrap; font-size: .9rem; }
.dz-bar .dz-gap { flex: 1; }
.dz-save { color: var(--muted); cursor: default; }
.dz-save.error-text { color: var(--err); cursor: pointer; }
.dz-pic-btn { position: relative; cursor: pointer; }
.dz-work { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .dz-work { grid-template-columns: minmax(0, 1fr); } }
.dz-stage-wrap { min-width: 0; }
.dz-stage { position: relative; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.dz-stage .dz { box-shadow: 0 2px 14px rgba(0, 0, 0, .18); }
.dz-edit .dz-l { cursor: move; touch-action: none; }
.dz-edit .dz-lock { pointer-events: none; }
.dz-edit .dz-field { outline: 1px dashed rgba(47, 111, 237, .55); outline-offset: -1px; }
.dz-edit .dz-field::before { content: attr(data-tag); position: absolute; left: 0; top: -1px; transform: translateY(-100%); z-index: 1; font: 600 10px/1.4 Inter, sans-serif; color: #fff; background: rgba(47, 111, 237, .85); padding: 1px 6px; border-radius: 4px 4px 0 0; white-space: nowrap; pointer-events: none; }
.dz-sel { position: absolute; z-index: 3; border: 2px solid #2F6FED; box-sizing: border-box; transform-origin: 50% 50%; cursor: move; touch-action: none; }
.dz-sel[hidden] { display: none; }
.dz-sel.dz-locked { border-style: dashed; cursor: default; }
.dz-sel.dz-locked .dz-h { display: none; }
.dz-h { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #fff; border: 2px solid #2F6FED; border-radius: 3px; box-sizing: border-box; touch-action: none; }
@media (pointer: coarse) { .dz-h { width: 22px; height: 22px; margin: -11px 0 0 -11px; } }
.dz-h-nw { left: 0; top: 0; cursor: nwse-resize; } .dz-h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.dz-h-se { left: 100%; top: 100%; cursor: nwse-resize; } .dz-h-sw { left: 0; top: 100%; cursor: nesw-resize; }
.dz-h-n, .dz-h-s, .dz-h-e, .dz-h-w { display: none; }
.dz-sel.dz-sides .dz-h-n, .dz-sel.dz-sides .dz-h-s, .dz-sel.dz-sides .dz-h-e, .dz-sel.dz-sides .dz-h-w { display: block; border-radius: 7px; }
.dz-h-n { left: 50%; top: 0; cursor: ns-resize; } .dz-h-s { left: 50%; top: 100%; cursor: ns-resize; }
.dz-h-e { left: 100%; top: 50%; cursor: ew-resize; } .dz-h-w { left: 0; top: 50%; cursor: ew-resize; }
.dz-rot { left: 50%; top: -30px; border-radius: 50%; cursor: grab; }
.dz-rot::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 16px; margin-left: -1px; background: #2F6FED; }
.dz-guide { position: absolute; z-index: 2; background: #E5398A; pointer-events: none; }
.dz-guide-v { left: 50%; top: 0; bottom: 0; width: 1px; }
.dz-guide-h { top: 50%; left: 0; right: 0; height: 1px; }
.dz-panel { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; margin: 0; }
@media (max-width: 860px) { .dz-panel { position: static; max-height: none; } }
.dz-panel h3 { margin: 0; font-size: 1.05rem; }
.dz-panel .dz-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.dz-panel h3.dz-ph { margin: 14px 0 6px; } .dz-panel h3.dz-ph:first-child { margin-top: 0; }
.dz-panel label { margin-top: 10px; }
.dz-panel input[type=range] { width: 100%; }
.dz-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.dz-row input[type=range] { flex: 1; min-width: 120px; }
.dz-row label { margin: 0; }
.dz-num { width: 86px !important; min-height: 40px; }
.dz-mm input { width: 90px; display: inline-block; min-height: 40px; }
.dz-colour { display: inline-flex !important; align-items: center; gap: 8px; margin: 8px 12px 0 0 !important; font-weight: 500; }
.dz-colour input[type=color] { width: 44px; height: 36px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); }
.dz-toggles .btn[aria-pressed=true] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.dz-seg { margin-top: 6px; }
.dz-tokens { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.dz-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.dz-list li + li { border-top: 1px solid var(--border); }
.dz-list button { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.dz-list button:hover { background: var(--primary-soft); }
.dz-rm { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--border); }
.dz-more .dz-copy { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-more .dz-copy form { margin: 0; }
.dz-remove { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dz-remove .btn svg { width: 16px; height: 16px; vertical-align: -3px; }
.own-design { display: flex; gap: 14px; align-items: center; margin: 0 0 14px; padding: 12px; border: 1px dashed var(--border); border-radius: 14px; }
.own-design .own-thumb { flex: none; width: 76px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.own-design .own-thumb svg { display: block; width: 100%; height: auto; }
.own-design form { margin: 0; }
.design-grid.own-on { opacity: .5; }
.own-design .own-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------- Tasks: steps, vendors, Given to me; vendors in Money and People as one entry ---------- */
.task-mine { margin: 0 0 12px; max-width: 420px; }
.task-mine a { flex: 1; text-align: center; padding: 8px 12px; color: var(--text); text-decoration: none; }
.task-mine a[aria-current="page"] { background: var(--primary); color: #fff; }
.task-steps.all { color: var(--ok); font-weight: 600; }
.my-steps { color: var(--primary); }
.step-list .step-row { display: flex; align-items: center; gap: 6px; }
.step-row .step-edit { flex: 1; min-width: 0; }
.step-row .step-edit > summary { list-style: none; cursor: pointer; padding: 10px 4px; display: block; }
.step-row .step-edit > summary::-webkit-details-marker { display: none; }
.step-row.done .task-title { text-decoration: line-through; color: var(--muted); }
.step-form { padding: 0 4px 10px; }
.step-more { display: flex; gap: 12px; padding: 0 4px 10px; }
.steps-done { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.task-vendor .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.task-vendor .chip svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
.task-vendor-pick { margin-top: 10px; }
.vendor-pairs .pair-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.vendor-link .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.for-you { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); text-decoration: none; }
.for-you:hover { border-color: var(--primary); }
.for-you .for-you-list { display: block; }
.for-you > svg { flex: none; width: 22px; height: 22px; color: var(--primary); }
.step-edit .ir-label { display: block; }
.step-edit .ir-sub { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }

/* ---------- Goods and gifts (src/goods.js): handing over, the Budget as one entry, packing lists, lena-dena ---------- */
.item-row .given-pill { flex: none; min-height: 0; padding: 4px 10px; text-decoration: none; white-space: nowrap; }
td .given-pill { white-space: nowrap; }
.if-cash { margin: 10px 0 2px; max-width: 360px; }
.if-cash label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 8px 12px; cursor: pointer; font-weight: 500; }
.if-cash label:has(input:checked) { background: var(--primary); color: #fff; }
.if-cash input { position: absolute; opacity: 0; pointer-events: none; }
.if-cash label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.offer-card .offer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.offer-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.offer-acts form { margin: 0; }
.offer-join { display: flex; gap: 6px; align-items: center; }
.offer-join select { margin: 0; min-height: 36px; max-width: 230px; }
.paid-sides { flex-wrap: wrap; margin-top: 0; }
.paid-name-line { display: flex; gap: 8px; align-items: center; }
.paid-name-line input, .paid-name-line select { flex: 1; margin: 0; min-width: 0; }
.item-sum { margin-bottom: 14px; }
.item-sum .inset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.item-sum form { margin: 0; }
.item-send .ir-label { display: flex; flex-direction: column; gap: 4px; }
.send-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.send-btns .btn .ic, .send-btns .btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.given-search { margin: 4px 0 10px; }
.given-row .inset-row, .pack-row .inset-row { flex: 1; min-width: 0; }
.given-row.done .task-title, .pack-row.done .task-title { color: var(--muted); }
.given-add { margin-top: 16px; }
.pack-group { margin-bottom: 14px; }
.pack-group .send-btns { gap: 4px; }
.print-box { flex: none; width: 18px; height: 18px; margin: 0 12px; border: 1.5px solid var(--text); border-radius: 4px; }
.from-item a { font-weight: 600; }
.from-item svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.lena-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 8px; }
@media (max-width: 560px) { .lena-cols { grid-template-columns: 1fr; } }
.lena-cols .inset-title { margin: 0 0 4px; }
.lena-list { list-style: none; margin: 0; padding: 0; }
.lena-list li { display: flex; flex-direction: column; padding: 6px 0; border-top: 1px solid var(--line); }
.lena-list li:first-child { border-top: 0; }
.lena-table td { vertical-align: top; }
.lena-table td > div + div { margin-top: 4px; }
.mine-items .inset-row { flex: 1; }
@media print {
  .pack-row .task-tick { border-radius: 4px; }
  .pack-row.done .task-tick::after { content: ''; }
}
/* A gift with handing over, on a phone: its name and line across the row, the tags (given, status) and bin below. */
.item-row.has-given { flex-wrap: wrap; row-gap: 6px; }
.item-row.has-given > .ir-label { flex: 1 1 calc(100% - 40px); }
.item-row.has-given > .given-pill { margin-left: 0; }
.item-row.has-given > .it-rm { margin-left: auto; }
.selecting .item-row.has-given > .given-pill { margin-left: 30px; }

/* The new name (src/brand.js, views/partials/brand_name.ejs): the old name sits under it, hidden; on the first page of a visit
   (html.bn-play, views/partials/page_acts.ejs) it shows, then lifts away as the new name rises in. Still for reduced motion. */
.bn { display: inline-grid; vertical-align: baseline; }
.bn > span { grid-area: 1 / 1; color: inherit; }
.landing-name .bn span, .landing-hero .landing-name .bn span { color: inherit; }
.bn-old { visibility: hidden; }
html.bn-play .bn-old { visibility: visible; animation: bn-out .55s ease-in .9s both; }
html.bn-play .bn-new { animation: bn-in .6s ease-out 1.15s both; }
@keyframes bn-out { to { opacity: 0; transform: translateY(-.45em); filter: blur(2px); } }
@keyframes bn-in { from { opacity: 0; transform: translateY(.45em); filter: blur(2px); } }
@media (prefers-reduced-motion: reduce) { html.bn-play .bn-old { visibility: hidden; animation: none; } html.bn-play .bn-new { animation: none; } }
/* "utsavvy.com is now gazumzum.com", the last line of every page until the end of March 2027. */
.moved-note { text-align: center; font-size: .85rem; color: var(--muted); margin: 4px 16px 22px; }
.moved-note strong { color: var(--primary); }
