:root {
  --bg: #faf7f2;
  --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; }
html { font-size: 20px; }
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); background: var(--primary); 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: #fff; color: var(--primary); }
.btn.secondary:hover { background: var(--primary-soft); }
.btn.danger { background: #fff; color: var(--err); border-color: var(--err); }
.btn.danger:hover { background: #fdecea; }
.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: #fff; 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: #fff; }
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: #fff; 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.ok { background: #e8f5ec; border-color: var(--ok); color: var(--ok); }
.flash.err { background: #fdecea; border-color: var(--err); color: var(--err); }

.topbar { background: var(--primary); 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: #FAF7F2; 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: #fff; 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; }
body.menu-open .drawer { transform: none; }
body.menu-open .drawer-backdrop { display: block; }
body.menu-open { overflow: hidden; }
@media (max-width: 760px) {
  .nav.primary { display: none; }
  .menu-btn span { display: none; }
  .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); 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); }
.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: #fff; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f1ece4; 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: #faf7f2; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; 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: #e8f5ec; color: var(--ok); }
.pill.no { background: #fdecea; color: var(--err); }
.pill.pending { background: #fff4e0; color: var(--warn); }
.pill.grey { background: #eee; color: var(--muted); }

.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: #fff; color: var(--text); }
.tabs a.active { background: var(--primary); border-color: var(--primary); 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: #f6f3ee; 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: #fff; }
  html { 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 { justify-content: flex-start; }
.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: #fff; 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: #f1ece4; }
.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: #f1ece4; }
.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, #e6e0d6 1px, transparent 1px); }
.cal-col.today { background-color: #fffbf2; }
.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); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .72rem; margin-left: 2px; white-space: nowrap; }
.cal-item.arrival { background: #e8f5ec; border-color: var(--ok); }
.cal-item.departure { background: #fff4e0; 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: #fff; margin-bottom: 20px; }
.cal-dow { background: #f1ece4; 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: #faf7f2; display: flex; flex-direction: column; gap: 3px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.in { background: #fff; }
.cal-cell.empty { background: #f3f0ea; }
.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: #fff; 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); }
.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: #fff; 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; }
.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: #fff; 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); 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); }
.date-native { position: absolute; left: 0; top: 100%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.date-native.show { width: 100%; height: 56px; opacity: 1; pointer-events: auto; z-index: 5; background: #fff; }
.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; }
.cal-item.function.aux { background: #fff; 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: 6px; }
.time-wrap .time-text { flex: 1; min-width: 0; }
.ampm { flex: none; min-width: 56px; border: 2px solid var(--primary); border-radius: 10px; background: var(--primary-soft); color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; }
.ampm:hover { background: var(--primary); color: #fff; }
.time-btn { flex: none; width: 50px; border: 2px solid var(--border); border-radius: 10px; background: #fff; font-size: 1.2rem; cursor: pointer; }
.time-btn:hover { background: var(--primary-soft); border-color: var(--primary); }
.time-native { position: absolute; left: 0; top: 100%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.time-native.show { width: 100%; height: 56px; opacity: 1; pointer-events: auto; z-index: 5; background: #fff; }
/* ---- 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: #fff; }
.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: 10px; margin-top: 6px; }
.custom-colour input[type=color] { width: 56px; height: 44px; padding: 2px; border: 2px solid var(--border); border-radius: 8px; background: #fff; }
.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: #fff; 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, rgba(122,31,61,.06) 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: #fff; 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: #fff; 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: #fff; 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: #fff4e0; 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: #fff; 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: #fff; border-radius: 6px; padding: 4px 8px; font: inherit; font-size: .85rem; cursor: pointer; }
.roomnum.blocked { text-decoration: line-through; color: var(--muted); background: #f3f0ea; }
.addnums { display: inline-flex; gap: 6px; }
.addnums input { min-height: 40px; padding: 6px 10px; font-size: .9rem; width: 240px; }
table.nights td.over { background: #fdecea; color: var(--err); }
table.nights td.full { background: #fff4e0; }
tr.focus td { background: var(--primary-soft); }
/* ---- installed app & offline ---- */
.offline-bar { position: sticky; top: 0; z-index: 60; background: #fff4e0; color: #6b4000; border-bottom: 2px solid var(--warn); padding: 10px 16px; font-weight: 600; text-align: center; }
.offline-bar.ok { background: #e8f5ec; 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-block .this-device { display: none; margin-left: 8px; }
.install-block.mine { border-color: var(--primary); }
.install-block.mine .this-device { display: inline-block; }
.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: #eee5da; 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: #f3faf5; }
tr.st-ordered td { background: #fffaf0; }
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: #f1ece4; 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: #fff; }
.meal-pill.st-within { border-color: var(--ok); background: #e8f5ec; }
.meal-pill.st-tight { border-color: var(--warn); background: #fff4e0; }
.meal-pill.st-short { border-color: var(--err); background: #fdecea; }
.text-err { color: var(--err); }
.warn-box { border: 2px solid var(--warn); background: #fff8eb; 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: #e8eefc; color: #2f4fa0; }
.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: #fff; 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: #fff; border-color: var(--border); color: var(--text); font-weight: 500; }
.gpick-list { position: absolute; left: 0; right: 0; z-index: 20; background: #fff; 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; }
.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: #fff; 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: '▾'; }
details.fold > fieldset { border: 0; margin: 0; padding-top: 0; }
/* ---- duplicate pairs ---- */
.dupe-pair { background: #fff; 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: #faf7f2; border-radius: 10px; padding: 10px; }
.dupe-person { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: #fff; 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: #e8f5ec; border-color: #b9dfc4; }
.fchip.awaiting { background: #e8eefc; border-color: #c3d0f2; }
.fchip.none { background: #f3f0ea; border-color: #e0d9cc; color: var(--muted); }
.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; }
/* 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 {
  --bg: #F7F5F2;
  --card: #FFFFFF;
  --text: #1F1B1C;
  --muted: #625A5D;
  --primary: #5E1730;
  --primary-dark: #4A1025;
  --primary-soft: #F7EEF1;
  --border: #E4DED6;
  --gold: #B08A4E;
  --gold-soft: #E8B867;
  --tile: #F3F0EC;
  --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;
}
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: #FBF6F7; box-shadow: inset 0 0 0 1.5px #E9D3DA, 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: #DCCFD3; }
.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 #DCD4CA; 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(--primary);
  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 #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(--primary);
  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 #C9A25E;
}
.hero.has-photo { background-image: linear-gradient(rgba(74,16,37,.55), 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); }
.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 #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 #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; }
.landing-hero .landing-mark { display: inline-flex; width: 88px; height: 88px; border-radius: 26px; background: #FAF7F2; 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 #EFEAE3; 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: #FBF9F6; }
.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: #fff; }
.hub-item .ic { width: 34px; height: 34px; margin: 0; color: #2A2326; flex: none; stroke-width: 1.4; }
.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; }
@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: #2A2326; }
.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; }
