/* app.css — staff app. Logical properties only (inline-start/end), so RTL needs no overrides. */
:root {
  --brand: #7a4e6d; --brand-bg: #f4ece6; --accent: #c49a5a;
  --ink: #2b2530; --muted: #6f6874; --line: #e4dde3; --card: #fff; --bad: #b3261e; --good: #2e7d32;
  --good-bg: #e3f1e4; --bad-bg: #fbe4e2; --warn-bg: #fbecd0; --warn: #7a4a00;
  --font: 'Inter', system-ui, sans-serif; --radius: 16px;
  /* v0.53.0 Soft glow: everything below follows --brand / --brand-bg / --accent / --t2, which the person's colour theme
     sets (applyBrand in app.js). These plain values are for a browser without color-mix(); the real ones are just under. */
  --t2: var(--accent); --deep: #4a2f43; --grad: var(--brand); --tint: var(--brand-bg); --glow: rgba(0,0,0,.14);
  --wash2: transparent; --wash3: transparent; --hatch1: rgba(122,78,109,.06); --hatch2: rgba(122,78,109,.12); --hatch3: rgba(122,78,109,.16);
  --acc-soft: rgba(197,160,89,.18); --acc-tint: #fffaf3;
}
@supports (color: color-mix(in srgb, red 50%, blue)) { :root {
  --t2: color-mix(in srgb, var(--brand) 55%, var(--accent)); --deep: color-mix(in srgb, var(--brand) 72%, #120a10);
  --grad: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 62%, var(--t2)));
  --tint: color-mix(in srgb, var(--brand) 12%, #fff); --glow: color-mix(in srgb, var(--brand) 28%, transparent);
  --wash2: color-mix(in srgb, var(--t2) 30%, transparent); --wash3: color-mix(in srgb, var(--accent) 22%, transparent);
  --hatch1: color-mix(in srgb, var(--brand) 6%, transparent); --hatch2: color-mix(in srgb, var(--brand) 12%, transparent);
  --hatch3: color-mix(in srgb, var(--brand) 16%, transparent);
  --acc-soft: color-mix(in srgb, var(--accent) 18%, transparent); --acc-tint: color-mix(in srgb, var(--accent) 10%, #fff);
} }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--brand-bg); font-size: 15px; line-height: 1.45; }
[dir="rtl"] body { font-size: 16px; }
a { color: var(--brand); }
h1 { font-size: 1.35rem; margin: 0 0 1rem; color: var(--brand); }
h2 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.boot { padding: 2rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
td.row { display: table-cell; }   /* a flex cell broke the row's line-up (v0.30.0) */
td.row > * + * { margin-inline-start: .35rem; }
.grow { flex: 1; }
.right { margin-inline-start: auto; }

/* shell — services "Relief" frame; since 0.53.0 a light glass sidebar and top bar over the theme's soft background */
.frame { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: rgba(255,255,255,.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-inline-end: 1px solid rgba(255,255,255,.9);
  color: var(--ink); padding: 14px 12px; z-index: 30; }
.brand { display: block; background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); text-align: center; }
.brand-logo { width: 100%; max-width: 200px; height: 48px; object-fit: contain; display: block; margin: 0 auto; }
.brand-tlogo { display: block; max-width: 160px; max-height: 44px; object-fit: contain; margin: 8px auto 0; }
.side-tn { margin: .7rem .3rem .2rem; font-weight: 700; font-size: .95em; color: var(--ink); }
.nav { flex: 1; margin-block-start: .4rem; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1rem .5rem .35rem; }
[dir="rtl"] .nav-group { letter-spacing: 0; font-size: 12px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover { background: var(--tint); color: var(--brand); }
.nav a.on { background: var(--grad); color: #fff; font-weight: 700; box-shadow: 0 6px 16px var(--glow); }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.small .ic, td .ic { width: 15px; height: 15px; }
.pop-x .ic, .hamb .ic { width: 22px; height: 22px; }
.umenu .ic { color: var(--muted); }
.umenu .out .ic { color: var(--bad); }
.nbadge { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 700; min-width: 18px; text-align: center; }
.side-foot { font-size: 11px; color: var(--muted); padding: .75rem .5rem 0; }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .75rem; height: 60px; padding: 0 1.25rem; background: rgba(255,255,255,.74); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-block-end: 1px solid rgba(255,255,255,.9); position: sticky; top: 0; z-index: 20; }
.crumb { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.hamb { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--ink); padding: .2rem .4rem; }
.tsw { width: auto; max-width: 220px; }
.wsw-box { flex: 0 1 320px; min-width: 0; }
.wsw { width: 100%; font-weight: 600; }
.wsw-box .cbx { width: 100%; }
.uwrap { position: relative; }
.uchip { display: flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px 4px 4px; cursor: pointer; font: inherit; color: var(--ink); }
[dir="rtl"] .uchip { padding: 4px 4px 4px 10px; }
.uav { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9em; }
.udot { position: absolute; inset-block-start: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); border: 2px solid var(--card); }
.uname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92em; }
.chev { font-size: .75em; color: var(--muted); }
.umenu { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); width: 270px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.18); padding: 6px; z-index: 40; }
.umenu-h { padding: .5rem .6rem .6rem; border-block-end: 1px solid var(--line); margin-block-end: 4px; word-break: break-all; }
.umenu > button, .umenu > a { display: flex; align-items: center; gap: .55rem; width: 100%; background: none; border: 0; padding: .55rem .6rem; border-radius: 8px; font: inherit; font-size: .92em; color: var(--ink); text-decoration: none; cursor: pointer; text-align: start; }
.umenu > button:hover, .umenu > a:hover { background: var(--brand-bg); }
.umenu .out { color: var(--bad); border-block-start: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-block-start: 4px; }
.npill { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.npanel { margin: 0 .4rem .4rem; border: 1px solid var(--line); border-radius: 8px; max-height: 260px; overflow-y: auto; }
.nitem { display: flex; gap: .45rem; align-items: flex-start; padding: .5rem .6rem; border-block-end: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9em; }
.nempty { margin: .6rem; }
.langs { display: flex; gap: .4rem; padding: 0 .6rem .4rem; }
.langs button { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .35rem; font: inherit; font-size: .9em; cursor: pointer; }
.langs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.main { flex: 1; padding: 1.25rem; min-width: 0; }
.scrim { display: none; }
@media (max-width: 900px) {
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; background: var(--brand-bg); transform: translateX(-104%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  [dir="rtl"] .side { transform: translateX(104%); }
  .side.open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .hamb { display: block; }
  .top { padding: 0 .75rem; gap: .5rem; }
  .top:has(.wsw-box) .crumb { display: none; }
  .wsw-box { flex: 1 1 auto; }
  .uname, .chev { display: none; }
  .uchip { padding: 3px; border: 0; }
  .main { padding: 1rem .75rem; }
}

/* parts */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-block-end: 1rem; box-shadow: 0 6px 20px rgba(60,20,50,.05); }
.tabs { display: flex; gap: .25rem; border-block-end: 1px solid var(--line); margin-block-end: 1rem; overflow-x: auto; }
.tabs button { background: none; border: 0; border-block-end: 3px solid transparent; padding: .6rem .9rem; cursor: pointer; font: inherit; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--brand); border-block-end-color: var(--brand); font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: .35rem; background: var(--grad); color: #fff; border: 0; border-radius: 12px; padding: .55rem 1rem; font: inherit; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: .3rem .6rem; font-size: .85em; }
button:disabled { opacity: .55; cursor: default; }
label { display: block; margin-block-end: .75rem; }
label > span:not(.cbx) { display: block; font-size: .85em; color: var(--muted); margin-block-end: .2rem; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); }
input[type=color] { padding: 2px; height: 40px; width: 64px; }
input[type=checkbox] { width: auto; }
.check { display: flex; gap: .45rem; align-items: center; margin: .2rem 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
table.list th, table.list td { text-align: start; padding: .55rem .6rem; border-block-end: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8em; color: var(--muted); font-weight: 600; }
.wrap { overflow-x: auto; }
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .78em; background: var(--line); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
tr.voided td { color: var(--muted, #888); } tr.voided td:not(:first-child):not(:last-child) { text-decoration: line-through; }   /* v0.73.0 a voided payment, kept as a trace */
.err { color: var(--bad); margin: .5rem 0; }
.linkbox { font-family: ui-monospace, monospace; font-size: .8em; word-break: break-all; background: var(--brand-bg); padding: .5rem; border-radius: 8px; }

/* sign-in pages */
.auth { max-width: 380px; margin: 8vh auto; }
.auth .logo { display: block; max-height: 64px; max-width: 240px; margin: 0 auto 1rem; }

/* popups — each its own <dialog>, stacked; Save/Cancel/Delete in a footer that stays in view */
dialog.pop { border: 0; border-radius: var(--radius); padding: 1.25rem 1.25rem 0; width: min(560px, 94vw); max-height: 90vh; overflow-y: auto; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
dialog.pop::backdrop { background: rgba(0,0,0,.35); }
dialog.pop > h2:first-of-type, dialog.pop > form > h2:first-child { margin-block-start: 0; padding-inline-end: 2rem; }
dialog.pop fieldset { min-width: 0; }   /* a fieldset is min-content wide by default: Arabic rows pushed it past the popup */
.pop-x { position: absolute; inset-block-start: .6rem; inset-inline-end: .6rem; background: none; border: 0; font-size: 1.1rem; color: var(--muted); cursor: pointer; padding: .25rem .5rem; border-radius: 6px; }
.pop-x:hover { background: var(--brand-bg); }
.pop-f { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; position: sticky; inset-block-end: 0; background: var(--card); padding: .75rem 0 1rem; margin-block-start: .5rem; border-block-start: 1px solid var(--line); }
@media (max-width: 760px) { dialog.pop { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; } }
.btn.danger.armed { outline: 3px solid #f3b3ad; }

/* type-inside dropdowns (combobox.js) fill their field like the select did */
label > .cbx, .grid2 .cbx { display: block; width: 100%; }

/* money */
th.num, td.num { text-align: end; font-variant-numeric: tabular-nums; }
.due { color: var(--bad); }
.done { color: var(--good); }
.linkish { color: var(--brand); text-decoration: underline; cursor: pointer; margin: 0; display: inline; font-size: .95em; }
.msum { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.msum h2 { margin-block-start: 0; }

/* tables (hall plan) */
.seat-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.seat-wrap.nopanel { grid-template-columns: 1fr; }
.plan-tools { display: flex; align-items: center; gap: .35rem; margin-block-end: .4rem; flex-wrap: wrap; }
.plan-scroll { overflow: auto; height: 76vh; min-height: 320px; scrollbar-gutter: stable; border-radius: var(--radius); touch-action: pan-x pan-y; }
.plan-scroll .plan { margin-inline: auto; }   /* width in px from seating.js (Fit × zoom) */
.tbl.rect { aspect-ratio: 2.6; border-radius: 8px; }
.tbl.drop { box-shadow: 0 0 0 4px var(--brand); }
.pitem { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 10px;
  background: repeating-linear-gradient(45deg, var(--hatch1) 0 10px, var(--hatch2) 10px 20px); color: var(--muted); font-size: .8em;
  cursor: grab; user-select: none; touch-action: none; z-index: 0; }
.pitem span { padding: 0 .3rem; text-align: center; overflow: hidden; }
.pitem.k-dance { background: repeating-conic-gradient(var(--acc-soft) 0 25%, var(--hatch1) 0 50%) 0 0 / 28px 28px; border-color: var(--accent); color: var(--ink); }
.pitem.k-stage { background: var(--hatch3); border-style: solid; }
.pitem .rsz { position: absolute; inset-inline-end: -6px; inset-block-end: -6px; width: 14px; height: 14px; background: var(--card); border: 2px solid var(--brand); border-radius: 4px; cursor: nwse-resize; }
.seatbar { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin: .35rem 0 .5rem; padding: .45rem; background: var(--brand-bg); border-radius: 10px; }
.seatbar.off { opacity: .6; }
.seatbar select { flex: 1; min-width: 140px; }
.pchip input { margin: 0 .25rem 0 0; vertical-align: -1px; }
.pchip.on { background: var(--accent); color: #23170e; }
.sp-list.unseated li > input[type=checkbox] { margin-inline-end: .3rem; }
.sp-list.unseated li[draggable=true] { cursor: grab; }
.plan { position: relative; aspect-ratio: 1000 / 700; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 4% 5.7%; overflow: hidden; touch-action: none; }
.plan-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }
.tbl { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--brand-bg); border: 2px solid var(--brand); color: var(--ink); cursor: grab; user-select: none; touch-action: none; line-height: 1.1;
  font-size: clamp(9px, 1.3vw, 14px); min-width: 34px; }
.tbl.round { border-radius: 50%; }
.tbl.square { border-radius: 8px; }
.tbl b { font-size: 1.25em; }
.tbl span { font-size: .8em; color: var(--muted); }
.tbl i { font-size: .7em; font-style: normal; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl.full { background: var(--good-bg); border-color: var(--good); }
.tbl.over { background: var(--bad-bg); border-color: var(--bad); }
.tbl.sel { box-shadow: 0 0 0 4px var(--accent); z-index: 2; }
.seat-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; max-height: 78vh; overflow-y: auto; }
.seat-panel h2 { margin: 0 0 .25rem; }
.sp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-block-end: .5rem; }
.sp-head .btn { margin-inline-start: auto; }
.sp-list { list-style: none; margin: .5rem 0 1rem; padding: 0; }
.sp-list li { padding: .35rem 0; border-block-end: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.sp-list li .btn { margin-inline-start: auto; }
.sp-list.unseated li { display: block; }
.chipset { display: flex; flex-wrap: wrap; gap: .3rem; margin-block-start: .25rem; }
.pchip { font: inherit; font-size: .82em; background: var(--brand-bg); border: 1px solid var(--line); border-radius: 99px; padding: .15rem .55rem; cursor: pointer; }
.pchip:disabled, .linkish:disabled { cursor: default; opacity: .7; text-decoration: none; }
button.linkish { background: none; border: 0; padding: 0; font: inherit; text-align: start; }
.tlists { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; margin-block-start: 1rem; }
.tlist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; break-inside: avoid; }
.tlist h3 { margin: 0 0 .3rem; font-size: 1rem; }
.tlist ol { margin: 0; padding-inline-start: 1.3rem; }
.print-title { display: none; }
.plan-print .tbl { cursor: default; }
@media (max-width: 900px) { .seat-wrap { grid-template-columns: 1fr; } .seat-panel { max-height: none; } }
@media print {
  .side, .top, #strips, .tabs, .chips, .toolbar, .seat-panel, .scrim, #toast, .main > p.small, .main > h1 { display: none !important; }
  .frame, .body, .main { display: block; padding: 0; }
  body { background: #fff; }
  .print-title { display: block; text-align: center; }
  .plan { break-after: page; }
  .tlist { border-color: #999; }
}

/* public page settings */
.pubgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.qrcard { text-align: center; }
.qrcard canvas { width: 240px; height: 240px; image-rendering: pixelated; }
.pin { letter-spacing: .2em; font-size: 1.1em; }
@media (max-width: 900px) { .pubgrid { grid-template-columns: 1fr; } }

/* rsvp (staff popup reuses the family form) */
.rsvp-staff .card { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem; margin-block-end: .6rem; }
.rsvp-staff h2 { font-size: 1rem; margin: 0 0 .2rem; }
.rrow { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem 0; border-block-start: 1px solid var(--line); flex-wrap: wrap; }
.yn { display: flex; gap: .4rem; }
.yn label { margin: 0; }
.yn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.yn b { display: inline-block; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 99px; font-weight: 600; font-size: .9em; cursor: pointer; }
.yn input:checked + b { background: var(--brand); border-color: var(--brand); color: #fff; }
.yn input[value="0"]:checked + b { background: var(--bad); border-color: var(--bad); }
.yn input:disabled + b { opacity: .5; cursor: default; }

/* check-in desk (phone-first) */
.desk { max-width: 720px; margin: 0 auto; }
.desk-count { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .5rem 0 1rem; }
.desk-count div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; text-align: center; }
.desk-count b { display: block; font-size: 1.8rem; color: var(--brand); line-height: 1.1; }
.desk-count span { font-size: .8em; color: var(--muted); }
.desk-find { display: flex; gap: .5rem; position: sticky; top: 64px; z-index: 3; background: var(--brand-bg); padding: .3rem 0; }
.desk-find input { font-size: 1.15rem; padding: .75rem .9rem; }
.desk-find .btn { white-space: nowrap; }
#cl { display: grid; gap: .4rem; margin-block-start: .5rem; }
.desk-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; text-align: start; width: 100%; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; font: inherit; cursor: pointer; }
.desk-row small { display: block; color: var(--muted); }
.desk-row.in { background: var(--good-bg); border-color: #b7dcb9; }
.desk-row.part { border-color: var(--accent); }
.desk-st { color: var(--good); font-weight: 700; white-space: nowrap; }
.desk-people { display: grid; gap: .4rem; }
.desk-p { display: flex; gap: .7rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; margin: 0; cursor: pointer; }
.desk-p input { width: 22px; height: 22px; }
.desk-p small { display: block; color: var(--muted); }
.desk-p.in { background: var(--good-bg); }
.scanbox { background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.scanbox video { width: 100%; height: 100%; object-fit: cover; }

/* planning */
table.tasks td.chk { width: 34px; }
table.tasks td.chk input { width: 20px; height: 20px; }
tr.tdone td { opacity: .55; }
tr.tdone b { text-decoration: line-through; }
tr.tlate td:nth-child(3) { color: var(--bad); font-weight: 700; }
tr.ttot td { background: var(--brand-bg); }

/* venue calendar */
.vmonth { min-width: 10rem; text-align: center; }
.vcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.vwd { font-size: .78em; color: var(--muted); text-align: center; padding: .2rem; }
.vday { background: var(--card); border: 1px solid var(--line); border-radius: 8px; min-height: 86px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.vday.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.vd { font-size: .8em; color: var(--muted); }
.vbk { display: block; font: inherit; font-size: .75em; text-align: start; border: 0; border-radius: 5px; padding: 2px 5px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--warn-bg); color: var(--warn); }
span.vbk { display: inline-block; }
.vbk.confirmed { background: var(--good-bg); color: var(--good); }
.vbk.cancelled { background: var(--line); color: var(--muted); text-decoration: line-through; }
@media (max-width: 760px) { .vday { min-height: 60px; } .vbk { font-size: .65em; } }

/* what's new (Binayati v0.1.4 / services 1569) */
dialog.pop.wide { width: min(680px, 94vw); }
.wn-list { display: grid; gap: .6rem; }
.wn-card { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; }
.wn-card.new { border-color: var(--accent); background: var(--acc-tint); }
.wn-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand); }
.wn-ic .ic { width: 20px; height: 20px; }
.wn-b { min-width: 0; }
.wn-b p { margin: .3rem 0; }

.rauto { margin-block-start: .75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; }

/* photos */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.mtile { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: var(--brand-bg); cursor: pointer; }
.mtile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mvid { display: grid; place-items: center; width: 100%; height: 100%; color: var(--brand); }
.mvid .ic { width: 42px; height: 42px; }
.mcap { position: absolute; inset-inline: 0; inset-block-end: 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: .75em; padding: .9rem .4rem .3rem; text-align: start; }
.mbadge { position: absolute; inset-block-start: 6px; inset-inline-start: 6px; background: var(--warn-bg); color: var(--warn); border-radius: 99px; font-size: .7em; padding: 1px 7px; }
.mtile.error .mbadge { background: var(--bad-bg); color: var(--bad); }
.mview { text-align: center; }
.mview img, .mview video { max-width: 100%; max-height: 70vh; border-radius: 8px; }

/* dashboard */
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; margin-block-end: 1rem; }
.otile { display: flex; flex-direction: column; gap: .2rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem .9rem; color: var(--ink); text-decoration: none; min-height: 120px; box-shadow: 0 6px 20px rgba(60,20,50,.05); }
a.otile:hover { border-color: var(--brand); }
.oh { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .85em; margin-block-end: .2rem; }
.obig { font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.obig .muted { font-size: .6em; }
.otile small { color: var(--muted); }
.ocount { grid-column: 1 / -1; min-height: 0; padding: 1.3rem 1rem; background: linear-gradient(130deg, var(--deep), var(--brand) 58%, var(--t2)); color: #fff;
  border-color: transparent; justify-content: center; text-align: center; box-shadow: 0 14px 30px var(--glow); }
.ocount b { font-size: 3.4rem; line-height: 1; }
.ocount span, .ocount small { color: rgba(255,255,255,.85); }
.obar { height: 6px; background: var(--brand-bg); border-radius: 99px; overflow: hidden; margin-block-start: .35rem; }
.obar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--t2)); border-radius: 99px; }
table.ohome td { vertical-align: middle; }

/* strips under the top bar */
.strip { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.25rem; font-size: .92em; flex-wrap: wrap; }
.strip .btn { margin-inline-start: auto; }
/* services' #update-bar, same measures: 12px 16px, 14px text, white button in the bar's colour */
.updbar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 16px; background: var(--deep); color: #fff;
  font-size: 14px; box-shadow: 0 -2px 12px rgba(0,0,0,.2); }
.updbtn { background: #fff; color: var(--deep); border: 0; border-radius: 8px;
  padding: .3rem .8rem; font: inherit; font-size: .9em; font-weight: 600; cursor: pointer; }
body:has(.updbar:not([hidden])) .main { padding-block-end: 5rem; }
.strip.va { background: var(--bad); color: #fff; }
.strip.va .btn { background: #fff; color: var(--bad); }
.vap { display: grid; gap: .4rem; margin-block-end: .5rem; }
.vap-p { display: flex; align-items: center; gap: .6rem; text-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; font: inherit; cursor: pointer; }
.vap-p:hover { border-color: var(--brand); background: var(--brand-bg); }
.vap-p > span { display: flex; flex-direction: column; }

/* activity history */
.nowrap { white-space: nowrap; }
.inl { display: flex; align-items: center; gap: .35rem; margin: 0; }
.inl > span { margin: 0 !important; }
.toolbar .inl input { width: auto; }
table.hist tr.undone td { opacity: .6; }
.hchg { margin-block-start: .4rem; }
.hchg table.list { background: var(--brand-bg); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pager { justify-content: center; margin-block-start: .75rem; }

/* sub-tabs (services sub-chips) */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-block-end: 1rem; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .85rem; font: inherit; font-size: .9em; color: var(--muted); cursor: pointer; }
.chip.on { background: var(--grad); background-origin: border-box; border-color: transparent; color: #fff; }
.perm-area { margin-block-end: .75rem; }
.perm-area b { display: block; margin-block-end: .25rem; }

#toast { position: fixed; inset-block-end: 1rem; inset-inline-start: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
[dir="rtl"] #toast { transform: translateX(50%); }
#toast.show { opacity: 1; }

.preview { border-radius: var(--radius); padding: 1rem; }
.preview h3 { margin: 0 0 .5rem; }

/* chunk 2 */
.toolbar { margin-block-end: .5rem; }
.toolbar select, .toolbar input { width: auto; }
.pill.side-groom { background: #e3ecf8; color: #1f4e8c; }
.pill.side-bride { background: #f8e3ef; color: #8c1f5c; }
.pill.side-shared { background: #eee9e2; color: #5d5245; }
.member { margin-block-end: .4rem; flex-wrap: nowrap; }
.member input { width: auto; }
#bulk { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; margin-block-end: .5rem; }
#bulk select { width: auto; }
@media (max-width: 760px) { .member { flex-wrap: wrap; } }

/* installed app on a phone with a notch: keep the bars clear of it */
@supports (padding: env(safe-area-inset-top)) {
  .top { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); }
  .side { padding-top: calc(14px + env(safe-area-inset-top)); }
  .updbar { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
.install-steps li { margin: .5rem 0; }
.mdue { display: grid; grid-template-columns: 9.5rem 7.5rem 1fr auto; gap: .4rem; align-items: center; margin: .3rem 0; }
.mdue > span { grid-column: 1 / -1; margin-top: -.2rem; }
@media (max-width: 560px) { .mdue { grid-template-columns: 1fr 1fr auto; } .mdue [data-k=note] { grid-column: 1 / 3; } }
.nav-more summary { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary:hover { background: var(--tint); color: var(--ink); }
.nav-more[open] summary { color: var(--ink); }
.nav-more a { padding-inline-start: 24px; }
.vawrap { position: relative; }
.vawrap > button { display: flex; align-items: center; gap: .55rem; width: 100%; background: none; border: 0; padding: .55rem .6rem; border-radius: 8px; font: inherit; font-size: .92em; color: var(--ink); cursor: pointer; text-align: start; }
.vawrap > button:hover, .vawrap:hover > button { background: var(--brand-bg); }
.vafly { position: absolute; inset-inline-end: calc(100% + 10px); inset-block-start: -8px; width: 290px; max-height: 70vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.18); padding: 8px; z-index: 41; }
.vafly::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 100%; width: 12px; }   /* keeps the hover alive across the gap */
.vafly input { width: 100%; margin-block-end: 6px; }
.valist { overflow: auto; }
.va-row { display: flex; align-items: stretch; gap: 4px; border-radius: 8px; }
.va-row.on { background: var(--brand-bg); }
.va-c { flex: 1; display: flex; flex-direction: column; align-items: flex-start; background: none; border: 0; padding: .45rem .55rem; border-radius: 8px; font: inherit; font-size: .92em; cursor: pointer; text-align: start; color: var(--ink); }
.va-c:hover, .va-p:hover { background: var(--brand-bg); }
.va-p { background: none; border: 0; border-radius: 8px; padding: 0 .5rem; cursor: pointer; color: var(--muted); }
@media (max-width: 760px) { .vafly { position: static; width: auto; box-shadow: none; border: 0; padding: 4px 0 0; max-height: 50vh; } .vafly::after { display: none; } }
.strip.warn { background: var(--warn-bg); color: var(--warn); }
.strip.bad { background: var(--bad-bg); color: var(--bad); }
.smp { max-height: 55vh; overflow: auto; margin: .5rem 0; }
.smt { border-block-end: 1px solid var(--line); padding: .35rem 0; }
.smt ul { margin: .2rem 0 0; padding-inline-start: 1.2rem; font-size: .9em; }
.smt.kid b { color: var(--brand); }
.warnmsg { background: var(--warn-bg) !important; color: var(--warn) !important; }
.welcome-big { text-align: center; }
.welcome-big h2 { margin: 0 0 .6rem; }
.wtab { border: 2px solid var(--brand); border-radius: 14px; padding: .6rem; margin: .5rem 0; }
.wtab span { display: block; font-size: .8em; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.wtab b { display: block; font-size: 4.2rem; line-height: 1.05; color: var(--ink); }
.wtab small { color: var(--muted); }
.nav a.locked { opacity: .62; }
.nav a.locked > svg:last-child { margin-inline-start: auto; width: 14px; height: 14px; }
.locked-card { text-align: center; max-width: 560px; margin: 1.5rem auto; padding: 1.5rem; }
.locked-card > svg { width: 40px; height: 40px; color: var(--brand); }
.pill.pack-premium { background: var(--tint); color: var(--brand); }
.pill.pack-plus { background: #e6eef7; color: #2c5d8a; }
.okmsg { background: var(--good-bg); color: var(--good); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0; }
/* v0.33.0 public page designer */
.pubparts { margin: .25rem 0 .75rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.grid3 input[type=color] { width: 100%; height: 40px; padding: 2px; }
.secs .secrow { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-block-end: 1px solid var(--line); }
.secs .secrow .check { margin: 0; }
.photopick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.photopick .pp { border: 2px solid var(--line); border-radius: 10px; padding: 4px; font-size: .85em; }
.photopick .pp.on { border-color: var(--brand); }
.photopick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; display: block; margin-bottom: 4px; }
.photopick .check { margin: .1rem 0; }
.pubprev .phoneframe { width: 100%; max-width: 340px; margin: .5rem auto 0; border: 8px solid #23211c; border-radius: 26px; overflow: hidden; height: 620px; }
.pubprev iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 900px) { .pubprev .phoneframe { height: 520px; } }

/* v0.42.0 sign-up + My plan → plans */
.auth.su { max-width: 440px; margin-block: 4vh; }
.su-kind { border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem .8rem .5rem; margin: 0 0 .8rem; min-width: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.2rem; }
.su-kind legend { padding: 0 .3rem; font-size: .9em; color: var(--muted); }
.su-kind .check { margin: .2rem 0; white-space: nowrap; }
.su-kind input[type=radio] { width: auto; margin: 0; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.su-link { text-align: center; margin: 1rem 0 0; }
.su-link .btn { white-space: normal; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; margin-block-end: 1rem; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: .9rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.plan .price { font-size: 1.35em; font-weight: 700; color: var(--brand); }
.plan .price small { font-size: .62em; font-weight: 400; }
.plan ul { margin: 0 0 .4rem; padding-inline-start: 1.1rem; font-size: .9em; }
.plan .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 600px) { .plans { align-items: start; } }

/* ── v0.46.0 phone comfort ─────────────────────────────────────────────── */
/* a zoomed plan must scroll inside its own box: without this the grid column grew to the plan's width and the whole
   page became wider than the screen (seen on phones after one tap on +, and it stayed that way) */
.plan-box { min-width: 0; }
.c-all span { display: none; }
@media (max-width: 900px) {
  /* things to tap are at least 40 px tall (tick boxes 24 px) */
  .btn, .chip, .tabs > *, .linkish, table.list td a[data-h] { min-height: 40px; }
  .btn.sm { padding: .45rem .8rem; }
  .chip { padding: .45rem 1rem; display: inline-flex; align-items: center; }
  .linkish, table.list td a[data-h] { display: inline-flex; align-items: center; }
  .hamb { min-width: 44px; min-height: 44px; }
  input[type=checkbox], input[type=radio] { width: 24px; height: 24px; flex: none; }
  input[type=checkbox][data-sel], .c-all input[type=checkbox], .sp-list input[type=checkbox], .desk-list input[type=checkbox] { width: 32px; height: 32px; }   /* 0.51.1 (audit A-13): standalone list ticks */
  .pchip input { width: 20px; height: 20px; vertical-align: -4px; }
  /* a wide list scrolls sideways: its Actions button stays in view at the end of the row */
  table.list td:has(> .am) { position: sticky; inset-inline-end: 0; background: var(--card); box-shadow: -8px 0 8px -8px rgba(0,0,0,.18); }
  [dir="rtl"] table.list td:has(> .am) { box-shadow: 8px 0 8px -8px rgba(0,0,0,.18); }
  .plan-scroll { min-height: 0; }   /* height = the plan's own (seating.js sFit) */
  .plan-scroll { scroll-margin-top: 70px; }
}
@media (max-width: 760px) {
  /* guests: one card per invitation instead of a 7-column table squeezed into the screen */
  table.list.cards, table.list.cards tbody { display: block; }
  table.list.cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .6rem; padding: .55rem .5rem; border-block-end: 1px solid var(--line); }
  table.list.cards th, table.list.cards td { display: block; padding: 0; border: 0; }
  table.list.cards th { display: none; }
  table.list.cards th:first-child { display: block; }
  table.list.cards th:first-child:empty, table.list.cards td:empty { display: none; }
  .c-all { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; }
  .c-all span { display: inline; font-size: 1.15em; }
  table.list.cards td.c-ck { flex: none; }
  table.list.cards td.c-main { flex: 1 1 0; min-width: 0; }
  table.list.cards td.c-num { flex: none; font-weight: 700; }
  table.list.cards td.c-num::after { content: ' ' attr(data-l); font-weight: 400; font-size: .85em; color: var(--muted); }
  table.list.cards td.c-meta { flex: 0 0 auto; order: 5; }
  table.list.cards td.c-meta[data-l]::before { content: attr(data-l) ' '; color: var(--muted); }
  table.list.cards td.c-ck + td.c-main + td.c-meta, table.list.cards td.c-ck ~ td.c-meta { margin-block-start: .15rem; }
  table.list.cards tr::after { content: ''; flex-basis: 100%; order: 4; height: 0; }
  table.list.cards td[colspan] { flex: 1 1 100%; }
}

/* ── v0.47.0 faster jobs ───────────────────────────────────────────────── */
.card.start { border-inline-start: 4px solid var(--accent); }
.card.start h2 { margin: 0; }
.startlist { list-style: none; margin: .5rem 0 0; padding: 0; }
.startlist li { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; min-height: 40px; }
.startlist li .ic { color: var(--good); flex: none; }
.startlist li.ok a { color: var(--muted); text-decoration: line-through; }
.startlist li.next a { font-weight: 700; }
.startlist .sn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: .8em; color: var(--muted); flex: none; }
.rqcard b { font-size: 1.2em; }

/* v0.48.0 reported photos */
.rthumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.rnote { overflow-wrap: anywhere; min-width: 150px; }

/* v0.49.0 the Terms tick on sign-up / invite; families whose photo sharing is stopped */
label.check.terms { display: flex; align-items: flex-start; gap: .5rem; margin: .6rem 0; }
label.check.terms input { margin-top: .15rem; flex: none; }
.mblocked { background: var(--brand-bg); border-radius: 10px; padding: .5rem .7rem; margin-block-end: .8rem; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; }

/* ── v0.53.0 Soft glow look + colour themes ────────────────────────────── */
/* the soft colour wash behind every screen (a fixed layer: it does not scroll and costs no repaint) */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 40% at 100% 0%, var(--wash2), transparent), radial-gradient(50% 40% at 0% 100%, var(--wash3), transparent); }
@media print { body::before { display: none; } }
.otile .oh .ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--tint); color: var(--brand); }
/* name menu → Colours: one round swatch per theme */
.themes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 .6rem .5rem; }
.themes button { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.themes button.on { box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 900px) { .themes button { width: 40px; height: 40px; } }
/* v0.54.0 the whole budget on one sheet: category name | amount box */
.bfill { display: grid; grid-template-columns: minmax(0, 1fr) 9rem; gap: .4rem .75rem; align-items: center; margin-block: .5rem; }
.bfill label { margin: 0; }
/* v0.55.0 picked contacts (and the names skipped as already on the list) */
.clist { list-style: none; margin: .25rem 0 .75rem; padding: 0; max-height: 38vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.clist li { padding: .3rem .6rem; border-block-end: 1px solid var(--line); }
.clist li:last-child { border-block-end: 0; }
.clist .check { margin: 0; min-height: 36px; }
