*, *::before, *::after { box-sizing: border-box; }
:root {
  color-scheme: light;
  --cream: #fbf7ec;
  --paper: #fffefa;
  --ink: #22281f;
  --quiet: #5a6256;
  --line: #e6dfcd;
  --green: #254e43;
  --green-deep: #1c4036;
  --mint: #e7f3e8;
  --yellow: #f3e5a6;
  --danger: #862f34;
  --shadow: 0 10px 32px #4e3b1710;
  --radius: 6px;
  font: 16px/1.5 system-ui, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-variant-numeric: tabular-nums;
}
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .47; cursor: default; }
button[aria-disabled="true"] { opacity: .56; cursor: default; }
:focus-visible { outline: 3px solid #3b796a; outline-offset: 3px; }
button, input, select { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, dl, ul { margin: 0; }
h1 { font-size: clamp(24px, 3vw, 31px); line-height: 1.2; letter-spacing: .015em; }
h2 { font-size: 20px; line-height: 1.3; }
h3 { font-size: 14px; }
small { font-size: 13px; }
[hidden] { display: none !important; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.masthead-inner, .layout, .tab-inner { max-width: 1104px; margin-inline: auto; }
.masthead-inner { min-height: 85px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img { border-radius: 50%; background: #f7e7aa; flex-shrink: 0; }
.brand div { display: grid; }
.brand span { color: var(--green); letter-spacing: .13em; font-size: 10px; font-weight: 750; line-height: 1.2; }
.brand strong { font-size: clamp(17px, 3vw, 23px); letter-spacing: .045em; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--quiet); background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: 12px; flex-shrink: 0; }
.connection i { border-radius: 50%; width: 7px; height: 7px; background: #988249; flex: none; }
.connection.ready { background: var(--mint); color: var(--green-deep); border-color: #d6e6d9; }
.connection.ready i { background: #398568; }
.layout { padding: 22px 24px calc(86px + env(safe-area-inset-bottom)); }
#notice:empty, .form-error:empty { display: none; }
.notice { color: var(--green-deep); border: 1px solid #c6decc; background: var(--mint); padding: 8px 12px; margin-bottom: 12px; border-radius: var(--radius); font-size: 14px; }
.error, .form-error { color: var(--danger); }
.notice.error { background: #fff0ec; border-color: #e5c5bb; }
.shift-banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f6edcb; border: 1px solid #eaddab; padding: 10px 15px; border-radius: var(--radius); margin-bottom: 14px; }
.shift-banner.is-open { background: var(--mint); border-color: #d6e6d9; }
.shift-banner > div { display: grid; gap: 1px; }
.shift-banner > div span { color: var(--quiet); font-size: 12px; }
.shift-banner button { flex: none; }
.shift-banner button span { padding-left: 5px; }
.sale-layout { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.menu { display: grid; gap: 14px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: var(--shadow); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.section-head > span, .muted, .hint, .quick-add small { color: var(--quiet); font-size: 13px; }
.section-head > span { text-align: right; }
.bowl-grid, .payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bowl { min-height: 69px; padding: 7px 11px; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); color: var(--ink); text-align: left; display: grid; grid-template-columns: 1fr auto; align-content: center; }
.bowl b { justify-self: end; font-size: 18px; }
.bowl small { color: var(--quiet); }
.bowl.selected, .flavor.selected, .button.selected { background: var(--mint); color: var(--green-deep); border-color: #6b9a82; }
.bowl.selected { box-shadow: inset 0 0 0 1px #6b9a82; }
.flavor-head { margin-top: 19px; }
.flavor-head h2 { font-size: 17px; }
.flavor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.flavor { background: #fdfaf2; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); min-height: 48px; padding: 5px 8px; text-align: left; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; line-height: 1.26; }
.flavor span { overflow-wrap: anywhere; }
.flavor i, .supply-info i { height: 13px; width: 13px; border-radius: 50%; background: var(--flavor); border: 1px solid #2e171629; flex: none; }
.flavor small { display: block; color: var(--quiet); margin-top: 2px; font-weight: 500; font-size: 11px; }
small.alcohol, .flavor .alcohol { color: #7c4a20; font-weight: 700; }
.scoops { border: 1px solid #dce8db; background: #f4f8ef; padding: 7px 9px; border-radius: var(--radius); display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; }
.scoop-labels { min-width: 0; flex: 1; display: grid; gap: 2px; }
.scoop-labels span { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.scoop-labels b { white-space: nowrap; }
.stepper { display: flex; gap: 5px; }
.stepper button, .remove { min-width: 44px; min-height: 44px; border-radius: var(--radius); font-size: 22px; line-height: 1; background: var(--paper); color: var(--green); border: 1px solid var(--line); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 7px 13px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 720; font-size: 14px; line-height: 1.3; }
.primary { color: white; background: var(--green); }
.primary:active:not(:disabled) { background: var(--green-deep); }
.secondary { color: var(--green-deep); background: var(--paper); border-color: #d4decd; }
.danger { color: var(--danger); background: #fffaf6; border-color: #e5c5bb; }
.wide { width: 100%; }
.add { margin-top: 12px; justify-content: space-between; }
.sale-layout .menu-hint { margin-top: 6px; }
.quick-add { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quick-add h2 { font-size: 16px; }
.quick-add button { white-space: nowrap; }
.cart { scroll-margin: 10px; }
.cart .count { background: #f5efda; border-radius: 20px; padding: 3px 9px; }
.empty { min-height: 117px; display: grid; align-content: center; justify-items: center; gap: 8px; background: #faf7ee; color: var(--quiet); border: 1px dashed var(--line); border-radius: var(--radius); font-size: 14px; }
.empty > span { border: 1px solid #e8dfca; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: #9a8154; }
.receipt { background: var(--mint); color: var(--green-deep); padding: 9px; margin-bottom: 10px; display: grid; border-radius: var(--radius); }
.receipt span { font-size: 13px; }
.amount { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 11px; padding: 10px 0 0; border-top: 1px solid var(--line); }
.amount > span { color: var(--quiet); font-size: 14px; }
.amount > strong { font-size: clamp(28px, 4vw, 37px); letter-spacing: -.045em; }
.cart h3 { margin: 9px 0 5px; }
.cart-items, .availability-list { list-style: none; padding: 0; }
.cart-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 6px 0; border-top: 1px solid var(--line); }
.cart-items small, .order li small { color: var(--quiet); display: block; font-size: 12px; }
.cart-items .remove { color: var(--danger); }
.cash-input { margin-top: 8px; font-size: 14px; font-weight: 650; }
.cash-input > div { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr) auto; margin-top: 3px; }
input:not([type="checkbox"]), select { color: var(--ink); width: 100%; min-height: 44px; border: 1px solid #c9d2c5; padding: 6px 10px; background: #fff; border-radius: var(--radius); font-size: 16px; }
.change { display: flex; align-items: center; justify-content: space-between; background: var(--mint); padding: 6px 10px; border-radius: var(--radius); color: var(--green-deep); margin: 8px 0 10px; font-size: 14px; }
.change > b { font-size: 23px; }
.hint { margin: 7px 0 10px; }
.cart-jump { display: none; }
.tabs { position: fixed; bottom: 0; inset-inline: 0; z-index: 5; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -7px 16px #4e3b1708; padding-bottom: env(safe-area-inset-bottom); }
.tab-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px 24px; }
.tabs button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 49px; background: transparent; color: var(--quiet); border: 0; border-radius: var(--radius); font-size: 13px; font-weight: 700; padding: 2px; }
.tabs span { font-size: 19px; line-height: 1; }
.tabs button[aria-current] { color: var(--green-deep); background: var(--mint); }
.subpage { max-width: 720px; margin-inline: auto; }
.subpage > h1:first-child, .subpage > h2:first-child { margin-bottom: 7px; }
.subpage .muted + button { margin-top: 10px; }
.history { margin-top: 12px; }
.availability-list li { border-top: 1px solid var(--line); }
.availability-list label { min-height: 49px; display: flex; gap: 8px; align-items: center; position: relative; cursor: pointer; }
.supply-info { flex: 1; display: flex; gap: 8px; align-items: center; }
.supply-info small { display: block; color: var(--quiet); }
.switch-label { color: var(--quiet); font-size: 13px; }
.availability-list input { position: absolute; right: 0; opacity: 0; width: 49px; height: 100%; margin: 0; cursor: pointer; }
.switch-track { width: 45px; height: 24px; background: #d9dbd2; border: 1px solid #adb2a7; border-radius: 24px; padding: 2px; }
.switch-track::before { content: ""; display: block; background: #fff; width: 18px; height: 18px; border-radius: 50%; }
input:checked + .switch-track { background: var(--green); border-color: var(--green); }
input:checked + .switch-track::before { transform: translateX(20px); }
input:focus-visible + .switch-track { outline: 3px solid #3b796a; outline-offset: 2px; }
.stack { display: grid; gap: 5px; color: var(--ink); font-size: 14px; font-weight: 650; }
.ledger-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 12px 0 6px; }
.ledger-metrics div { padding: 6px 10px; background: #fbf7eb; border-radius: var(--radius); min-width: 0; }
.ledger-metrics .emphasis { background: var(--mint); }
.ledger-metrics dt { font-size: 13px; color: var(--quiet); }
.ledger-metrics dd { margin: 0; font-weight: 800; font-size: 23px; overflow-wrap: anywhere; }
.order { border: 1px solid var(--line); border-radius: var(--radius); margin-top: 9px; padding: 9px 11px; }
.order.voided { background: #fcf3ef; border-color: #efd7cb; }
.order header, .order li { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.order header span { display: block; font-size: 13px; color: var(--quiet); }
.order ul { list-style: none; padding: 6px 0 0; border-top: 1px solid var(--line); margin-top: 6px; }
.order p { font-size: 13px; margin-top: 6px; overflow-wrap: anywhere; }
.order .button { margin-top: 6px; }
.void-reason { color: var(--danger); }
.backup-filename { font-size: 12px; margin: 7px 0; overflow-wrap: anywhere; }
dialog { width: min(420px, calc(100% - 24px)); max-height: calc(100% - 24px); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: 0 16px 50px #141c2160; }
dialog::backdrop { background: #1b252672; }
dialog p { margin-bottom: 7px; }
dialog .form-error { font-size: 14px; margin: 5px 0 0; }
dialog .wide { margin-top: 10px; }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; min-height: 44px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--green); }
@media (min-width: 741px) {
  .cart { position: sticky; top: 12px; }
}
@media (max-width: 740px) {
  .masthead-inner { min-height: 65px; padding: 8px 12px; }
  .brand { gap: 7px; }
  .brand img { width: 43px; height: 43px; }
  .brand span { font-size: 8px; }
  .brand strong { letter-spacing: .015em; }
  .connection { padding: 4px 7px; font-size: 11px; white-space: normal; }
  .layout { padding: 10px 9px calc(114px + env(safe-area-inset-bottom)); }
  .shift-banner { margin-bottom: 8px; padding: 6px 9px; }
  .sale-layout, .menu { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .panel { padding: 11px; }
  .section-head { margin-bottom: 8px; }
  .flavor-head { margin-top: 12px; }
  .tab-inner { padding: 3px 6px; gap: 2px; }
  .tabs button { flex-direction: column; gap: 2px; font-size: 11px; }
  .tabs span { font-size: 16px; }
  .cart-jump { position: fixed; z-index: 4; left: 9px; right: 9px; bottom: calc(58px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; gap: 5px; align-items: center; padding: 6px 10px; min-height: 44px; border: 0; border-radius: var(--radius); background: var(--green); color: #fff; box-shadow: 0 5px 12px #25392e44; }
}
@media (max-width: 355px) {
  .flavor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
