/* style.css — 前台與後台共用（手機優先）。米白＋墨黑＋裸粉酒紅點綴，系統字體，不載入任何外部資源。 */
:root {
  --bg: #f7f3ec; --card: #fffdfa; --ink: #1c1b19; --muted: #5d5851; --line: #e4dccf;
  --rose: #cf9a9c; --rose-d: #8a3b4c; --rose-soft: #f5e4e2; --chat: #2f7d55;
  --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; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; }
body { margin: 0; overflow-x: hidden; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: .02em; }
h1 { font-size: 2.4rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.1rem; }
h3:focus { outline: none; }
p { margin: 0 0 .8em; }
a { color: var(--rose-d); }
small { font-weight: 400; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: .85rem; }
:focus-visible { outline: 3px solid var(--rose-d); outline-offset: 2px; }
[hidden] { display: none !important; }
button, select, input, textarea { font: inherit; }

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

/* 頂部導覽：單行不換行，手機隱藏品牌文字以免擠壓 */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .5rem; padding: .3rem .75rem;
  background: rgba(247,243,236,.95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .5rem; min-height: 44px; 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: #f3d6d8; font-family: Georgia, serif; }
.brand-text { display: none; }
.topnav { display: flex; flex-wrap: nowrap; white-space: nowrap; }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .55rem; text-decoration: none; color: var(--ink); font-size: .92rem; }
.topnav .nav-cta { color: var(--rose-d); font-weight: 700; }
.topnav .nav-line { display: none; }

/* 按鈕 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .5rem 1.2rem;
  border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 600; cursor: pointer; text-decoration: none; background: transparent; color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-rose { background: var(--rose-d); border-color: var(--rose-d); color: #fff; }
.btn-chat { background: var(--chat); border-color: var(--chat); color: #fff; }
.btn:hover { filter: brightness(.94); }
.btn-sm { padding: .3rem .9rem; font-size: .9rem; }
.btn-lg { min-height: 50px; padding: .6rem 1.6rem; font-size: 1.05rem; }
.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 88% 10%, #ecd2d3 0, transparent 45%), radial-gradient(circle at 4% 92%, #e8dfd0 0, transparent 40%); }
.eyebrow { letter-spacing: .25em; font-size: .78rem; color: var(--rose-d); font-weight: 700; margin-bottom: .3rem; }
.lead { font-size: 1.05rem; max-width: 32rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .8rem; }
.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(--rose); margin-top: .4rem; }

/* 作品牆 */
.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; }
.work { display: block; padding: 0; background: none; border: 0; cursor: pointer; text-align: center; color: var(--ink); }
.work-img { display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.work-img svg, .lb-img svg { display: block; width: 100%; height: 100%; }
.hero-art { display: block; width: 100%; max-width: 560px; aspect-ratio: 4 / 3; border-radius: 16px; margin-top: 1.25rem; border: 1px solid var(--line); overflow: hidden; }
.hero-art svg { display: block; width: 100%; height: 100%; }
.about-wrap { display: grid; gap: 1rem; }
.badge-art { display: block; width: 160px; height: 160px; }
.work-tag { display: block; font-size: .82rem; margin-top: .3rem; font-weight: 600; }
.work:hover .work-img { border-color: var(--rose-d); }

/* 燈箱 */
.lightbox { width: min(92vw, 420px); max-height: 92vh; padding: .75rem; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); overflow: auto; }
.lightbox::backdrop { background: rgba(28,27,25,.6); }
.lb-close { position: absolute; top: .9rem; right: .9rem; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,253,250,.92); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.lb-img { aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; max-height: 70vh; margin: 0 auto; }
.lb-cap { margin: .6rem 0 0; text-align: center; font-weight: 600; }
.lb-note { margin: .2rem 0 0; text-align: center; }

