:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #fff;
  --text: #172422;
  --muted: #62716e;
  --line: #e2e8e7;
  --accent: #006d65;
  --accent-soft: #e3f3ef;
  --accent-pressed: #005a53;
  --phone-width: 480px;
  font: 16px/1.5 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background: #e9eeed;
}
* { box-sizing: border-box; }
body { max-width: var(--phone-width); margin: auto; min-height: 100dvh; background: var(--bg); }
button, input, textarea, select { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { flex: none; vertical-align: middle; }
.site-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.top-wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 12px; min-height: 73px; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 8px; }
.brand img { width: 62px; height: 46px; object-fit: contain; }
.brand strong, .brand small { display: block; white-space: nowrap; }
.brand strong { font-size: 1.23rem; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; }
.brand small { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.tools { display: flex; align-items: center; gap: 4px; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #465652; font-size: .8rem; white-space: nowrap; }
.tool-btn:active { background: var(--bg); }
.share-btn { width: 38px; }
.tools { gap: 0; }
.tool-btn { border: 0; border-radius: 0; min-height: 44px; background: transparent; }
.share-btn { position: relative; }
.page-back, #page-heading { display: none; }
body[data-screen="inside"] .top-wrap { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.7fr) minmax(0,1fr); gap: 4px; min-height: 54px; padding: 4px 10px; }
body[data-screen="inside"] .brand { display: none; }
body[data-screen="inside"] .page-back { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 8px; background: transparent; }
body[data-screen="inside"] #page-heading { display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; text-align: center; white-space: nowrap; font-size: 1.05rem; font-weight: 650; }
body[data-screen="inside"] .tools { justify-self: end; }
body[data-screen="inside"] :is(.sh-back,.dk-crumb,.sh-page-title h1,.dk-page-title h1) { display: none; }
body[data-screen="inside"] :is(.sh-page-title,.dk-page-title):not(:has(p,button)) { display: none; }
body[data-screen="inside"] .sh-page-head { justify-content: flex-end; }
#view { container-type: inline-size; min-height: 75vh; padding: 16px 16px calc(86px + env(safe-area-inset-bottom)); outline: none; }
body[data-screen="storefront"] { background: white; }
body[data-screen="storefront"] .site-header { border-bottom: 0; }
body[data-screen="storefront"] #view { padding-top: 0; padding-inline: 0; background: white; }
.bottom-nav { position: fixed; z-index: 5; left: 50%; bottom: 0; transform: translateX(-50%); width: min(var(--phone-width),100%); display: flex; justify-content: space-around; background: #fff; border-top: 1px solid var(--line); padding: 3px 4px calc(3px + env(safe-area-inset-bottom)); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 51px; font-size: .75rem; line-height: 1.35; color: var(--muted); }
.nav-item.active { color: var(--accent); font-weight: 650; }
.nav-item.active .icon { stroke-width: 2.25; }
body[data-footer="action"] .bottom-nav { display: none; }
body[data-footer="none"] .bottom-nav { display: none; }
.loading, .shell-error { text-align: center; color: var(--muted); padding-block: 10vh; }
.panel, dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; min-height: 42px; border: 1px solid transparent; border-radius: 8px; line-height: 1.4; font-weight: 600; }
.primary { color: white; background: var(--accent); }
.primary:active { background: var(--accent-pressed); }
.secondary { background: white; color: var(--text); border-color: var(--line); }
input, textarea, select { accent-color: var(--accent); }
dialog { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(var(--phone-width), 100%); max-width: none; max-height: 88dvh; overflow-y: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 24px #17332b0c; }
dialog::backdrop { background: #18252260; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-head button { display:grid; place-items:center; width:36px; height:36px; border:0; border-radius:8px; color:var(--muted); background:var(--bg); }
.dialog-copy { font-size: .9rem; color: var(--muted); line-height: 1.65; }
.share-url, .staff-select { width: 100%; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); margin: 3px 0 12px; }
.dialog-actions { display: flex; gap: 8px; }
.dialog-actions .btn { width: 100%; }
#toast, #connection { position: fixed; left: 50%; z-index: 20; transform: translateX(-50%); max-width: 90vw; width: max-content; padding: 9px 14px; font-size: .875rem; border-radius: 8px; text-align: center; color: white; background: #213d37; pointer-events: none; }
#toast { bottom: calc(75px + env(safe-area-inset-bottom)); }
#connection { top: 8px; }
#toast:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 355px) {
  .top-wrap { padding-inline: 12px; }
  .brand img { width: 48px; height: 40px; }
  .brand { gap: 5px; }
  .brand strong { font-size: .98rem; }
  #view { padding-inline: 12px; }
}
@media (min-width: 500px) {
  :root { --phone-width: 390px; }
  body { box-shadow: 0 0 0 1px #dbe2e0; }
  dialog { inset: 0; margin: auto; height: fit-content; max-width: 410px; border-radius: 14px; }
}
