/* style.css — 共用樣式（手機優先）。米白＋墨黑＋暖金點綴，系統字體。 */
:root {
  --bg: #faf6ee; --card: #fffdf8; --ink: #1b1a17; --muted: #5f5a50; --line: #e2d9c6;
  --gold: #c39a4a; --gold-d: #7d5a17; --danger: #a3302a; --ok: #2f6b45;
  --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.1rem; }
h3:focus { outline: none; }
p { margin: 0 0 .8em; }
a { color: var(--gold-d); }
small { font-weight: 400; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: .8rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* 示範橫幅 */
.demo-banner { background: var(--ink); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .9rem; }
.demo-banner strong { color: #f0cd85; }

/* 頂部列 */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem; background: rgba(250,246,238,.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); color: #f0cd85; font-family: Georgia, serif; }
.topnav { display: none; gap: 1rem; } .topnav a { text-decoration: none; color: var(--ink); }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.2rem;
  border: 1.5px solid var(--ink); border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: transparent; color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1b1a17; }
.btn-line:hover, .btn-ink:hover, .btn-gold:hover { filter: brightness(.94); }
.btn-sm { min-height: 38px; padding: .3rem .9rem; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: .7rem 2rem; font-size: 1.1rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.danger { color: var(--danger); border-color: var(--danger); }

/* 首頁區塊 */
.hero { padding: 3rem 1.25rem 2.5rem; background: radial-gradient(circle at 85% 12%, #ecd9b0 0, transparent 45%), radial-gradient(circle at 5% 90%, #e8dcc4 0, transparent 40%); }
.eyebrow { text-transform: uppercase; letter-spacing: .25em; font-size: .75rem; color: var(--gold-d); font-weight: 700; }
.lead { font-size: 1.05rem; max-width: 34rem; }
.hero .btn { margin: .5rem 0 1rem; }
.hero-points { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
.hero-points li::before { content: "◆ "; color: var(--gold); }
.section { padding: 2.25rem 1.25rem; max-width: 960px; margin: 0 auto; }
.section h2::after { content: ""; display: block; width: 2.5rem; height: 3px; background: var(--gold); margin-top: .4rem; }

.cards { display: grid; gap: 1rem; margin-top: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; display: grid; gap: .1rem; }
.avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin-bottom: .5rem; }
.avatar svg, .choice-img svg { display: block; width: 100%; height: 100%; }
.tag { color: var(--gold-d); font-weight: 600; margin-bottom: .3rem; }
.card-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }

.table-wrap { overflow-x: auto; margin-top: 1rem; }
.price-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); font-size: .9rem; }
.price-table th, .price-table td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table thead th { background: var(--ink); color: #fff; }

.price-cards { display: grid; gap: .7rem; margin-top: 1rem; }
.price-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.price-card h3 { margin: 0 0 .4rem; }
.price-card dl { margin: 0; display: grid; }
.price-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.price-card dt { color: var(--muted); } .price-card dd { margin: 0; font-weight: 700; }
.table-wrap { display: none; }

.flow { list-style: none; counter-reset: f; padding: 0; display: grid; gap: .75rem; }
.flow li { counter-increment: f; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem .8rem 3.2rem; position: relative; display: grid; }
.flow li::before { content: counter(f); position: absolute; left: .9rem; top: .8rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-weight: 700; }
.flow span { color: var(--muted); font-size: .9rem; }

/* 預約區 */
.booking { background: var(--card); border: 1px solid var(--line); border-radius: 20px; max-width: 760px; padding: 1.5rem 1.1rem; margin: 1rem auto 2.5rem; width: calc(100% - 1.5rem); scroll-margin-top: 4rem; }
.stepper { list-style: none; display: flex; gap: .25rem; padding: 0; margin: 0 0 1.25rem; font-size: .8rem; }
.stepper li { flex: 1; text-align: center; color: var(--muted); border-top: 3px solid var(--line); padding-top: .4rem; }
.stepper li span { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--line); margin-right: .25rem; font-weight: 700; color: var(--ink); }
.stepper li.done { border-color: var(--gold); color: var(--ink); }
.stepper li.done span { background: var(--gold); }
.stepper li.current { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.stepper li.current span { background: var(--ink); color: #fff; }

.choices { display: grid; gap: .6rem; }
.choice { display: flex; align-items: center; gap: .8rem; text-align: left; width: 100%; padding: .7rem .9rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.choice b, .choice small { display: block; }
.choice[aria-pressed="true"], .choice:has(input:checked) { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--ink); }
.choice-img { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--line); }
.any-ico { width: 100%; height: 100%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 700; background: var(--ink); color: #f0cd85; }
.check { justify-content: space-between; } .check input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.check span { flex: 1; } .check em { font-style: normal; font-weight: 700; white-space: nowrap; }
.summary { margin: .9rem 0 0; padding: .6rem .8rem; background: #f3ead6; border-radius: 10px; font-size: .92rem; font-weight: 600; }
.summary:empty { display: none; }
.hint { color: var(--muted); font-size: .9rem; margin: .6rem 0 0; min-height: 1.5em; }

.dates-wrap { position: relative; }
.dates-wrap::before, .dates-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 34px; z-index: 1; pointer-events: none; transition: opacity .15s; }
.dates-wrap::before { left: 0; background: linear-gradient(to right, var(--card) 15%, transparent); }
.dates-wrap::after { right: 0; background: linear-gradient(to left, var(--card) 15%, transparent); }
.dates-wrap.at-start::before, .dates-wrap.at-end::after { opacity: 0; }
.dates-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink);
  background: var(--card); color: var(--ink); font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(27,26,23,.2); }
.dates-arrow.prev { left: -6px; } .dates-arrow.next { right: -6px; }
.dates-arrow:disabled { opacity: 0; pointer-events: none; }
.dates-tip { text-align: center; margin: 0; }
.dates { position: relative; display: flex; gap: .45rem; overflow-x: auto; padding: .9rem 0 .4rem; margin-top: .3rem; scroll-snap-type: x proximity; }
.date { flex: none; width: 58px; scroll-snap-align: start; display: grid; justify-items: center; padding: .4rem 0; font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.date b { font-size: 1.2rem; line-height: 1.2; }
.date[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.date[aria-pressed="true"] small { color: #e8dcc4; }
.date.off { background: #ece7dc; color: #6d675b; border-style: dashed; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-top: .6rem; }
.slot { min-height: 44px; font: inherit; font-weight: 600; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; }
.slot[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot:disabled { background: #ece7dc; color: #6d675b; text-decoration: line-through; cursor: not-allowed; border-style: dashed; }

.nav { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.3rem; }
.field { display: grid; gap: .3rem; font-weight: 600; margin: .8rem 0; border: 0; padding: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: .3rem; }
input:not([type="checkbox"]), textarea, select { font: inherit; padding: .6rem .75rem; border: 1.5px solid #bdb29a; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; min-height: 44px; }
.paynote { background: #f3ead6; padding: .6rem .8rem; border-radius: 10px; font-size: .92rem; }
.error { color: var(--danger); font-weight: 600; }
.bk-code { font-size: 2.2rem; font-weight: 800; letter-spacing: .08em; margin: .2rem 0 .6rem; color: var(--gold-d); font-family: Georgia, serif; }
.dl { display: grid; grid-template-columns: 6.5rem 1fr; gap: .4rem .8rem; margin: 0 0 1rem; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; }
.demo-note { background: #fff1d6; border-left: 4px solid var(--gold); padding: .6rem .8rem; border-radius: 6px; font-size: .92rem; }

/* 作品視窗 */
dialog { width: min(94vw, 640px); max-height: 90vh; border: 0; border-radius: 18px; padding: 1.1rem; background: var(--bg); color: var(--ink); }
dialog::backdrop { background: rgba(27,26,23,.6); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.dlg-head h3 { margin: 0; }
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.works figure { margin: 0; } .works svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.works figcaption { font-size: .85rem; text-align: center; margin-top: .25rem; }

.footer { text-align: center; padding: 1.5rem 1rem 2.5rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

/* ---------- 店家端 ---------- */
.staff-main { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.toolbar { display: grid; gap: .6rem; margin-bottom: .8rem; }
.tabs { display: flex; gap: .4rem; }
.tab { flex: 1; min-height: 44px; font: inherit; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.tab[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.live { margin: 0; color: var(--muted); font-size: .9rem; }
.phone { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem; margin-bottom: 1rem; }
.phone summary { cursor: pointer; font-weight: 700; padding: .6rem 0; min-height: 44px; }
.row { display: grid; gap: .5rem; }
.check-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { cursor: pointer; } .chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: .45rem .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 600; }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.board { display: grid; gap: 1rem; }
.col { background: #f3ede0; border-radius: var(--radius); padding: .8rem; min-width: 0; }
.col h2 { font-size: 1.15rem; } .col h2::after { display: none; }
.off, .empty { color: var(--muted); text-align: center; padding: .8rem 0; margin: 0; }
.tl { margin-bottom: .7rem; }
.tl-bar { display: grid; grid-template-columns: repeat(18, 1fr); gap: 2px; height: 14px; }
.tl-bar i { background: #fff; border-radius: 2px; } .tl-bar i.busy { background: var(--ink); }
.tl-scale { position: relative; height: 1.5rem; font-size: .62rem; color: var(--muted); }
.tl-scale span { position: absolute; top: 0; transform: translateX(-50%); padding-top: 5px; border-left: 1px solid #b9ae96; line-height: 1.2; white-space: nowrap; }
.tl-scale span:first-child { transform: none; }
.tl-scale span:last-child { transform: translateX(-100%); border-left: 0; border-right: 1px solid #b9ae96; }
.bk { background: #fff; border: 1.5px solid var(--line); border-left-width: 6px; border-radius: 10px; padding: .65rem .8rem; margin-bottom: .6rem; }
.bk p { margin: 0 0 .25rem; }
.bk-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .2rem; }
.bk-name { font-weight: 700; }
.bk-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.badge { font-size: .75rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; background: #eee; color: var(--ink); white-space: nowrap; }
.badge.new { background: #f6d98f; } .badge.confirmed { background: #cfe6d6; color: #1f4a2e; }
.badge.done { background: #ddd; } .badge.cancelled { background: #f1cfcc; color: #7a1f1a; }
.st-new { border-left-color: var(--gold); } .st-confirmed { border-left-color: var(--ok); }
.st-done { border-left-color: #888; opacity: .8; } .st-cancelled { border-left-color: var(--danger); opacity: .6; text-decoration: line-through; }
.st-cancelled button { text-decoration: none; }
.flash { animation: flash 1s ease-in-out 8; }
@keyframes flash { 0%, 100% { background: #fff; } 50% { background: #ffe29a; box-shadow: 0 0 0 4px rgba(195,154,74,.55); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; background: #ffe29a; } html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }

/* ---------- 桌機 ---------- */
@media (min-width: 720px) {
  h1 { font-size: 3rem; }
  .topnav { display: flex; }
  .hero { padding: 5rem max(2rem, calc((100vw - 960px) / 2)) 4rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .table-wrap { display: block; }
  .price-cards { display: none; }
  .dates-tip { display: none; }
  .flow { grid-template-columns: repeat(4, 1fr); }
  .booking { padding: 2rem; }
  .choices { grid-template-columns: repeat(2, 1fr); }
  .slots { grid-template-columns: repeat(6, 1fr); }
  .works { grid-template-columns: repeat(3, 1fr); }
  .toolbar { grid-template-columns: auto 1fr auto; align-items: center; }
  .row { grid-template-columns: repeat(3, 1fr); }
  .phone .row:last-of-type { grid-template-columns: 1fr 1fr; }
  .board { grid-template-columns: repeat(3, 1fr); align-items: start; }
}
@media (max-width: 380px) { .slots { grid-template-columns: repeat(3, 1fr); } }