/* 擅長與關於 */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 1rem 0; }
.tags li { padding: .25rem .8rem; border-radius: 999px; background: var(--rose-soft); color: var(--rose-d); font-weight: 600; font-size: .9rem; }
.years { font-weight: 600; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.card h3 { margin-bottom: .4rem; }
.svc-grid, .policy-grid, .loc-grid { display: grid; gap: .8rem; margin-top: 1rem; }
.svc-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.svc-cat { margin: 1.4rem 0 0; font-size: 1.15rem; color: var(--rose-d); }
.svc-group:first-child .svc-cat { margin-top: .6rem; }
.tag-addon { display: inline-block; margin-left: .5rem; padding: 0 .5rem; border-radius: 999px; border: 1px solid var(--rose-d); color: var(--rose-d); font-size: .72rem; font-weight: 700; vertical-align: middle; }
.svc-card h4 { margin: 0 0 .2rem; font-size: 1.05rem; } .svc-card p { margin-bottom: .4rem; font-size: .92rem; }
.svc-meta { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin: 0 !important; font-size: 1rem !important; }
.svc-meta b { font-size: 1.15rem; }
.demo-tag { display: inline-block; padding: .1rem .6rem; border: 1px dashed var(--rose-d); color: var(--rose-d); border-radius: 999px; font-size: .8rem; font-weight: 600; }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-top: 1px solid var(--line); }
.hours div:first-child { border-top: 0; }
.hours dt { color: var(--muted); } .hours dd { margin: 0; font-weight: 600; }
.off-tag { color: var(--danger); }
.hours-note { margin: .5rem 0 0 !important; }

