:root {
  --bg: #f5f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1f2a44;
  --ink-2: #3b4560;
  --muted: #6b7386;
  --line: #e5e1da;
  --line-2: #d6d1c7;
  --accent: #8a1f35;
  --accent-ink: #ffffff;
  --accent-soft: #f7ecee;
  --accent-line: #e3c3ca;
  --ok: #23714a;
  --ok-soft: #e7f3ec;
  --warn: #a4520b;
  --warn-soft: #fbf0e3;
  --shadow: 0 1px 2px rgba(31, 42, 68, .05), 0 4px 16px rgba(31, 42, 68, .05);
  --radius: 14px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Raleway', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --t-V: #2f7a3e; --t-VG: #1d6b5c; --t-GF: #9a6512; --t-DF: #2d5f9a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11141b; --surface: #181d27; --surface-2: #1d2330; --ink: #e9ecf3; --ink-2: #c9cfdc; --muted: #9099ad;
    --line: #2a3141; --line-2: #374053; --accent: #e0849a; --accent-ink: #1a0e12; --accent-soft: #2c1a21; --accent-line: #5a2c39;
    --ok: #6ccf9a; --ok-soft: #16291f; --warn: #f0a85b; --warn-soft: #2d2114;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --t-V: #7fcf8f; --t-VG: #6cc9b4; --t-GF: #e8b15e; --t-DF: #82b2ec;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11141b; --surface: #181d27; --surface-2: #1d2330; --ink: #e9ecf3; --ink-2: #c9cfdc; --muted: #9099ad;
  --line: #2a3141; --line-2: #374053; --accent: #e0849a; --accent-ink: #1a0e12; --accent-soft: #2c1a21; --accent-line: #5a2c39;
  --ok: #6ccf9a; --ok-soft: #16291f; --warn: #f0a85b; --warn-soft: #2d2114;
  --t-V: #7fcf8f; --t-VG: #6cc9b4; --t-GF: #e8b15e; --t-DF: #82b2ec;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- disclaimer */
.disclaimer {
  background: var(--ink); color: var(--surface); text-align: center; font-size: 12.5px; font-weight: 500;
  padding: 7px 16px; line-height: 1.4;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .disclaimer { background: var(--surface-2); color: var(--ink-2); border-bottom: 1px solid var(--line); } }

/* ---------------------------------------------------------------- header */
.top {
  max-width: 1320px; margin: 0 auto; padding: 22px 24px 14px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.eyebrow { font-family: var(--display); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
h1 { font-family: var(--display); font-weight: 500; letter-spacing: .04em; font-size: 28px; margin: 2px 0 0; color: var(--ink); }
.top-actions { display: flex; gap: 8px; flex: none; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); padding: 0;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--ink-2); background: var(--surface); }
.icon-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.icon-btn.primary:hover { filter: brightness(1.06); }
.icon-btn.busy { opacity: .55; }
.icon-btn[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px);
  background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 5px 9px; border-radius: 7px; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 20;
}
.icon-btn[data-tip]:hover::after, .icon-btn[data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.icon-row .icon-btn:first-child[data-tip]::after { left: 0; transform: translateY(-4px); }
.icon-row .icon-btn:last-child[data-tip]::after { left: auto; right: 0; transform: translateY(-4px); }
.icon-row .icon-btn:is(:first-child, :last-child)[data-tip]:is(:hover, :focus-visible)::after { transform: none; }
.tip-up .icon-btn[data-tip]::after { top: auto; bottom: calc(100% + 8px); }

.btn {
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13px; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink-2); filter: none; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }

