/* ==========================================================================
   The Pharo — admin panel, guest portal, sign-in and setup screens.
   Ivory surfaces with the palace's gold and obsidian; the real logo sits on
   light backgrounds throughout. The public website has its own stylesheet.
   ========================================================================== */

@font-face { font-family: "Cinzel"; src: url("../fonts/cinzel-latin-500-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }

:root {
  --bg: #f5efe3;
  --surface: #fffdf8;
  --side: #fbf7ee;
  --ink: #1c170f;
  --ink-2: #4a4132;
  --muted: #7a6e5a;
  --line: #e8dec9;
  --line-strong: #d8c9a6;
  --gold: #9c7a3c;
  --gold-ink: #7a5d27;
  --gold-bright: #c9a45c;
  --gold-soft: #f3e9d2;
  --obsidian: #0b0a08;
  --red: #b3262b;
  --ok: #1e6b3a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 23, 15, .04), 0 10px 30px rgba(28, 23, 15, .05);
  --display: "Cinzel", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --side-w: 264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.app { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 1em; }
hr { margin: 20px 0; border: 0; border-top: 1px solid var(--line); }
code { padding: 1px 6px; border-radius: 6px; background: var(--gold-soft); font-size: .9em; }
small { color: var(--muted); font-size: .82em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -60px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.strong { color: var(--ink); font-weight: 600; text-decoration: none; }
a.strong:hover { color: var(--gold-ink); text-decoration: underline; }
.due { color: var(--red); font-weight: 600; }
.pad { padding: 4px 22px 20px; }
.narrow { max-width: 640px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kicker { margin: 0 0 6px; color: var(--gold-ink); font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.lede { color: var(--ink-2); font-size: 1.02rem; }
.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 3px; vertical-align: baseline; }

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 .86rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s, transform .1s; }
.btn:hover { border-color: var(--gold); background: #fff; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { border-color: transparent; background: linear-gradient(135deg, #e8cf98, #c9a45c 55%, #a8853f); color: var(--obsidian); box-shadow: 0 6px 18px rgba(156, 122, 60, .28); }
.btn-primary:hover { border-color: transparent; background: linear-gradient(135deg, #f0dcae, #d4b06a 55%, #b08c44); }
.btn-dark { border-color: var(--obsidian); background: var(--obsidian); color: #f4ecdc; }
.btn-dark:hover { border-color: var(--obsidian); background: #2a2317; color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--surface); }
.btn-danger-ghost { border-color: transparent; background: transparent; color: var(--red); }
.btn-danger-ghost:hover { border-color: #e6b5b2; background: #fdf1f0; color: var(--red); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .8rem; }
.btn-xs { min-height: 28px; padding: 0 11px; font-size: .74rem; }
.btn-xs .ic { width: 14px; height: 14px; }
.btn-lg { min-height: 48px; padding: 0 26px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn.is-active { border-color: var(--ink); background: var(--ink); color: #f4ecdc; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { margin-left: 0; border-radius: 999px 0 0 999px; }
.btn-group .btn:last-child { border-radius: 0 999px 999px 0; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--muted); font: inherit; cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.inline-form { display: inline-flex; margin: 0; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Admin shell ---------- */

.side { position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column; width: var(--side-w); border-right: 1px solid var(--line); background: var(--side); }
.side-logo { display: block; padding: 22px 26px 14px; }
.side-logo img { width: 132px; height: auto; margin: 0 auto; }
.side-nav { flex: 1; padding: 6px 14px 18px; overflow-y: auto; }
.side-label { margin: 18px 12px 6px; color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; text-decoration: none; }
.side-nav a:hover { background: var(--gold-soft); color: var(--ink); }
.side-nav a.is-active { background: var(--ink); color: #f4ecdc; }
.side-nav a.is-active .ic { color: var(--gold-bright); }
.side-nav a span { flex: 1; }
.count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; }
.count.is-soft { background: var(--gold-soft); color: var(--gold-ink); }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.side-user { display: flex; flex: 1; align-items: center; gap: 11px; min-width: 0; color: var(--ink); text-decoration: none; }
.side-user strong, .side-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #e8cf98, #a8853f); color: var(--obsidian); font: 600 1rem var(--display); }
.side-scrim { display: none; }
.main { margin-left: var(--side-w); min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 12px clamp(16px, 3vw, 34px); border-bottom: 1px solid var(--line); background: rgba(245, 239, 227, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.top-title { flex: 1; min-width: 0; }
.top h1 { overflow: hidden; font: 600 1.32rem/1.2 var(--display); letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.top h1 small { margin-left: 8px; color: var(--muted); font: 500 .8rem var(--body); letter-spacing: .08em; }
.top-back { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 2px; color: var(--muted); font-size: .76rem; text-decoration: none; }
.top-back .ic { width: 14px; height: 14px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.side-toggle { display: none; }
.content { display: grid; gap: 20px; padding: clamp(16px, 3vw, 34px); max-width: 1500px; }
.content > * { min-width: 0; }

/* ---------- Cards & layout ---------- */

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 18px 22px 12px; }
.card-head h2 { display: flex; align-items: center; gap: 9px; font: 600 1.02rem var(--body); }
.card-head h2 small { font-weight: 500; }
.card-head h2 .ic { color: var(--gold); }
.card-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.card-empty { margin: 0; padding: 6px 22px 22px; color: var(--muted); }
.card-attention { border-color: #ecd9a4; background: #fffaf0; }
.pill { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #f4ecdc; font-size: .76rem; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; }
.stack > * { min-width: 0; }

.hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hello h1, .hello h2 { font: 600 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); letter-spacing: .01em; }
.hello-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ok); font-size: .76rem; font-weight: 600; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: #2f9e58; box-shadow: 0 0 0 0 rgba(47, 158, 88, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47, 158, 88, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 88, 0); } }

/* ---------- Figures ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
a.stat:hover { border-color: var(--gold); color: var(--ink); }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.stat-label .ic { color: var(--gold); }
.stat-value { font: 600 2.1rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 2px; color: var(--muted); font: 500 1rem var(--body); }
.stat-sub { color: var(--muted); font-size: .8rem; }
.meter { display: block; height: 6px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--gold); transition: width .5s; }
.mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 4px 22px 22px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--line); overflow: hidden; }
.mini-stats div { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); }
.mini-stats span { color: var(--muted); font-size: .76rem; }
.mini-stats strong { font: 600 1.3rem var(--display); font-variant-numeric: tabular-nums; }

/* Bar chart: one series, one hue; the axis and grid stay quiet. */
.bars { margin: 0; padding: 6px 22px 18px; }
.bars-plot { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: end; height: 190px; margin-left: 26px; }
.bars-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bars-grid span { position: relative; border-top: 1px solid var(--line); }
.bars-grid span::before { content: attr(data-label); position: absolute; top: -9px; left: -26px; width: 20px; color: var(--muted); font-size: .68rem; text-align: right; }
.bar { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 0 2px; cursor: default; }
.bar i { display: block; width: min(100%, 26px); border-radius: 4px 4px 0 0; background: var(--gold); transition: background-color .15s; }
.bar:hover i, .bar:focus-visible i { background: var(--gold-ink); }
.bar::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; z-index: 5; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #f4ecdc; font-size: .74rem; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .15s, transform .15s; }
.bar:hover::after, .bar:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.bar:nth-child(-n+4)::after { left: 0; transform: translate(0, 4px); }
.bar:nth-last-child(-n+3)::after { right: 0; left: auto; transform: translate(0, 4px); }
.bars-axis { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 8px 0 0 26px; color: var(--muted); font-size: .7rem; text-align: center; }
.bars-axis b { display: block; font-weight: 500; }
.bars-axis .is-today { color: var(--ink); font-weight: 700; }
.bars-table { margin-top: 12px; }
.bars-table summary { color: var(--muted); font-size: .8rem; cursor: pointer; }

/* ---------- Tables & lists ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table thead th { border-top: 0; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.table td small { display: block; margin-top: 1px; }
.table td small.inline { display: inline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table-hover tbody tr[data-href] { cursor: pointer; }
.table-hover tbody tr:hover { background: #fbf6ea; }
.table tr.is-past { opacity: .55; }
.table tfoot th { border-top: 1px solid var(--line-strong); font-weight: 600; }
.folio .is-payment td { color: var(--ok); }
.folio .is-due th { font-size: 1.02rem; }
.rows { margin: 0; padding: 0 22px 12px; list-style: none; }
.rows li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows li > a, .rows li > span:not(.datebox):not(.pts):not(.badge):not(.dot):not(.offer-ic):not(.muted) { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.rows strong { display: block; font-weight: 600; }
.rows small { display: block; }
.rows a:hover strong { color: var(--gold-ink); }
.rows.is-past { opacity: .7; }
.rows .is-locked { opacity: .6; }
.rows .dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.rows .is-unread .dot { background: var(--red); }
.offer-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); }
.datebox { display: grid; flex: none; place-items: center; width: 50px; padding: 6px 0; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
.datebox b { color: var(--ink); font: 600 1.15rem/1.1 var(--display); letter-spacing: 0; }
.datebox small { font-size: .6rem; }
.pts { flex: none; min-width: 64px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pts.is-plus { color: var(--ok); }
.pts.is-minus { color: var(--red); }
.timeline { margin: 0; padding: 0 22px 18px 40px; color: var(--ink-2); font-size: .9rem; }
.timeline li { padding: 4px 0; }
.defs { margin: 0; padding: 0 22px 18px; }
.defs div { display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.defs dt { font-weight: 600; }
.defs dd { margin: 0; color: var(--ink-2); }

/* Status pills: the label carries the meaning; colour only reinforces it. */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #ece8df; color: #575043; font-size: .72rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.is-pending, .badge.is-enquiry, .badge.is-dirty, .badge.is-soldout { background: #fbefd2; color: #7a5200; }
.badge.is-confirmed, .badge.is-clean, .badge.is-active, .badge.is-available, .badge.is-earn, .badge.is-bonus { background: #e1f2e6; color: #1e6b3a; }
.badge.is-checked_in, .badge.is-tentative { background: #e0ebfa; color: #1d4f91; }
.badge.is-cancelled, .badge.is-maintenance, .badge.is-redeem { background: #fbe4e2; color: #a12a22; }
.badge.is-no_show { background: #efe6f3; color: #6a3d7d; }
.tier-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 8px; border-radius: 999px; background: var(--tier); color: #fff8e8; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.tier-chip .ic { width: 14px; height: 14px; }
.tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: .68rem; font-weight: 700; }
.tag.is-veg { background: #e1f2e6; color: #1e6b3a; }
.tag.is-spicy { background: #fbe4e2; color: #a12a22; }

.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); overflow-x: auto; scrollbar-width: none; justify-self: start; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; color: var(--ink-2); font-size: .84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tabs a:hover { background: var(--gold-soft); }
.tabs a.is-active { background: var(--ink); color: #f4ecdc; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.toolbar label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.toolbar-title { margin: 0; font: 600 1.05rem var(--display); }
.toolbar input, .toolbar select { height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .86rem; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .ic { position: absolute; left: 14px; top: 50%; color: var(--muted); transform: translateY(-50%); }
.search input { width: 100%; padding-left: 40px !important; }
.search-lg { max-width: none; }
.search-lg input { height: 48px !important; font-size: 1rem !important; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 22px; border-top: 1px solid var(--line); font-size: .84rem; }
.pager a, .pager span { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; }
.pager a:hover { background: var(--gold-soft); }
.pager .is-active { background: var(--ink); color: #f4ecdc; }
.pager .is-off { color: var(--line-strong); }
.pager-total { margin-left: auto; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .8rem; list-style: none; }
.legend-inline { margin-left: auto; padding: 0; border: 0; }
.legend li { display: flex; align-items: center; gap: 8px; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 44px 22px; text-align: center; }
.empty img { width: 54px; opacity: .85; }
.empty h3 { font: 600 1.15rem var(--display); }
.empty p { max-width: 420px; margin: 0 0 8px; color: var(--muted); }
.flash { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 16px; border: 1px solid #bfe0c9; border-radius: var(--radius-sm); background: #eef8f1; color: #185a30; font-weight: 500; }
.flash .ic { margin-top: 2px; }
.flash.is-error { border-color: #efc2be; background: #fdf1f0; color: #8f241d; }
.flash.is-info { border-color: #ecd9a4; background: #fffaf0; color: #6b4a00; }
.card > .flash { margin: 0 22px 16px; }
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #f4ecdc; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); font-size: .88rem; animation: toast .3s; }
.toast a { color: var(--gold-bright); }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; padding: 6px 22px 20px; }
.form-grid.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-grid h3 { font: 600 .98rem var(--body); }
.field { min-width: 0; }
.full { grid-column: 1 / -1; }
.field > label { display: block; margin-bottom: 6px; color: var(--ink-2); font-size: .78rem; font-weight: 600; }
.field > label i { color: var(--red); font-style: normal; }
.field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]), .field select, .field textarea, .select-sm { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 0; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201, 164, 92, .25); }
.field input[readonly] { background: var(--side); color: var(--muted); }
.field input[type="color"] { width: 64px; height: 42px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
.field input[type="file"] { max-width: 100%; font: inherit; font-size: .84rem; }
.hint { display: block; margin-top: 5px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.field-static { margin: 0; padding: 9px 0; font-weight: 600; }
.field-btn { display: flex; align-items: flex-end; }
.field-check { align-self: end; }
.check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: .9rem; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.check-row { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.select-sm { width: auto; min-height: 34px; padding: 4px 28px 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.select-sm.status-soldout { border-color: #e9cf8f; background: #fbefd2; color: #7a5200; }
.select-sm.status-hidden { background: #ece8df; color: #575043; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; padding: 0 22px 20px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; padding: 14px 0; background: linear-gradient(180deg, rgba(245, 239, 227, 0), var(--bg) 40%); }
.form-danger { display: flex; justify-content: flex-end; }
.split-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-forms > form + form { border-left: 1px solid var(--line); }
.toolbar-card .form-grid { padding-top: 20px; }
.image-pick { display: flex; gap: 16px; align-items: flex-start; }
.image-pick-preview { display: grid; flex: none; place-items: center; width: 132px; height: 98px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--side); color: var(--line-strong); overflow: hidden; }
.image-pick-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-pick-preview .ic { width: 30px; height: 30px; }
.image-pick-controls { display: grid; flex: 1; gap: 8px; min-width: 0; }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 22px 16px; }
.choice { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 164, 92, .22); }
.choice input { margin-top: 3px; accent-color: var(--gold); }
.choice strong, .choice small { display: block; }
[hidden] { display: none !important; }

/* ---------- Reservations ---------- */

.res-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-left: 5px solid var(--line-strong); }
.res-head.is-pending, .res-head.is-enquiry { border-left-color: #d9a520; }
.res-head.is-confirmed { border-left-color: #2f9e58; }
.res-head.is-checked_in, .res-head.is-tentative { border-left-color: #2f6fc4; }
.res-head.is-cancelled, .res-head.is-no_show { border-left-color: #c9453c; }
.res-head-main h2 { margin: 8px 0 4px; font: 600 1.3rem var(--display); }
.res-head-main p { margin: 0; color: var(--ink-2); }
.res-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.member-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; text-decoration: none; }
.room-pick { display: grid; gap: 12px; padding: 4px 22px 18px; }
.room-pick-type { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.room-pick-type legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0 6px; }
.room-pick-type legend span { color: var(--muted); font-size: .84rem; }
.room-pick-type.is-off { opacity: .6; }
.room-pick-type p { margin: 0; }
.room-chip input { position: absolute; opacity: 0; }
.room-chip span { display: inline-flex; align-items: center; gap: 6px; min-width: 62px; justify-content: center; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-weight: 700; cursor: pointer; }
.room-chip i { color: #d9a520; font-style: normal; }
.room-chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #f4ecdc; }
.room-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Room calendar (tape chart): two columns per day so stays run afternoon → morning. */
.tape-scroll { overflow-x: auto; }
.tape { display: grid; grid-template-columns: 124px repeat(calc(var(--days) * 2), minmax(22px, 1fr)); grid-auto-rows: 44px; min-width: calc(124px + var(--days) * 56px); }
.tape-corner, .tape-day { position: sticky; top: 0; z-index: 3; grid-row: 1; display: grid; place-items: center; align-content: center; border-bottom: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: .7rem; line-height: 1.25; }
.tape-corner { left: 0; z-index: 4; justify-items: start; padding-left: 22px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tape-day b { color: var(--ink); font-size: .68rem; font-weight: 600; }
.tape-day small { font-size: .6rem; }
.tape-day.is-weekend { background: #fbf6ea; }
.tape-day.is-today { background: var(--ink); color: #d9cdb2; }
.tape-day.is-today b { color: #f4ecdc; }
.tape-group { grid-column: 1 / -1; display: flex; align-items: center; padding-left: 22px; border-bottom: 1px solid var(--line); background: var(--side); color: var(--gold-ink); font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.tape-room { position: sticky; left: 0; z-index: 2; grid-column: 1; display: grid; align-content: center; padding-left: 22px; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); background: var(--surface); }
.tape-room small { font-size: .64rem; }
.tape-room small.is-dirty { color: #7a5200; }
.tape-room.is-off { color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface) 0 6px, #f1eadb 6px 12px); }
.tape-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tape-cell.is-weekend { background: #fcf8ee; }
.tape-cell.is-today { background: #fbf1d8; }
.tape-cell:hover { background: var(--gold-soft); }
.tape-stay { z-index: 1; display: flex; align-items: center; margin: 7px 2px; padding: 0 10px; border-radius: 9px; background: #ece8df; color: #3d382e; font-size: .76rem; font-weight: 600; text-decoration: none; overflow: hidden; box-shadow: 0 0 0 2px var(--surface); }
.tape-stay span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tape-stay:hover { filter: brightness(.95); color: inherit; }
.tape-stay.is-pending, .tape-key.is-pending { background: #f6dc9a; color: #5c3f00; }
.tape-stay.is-confirmed, .tape-key.is-confirmed { background: #b9e2c5; color: #14502a; }
.tape-stay.is-checked_in, .tape-key.is-checked_in { background: #b5d0f3; color: #123d73; }
.tape-stay.is-checked_out, .tape-key.is-checked_out { background: #e2ddd1; color: #575043; }
.tape-key, .cal-key { display: inline-block; width: 22px; height: 12px; border-radius: 4px; }

/* Housekeeping board, tiles */
.room-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; padding: 4px 22px 22px; }
.room-tile { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-top: 4px solid #2f9e58; border-radius: var(--radius-sm); background: #fff; }
.room-tile.is-dirty { border-top-color: #d9a520; }
.room-tile.is-checked_in { border-top-color: #2f6fc4; }
.room-tile.is-maintenance { border-top-color: #c9453c; background: var(--side); }
.room-tile header { display: flex; align-items: baseline; justify-content: space-between; }
.room-tile header strong { font: 600 1.4rem var(--display); }
.room-tile p { margin: 0; min-height: 44px; }
.room-tile p small { display: block; margin-top: 4px; }
.room-tile footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 34px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.tile { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .2s, border-color .2s; }
.tile:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-2px); }
.tile figure { margin: 0; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e9dcc0, #cdb98e); }
.tile figure img { width: 100%; height: 100%; object-fit: cover; }
.tile > div { padding: 16px 18px 18px; }
.tile h3 { margin-bottom: 6px; font: 600 1.1rem var(--display); }
.tile p { margin: 0 0 8px; color: var(--ink-2); font-size: .88rem; }
.tile.is-off { opacity: .6; }
.tile > a { display: block; }
.tile h3 a { text-decoration: none; }
.tile-tools { display: flex; align-items: center; justify-content: flex-end; gap: 2px; margin-top: 6px; }
.tile-tools .badge { margin-right: auto; }
.tiles-sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tiles-sm .tile figure { aspect-ratio: 4 / 3; }
.tiles-sm .tile > div { padding: 12px 14px 12px; }
.tiles-sm .tile h3 { font: 600 .92rem var(--body); }
.menu-cat.is-off { opacity: .65; }

/* Website text editor */
.text-list { display: grid; padding: 0 22px 14px; }
.text-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.text-row:first-child { border-top: 0; }
.text-kind { padding-top: 11px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.text-row input, .text-row textarea { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--side); color: var(--ink); font: inherit; resize: vertical; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.text-row input:hover, .text-row textarea:hover { border-color: var(--line-strong); }
.text-row input:focus, .text-row textarea:focus { border-color: var(--gold); outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(201, 164, 92, .25); }
.text-row.is-changed input, .text-row.is-changed textarea, .text-row.is-dirty input, .text-row.is-dirty textarea { border-color: var(--gold); background: #fffaf0; }
.text-row .hint { grid-column: 2; margin: 0; }
.link-btn { padding: 0; border: 0; background: none; color: var(--gold-ink); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.menu-table tr.is-hidden td:not(:nth-child(4)):not(:last-child) { opacity: .45; }
.menu-thumb { width: 62px; padding-right: 0 !important; }
.menu-thumb img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }

/* Month calendar (events) */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-dow { padding: 10px; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.cal-day { display: grid; align-content: start; gap: 4px; min-height: 112px; padding: 6px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-other { background: var(--side); }
.cal-day.is-other .cal-num { color: var(--line-strong); }
.cal-num { justify-self: start; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--ink-2); font-size: .82rem; font-weight: 600; text-decoration: none; }
.cal-num:hover { background: var(--gold-soft); }
.cal-day.is-today .cal-num { background: var(--ink); color: #f4ecdc; }
.cal-event { display: flex; gap: 6px; padding: 3px 7px; border-left: 4px solid var(--hall); border-radius: 6px; background: #e1f2e6; color: #14502a; font-size: .72rem; line-height: 1.35; text-decoration: none; overflow: hidden; }
.cal-event b { flex: none; }
.cal-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.is-tentative, .cal-key.is-tentative { background: #e0ebfa; color: #123d73; }
.cal-event.is-enquiry, .cal-key.is-enquiry { background: #fff; color: #6b4a00; outline: 1px dashed #d9a520; outline-offset: -1px; }
.cal-event.is-completed { background: #ece8df; color: #575043; }
.cal-key.is-confirmed { background: #b9e2c5; }

/* ---------- Loyalty ---------- */

.scan-layout { display: grid; gap: 20px; max-width: 880px; }
.scan-form { display: flex; gap: 10px; padding: 4px 22px 14px; }
.scan-form .search { flex: 1; }
.scan-form .search input { height: 48px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font: inherit; }
.scan-form .btn { min-height: 48px; }
.scanner { position: relative; margin: 0 22px 14px; border-radius: var(--radius); background: var(--obsidian); overflow: hidden; aspect-ratio: 4 / 3; max-height: 420px; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner::after { content: ""; position: absolute; inset: 14% 20%; border: 3px solid rgba(232, 207, 152, .9); border-radius: 22px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.scanner-hint { position: absolute; right: 0; bottom: 12px; left: 0; z-index: 2; margin: 0; color: #f4ecdc; font-size: .82rem; text-align: center; }
.member-panel { overflow: hidden; }
.member-card { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 18px 22px 14px; padding: 22px 24px; border-radius: 18px; background: var(--tier); background: linear-gradient(135deg, color-mix(in srgb, var(--tier) 82%, #000), color-mix(in srgb, var(--tier) 52%, #000)); color: #fff8e8; box-shadow: 0 16px 40px rgba(28, 23, 15, .2); }
.member-card h2 { font: 600 1.5rem var(--display); }
.member-card-tier { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: .7rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; opacity: .92; }
.member-card-no { margin: 6px 0 0; font-size: .86rem; letter-spacing: .14em; opacity: .85; }
.member-card-points { text-align: right; }
.member-card-points strong { display: block; font: 600 2.3rem/1 var(--display); font-variant-numeric: tabular-nums; }
.member-card-points span { font-size: .78rem; opacity: .9; }
.member-progress { display: grid; gap: 6px; margin: 0 22px 16px; }
.earn-preview { margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--ink-2); font-size: .9rem; }
.earn-preview strong { color: var(--ink); font-size: 1.1rem; }
.tier-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; padding: 4px 22px 22px; }
.tier-split-item { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); text-decoration: none; }
.tier-split-item:hover { border-color: var(--tier); color: var(--ink); }
.tier-split-item strong { font: 600 1.6rem var(--display); }
.tier-split-item .meter i { background: var(--tier); }
.tier-split-name { display: flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 700; }
.tier-split-name .ic { color: var(--tier); }
.tier-card { border-top: 5px solid var(--tier, var(--line-strong)); }
.tier-card .card-head .ic { color: var(--tier, var(--gold)); }
.tier-card.is-new { border-style: dashed; box-shadow: none; }

.qr-panel { text-align: center; }
.qr-panel .card-head { text-align: left; }
.qr-panel .form-actions { justify-content: center; }
.qr-panel > .muted { padding: 0 22px; }
.qr-box { width: min(300px, 70%); margin: 6px auto 12px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 18px; background: #fff; }
.qr-box-sm { width: min(210px, 60%); }
.qr-box svg { width: 100%; height: auto; }
.qr-url { margin: 0 22px 10px; font-weight: 600; word-break: break-all; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.media-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.media-card.is-replaced { border-color: #a9d6b7; }
.media-card figure { position: relative; margin: 0; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e9dcc0, #cdb98e); }
.media-card figure img { width: 100%; height: 100%; object-fit: cover; }
.media-card figure .badge { position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.media-card-body { display: flex; flex-wrap: wrap; align-content: start; gap: 8px; padding: 14px 16px 16px; }
.media-card-body h3 { width: 100%; font: 600 .92rem/1.35 var(--body); }
.media-card-body p { width: 100%; margin: 0; font-size: .78rem; }

/* ---------- Sign-in, setup ---------- */

.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: clamp(28px, 5vw, 64px); background: linear-gradient(180deg, rgba(11, 10, 8, .25), rgba(11, 10, 8, .9)), var(--art) center / cover; color: #f4ecdc; }
.auth-art p { margin: 0; color: #e8cf98; font-size: .7rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; }
.auth-art h2 { max-width: 520px; font: 500 clamp(1.5rem, 2.6vw, 2.3rem)/1.25 var(--display); }
.auth-tiers { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.auth-tiers li { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid rgba(232, 207, 152, .35); border-radius: 999px; background: rgba(11, 10, 8, .45); font-size: .8rem; font-weight: 600; }
.auth-tiers i { width: 10px; height: 10px; border-radius: 50%; background: var(--tier); box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.auth-tiers span { color: #e8cf98; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; width: min(460px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(22px, 4vw, 40px); }
.auth-logo { width: 164px; height: auto; margin: 0 0 30px; }
.auth-panel h1 { margin-bottom: 20px; font: 600 1.9rem var(--display); }
.auth-panel .stack { gap: 16px; }
.auth-panel .form-grid { padding: 0; }
.auth-panel .flash { margin-bottom: 16px; }
.auth-foot { margin: 16px 0 0; color: var(--muted); font-size: .9rem; }
.setup { display: grid; gap: 20px; width: min(760px, 100% - 32px); margin: 0 auto; padding: 44px 0 70px; }
.setup-logo { width: 170px; height: auto; margin: 0 auto 6px; }
.setup > .kicker, .setup > h1, .setup > .lede { margin: 0; text-align: center; }
.setup > h1 { font: 600 2rem var(--display); }
.checklist { display: grid; gap: 8px; margin: 0; padding: 0 22px 20px; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 10px; }
.checklist .is-ok .ic { color: var(--ok); }
.checklist .is-bad { color: var(--red); font-weight: 600; }

/* Printable menu QR card */
.qr-print { margin: 0; background: #e9e3d6; font-family: var(--body); color: var(--ink); }
.qr-print-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: var(--muted); font-size: .84rem; }
.qr-card { display: grid; justify-items: center; align-content: center; gap: 2mm; width: 105mm; height: 148mm; margin: 10px auto 40px; padding: 10mm 9mm; border: .5mm solid #c9a45c; outline: .25mm solid #c9a45c; outline-offset: -2.4mm; background: #fff; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.qr-card-logo { width: 46mm; height: auto; }
.qr-card-kicker { margin: 4mm 0 0; color: #7a5d27; font-size: 8.5pt; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; }
.qr-card h1 { font: 600 20pt var(--display); letter-spacing: .04em; }
.qr-card-code { width: 54mm; margin: 3mm 0; }
.qr-card-code svg { width: 100%; height: auto; }
.qr-card-hint { margin: 0; font-size: 9pt; }
.qr-card-url { margin: 0; color: #7a6e5a; font-size: 7.5pt; letter-spacing: .04em; }
@media print {
  @page { size: A6; margin: 0; }
  .qr-print { background: #fff; }
  .qr-print-bar { display: none; }
  .qr-card { margin: 0; box-shadow: none; }
}

/* ---------- Guest portal ---------- */

.portal { padding-bottom: env(safe-area-inset-bottom); }
.p-top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(251, 247, 238, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.p-top-inner { display: flex; align-items: center; gap: 20px; width: min(1180px, 100% - 32px); min-height: 74px; margin: 0 auto; }
.p-logo img { width: 84px; height: auto; }
.p-nav { display: flex; flex: 1; gap: 2px; justify-content: center; }
.p-nav a { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font-size: .86rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.p-nav a:hover { background: var(--gold-soft); }
.p-nav a.is-active { background: var(--ink); color: #f4ecdc; }
.p-nav a.is-active .ic { color: var(--gold-bright); }
.p-user { display: flex; align-items: center; gap: 8px; }
.p-main { display: grid; gap: 22px; width: min(1180px, 100% - 32px); margin: 0 auto; padding: 30px 0 60px; }
.p-main > * { min-width: 0; }
.p-foot { padding: 22px 16px 40px; color: var(--muted); font-size: .84rem; text-align: center; }
.p-foot p { margin: 0; }

/* The member card: a real 3D card. It floats, tilts towards the pointer and
   turns over to show the QR code. Sizes follow the card's own width (--w). */
.pass3d { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 30%; display: grid; justify-items: center; gap: 22px; container-type: inline-size; perspective: 1500px; }
.pass3d-float { --w: min(460px, 100cqw); position: relative; width: var(--w); font-size: calc(var(--w) * .04); transform-style: preserve-3d; animation: pass-float 7s ease-in-out infinite; }
.pass3d-float::after { content: ""; position: absolute; right: 9%; bottom: -11%; left: 9%; height: 13%; border-radius: 50%; background: radial-gradient(closest-side, rgba(28, 23, 15, .38), transparent); filter: blur(7px); transform: translateZ(-70px); pointer-events: none; }
@keyframes pass-float { 0%, 100% { transform: translateY(0) rotateX(3deg) rotateZ(-.7deg); } 50% { transform: translateY(-2.4%) rotateX(-2deg) rotateZ(.7deg); } }
.pass3d.is-tilting .pass3d-float { animation-play-state: paused; }
.pass3d-card { position: relative; width: 100%; aspect-ratio: 1.586; transform: rotateX(var(--rx)) rotateY(calc(var(--ry) + var(--flip, 0deg))); transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .85, .25, 1); cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; touch-action: pan-y; }
.pass3d.is-tilting .pass3d-card { transition: transform .12s ease-out; }
.pass3d.is-flipped .pass3d-card { --flip: 180deg; }
.pass3d-face { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 6.5% 7%; border-radius: 1.3em; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
.pass3d-card:focus-visible .pass3d-face { box-shadow: 0 0 0 4px var(--gold-bright), 0 30px 60px -18px rgba(28, 23, 15, .55); }
.pass3d-front { color: #fff8e8; background: var(--tier);
  background: radial-gradient(120% 130% at 8% -10%, color-mix(in srgb, var(--tier) 78%, #fff 22%), transparent 48%),
    linear-gradient(135deg, color-mix(in srgb, var(--tier) 88%, #000), color-mix(in srgb, var(--tier) 50%, #000) 58%, color-mix(in srgb, var(--tier) 30%, #000));
  box-shadow: 0 30px 60px -18px rgba(28, 23, 15, .55), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .3); text-shadow: 0 1px 2px rgba(0, 0, 0, .28); }
.pass3d-front::after { content: ""; position: absolute; inset: .55em; border: 1px solid rgba(255, 240, 205, .32); border-radius: .9em; pointer-events: none; }
.pass3d-pattern, .pass3d-foil, .pass3d-shine { position: absolute; inset: 0; pointer-events: none; }
.pass3d-pattern { background: repeating-radial-gradient(circle at 86% 16%, rgba(255, 255, 255, .09) 0 1px, transparent 1px .82em), repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px .6em); -webkit-mask-image: linear-gradient(120deg, transparent 18%, #000 80%); mask-image: linear-gradient(120deg, transparent 18%, #000 80%); }
.pass3d-foil { background: linear-gradient(115deg, transparent 30%, rgba(255, 226, 160, .5) 45%, rgba(255, 255, 255, .7) 50%, rgba(190, 228, 255, .4) 55%, transparent 70%) 120% 0 / 300% 100% no-repeat; mix-blend-mode: overlay; animation: pass-foil 5.5s ease-in-out infinite; }
@keyframes pass-foil { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
.pass3d.is-tilting .pass3d-foil { background-position: calc(110% - var(--mx) * 1.3) 0; animation: none; }
.pass3d-shine { background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .5), transparent 44%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .35s; }
.pass3d.is-tilting .pass3d-shine { opacity: 1; }
.pass3d-front > header, .pass3d-front > p, .pass3d-front > footer { position: relative; z-index: 1; margin: 0; }
.pass3d-front header { display: flex; align-items: center; gap: .8em; font-size: .68em; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; }
.pass3d-front header img { width: 3.4em; height: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.pass3d-tier { margin-top: auto !important; font: 600 2.15em/1 var(--display); letter-spacing: .1em; text-transform: uppercase; }
.pass3d-points { position: absolute !important; right: 7%; bottom: 9%; display: grid; justify-items: end; text-align: right; }
.pass3d-points strong { font: 600 2.6em/1 var(--display); font-variant-numeric: tabular-nums; }
.pass3d-points span { margin-top: .35em; font-size: .62em; letter-spacing: .06em; opacity: .9; }
.pass3d-front footer { display: grid; gap: .25em; margin-top: 1.1em !important; max-width: 58%; }
.pass3d-name { overflow: hidden; font-size: .86em; font-weight: 600; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.pass3d-no { font: 500 .92em/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .16em; opacity: .9; }
.pass3d-back { flex-direction: row; align-items: center; gap: 6%; border: 1px solid var(--line-strong); background: linear-gradient(135deg, #fffdf8, #f1e5c9); color: var(--ink); box-shadow: 0 30px 60px -18px rgba(28, 23, 15, .45); transform: rotateY(180deg); }
.pass3d-qr { flex: none; height: 100%; aspect-ratio: 1; padding: .5em; border-radius: .9em; background: #fff; box-shadow: 0 0 0 1px var(--line-strong), 0 8px 20px rgba(28, 23, 15, .1); }
.pass3d-qr svg { width: 100%; height: 100%; }
.pass3d-back-copy { display: grid; gap: .45em; min-width: 0; }
.pass3d-back-copy img { width: 68%; height: auto; }
.pass3d-back-copy p { margin: .3em 0 0; color: var(--ink-2); font-size: .7em; line-height: 1.4; }
.pass3d-back-copy strong { font: 600 .86em ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .1em; }
.pass3d-back-copy small { font-size: .62em; }
.pass3d-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.home-pass { display: grid; gap: 22px; padding: clamp(22px, 3.4vw, 36px) clamp(16px, 3vw, 32px) clamp(16px, 3vw, 26px); border: 1px solid var(--line); border-radius: 26px; background: radial-gradient(90% 110% at 0% 0%, color-mix(in srgb, var(--tier) 15%, transparent), transparent 62%), var(--surface); box-shadow: var(--shadow); }
.home-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 14px 18px; border-radius: 16px; background: var(--side); color: var(--ink-2); text-decoration: none; transition: background-color .2s; }
.home-next:hover { background: var(--gold-soft); color: var(--ink); }
.home-next .meter { grid-column: 1 / -1; }
.home-next .meter i { background: var(--tier); animation: grow-x 1.6s cubic-bezier(.2, .8, .2, 1) backwards; }
.home-next strong { color: var(--ink); }
.home-next .ic { color: var(--gold); }
@keyframes grow-x { from { width: 0; } }

/* Points & card: the card beside the journey to the next tier */
.loyalty-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; gap: clamp(26px, 4vw, 60px); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: 28px; background: radial-gradient(80% 110% at 0% 0%, color-mix(in srgb, var(--tier) 17%, transparent), transparent 60%), radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--next) 15%, transparent), transparent 62%), var(--surface); box-shadow: var(--shadow); }
.journey { display: grid; gap: 26px; min-width: 0; }
.journey-head { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 28px); }
.journey-head h2 { margin-bottom: 8px; font: 600 clamp(1.45rem, 2.7vw, 2.15rem)/1.12 var(--display); }
.journey-head h2 em { color: color-mix(in srgb, var(--next) 72%, #000); font-style: normal; }
.journey-head p:last-child { margin: 0; color: var(--ink-2); }
.ring { position: relative; flex: none; width: clamp(96px, 12vw, 132px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring-track { stroke: var(--gold-soft); }
.ring-fill { stroke: color-mix(in srgb, var(--next) 80%, #000); stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--off); animation: ring-fill 1.8s cubic-bezier(.2, .8, .2, 1) .2s backwards; }
@keyframes ring-fill { from { stroke-dashoffset: var(--len); } }
.ring strong { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 34%; font: 600 clamp(1.5rem, 2.6vw, 2rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.ring strong small { margin-left: 2px; font: 600 .5em var(--body); }
.journey-track { --n: 4; position: relative; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; margin: 6px 0 0; padding: 0; list-style: none; }
.journey-track::before, .journey-track::after { content: ""; position: absolute; top: 24px; left: calc(50% / var(--n)); height: 8px; border-radius: 8px; }
.journey-track::before { right: calc(50% / var(--n)); background: var(--gold-soft); box-shadow: inset 0 1px 2px rgba(28, 23, 15, .12); }
.journey-track::after { width: calc((100% - 100% / var(--n)) * var(--progress) / 100); background: linear-gradient(90deg, var(--gold), #e8cf98); box-shadow: 0 0 14px rgba(201, 164, 92, .7); animation: grow-x 2s cubic-bezier(.2, .8, .2, 1) .3s backwards; }
.journey-track li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 3px; text-align: center; animation: node-pop .7s cubic-bezier(.2, 1.4, .3, 1) backwards; animation-delay: calc(var(--i) * 180ms + 350ms); }
@keyframes node-pop { from { opacity: 0; transform: translateY(10px) scale(.6); } }
.journey-node { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border: 3px solid var(--surface); border-radius: 50%; background: #e9e2d2; color: #8d826c; box-shadow: 0 6px 16px rgba(28, 23, 15, .14); }
.journey-node .ic { width: 22px; height: 22px; }
.journey-track strong { font: 600 .92rem var(--display); letter-spacing: .04em; }
.journey-track small { font-size: .72rem; }
.journey-track .is-reached .journey-node, .journey-track .is-current .journey-node { background: linear-gradient(140deg, color-mix(in srgb, var(--tier) 86%, #fff), color-mix(in srgb, var(--tier) 62%, #000)); color: #fff8e8; }
.journey-track .is-current .journey-node { width: 64px; height: 64px; margin-top: -4px; animation: node-pulse 2.4s ease-out infinite 1.6s; }
@keyframes node-pulse { 0% { box-shadow: 0 6px 16px rgba(28, 23, 15, .14), 0 0 0 0 color-mix(in srgb, var(--tier) 60%, transparent); } 70%, 100% { box-shadow: 0 6px 16px rgba(28, 23, 15, .14), 0 0 0 16px transparent; } }
.journey-track .is-current strong { color: color-mix(in srgb, var(--tier) 75%, #000); }
.journey-track .is-next .journey-node { border: 3px dashed color-mix(in srgb, var(--tier) 80%, #000); background: #fff; color: color-mix(in srgb, var(--tier) 80%, #000); animation: node-beckon 2.6s ease-in-out infinite 2s; }
@keyframes node-beckon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.journey-track .is-locked { color: var(--muted); }
.journey-foot { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }

/* The four tiers as cards that lean towards the pointer */
.tiers-section { display: grid; gap: 22px; }
.tiers-head { text-align: center; }
.tiers-head h2 { font: 600 clamp(1.3rem, 2.4vw, 1.8rem)/1.2 var(--display); }
.tier-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 18px; padding: 12px 0 8px; perspective: 1600px; }
.tier3d { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 0%; position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; animation: tier-rise .9s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 120ms + 200ms); }
@keyframes tier-rise { from { opacity: 0; transform: translateY(34px) rotateX(-14deg); } }
.tier3d.is-tilting { transition: transform .12s ease-out, box-shadow .4s; box-shadow: 0 26px 54px -20px color-mix(in srgb, var(--tier) 60%, rgba(28, 23, 15, .5)); }
.tier3d-top { position: relative; display: grid; gap: 4px; padding: 22px 22px 20px; background: var(--tier); background: radial-gradient(130% 130% at 0% -10%, color-mix(in srgb, var(--tier) 78%, #fff 22%), transparent 50%), linear-gradient(140deg, color-mix(in srgb, var(--tier) 88%, #000), color-mix(in srgb, var(--tier) 42%, #000)); color: #fff8e8; text-shadow: 0 1px 2px rgba(0, 0, 0, .28); overflow: hidden; }
.tier3d-top::before { content: ""; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 92% 0%, rgba(255, 255, 255, .09) 0 1px, transparent 1px 13px); -webkit-mask-image: linear-gradient(200deg, #000, transparent 70%); mask-image: linear-gradient(200deg, #000, transparent 70%); }
.tier3d-shine { position: absolute; inset: 0; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .45), transparent 46%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .3s; }
.tier3d.is-tilting .tier3d-shine { opacity: 1; }
.tier3d-top > * { position: relative; }
.tier3d-num { font: 500 .78rem var(--display); letter-spacing: .3em; opacity: .85; }
.tier3d-flag { position: absolute !important; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px; border: 1px solid rgba(255, 244, 214, .45); border-radius: 999px; background: rgba(11, 10, 8, .28); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-shadow: none; text-transform: uppercase; }
.tier3d-flag .ic { width: 13px; height: 13px; }
.tier3d h3 { margin-top: 6px; font: 600 1.55rem/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; }
.tier3d-rate { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 0; }
.tier3d-rate strong { font: 600 2.5rem/1 var(--display); }
.tier3d-rate span { font-size: .74rem; line-height: 1.3; opacity: .92; }
.tier3d-body { display: grid; align-content: start; gap: 14px; padding: 18px 22px 22px; }
.tier3d-goal { display: grid; gap: 7px; margin: 0; font-size: .86rem; }
.tier3d-goal .meter i { background: var(--tier); animation: grow-x 1.8s cubic-bezier(.2, .8, .2, 1) .8s backwards; }
.tier3d ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.tier3d li { display: flex; gap: 9px; color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
.tier3d li .ic { width: 16px; height: 16px; margin-top: 2px; color: color-mix(in srgb, var(--tier) 80%, #000); }
.tier3d.is-current { border: 2px solid color-mix(in srgb, var(--tier) 85%, #000); box-shadow: 0 28px 60px -22px color-mix(in srgb, var(--tier) 70%, rgba(28, 23, 15, .5)); translate: 0 -10px; }
.tier3d.is-current .tier3d-flag { border-color: transparent; background: #fff8e8; color: var(--ink); }
.tier3d.is-current .tier3d-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%) 130% 0 / 300% 100% no-repeat; mix-blend-mode: overlay; animation: pass-foil 4.5s ease-in-out infinite; }
.tier3d.is-next { border: 2px dashed color-mix(in srgb, var(--tier) 80%, #000); }
.tier3d.is-next .tier3d-flag { animation: flag-glow 2.2s ease-in-out infinite; }
@keyframes flag-glow { 50% { background: rgba(255, 248, 232, .9); color: var(--ink); } }
.tier3d.is-locked .tier3d-top { filter: saturate(.75); }
.tier3d.is-locked .tier3d-body { opacity: .82; }

.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick a { display: grid; gap: 2px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.quick a:hover { border-color: var(--gold); }
.quick .ic { width: 24px; height: 24px; margin-bottom: 8px; color: var(--gold); }
.qr-full { width: min(420px, 100% - 32px); padding: 28px 24px 22px; border: 0; border-radius: 26px; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 40px 120px rgba(0, 0, 0, .4); }
.qr-full::backdrop { background: rgba(11, 10, 8, .82); }
.qr-full > img { width: 120px; height: auto; margin: 0 auto 10px; }
.qr-full-code svg { width: 100%; height: auto; }
.qr-full p { margin: 8px 0 16px; }
.steps-list { display: grid; gap: 12px; margin: 0; padding: 4px 22px 22px 44px; color: var(--ink-2); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.offer { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.offer figure { position: relative; margin: 0; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #2a2117, #6b4a2c 60%, #c9a45c); }
.offer figure img { width: 100%; height: 100%; object-fit: cover; }
.offer figure .badge { position: absolute; top: 12px; left: 12px; }
.offer-body { display: grid; align-content: start; gap: 8px; padding: 18px 20px 20px; }
.offer-body h2 { font: 600 1.2rem/1.3 var(--display); }
.offer-body p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.offer-summary { color: var(--ink) !important; font-weight: 600; }
.offer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.offer-foot .btn { margin-left: auto; }
.offer-code { padding: 6px 12px; border: 1px dashed var(--gold); border-radius: 10px; background: var(--gold-soft); font-size: .8rem; }
.offer-lock { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--side); }
.offer.is-locked figure img { filter: grayscale(1) brightness(.8); }
.inbox { margin: 0; padding: 0; list-style: none; }
.inbox li { display: flex; gap: 14px; padding: 18px 22px; border-top: 1px solid var(--line); }
.inbox li:first-child { border-top: 0; }
.inbox li.is-unread { background: #fffaf0; box-shadow: inset 4px 0 0 var(--gold-bright); }
.inbox-ic { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); }
.inbox h2 { font: 600 1rem var(--body); }
.inbox p { margin: 4px 0 6px; color: var(--ink-2); }
.inbox small { display: block; margin-bottom: 8px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 1180px) {
  .tier-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier3d.is-current { translate: none; }
  .loyalty-hero { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.g-4, .form-grid.g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .side { transform: translateX(-102%); transition: transform .3s; box-shadow: 20px 0 60px rgba(0, 0, 0, .2); }
  .side.is-open { transform: none; }
  .side.is-open + .side-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(11, 10, 8, .45); }
  .main { margin-left: 0; }
  .side-toggle { display: inline-grid; border-color: var(--line-strong); color: var(--ink); }
  .top-site span { display: none; }
  .g-2 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { min-height: 200px; padding: 26px 22px; }
  .auth-art h2 { font-size: 1.25rem; }
  .auth-tiers { display: none; }
  /* A blurred header would trap the fixed tab bar inside it, so the header is solid on phones. */
  .p-top { background: #fbf7ee; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .p-top-inner { min-height: 62px; }
  .p-logo img { width: 68px; }
  .p-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(251, 247, 238, .97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .p-nav a { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; border-radius: 12px; font-size: .62rem; }
  .p-nav a.is-active { background: transparent; color: var(--ink); }
  .p-nav a.is-active .ic { color: var(--gold-ink); }
  .p-nav .count { position: absolute; top: 0; left: 54%; min-width: 17px; height: 17px; font-size: .6rem; }
  .p-user { margin-left: auto; }
  .p-main { padding: 20px 0 110px; }
  .p-foot { padding-bottom: 100px; }
}
@media (max-width: 640px) {
  .tier-cards { display: flex; gap: 14px; margin: 0 -16px; padding: 12px 16px 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .tier-cards::-webkit-scrollbar { display: none; }
  .tier3d { flex: 0 0 82%; scroll-snap-align: center; }
  .journey-head { flex-direction: column; align-items: flex-start; }
  .journey-node { width: 46px; height: 46px; }
  .journey-track .is-current .journey-node { width: 54px; height: 54px; }
  .journey-track::before, .journey-track::after { top: 19px; }
  .journey-track strong { font-size: .78rem; }
  .content { gap: 16px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 1.7rem; }
  .form-grid, .form-grid.g-4, .form-grid.g-5, .split-forms, .choice-row { grid-template-columns: minmax(0, 1fr); }
  .split-forms > form + form { border-top: 1px solid var(--line); border-left: 0; padding-top: 14px; }
  .top h1 { font-size: 1.08rem; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { padding: 0 11px; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .quick a { grid-template-columns: 34px 1fr; align-items: center; column-gap: 6px; }
  .quick .ic { grid-row: span 2; margin: 0; }
  .image-pick { flex-direction: column; }
  .defs div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .text-row { grid-template-columns: minmax(0, 1fr); }
  .text-kind { padding-top: 0; }
  .text-row .hint { grid-column: 1; }
  .cal-day { min-height: 78px; padding: 3px; }
  .cal-event span { display: none; }
  .rows li { flex-wrap: wrap; }
  .table th, .table td { padding: 10px; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .card-head, .form-grid, .form-actions { padding-right: 16px; padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
