.pos-shell {
  min-height: 100vh;
  --terminal-edge: clamp(18px, 3.5vw, 64px);
  --terminal-gap: clamp(16px, 1.65vw, 26px);
  --terminal-radius: 16px;
}
.pos-shell .ico { width: 18px; height: 18px; display: inline-block; vertical-align: middle; flex: none; }
.pos-shell :where(button,input,select,textarea) { font-family: var(--body); }
.skip { position: absolute; top: -80px; left: 16px; z-index: 10; padding: 12px; background: white; color: var(--ink); }
.skip:focus { top: 4px; }

.appbar { background: #fff; border-bottom: 1px solid var(--line); }
.appbar-inner, .workspace { width: min(calc(100% - 2 * var(--terminal-edge)), 1512px); margin-inline: auto; }
.appbar-inner { min-height: 72px; display: flex; align-items: center; gap: clamp(18px, 2.5vw, 48px); }
.brand, .main-nav, .main-nav a, .top-actions, .online-link, .account-btn { display: flex; align-items: center; }
.brand { flex: none; gap: 7px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 31px; height: 31px; }
.brand>span { font: 780 1.57rem/1 var(--display); letter-spacing: -.066em; }
.brand-light { font-weight: 430; }
.main-nav { min-width: 0; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: thin; }
.main-nav a {
  flex: none; gap: 6px; min-height: 38px; padding: 6px 10px; border-radius: 7px;
  color: var(--muted); font: 560 .86rem/1.3 var(--body); text-decoration: none; white-space: nowrap;
}
.more-links { display:flex; align-items:center; gap:2px; }
.nav-more { display:none; }
.main-nav .ico { width: 16px; height: 16px; }
.main-nav a:hover, .online-link:hover { background: var(--soft); color: var(--ink); }
.main-nav a[aria-current=page] { background: var(--dark); color: white; }
.main-nav a[aria-current=page] .ico { color: #efd388; }
.top-actions { flex: none; margin-left: auto; gap: 12px; }
.online-link, .account-btn { justify-content: center; min-height: 36px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.online-link { gap: 7px; padding: 6px 11px; text-decoration: none; color: var(--ink); font: 580 .83rem/1.3 var(--body); }
.online-link .ico { width: 15px; height: 15px; }
.nav-rule { height: 22px; border-left: 1px solid var(--line); }
.account-btn { width: 36px; border-color: #dfd5bf; background: #f3eddd; color: #65512e; font: 680 1rem/1 var(--display); }

.workspace { margin-block: clamp(20px, 2.8vw, 42px) 54px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: var(--terminal-gap); }
.hero h1 { margin: 0; font: 690 clamp(2.4rem, 3.5vw, 3.45rem)/1.05 var(--display); letter-spacing: -.055em; }
.hero h1 span { color: var(--gold); }
.hero-branch, .hero-date { display: flex; align-items: center; gap: 7px; font: 540 .875rem/1.45 var(--body); color: var(--muted); }
.hero-branch { margin-top: 8px; overflow-wrap: anywhere; }
.hero-date { padding-bottom: 2px; }
.hero-branch .ico, .hero-date .ico { width: 16px; height: 16px; }
.cashier-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(315px, 30%); gap: var(--terminal-gap); align-items: start; }
.catalog-pane, .ticket { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--terminal-radius); }
.catalog-pane { overflow: hidden; }
.catalog-tools { container-type: inline-size; padding: clamp(16px, 1.55vw, 23px); border-bottom: 1px solid var(--line); }
.menu-heading, .title-and-count, .search, .categories, .category, .ticket-heading, .service-switch, .table-pick, .total-line, .primary-action, .cart-controls { display: flex; align-items: center; }
.menu-heading { justify-content: space-between; gap: 12px; }
.title-and-count { gap: 8px; min-width: 0; }
.menu-heading h2, .ticket h2 { margin: 0; color: var(--ink); font: 680 clamp(1.28rem, 1.65vw, 1.65rem)/1.16 var(--display); letter-spacing: -.043em; }
.menu-count, .item-count { flex: none; padding: 3px 8px; border: 1px solid #e7e3db; border-radius: 20px; background: #f6f5f1; color: var(--muted); font: 580 .75rem/1.45 var(--body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.search { width: min(44%, 255px); min-height: 40px; padding: 6px 11px; gap: 8px; border: 1px solid var(--line); border-radius: 8px; }
.search .ico { width: 16px; height: 16px; color: var(--muted); }
.search input { border: 0; background: transparent; padding: 0; min-width: 0; width: 100%; color: var(--ink); font-size: .875rem; line-height: 1.4; }
.search input::placeholder { color: #706b61; }
.search:focus-within { outline: 2px solid #9b7c38; outline-offset: 1px; }
.pos-shell .search input:focus { outline: 0; }
.search kbd { border: 1px solid #e3dfd6; border-radius: 4px; padding: 0 5px; color: #746e63; font: 520 .75rem/18px var(--body); }
.categories { gap: 6px; margin-top: 14px; padding: 2px; overflow-x: auto; scrollbar-width: thin; }
.category {
  flex: none; gap: 6px; min-height: 36px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #59554c; font: 570 .865rem/1.35 var(--body);
}
.category .ico { width: 16px; height: 16px; }
.category[aria-pressed=true] { background: var(--dark); color: white; border-color: var(--dark); }
.category:hover:not([aria-pressed=true]) { background: var(--soft); border-color: #c6bfaf; }
@container (max-width: 27rem) {
  .categories:not(:has(> :nth-child(5))) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 5px; }
  .categories:not(:has(> :nth-child(5))) .category { flex-direction: column; justify-content: center; gap: 3px; min-width: 0; min-height: 45px; padding: 5px 1px; font-size: .8125rem; overflow-wrap: anywhere; }
}
.products { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%, 166px), 1fr)); gap: clamp(10px, 1vw, 16px); padding: clamp(14px, 1.55vw, 23px); align-content: start; }
.product {
  min-width: 0; position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0;
  border: 1px solid #dedbd3; border-radius: 11px; background: white; color: var(--ink); text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.product:is(:hover,:focus-visible):enabled { border-color: #a19475; box-shadow: 0 3px 10px #29211112; }
.product[aria-pressed=true] { border-color: #a78a49; }
.product-photo { position: relative; display: block; width: 100%; aspect-ratio: 1.75; overflow: hidden; background: #eeeae2; }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product:disabled .product-photo img { filter: saturate(.55); }
.picked { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 5px; color: #fff; background: #29251e; font-size: .75rem; font-weight: 650; }
.picked .ico { width: 12px; height: 12px; }
.product-body { display: flex; flex-direction: column; flex: 1; width: 100%; padding: 11px 12px 12px; }
.product-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 6px; color: var(--muted); font: 500 .75rem/1.4 var(--body); }
.product-stock { white-space: nowrap; }
.stock-low { color: #80530e; font-weight: 640; }
.product-name { margin-top: 4px; font: 665 clamp(1rem, 1.14vw, 1.19rem)/1.2 var(--display); letter-spacing: -.035em; overflow-wrap: anywhere; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 10px; }
.price { font: 650 .92rem/1.3 var(--body); letter-spacing: -.025em; }
.add { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #ded9cf; border-radius: 7px; color: var(--ink); background: #f7f5ef; }
.add .ico { width: 15px; height: 15px; }
.product:enabled:is(:hover,[aria-pressed=true]) .add { background: var(--dark); color: white; border-color: var(--dark); }
.product:disabled .add { opacity: .45; }
.list-message { grid-column: 1/-1; margin: 0; padding: 32px 14px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: .9rem; }

.ticket { position: sticky; top: 14px; overflow: hidden; }
.ticket-heading { padding: 16px 18px; gap: 9px; border-bottom: 1px solid var(--line); }
.ticket-icon { display: grid; place-items: center; flex-shrink: 0; width: 33px; height: 33px; background: #f1ede4; color: #625336; border: 1px solid #e6e0d2; border-radius: 8px; }
.item-count { margin-left: auto; }
.ticket-inner { padding: 16px 18px 18px; }
.service-switch { gap: 3px; padding: 3px; border: 1px solid #e2ddd4; border-radius: 9px; background: #f4f2ee; }
.service-switch button { display: flex; justify-content: center; align-items: center; min-height: 35px; min-width: 0; flex: 1; gap: 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: .86rem; font-weight: 560; }
.service-switch button[aria-pressed=true] { background: #fff; border-color: #e0dacf; color: var(--ink); box-shadow: 0 1px 2px #2721130c; }
.service-switch .ico, .table-pick .ico { width: 16px; height: 16px; }
.table-pick { position: relative; border: 1px solid var(--line); border-radius: 8px; margin-top: 10px; color: var(--muted); }
.table-pick>.ico { position: absolute; pointer-events: none; }
.table-pick>.ico:first-of-type { left: 11px; }
.table-pick>.ico:last-child { right: 11px; width: 14px; }
.table-pick select { min-height: 40px; width: 100%; appearance: none; border: 0; border-radius: inherit; background: transparent; padding: 8px 32px 8px 35px; color: var(--ink); font-size: .875rem; }
.cart-tools, .quick-cash { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cart-tools button, .quick-cash button, .parked-list button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 9px; background: white; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font: 560 .81rem/1.35 var(--body); }
.cart-tools { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); }
.cart-tools button { justify-content: center; min-width: 0; padding-inline: 5px; overflow-wrap: anywhere; }
.cart-tools .ico { width: 15px; height: 15px; }
.cart-tools button:hover:enabled, .quick-cash button:hover:enabled, .parked-list button:hover { background: var(--soft); }
.cart-tools button:disabled, .quick-cash button:disabled { opacity: .56; }
.empty-cart { display: grid; justify-items: center; text-align: center; padding: 25px 6px 24px; border-top: 1px solid #ece8df; }
.empty-cart img { width: 65px; height: 57px; }
.empty-cart h3 { font: 665 1.08rem/1.3 var(--display); letter-spacing: -.029em; margin: 8px 0 4px; }
.empty-cart p { font-size: .875rem; color: var(--muted); line-height: 1.45; margin: 0; max-width: 230px; }
.ticket-bottom { padding-top: 14px; border-top: 1px dashed #d4cfc4; }
.total-line { justify-content: space-between; gap: 10px; font-size: .93rem; font-weight: 560; margin-bottom: 14px; }
.total-line strong { font: 690 1.55rem/1.1 var(--display); letter-spacing: -.045em; }
.primary-action { width: 100%; min-height: 44px; justify-content: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--dark); border-radius: 8px; color: white; background: var(--dark); font-size: .875rem; font-weight: 620; }
.primary-action:hover:enabled { background: #3c3931; }
.primary-action .ico { width: 17px; height: 17px; }
.primary-action.pay-now { margin-top: 7px; background: white; color: var(--ink); border-color: var(--line); }
.primary-action.pay-now:hover:enabled { background: var(--soft); }
.primary-action:disabled { background: #efede7; color: #79756a; border-color: #e4e0d8; }
.cart-lines { padding: 0 0 7px; margin: 0; list-style: none; max-height: 40vh; overflow: auto; }
.cart-line { display: flex; align-items: center; gap: 8px; padding: 11px 1px; border-top: 1px solid #ece8df; }
.cart-detail { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cart-detail strong, .cart-detail small { display: block; line-height: 1.4; }
.cart-detail strong { font-size: .9rem; }
.cart-detail small { font-size: .81rem; color: var(--muted); }
.cart-controls { gap: 4px; font-size: .875rem; }
.cart-controls button { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 6px; background: #faf9f6; color: var(--ink); }
.cart-controls .ico { width: 14px; height: 14px; }
.cart-controls output { min-width: 1.3em; text-align: center; }
.line-options { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; border: 0; background: transparent; color: #64522c; font: 530 .81rem/1.4 var(--body); }
.line-options .ico { width: 14px; height: 14px; }
.line-options:hover { text-decoration: underline; text-underline-offset: 2px; }
.parked-list { display: grid; gap: 8px; }
.parked-list button { justify-content: space-between; text-align: left; overflow-wrap: anywhere; }
.parked-list span { color: var(--muted); }
.extras-picker { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.extras-picker summary { cursor: pointer; font-weight: 600; }
.pos-form .extras-picker label { display: flex; align-items: center; gap: 8px; margin: 10px 0; }
.pos-form .extras-picker input { width: 1.05rem; height: 1.05rem; min-height: 0; flex-shrink: 0; margin: 0; accent-color: var(--dark); }
.extras-picker small { margin-left: auto; }
.pos-modal { padding: 0; width: min(470px,calc(100vw - 28px)); max-width: 100%; max-height: 90dvh; border: 1px solid var(--line); border-radius: var(--terminal-radius); color: var(--ink); box-shadow: 0 18px 70px #211c1630; }
.pos-modal::backdrop { background: #27231d68; }
.modal-content { padding: clamp(18px, 3vw, 26px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.modal-head h2, .access-card h1 { margin: 0; font: 680 1.7rem/1.15 var(--display); letter-spacing: -.05em; }
.close-modal { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); }
.close-modal .ico { width: 16px; height: 16px; }
.modal-content p, .access-card p { font-size: .925rem; color: var(--muted); line-height: 1.5; }
.pos-form { display: grid; gap: 14px; margin-top: 18px; }
.pos-form label { display: grid; gap: 6px; min-width: 0; font-size: .875rem; line-height: 1.4; font-weight: 610; }
.pos-form input, .pos-form textarea, .pos-form select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 11px; background: white; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: 400 .95rem/1.4 var(--body); }
.pos-form textarea { resize: vertical; min-height: 65px; }
.modal-content .error-note { color: #8a3028; margin: 0; }
.modal-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 12px; background: var(--soft); padding: 13px; border-radius: 8px; font-size: .9rem; }
.modal-total strong { font: 700 1.3rem/1.25 var(--display); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.modal-actions>* { flex: 1; }
.pos-form .money-change { margin: 0; font-size: .875rem; }
.pos-form .quick-cash { margin: -6px 0 0; }
.access-card { width: min(500px,100%); padding: clamp(18px,3vw,32px); border: 1px solid var(--line); border-radius: var(--terminal-radius); background: white; }
.access-card h1 { margin-top: 14px; }
.pos-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; z-index: 50; border-radius: 8px; padding: 11px 16px; color: white; background: var(--dark); box-shadow: 0 3px 16px #1b160826; font-size: .875rem; }
#mobile-cart { display: none; }

@media (max-width: 1160px) {
  .appbar-inner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 12px; padding-top: 11px; }
  .main-nav { grid-column: 1/-1; order: 3; margin-top: 8px; padding: 5px 1px; border-top: 1px solid #eeeae1; }
  .top-actions { grid-column: 2; }
  .cashier-layout { grid-template-columns: minmax(0,1fr) minmax(300px,32%); }
}
@media (max-width: 790px) {
  .pos-shell { --terminal-edge: 16px; }
  .cashier-layout { grid-template-columns: minmax(0,1fr); }
  .ticket { position: static; scroll-margin-top: 10px; }
  .cart-lines { max-height: none; }
  .empty-cart { padding-block: 15px; }
  .pos-shell:has(#mobile-cart:not([hidden])) { padding-bottom: 56px; }
  #mobile-cart:not([hidden]) {
    position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 2;
    display: flex; align-items: center; justify-content: center; gap: 7px; max-width: calc(100vw - 20px); min-height: 44px; padding: 8px 16px;
    background: var(--dark); color: white; border-radius: 9px; box-shadow: 0 3px 14px #211b162d; text-decoration: none; font-size: .86rem; white-space: nowrap;
  }
  #mobile-cart strong { border-left: 1px solid #ffffff55; padding-left: 9px; margin-left: 2px; }
  .pos-toast { bottom: 70px; }
}
@media (max-width: 650px) {
  .main-nav { display:grid; grid-template-columns:repeat(4,minmax(max-content,1fr)); align-items:stretch; gap:2px; padding-block:4px; overflow:visible; }
  .main-nav a, .main-nav .nav-more { min-width:0; justify-content:center; padding:5px 3px; gap:4px; flex-direction:column; min-height:44px; border-radius:6px; font-size:.79rem; }
  .main-nav .nav-more { display:flex; align-items:center; color:var(--muted); border:0; background:transparent; font-family:var(--body); font-weight:560; }
  .main-nav .nav-more .ico { width:16px; height:16px; }
  .main-nav .nav-more[aria-expanded=true], .main-nav:has(.more-links [aria-current=page]) .nav-more { background:var(--soft); color:var(--ink); }
  .nav-more[aria-expanded=true] .ico { transform:rotate(180deg); }
  .more-links { display:none; }
  .nav-more[aria-expanded=true]+.more-links { display:flex; grid-column:1/-1; align-items:stretch; flex-wrap:wrap; gap:5px; padding:6px 0 2px; }
  .more-links a { flex:1 1 auto; flex-direction:row; padding-inline:7px; min-height:38px; border:1px solid var(--line); }
}
@media (max-width: 560px) {
  .pos-shell { --terminal-edge: 12px; --terminal-radius: 12px; }
  .brand>span { font-size: 1.35rem; }
  .brand img { width: 29px; height: 29px; }
  .top-actions { gap: 7px; }
  .nav-rule { display: none; }
  .online-link { padding: 5px 8px; }
  .hero { flex-wrap: wrap; align-items: center; gap: 9px 12px; }
  .hero h1 { font-size: 2.3rem; }
  .hero-title { display: contents; }
  .hero h1 { width: 100%; }
  .hero-branch { margin: 0; }
  .hero-date { padding: 0; }
  .hero-date, .hero-branch { font-size: .79rem; }
  .catalog-tools { padding: 12px; }
  .menu-heading { flex-wrap: wrap; gap: 10px; }
  .title-and-count { flex: 1 0 auto; }
  .search { width: auto; flex: 1 1 125px; }
  .search kbd { display: none; }
  .categories { margin-top: 10px; }
  .products { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; gap: 9px; }
  .product-body { padding: 9px; }
  .product-foot { padding-top: 6px; }
  .product-stock { white-space: normal; }
  .product-meta { font-size: .75rem; }
  .ticket-inner, .ticket-heading { padding-inline: 14px; }
  .pos-form input, .pos-form select, .pos-form textarea, .search input { font-size: 1rem; }
}
@media (max-width: 395px) {
  .online-prefix { display: none; }
  .online-link>span { text-transform: capitalize; }
  .search { flex-basis: 100%; }
}
@media (max-width: 340px) {
  .online-link { width: 34px; height: 34px; padding: 0; }
  .online-link span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .product { transition: none; }
}
