:root {
  --primary: #316c72;
  --primary-dark: #255459;
  --bg: #f2f2f7;
  --card: rgba(255, 255, 255, .72);
  --line: rgba(205, 213, 219, .62);
  --text: #1c1c1e;
  --sub: #6b7280;
  --danger: #e45656;
  --shadow: 0 22px 55px -34px rgba(31, 52, 55, .45);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 4%, rgba(181, 224, 223, .48), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(215, 224, 241, .62), transparent 30%),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Microsoft YaHei, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.app-shell { width: min(100%, 1180px); min-height: 100vh; margin: 0 auto; }
.page-shell { padding: 10px 16px 44px; }
.login-page { min-height: 100vh; display: grid; align-items: center; }
.login-card { width: min(100%, 460px); margin: 0 auto; padding: 34px 24px; border-radius: 30px; text-align: center; }
.login-logo { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 22px; color: #fff; background: linear-gradient(145deg, var(--primary), var(--primary-dark)); box-shadow: 0 18px 34px -18px rgba(37,84,89,.9); font-size: 28px; font-weight: 900; }
.login-card h1 { margin: 4px 0 8px; font-size: 22px; }
.login-card > p:not(.eyebrow) { margin: 0 0 22px; color: var(--sub); font-size: 12px; }
.login-field { display: block; text-align: left; }
.login-field span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 800; }
.login-field input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #d7dfe2; border-radius: 15px; outline: 0; background: rgba(255,255,255,.86); }
.login-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(49,108,114,.09); }
.login-button { width: 100%; margin-top: 12px; }
.login-message { display: block; min-height: 17px; margin-top: 11px; color: var(--sub); }
.login-message.error { color: var(--danger); }
.admin-entry { display: inline-block; margin-top: 8px; color: var(--primary); font-size: 12px; font-weight: 800; text-decoration: none; }
.glass-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow: inset 0 0 0 1px rgba(210, 219, 224, .46), var(--shadow);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}
.compact-card { border-radius: 22px; }
.brand-bar { min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #143c41; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: #62a6a5; box-shadow: 0 0 0 5px rgba(98, 166, 165, .13); }
.demo-badge { padding: 4px 7px; border-radius: 99px; color: var(--primary); background: rgba(49, 108, 114, .1); font-size: 10px; font-weight: 800; }
.notice-bar {
  margin-top: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 19px;
  display: grid;
  grid-template-columns: 22px auto 1fr 28px;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.notice-icon { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #2690ad; background: #e5f5fb; font-weight: 900; }
.notice-copy { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #30363a; }
.icon-button, .clear-button, .modal-close { border: 0; background: rgba(245, 247, 248, .9); cursor: pointer; }
.icon-button { width: 28px; height: 28px; border-radius: 50%; color: #7e8a91; }
.coupon-card, .section-card, .receipt-card, .success-card { margin-top: 8px; border-radius: 22px; }
.order-sidebar { display: grid; grid-template-columns: 1fr; gap: 8px; }
.coupon-card { padding: 16px 15px 13px; }
.coupon-row { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.45; }
.coupon-row + .coupon-row { margin-top: 5px; }
.coupon-label { color: #5d6770; font-weight: 700; }
.coupon-expire { font-size: 12px; color: #3e4850; }
.step-nav { display: flex; gap: 8px; margin-top: 12px; }
.step-chip { border: 0; border-radius: 999px; padding: 9px 16px; background: rgba(238, 240, 243, .86); color: #565e65; font-size: 12px; font-weight: 800; cursor: pointer; }
.step-chip.active { color: #fff; background: linear-gradient(145deg, #2b9dcc, #2488b7); box-shadow: 0 8px 20px -10px rgba(36, 136, 183, .8); }
.section-card { position: relative; z-index: 1; padding: 14px; scroll-margin-top: 12px; }
#city-section { z-index: 30; }
#shop-section { z-index: 20; }
#goods-section { z-index: 10; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.section-heading h2, .receipt-card h2 { margin: 0; font-size: 15px; }
.section-meta { color: #68727a; font-size: 12px; }
.location-status { margin-top: 10px; color: #687b80; font-size: 11px; line-height: 1.5; }
.location-status.locating { color: #287d86; }
.location-status.success { color: #25805f; }
.location-status.error { color: #a76b3c; }
.select-shell { position: relative; }
.select-shell input, .goods-search-wrap input, .remark-field input {
  width: 100%;
  border: 1px solid rgba(214, 221, 226, .74);
  outline: 0;
  background: rgba(247, 248, 250, .85);
  transition: border-color .2s, box-shadow .2s;
}
.select-shell input { height: 44px; padding: 0 70px 0 14px; border-radius: 15px; font-weight: 700; }
.select-shell input:focus, .goods-search-wrap input:focus, .remark-field input:focus { border-color: rgba(49, 108, 114, .56); box-shadow: 0 0 0 4px rgba(49, 108, 114, .08); }
.select-arrow { position: absolute; right: 16px; top: 10px; color: #849199; pointer-events: none; }
.clear-button { position: absolute; z-index: 2; right: 39px; top: 10px; width: 24px; height: 24px; border-radius: 50%; color: #a7b0b5; }
.select-panel {
  position: absolute;
  z-index: 200;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  display: none;
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(218, 225, 229, .9);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 24px 54px -18px rgba(35, 51, 54, .46);
}
.select-shell.open .select-panel { display: block; }
.option-button { width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid #eef1f2; background: transparent; text-align: left; cursor: pointer; }
.option-button:last-child { border-bottom: 0; }
.option-button:hover, .option-button.selected { background: #edf6f6; }
.option-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; }
.option-sub { margin-top: 4px; color: var(--sub); font-size: 11px; }
.option-count { flex: 0 0 auto; color: var(--sub); font-size: 11px; font-weight: 700; }
.status-pill { flex: 0 0 auto; padding: 3px 7px; border-radius: 99px; font-size: 10px; color: #22704d; background: #e9f7ef; }
.status-pill.closed { color: #8b4a4a; background: #f9ecec; }
.shop-info { min-height: 62px; margin-top: 10px; padding: 12px; border: 1px solid rgba(217, 223, 227, .8); border-radius: 16px; background: rgba(255, 255, 255, .5); font-size: 12px; }
.shop-info.empty { display: grid; place-items: center; color: var(--sub); }
.shop-info-row { display: grid; grid-template-columns: 48px 1fr; gap: 2px; line-height: 1.8; }
.shop-info-row span:first-child { color: #78838a; font-weight: 700; }
.goods-search-wrap { margin-bottom: 10px; }
.goods-search-wrap input { height: 40px; padding: 0 13px; border-radius: 14px; }
.empty-state { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid rgba(217, 223, 227, .8); border-radius: 16px; color: #4c555c; background: rgba(255, 255, 255, .48); font-size: 12px; }
.empty-state::before { content: 'i'; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #84939a; background: #eef2f4; font-size: 11px; font-weight: 900; }
.goods-list { display: grid; gap: 10px; }
.goods-card { display: grid; grid-template-columns: 82px 1fr; gap: 12px; min-height: 112px; padding: 10px; border: 1px solid rgba(217, 223, 227, .76); border-radius: 19px; background: rgba(255, 255, 255, .58); }
.goods-copy { min-width: 0; display: flex; flex-direction: column; }
.goods-copy h3 { margin: 4px 0 3px; font-size: 15px; }
.goods-copy p { margin: 0; color: var(--sub); font-size: 11px; line-height: 1.45; }
.goods-tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.goods-tag { padding: 3px 6px; border-radius: 7px; color: #6d5a36; background: #fbf3df; font-size: 9px; font-weight: 800; }
.goods-bottom { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.goods-price strong { color: #c1533e; font-size: 17px; }
.goods-price del { margin-left: 5px; color: #a1a8ad; font-size: 10px; }
.add-button { width: 29px; height: 29px; border: 0; border-radius: 50%; color: #fff; background: var(--primary); box-shadow: 0 8px 18px -9px rgba(49, 108, 114, .8); cursor: pointer; font-size: 20px; line-height: 1; }
.drink-art { position: relative; width: 82px; height: 92px; overflow: hidden; border-radius: 17px; background: linear-gradient(145deg, var(--art-a), var(--art-b)); }
.goods-image { width: 82px; height: 92px; object-fit: cover; border-radius: 17px; background: #edf1f2; }
.drink-art::before { content: ''; position: absolute; left: 25px; bottom: 12px; width: 34px; height: 55px; border: 3px solid rgba(255, 255, 255, .88); border-top-width: 5px; border-radius: 8px 8px 12px 12px; background: linear-gradient(to bottom, rgba(255,255,255,.82) 0 15%, var(--tea) 16% 100%); box-shadow: inset 0 8px 0 rgba(255,255,255,.18), 0 10px 18px rgba(53, 39, 24, .12); transform: rotate(-3deg); }
.drink-art::after { content: ''; position: absolute; left: 49px; top: 13px; width: 3px; height: 35px; border-radius: 8px; background: rgba(56, 81, 75, .62); transform: rotate(8deg); }
.drink-art.large { width: 106px; height: 118px; flex: 0 0 auto; }
.drink-art.large::before { left: 32px; bottom: 14px; width: 42px; height: 70px; }
.drink-art.large::after { left: 62px; top: 16px; height: 44px; }
.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: rgba(31, 40, 43, .38); backdrop-filter: blur(6px); }
.spec-modal { position: relative; width: min(480px, 100%); max-height: 90vh; overflow: auto; padding: 12px 18px 22px; border-radius: 28px 28px 0 0; background: #fbfcfc; box-shadow: 0 -22px 70px -30px rgba(20, 40, 44, .58); animation: modal-in .24s ease-out; }
@keyframes modal-in { from { transform: translateY(40px); opacity: .2; } }
.modal-handle { width: 42px; height: 5px; margin: 0 auto 13px; border-radius: 99px; background: #d4dade; }
.modal-close { position: absolute; right: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; color: #657178; font-size: 20px; }
.modal-product { display: flex; gap: 15px; padding-right: 28px; }
.eyebrow { margin: 0 0 4px; color: #6f8788; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.modal-product h2 { margin: 0; font-size: 20px; }
.modal-description { margin: 7px 0; color: var(--sub); font-size: 11px; line-height: 1.5; }
.modal-price { color: #c1533e; font-size: 18px; font-weight: 900; }
.spec-groups { margin-top: 18px; }
.spec-group + .spec-group { margin-top: 15px; }
.spec-group h3 { margin: 0 0 9px; font-size: 13px; }
.spec-options { display: flex; gap: 8px; flex-wrap: wrap; }
.spec-option { min-width: 74px; padding: 9px 12px; border: 1px solid #dce2e5; border-radius: 13px; background: #fff; cursor: pointer; font-size: 12px; }
.spec-option.selected { color: var(--primary); border-color: var(--primary); background: #edf6f6; box-shadow: inset 0 0 0 1px rgba(49, 108, 114, .1); font-weight: 800; }
.remark-field { display: block; margin-top: 17px; }
.remark-field span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.remark-field span small { margin-left: 6px; color: var(--sub); font-size: 10px; font-weight: 500; }
.remark-field input { height: 42px; padding: 0 12px; border-radius: 13px; }
.order-check-message { margin-top: 12px; padding: 10px 12px; border: 1px solid #dfe6e8; border-radius: 13px; color: var(--sub); background: #f3f7f7; font-size: 11px; line-height: 1.55; }
.order-check-message.ready { color: #237450; border-color: #bcdccc; background: #edf8f2; }
.order-check-message.error { color: var(--danger); border-color: #edc8bf; background: #fff3f0; }
.modal-footer { position: sticky; bottom: -22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px -18px -22px; padding: 13px 18px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid #e7ebed; background: rgba(251, 252, 252, .96); }
.price-preview small { display: block; color: var(--sub); font-size: 10px; }
.price-preview strong { color: #c1533e; font-size: 21px; }
.primary-button, .secondary-button { height: 44px; border-radius: 15px; padding: 0 20px; border: 0; font-weight: 800; cursor: pointer; }
.primary-button { color: #fff; background: linear-gradient(145deg, var(--primary), var(--primary-dark)); box-shadow: 0 12px 25px -14px rgba(37, 84, 89, .9); }
.secondary-button { color: var(--primary); background: #e7f0f0; }
.submit-button { min-width: 145px; }
.success-card { padding: 30px 20px; text-align: center; }
.success-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #5aa988, #32795d); box-shadow: 0 15px 30px -16px rgba(50, 121, 93, .9); font-size: 27px; font-weight: 900; }
.success-card h1 { margin: 3px 0 10px; font-size: 20px; }
.queue-number { color: var(--primary); font-size: 44px; font-weight: 950; letter-spacing: .04em; }
.success-subtitle { margin: 5px 0 0; color: var(--sub); font-size: 12px; }
.receipt-status { width: fit-content; max-width: 100%; margin: 10px auto 0; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .72); color: #25634f; font-size: 12px; font-weight: 800; }
.receipt-status.error { color: #a23a2c; background: rgba(255, 236, 232, .9); }
.receipt-qr-wrap { display: grid; justify-items: center; gap: 8px; margin: 14px auto 0; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .72); }
.receipt-qr-image { width: 220px; height: 220px; object-fit: contain; image-rendering: pixelated; border-radius: 8px; background: #fff; }
.receipt-qr-code { max-width: 100%; color: #2c3538; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; text-align: center; }
.receipt-qr-wrap p { margin: 0; color: var(--sub); font-size: 11px; }
.receipt-refresh-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--sub); font-size: 12px; line-height: 1.5; }
.receipt-refresh-button { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid #dbe3df; border-radius: 50%; color: var(--primary); background: rgba(255, 255, 255, .84); cursor: pointer; font-size: 24px; line-height: 1; }
.receipt-refresh-button:hover { background: #edf7f0; }
.receipt-refresh-button:disabled { opacity: .55; cursor: wait; }
.receipt-card { padding: 16px; }
.receipt-title-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.order-no { color: var(--sub); font-size: 10px; }
.receipt-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 11px 0; border-top: 1px solid #e9edef; }
.receipt-item:first-child { border-top: 0; }
.receipt-item strong { font-size: 14px; }
.receipt-item p { margin: 4px 0 0; color: var(--sub); font-size: 11px; }
.receipt-total { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 13px; border-top: 1px dashed #d7dee1; }
.receipt-total strong { color: #c1533e; font-size: 21px; }
.progress-card h2 { margin-bottom: 12px; }
.progress-list { margin: 0; padding: 0; list-style: none; }
.progress-list li { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 10px; min-height: 56px; color: #929ba0; }
.progress-list li > span { position: relative; width: 14px; height: 14px; margin-top: 2px; border: 3px solid #d7dddf; border-radius: 50%; background: #fff; }
.progress-list li:not(:last-child) > span::after { content: ''; position: absolute; left: 3px; top: 11px; width: 2px; height: 43px; background: #dde3e5; }
.progress-list li.done, .progress-list li.active { color: var(--text); }
.progress-list li.error { color: var(--danger); }
.progress-list li.error > span { border-color: var(--danger); background: var(--danger); }
.progress-list li.done > span, .progress-list li.active > span { border-color: var(--primary); background: var(--primary); }
.progress-list strong, .progress-list small { display: block; }
.progress-list strong { font-size: 13px; }
.progress-list small { margin-top: 3px; color: var(--sub); font-size: 10px; }
.receipt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 34px; max-width: calc(100vw - 42px); padding: 10px 16px; border-radius: 99px; color: #fff; background: rgba(32, 43, 46, .9); box-shadow: 0 12px 30px -14px rgba(0,0,0,.7); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .22s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 360px) {
  .page-shell { padding-left: 10px; padding-right: 10px; }
  .step-chip { padding-left: 12px; padding-right: 12px; }
  .goods-card { grid-template-columns: 72px 1fr; }
  .drink-art { width: 72px; }
}
@media (min-width: 600px) {
  body { padding: 12px; }
  .app-shell { min-height: calc(100vh - 24px); }
  .page-shell { padding: 0; }
  #order-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'brand'
      'notice'
      'controls'
      'goods';
    gap: 12px;
    align-items: start;
  }
  .brand-bar { grid-area: brand; justify-content: flex-start; padding: 0 18px; }
  .notice-bar { grid-area: notice; margin-top: 0; padding-left: 14px; }
  .order-sidebar {
    grid-area: controls;
    display: grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(210px, .85fr) minmax(260px, 1fr);
    gap: 12px;
    min-width: 0;
    align-items: stretch;
  }
  .order-sidebar > * { min-width: 0; height: 100%; margin-top: 0; }
  #goods-section { grid-area: goods; min-height: calc(100vh - 330px); margin-top: 0; padding: 18px; }
  .goods-list { grid-template-columns: 1fr; }
  .coupon-card, .section-card { border-radius: 24px; }
  .modal-backdrop { align-items: center; padding: 24px; }
  .spec-modal { width: min(720px, 100%); border-radius: 28px; }
}
@media (min-width: 860px) {
  body { padding: 18px; }
  .app-shell { min-height: calc(100vh - 36px); }
  #order-page { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1080px) {
  #order-page { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .goods-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