/* ---------------------------------------------------------------- layout */
.layout {
  max-width: 1320px; margin: 0 auto; padding: 20px 24px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start;
}
main { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------- event card */
.event { padding: 18px 18px 6px; }
.ev-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.ev-grid.sm { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.f > span { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.f-name { grid-column: span 2; }
.f-room { grid-column: span 2; }
.f input[type="text"], .f input[type="date"], .f input[type="number"], .f select {
  width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
  padding: 0 12px; outline: none; min-width: 0;
}
.f input:focus, .f select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { font-size: 12px; color: var(--muted); min-height: 1em; }
.warn { color: var(--warn); font-weight: 600; }
.money { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); height: 40px; padding-left: 12px; }
.money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.money span { color: var(--muted); font-weight: 600; }
.money input { border: 0 !important; box-shadow: none !important; height: 100% !important; padding-left: 4px !important; background: transparent !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.money.sm { height: 34px; width: 120px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 7px; padding: 0 12px; height: 32px; font-weight: 600; font-size: 13.5px; color: var(--muted); flex: 1; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.sm button { height: 30px; font-size: 13px; }
.seg.wrap { flex-wrap: wrap; }
.event .seg { display: flex; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--surface); height: 36px; }
.stepper button { width: 34px; border: 0; background: var(--surface-2); font-size: 18px; line-height: 1; color: var(--ink-2); }
.stepper button:hover { background: var(--accent-soft); color: var(--accent); }
.stepper input { width: 64px; border: 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; background: transparent; outline: none; }
.stepper.lg { height: 40px; display: flex; }
.stepper.lg input { flex: 1; width: 100%; font-size: 16px; height: auto !important; border: 0 !important; box-shadow: none !important; }
.stepper.lg button { width: 40px; }

.more { border-top: 1px solid var(--line); margin-top: 14px; }
.more summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 13.5px; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: '▸'; font-size: 11px; color: var(--muted); transition: transform .15s; }
.more[open] summary::before { transform: rotate(90deg); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); padding-top: 4px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 14px 0 12px; }

/* ---------------------------------------------------------------- member card */
.member { margin-top: 14px; padding: 0 18px; }
.member > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.member > summary::-webkit-details-marker { display: none; }
.m-head { display: flex; flex-direction: column; min-width: 0; }
.m-title { font-weight: 700; font-size: 14.5px; }
.m-sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.member.filled .m-sub { color: var(--ink-2); font-weight: 500; }
.m-cta { flex: none; font-size: 13px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 999px; padding: 5px 14px; }
.member:not(.filled):not([open]) .m-cta { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.member[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.member .fine { margin-top: 12px; }
.f-2 { grid-column: span 2; }
.f-4 { grid-column: 1 / -1; }
.f textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 10px 12px; outline: none; resize: vertical; font: inherit; color: inherit; }
.f textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.f input[type="email"], .f input[type="tel"] {
  width: 100%; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); padding: 0 12px; outline: none; min-width: 0;
}

/* ---------------------------------------------------------------- browse */
.browse { margin-top: 18px; }
.toolbar { display: flex; gap: 10px; align-items: center; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 0 14px; height: 42px; min-width: 0; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.search input { flex: 1; border: 0; outline: none; background: transparent; height: 100%; min-width: 0; }
.diet { display: flex; gap: 4px; }
.diet button { height: 34px; min-width: 40px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.diet button.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px;
  position: sticky; top: 60px; z-index: 4; background: var(--bg);
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { border-color: var(--ink-2); }
.tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.badge { min-width: 19px; height: 19px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; }
.tab.on .badge { background: var(--accent-ink); color: var(--accent); }

.sec-intro { margin: 6px 0 14px; }
.sec-intro .src, .sec-h span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sec-intro p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 72ch; }
.sec-h { font-family: var(--display); font-size: 20px; font-weight: 600; margin: 22px 0 8px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.block { margin-bottom: 22px; }
.block-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.block-h h3 { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 0; color: var(--accent); }
.block-h p { margin: 3px 0 0; font-size: 13px; color: var(--muted); max-width: 70ch; }
.items { display: grid; gap: 8px; }

.item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .12s, box-shadow .12s; }
.item:hover { border-color: var(--line-2); }
.item.on { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow); }
.item-main { display: flex; gap: 14px; padding: 12px 14px; cursor: pointer; align-items: flex-start; border-radius: 12px; }
.item-main:focus-visible { outline-offset: -2px; }
.item-text { flex: 1; min-width: 0; }
.item-name { font-weight: 600; color: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.item-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; text-align: right; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.per { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.mkt { font-style: italic; font-weight: 600; color: var(--muted); font-size: 13px; }
.add { font-size: 12.5px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.item.on .add { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tags { display: inline-flex; gap: 3px; }
.tag { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; border: 1px solid currentColor; line-height: 1.35; }
.t-V { color: var(--t-V); } .t-VG { color: var(--t-VG); } .t-GF { color: var(--t-GF); } .t-DF { color: var(--t-DF); }
.fee-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px dashed var(--line-2); padding: 0 6px; border-radius: 4px; }

.item-ctl { border-top: 1px dashed var(--line); padding: 10px 14px 12px; display: grid; gap: 8px; }
.ctl-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.qty { display: flex; flex-direction: column; gap: 4px; }
.qty > span, .opt > span, .opt legend { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.line-total { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.line-total span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.line-total strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; min-height: 0; }
.meta:empty { display: none; }
.meta .warn { background: var(--warn-soft); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.auto { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ok); background: var(--ok-soft); padding: 2px 8px; border-radius: 999px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.opt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt select { height: 34px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); padding: 0 10px; max-width: 100%; }
fieldset.opt { border: 0; padding: 0; margin: 0; }
fieldset.opt legend { padding: 0; margin-bottom: 4px; }
.chk-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px 4px 8px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chk input { accent-color: var(--accent); margin: 0; }
.chk.on { border-color: var(--accent-line); background: var(--accent-soft); }
.chk em { font-style: normal; color: var(--muted); font-weight: 600; }

/* builders */
.builder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.builder.on { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-line), var(--shadow); }
.add-btn { flex: none; font-size: 13px; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); background: transparent; border-radius: 999px; padding: 6px 14px; }
.add-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.base { margin-bottom: 12px; display: flex; max-width: 460px; }
.slot { margin-top: 14px; }
.slot-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.slot-l { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.slot-hint { font-size: 12.5px; color: var(--muted); text-align: right; }
.slot-g { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.slot-items.rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.slot-items.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 10px; padding: 9px 11px; min-width: 0;
}
.chips .pick { padding: 6px 12px 6px 9px; border-radius: 999px; align-items: center; }
.pick:hover { border-color: var(--line-2); }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.pk-box { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--line-2); flex: none; margin-top: 2px; display: grid; place-items: center; background: var(--surface); }
.chips .pk-box { margin-top: 0; border-radius: 50%; }
.pick.on .pk-box { background: var(--accent); border-color: var(--accent); }
.pick.on .pk-box::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); }
.pk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-n { font-weight: 600; font-size: 14px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.pk-d { font-size: 12.5px; color: var(--muted); }
.pk-p { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-foot { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.b-foot.off { color: var(--muted); font-size: 13.5px; }

/* bar */
.barblock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.bar-sec { margin-top: 16px; }
.spirits { font-size: 13px; color: var(--muted); margin-top: 8px; }
.est { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.est small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.inline { display: inline-flex; align-items: center; gap: 6px; }
.inline input { width: 60px; height: 32px; border: 1px solid var(--line-2); border-radius: 8px; text-align: center; background: var(--surface); font-weight: 600; }
.bar-lines { margin-top: 12px; }
.bar-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 90px; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.bar-line.on { border-color: var(--accent-line); }
.bar-line .stepper { justify-self: start; }
.bl-total { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.fees-row { display: grid; gap: 4px; }

.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty.sm { padding: 12px; font-size: 13px; text-align: left; border: 0; }

/* ---------------------------------------------------------------- summary */
.summary { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overscroll-behavior: contain; }
.sum-inner { padding: 18px; }
.sum-head { position: relative; }
.sum-title { font-family: var(--display); font-size: 20px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.sum-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.sheet-close { display: none; }

.meter-wrap { margin-top: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.meter-nums { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.meter-nums > div { display: flex; flex-direction: column; }
.meter-nums .right { text-align: right; }
.lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.big { font-size: 28px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.mid { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.meter { height: 10px; background: var(--line); border-radius: 999px; margin: 10px 0 10px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.meter-wrap.met .fill { background: var(--ok); }
.status { font-size: 13.5px; }
.status.ok { color: var(--ok); }
.status.short strong { color: var(--accent); }
.status.none { color: var(--muted); }
.status .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

.totals { margin: 14px 0 0; display: grid; gap: 0; }
.totals > div { display: flex; justify-content: space-between; padding: 6px 2px; font-size: 14px; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.totals .short dd, .totals .short dt { color: var(--accent); }
.totals .grand { border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 10px; font-size: 17px; }
.totals .grand dt { font-weight: 700; color: var(--ink); }
.totals .grand dd { font-weight: 800; }
.totals .pg { font-size: 13px; color: var(--muted); padding-top: 0; }
.totals .pg dt, .totals .pg dd { color: var(--muted); font-weight: 500; }

.lines { margin-top: 16px; border-top: 1px solid var(--line); }
.lines-h { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 4px; }
.lines-h .link { font-size: 12.5px; }
.lines h4 { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.muted { color: var(--muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.ln-sec { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }
.ln { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 8px; align-items: start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ln:last-child { border-bottom: 0; }
.ln-n { font-weight: 600; font-size: 13.5px; }
.ln-d { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.ln-t { font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.x { width: 22px; height: 22px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; font-size: 16px; line-height: 1; }
.x:hover { background: var(--accent-soft); color: var(--accent); }
.dot { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 10px; font-weight: 800; }
.member-line { color: var(--ink-2); font-weight: 500; }

.send { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.send h4 { margin: 0 0 2px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.icon-row { display: flex; gap: 8px; }
.send .icon-row { justify-content: space-between; padding-top: 2px; }
.send .icon-btn { width: 40px; height: 40px; }
.busy { opacity: .6; cursor: progress; }
.btn.busy::after { content: ' …'; }

.foot { max-width: 1320px; margin: 0 auto; padding: 0 24px 40px; font-size: 12px; color: var(--muted); }
.foot p { margin: 0 0 6px; }
.foot strong { color: var(--ink-2); }

/* mobile bar & sheet */
.mobilebar, .scrim { display: none; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
  .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-items.rows { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .top { padding: 16px 16px 12px; }
  h1 { font-size: 23px; }
  .top { align-items: center; }
  .icon-btn { width: 38px; height: 38px; }
  .icon-btn svg { width: 18px; height: 18px; }
  .icon-btn[data-tip]::after { display: none; }
  .send .icon-btn { width: 40px; height: 40px; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 110px; }
  .foot { padding: 0 16px 110px; }
  .ev-grid.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 88vh; z-index: 50;
    border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .25s ease; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.sheet-open .summary { transform: translateY(0); }
  .sheet-close { display: grid; place-items: center; position: absolute; right: -4px; top: -4px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); font-size: 20px; color: var(--ink-2); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 14, 22, .45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 45; }
  body.sheet-open .scrim { opacity: 1; pointer-events: auto; }
  body.sheet-open { overflow: hidden; }
  .mobilebar {
    display: block; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40;
    border: 1px solid var(--line-2); background: var(--surface); border-radius: 16px; padding: 10px 14px 11px; text-align: left;
    box-shadow: 0 8px 28px rgba(15, 20, 35, .18);
  }
  .mb-meter { display: block; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
  .mb-meter .fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
  .mb-meter.met .fill { background: var(--ok); }
  .mb-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 13.5px; }
  .mb-l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mb-r { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-variant-numeric: tabular-nums; }
  .short-t { color: var(--accent); font-weight: 600; }
  .ok-t { color: var(--ok); font-weight: 600; }
  .chev { color: var(--muted); font-size: 14px; }
  .toast { bottom: 96px; }
  .tabs { top: 58px; }
}

@media (max-width: 560px) {
  .ev-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .f-name, .f-room, .f-2, .f-seg { grid-column: 1 / -1; }
  .hide-sm { display: none; }
  .top-actions { gap: 6px; }
  .ev-grid.sm { grid-template-columns: minmax(0, 1fr); }
  .toolbar { flex-wrap: wrap; position: static; }
  .search { flex-basis: 100%; }
  .diet { width: 100%; }
  .diet button { flex: 1; }
  .tabs { top: 0; padding-top: 8px; }
  .item-main { flex-direction: column; gap: 8px; }
  .item-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .line-total { margin-left: 0; align-items: flex-start; flex-basis: 100%; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .bar-line { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-line .price { text-align: right; }
  .block-h { flex-direction: row; }
  .seg button { padding: 0 8px; font-size: 13px; }
  .base { max-width: none; }
}

@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  .top-actions, .browse, #event, #member, .mobilebar, .scrim, .toast, .send, .x, .lines-h .link, .sheet-close { display: none !important; }
  .disclaimer { background: none; color: #000; border-bottom: 1px solid #ccc; text-align: left; padding: 0 0 6px; }
  .top { border: 0; padding: 0 0 8px; }
  .layout { display: block; padding: 0; }
  .summary { position: static; transform: none !important; max-height: none; overflow: visible; box-shadow: none; border: 0; }
  .sum-inner { padding: 0; }
  .meter-wrap { break-inside: avoid; }
  .ln { break-inside: avoid; }
  .foot { padding: 16px 0 0; }
}
