/* 留白｜夜色迷幻風。只有深色，因為客人都在暗處用手機。 */
:root {
  --bg: #07040f;
  --panel: rgba(22, 12, 40, 0.72);
  --panel-solid: #160c28;
  --line: rgba(190, 140, 255, 0.22);
  --text: #f3ecff;
  --muted: #a99bc4;
  --neon-1: #ff3df2;
  --neon-2: #7b5cff;
  --neon-3: #2ef2ff;
  --ok: #3dffa8;
  --warn: #ffcf3d;
  --danger: #ff4d6d;
  --line-green: #06c755;
  --radius: 18px;
  --tap: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ── 背景：會慢慢流動、變色的光暈 ── */
.aura { position: fixed; inset: -20vmax; z-index: -1; pointer-events: none; filter: blur(60px) saturate(140%); animation: hue 24s linear infinite; }
.aura i { position: absolute; border-radius: 50%; opacity: .55; mix-blend-mode: screen; }
.aura i:nth-child(1) { width: 60vmax; height: 60vmax; left: 5%; top: 0; background: radial-gradient(circle, var(--neon-1), transparent 65%); animation: drift1 19s ease-in-out infinite alternate; }
.aura i:nth-child(2) { width: 55vmax; height: 55vmax; right: 0; top: 30%; background: radial-gradient(circle, var(--neon-2), transparent 65%); animation: drift2 23s ease-in-out infinite alternate; }
.aura i:nth-child(3) { width: 45vmax; height: 45vmax; left: 25%; bottom: 0; background: radial-gradient(circle, var(--neon-3), transparent 65%); opacity: .35; animation: drift3 29s ease-in-out infinite alternate; }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 3px 3px; }
@keyframes hue { to { filter: blur(60px) saturate(140%) hue-rotate(360deg); } }
@keyframes drift1 { to { transform: translate(18vmax, 14vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-20vmax, -10vmax) scale(.9); } }
@keyframes drift3 { to { transform: translate(10vmax, -18vmax) scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .aura, .aura i { animation: none; } }

/* ── 版面 ── */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px calc(120px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 60%, transparent); }
.logo { font-size: 26px; font-weight: 900; letter-spacing: .3em; margin: 0;
  background: linear-gradient(90deg, var(--neon-1), var(--neon-3), var(--neon-2), var(--neon-1)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 8s linear infinite; }
.logo small { display: block; font-size: 10px; letter-spacing: .5em; color: var(--muted); -webkit-text-fill-color: var(--muted); font-weight: 500; }
@keyframes shimmer { to { background-position: 300% 0; } }
.icon-btn { min-width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 15px; padding: 0 12px; cursor: pointer; }
.icon-btn[aria-pressed="true"] { border-color: var(--neon-3); box-shadow: 0 0 12px rgba(46,242,255,.4); }
.row { display: flex; gap: 8px; align-items: center; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card + .card { margin-top: 12px; }
h2 { font-size: 15px; letter-spacing: .15em; color: var(--muted); margin: 24px 0 10px; font-weight: 600; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ── 按鈕 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 22px; border-radius: 16px;
  border: 0; font: inherit; font-weight: 700; color: #fff; cursor: pointer; text-decoration: none; transition: transform .08s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-neon { background: linear-gradient(120deg, var(--neon-1), var(--neon-2)); box-shadow: 0 6px 28px rgba(255,61,242,.35); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-line { background: var(--line-green); font-size: 19px; }
.btn-danger { background: var(--danger); }

/* ── 一鍵續酒：首頁最大的那顆 ── */
.again { position: relative; display: grid; place-items: center; width: min(76vw, 300px); aspect-ratio: 1; margin: 18px auto 8px; border-radius: 50%;
  border: 0; cursor: pointer; color: #fff; font: inherit; padding: 0;
  background: conic-gradient(from var(--spin, 0deg), var(--neon-1), var(--neon-2), var(--neon-3), var(--neon-1));
  animation: spin 6s linear infinite; box-shadow: 0 0 60px rgba(255,61,242,.45), 0 0 120px rgba(46,242,255,.25); }
.again::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2a1550, #0d0620 70%); }
.again span { position: relative; text-align: center; line-height: 1.2; }
.again b { display: block; font-size: 40px; letter-spacing: .12em; text-shadow: 0 0 18px rgba(255,61,242,.8); }
.again em { display: block; font-style: normal; font-size: 14px; color: var(--muted); margin-top: 8px; letter-spacing: .2em; }
.again:active { transform: scale(.96); }
.again:disabled { filter: grayscale(.8); }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.again-detail { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.again-detail strong { color: var(--text); }

/* ── 選擇用的膠囊 ── */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: var(--text); font: inherit; font-size: 16px; cursor: pointer; white-space: nowrap; }
.chip small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.chip[aria-pressed="true"] { background: linear-gradient(120deg, rgba(255,61,242,.35), rgba(123,92,255,.35)); border-color: var(--neon-1); box-shadow: 0 0 14px rgba(255,61,242,.4); }

input, select, textarea { width: 100%; min-height: var(--tap); border-radius: 14px; border: 1px solid var(--line); background: rgba(10,5,22,.7);
  color: var(--text); font: inherit; font-size: 20px; padding: 0 16px; }
textarea { min-height: 80px; padding: 12px 16px; font-size: 16px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .again:focus-visible { outline: 2px solid var(--neon-3); outline-offset: 2px; }
label.field { display: block; margin-top: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; letter-spacing: .1em; }

/* ── 酒單 ── */
.cat { font-size: 13px; letter-spacing: .3em; color: var(--neon-3); margin: 22px 4px 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 8px; }
.item.on { border-color: var(--neon-1); box-shadow: inset 0 0 0 1px var(--neon-1), 0 0 16px rgba(255,61,242,.25); }
.item.out { opacity: .4; }
.item .info { flex: 1; min-width: 0; }
.item .name { font-weight: 700; font-size: 16px; }
.item .meta { font-size: 13px; color: var(--muted); }
.item .price { font-weight: 800; color: var(--neon-3); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.stepper button.plus { background: linear-gradient(120deg, var(--neon-1), var(--neon-2)); border: 0; }
.stepper output { width: 30px; text-align: center; font-size: 20px; font-weight: 800; }

/* ── 底部固定送出列 ── */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 35%); }
.dock .inner { max-width: 560px; margin: 0 auto; }
.dock .btn { width: 100%; min-height: 64px; font-size: 20px; }

/* ── 訂單 ── */
.order { display: grid; gap: 6px; }
.order .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .15em; font-weight: 800; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.08); }
.st-pending { color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.st-accepted { color: var(--neon-3); box-shadow: inset 0 0 0 1px var(--neon-3); }
.st-ready { color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.st-delivered { color: var(--muted); }
.st-cancelled { color: var(--danger); opacity: .8; }

/* ── 送出成功 ── */
.done { text-align: center; padding: 40px 0 10px; }
.done .ring { width: 140px; height: 140px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; font-size: 64px;
  background: radial-gradient(circle, rgba(61,255,168,.25), transparent 70%); box-shadow: 0 0 0 3px var(--ok), 0 0 50px rgba(61,255,168,.5); color: var(--ok); }
.done h3 { font-size: 28px; margin: 0 0 4px; }
.done .code { font-size: 34px; color: var(--neon-3); display: block; margin: 10px 0; }

/* ── 年齡確認、警語 ── */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(5,2,12,.92); backdrop-filter: blur(10px); }
.gate .card { max-width: 380px; text-align: center; }
.gate h3 { font-size: 24px; margin: 6px 0 4px; }
.warning { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; text-align: center; font-size: 12px; color: var(--muted); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(7,4,15,.9); letter-spacing: .04em; white-space: nowrap; }
body.has-dock > .warning { display: none; }
.dock .warning { position: static; background: none; padding: 0 0 6px; }

.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--danger); box-shadow: 0 8px 30px rgba(0,0,0,.5); font-weight: 600; }
.toast.ok { border-color: var(--ok); }

.dev { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.dev .tag { font-size: 12px; color: var(--warn); letter-spacing: .1em; }

#loginCard { margin-top: 12vh; text-align: center; }
.mt8 { margin-top: 8px; }
.btn-big { min-height: 64px; font-size: 20px; }
.btn-sm { min-height: 44px; }
.hint { font-size: 13px; margin-top: 10px; }
.tagline { font-size: 24px; margin: 4px 0; }
a.logo { text-decoration: none; }