/* 預約區 */
.booking { background: var(--card); border: 1px solid var(--line); border-radius: 20px; max-width: 760px; padding: 1.4rem 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: .82rem; }
.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(--rose); color: var(--ink); }
.stepper li.done span { background: var(--rose); }
.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; justify-content: space-between; gap: .8rem; text-align: left; width: 100%; min-height: 56px; padding: .6rem .9rem; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.sub-h { margin: 1rem 0 .4rem; font-size: 1rem; }
.cat-block { margin-bottom: .8rem; }
.cat-h { margin: 0 0 .4rem; font-size: .88rem; letter-spacing: .12em; color: var(--rose-d); }
.choice span { min-width: 0; } .choice b, .choice small { display: block; }
.choice em { font-style: normal; font-weight: 700; white-space: nowrap; }
.choice[aria-pressed="true"] { border-color: var(--rose-d); background: #fff; box-shadow: inset 0 0 0 1.5px var(--rose-d); }
.choice[aria-pressed="true"] b::before { content: "✓ "; color: var(--rose-d); }
.choice.addon[aria-pressed="true"] { background: var(--rose-soft); }
.summary { margin: .9rem 0 0; padding: .6rem .8rem; background: var(--rose-soft); border-radius: 10px; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.summary:empty { display: none; }
.hint { color: var(--muted); font-size: .9rem; margin: .6rem 0 0; min-height: 1.5em; }

/* 日期條：箭頭是兩側獨立欄位，不蓋住日期 */
.dates-row { display: flex; align-items: center; gap: .3rem; margin-top: .8rem; }
.dates-arrow { flex: none; position: static; width: 32px; height: 44px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0; }
.dates-arrow:disabled { opacity: .3; cursor: default; }
.dates { flex: 1; min-width: 0; display: flex; gap: .45rem; overflow-x: auto; padding: .2rem .3rem .4rem; scroll-snap-type: x proximity; scroll-padding: 0 .3rem; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date small { white-space: nowrap; line-height: 1.3; }
.date { flex: none; width: 60px; min-height: 66px; white-space: nowrap; scroll-snap-align: start; display: grid; justify-items: center; align-content: center; padding: .35rem 0; 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: #f0dcdd; }
.date.off { background: #ebe6dd; color: #5f5a51; border-style: dashed; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .6rem; }
.slot { min-height: 44px; 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(--rose-d); border-color: var(--rose-d); color: #fff; }
.slot:disabled { background: #ebe6dd; color: #6b665d; text-decoration: line-through; cursor: not-allowed; border-style: dashed; }

/* 表單與確認 */
.field { display: block; margin: .9rem 0 0; font-weight: 600; }
.field input, .field textarea { display: block; width: 100%; min-height: 44px; margin-top: .3rem; padding: .55rem .75rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.field small { display: block; margin-top: .25rem; }
.note-tip { margin: .9rem 0 0; padding: .6rem .8rem; background: var(--rose-soft); border-radius: 10px; font-size: .92rem; }
.check-field { display: flex; align-items: flex-start; gap: .55rem; min-height: 44px; margin: .5rem 0 0; padding: .35rem 0; font-weight: 600; font-size: .95rem; }
.check-field input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--rose-d); }
.notice { margin: .2rem 0 0; padding: .55rem .8rem; border-radius: 10px; background: #eef2f6; color: #2f4256; font-size: .9rem; }
.notice.warn { background: #f8e3e0; color: #7a231d; }
.pay { margin: 1rem 0 0; padding: .6rem .8rem; border: 1px dashed var(--line); border-radius: 10px; font-size: .92rem; }
.error { color: var(--danger); font-weight: 600; margin: .8rem 0 0; }
.nav-row { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; }
.bk-code { font-size: 2rem; font-weight: 800; letter-spacing: .12em; text-align: center; margin: .6rem 0; color: var(--rose-d); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0 0 1rem; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.combo { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.combo li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
.combo em { font-style: normal; font-size: .72rem; padding: 0 .5rem; border-radius: 999px; background: var(--rose-soft); color: var(--rose-d); }
.combo small { color: var(--muted); font-weight: 400; }
.confirm-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; margin-top: 1.2rem; }
.demo-note { padding: .6rem .8rem; background: var(--rose-soft); border-radius: 10px; font-size: .92rem; }

.footer { text-align: center; padding: 1.5rem 1rem 2.5rem; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* 手機底部固定「加入 LINE 預約」列；body 預留空間，不遮住內容 */
.line-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: .5rem; padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom)); background: rgba(255,253,250,.97); border-top: 1px solid var(--line); }
.line-bar .btn { flex: 1; }
.line-bar .btn-line { flex: 0 0 auto; background: var(--card); }
body.has-line-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
body.has-line-bar .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ===== 後台 ===== */
.studio-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: 1rem; max-width: 960px; margin: 0 auto; }
.studio-head h1 { font-size: 1.5rem; margin: 0; }
.studio-main { max-width: 960px; margin: 0 auto; padding: 0 1rem 3rem; }
.tabs { display: flex; gap: .4rem; }
.main-tabs { border-bottom: 2px solid var(--line); margin-bottom: 1rem; }
.main-tabs .tab { flex: 1; min-height: 44px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 700; color: var(--muted); cursor: pointer; }
.main-tabs .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--rose-d); }
.list-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.sub-tabs { flex-wrap: wrap; }
.sub-tabs .tab { min-height: 44px; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; color: var(--ink); cursor: pointer; }
.sub-tabs .tab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.check-inline { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .92rem; }
.check-inline input { width: 20px; height: 20px; accent-color: var(--rose-d); }

.bk-list { display: grid; gap: .8rem; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.bk { position: relative; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.bk.st-confirmed { border-left-color: var(--ok); }
.bk.st-cancelled { opacity: .72; } .bk.st-cancelled .bk-svc { text-decoration: line-through; }
.bk.is-new { border-left-color: var(--rose-d); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { background: var(--card); box-shadow: 0 0 0 0 transparent; } 50% { background: var(--rose-soft); box-shadow: 0 0 0 3px rgba(140,71,82,.25); } }
.bk-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; }
.bk-time { margin: 0; } .bk-time span { font-variant-numeric: tabular-nums; margin-left: .3rem; font-weight: 600; }
.bk-svc { margin: .3rem 0; font-size: 1.1rem; font-weight: 700; }
.badge { padding: .15rem .7rem; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.b-new { background: var(--rose-d); color: #fff; }
.b-confirmed { background: #dcefe2; color: #1f5133; }
.b-done { background: #e6e3dd; color: #46423b; }
.b-cancelled { background: #f6dcda; color: #8a2620; }
.bk-info { margin: 0 0 .6rem; display: grid; gap: .2rem; }
.bk-info div { display: grid; grid-template-columns: 3rem 1fr; gap: .5rem; }
.bk-info dt { color: var(--muted); } .bk-info dd { margin: 0; overflow-wrap: anywhere; }
.bk-status { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.bk-status select { flex: 1; min-height: 44px; max-width: 14rem; padding: 0 .6rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }

.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1rem 1rem; margin-bottom: .8rem; }
.fold summary { min-height: 52px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.week { display: grid; gap: .5rem; margin-bottom: .8rem; }
.week-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--line); }
.week-day { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 600; min-width: 5rem; }
.week-day input { width: 22px; height: 22px; accent-color: var(--rose-d); }
.week-time { display: flex; align-items: center; gap: .4rem; }
.week-time select, .svc-row input { min-height: 44px; padding: 0 .5rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.off-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .4rem; margin: .8rem 0; }
.off-cell { display: grid; justify-items: center; align-content: center; min-height: 62px; padding: .2rem 0; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); cursor: pointer; }
.off-cell.week-off { border-style: dashed; color: var(--muted); }
.off-cell[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.off-cell[aria-pressed="true"] small { color: #f0dcdd; }
.svc-edit { display: grid; gap: .6rem; margin-bottom: .8rem; }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .6rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.svc-row b { grid-column: 1 / -1; }
.svc-edit .cat-h { margin: 1rem 0 0; }
.add-form { max-width: 640px; }
.add-form .btn { margin-top: 1rem; }
.addon-box { margin: .9rem 0 0; padding: .3rem .8rem .6rem; border: 1.5px solid var(--line); border-radius: 10px; }
.addon-box legend { padding: 0 .4rem; font-weight: 600; }
.add-form select { display: block; width: 100%; min-height: 44px; margin-top: .3rem; padding: 0 .6rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.two-col { display: grid; gap: 0 .8rem; }
.svc-row label { display: grid; gap: .2rem; font-size: .88rem; color: var(--muted); }
.svc-row input { width: 100%; font-size: 1rem; }
.tools { display: grid; gap: .6rem; justify-items: start; }
.toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 30; width: max-content; max-width: calc(100vw - 2rem); padding: .7rem 1.1rem; background: var(--ink); color: #fff; border-radius: 12px; font-size: .92rem; box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* 桌機 */
@media (min-width: 480px) { .brand-text { display: inline; } }
@media (min-width: 700px) {
  h1 { font-size: 3.2rem; }
  .topbar { padding: .3rem 1.5rem; } .topnav a { padding: 0 .9rem; }
  .hero { padding: 4.5rem max(1.5rem, calc((100vw - 960px) / 2)) 3.5rem; }
  .hero { display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 2.5rem; align-items: start; }
  .hero > *:not(.hero-art) { grid-column: 1; }
  .hero-art { grid-column: 2; grid-row: 1 / span 6; margin-top: 0; max-width: none; }
  .about-wrap { grid-template-columns: 200px 1fr; gap: 1.75rem; align-items: start; }
  .badge-art { width: 200px; height: 200px; }
  .topnav .nav-line { display: inline-flex; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .line-bar { display: none; }
  body.has-line-bar { padding-bottom: 0; }
  body.has-line-bar .toast { bottom: 1rem; }
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
  .svc-grid, .policy-grid { grid-template-columns: repeat(3, 1fr); }
  .loc-grid { grid-template-columns: 1fr 1fr; }
  .booking { padding: 2rem; }
  .slots { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .bk-list { grid-template-columns: 1fr 1fr; }
  .week-row { flex-wrap: nowrap; }
  .svc-row { grid-template-columns: 8rem 1fr 1fr; align-items: end; } .svc-row b { grid-column: auto; padding-bottom: .6rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .bk.is-new { animation: none; } }
