/* 相機出租網站 — 前台樣式
   主色由後台「網站外觀」設定，會寫進 <html style="--brand:#xxxxxx"> */
:root {
  --brand: #1F6FEB;
  --paper: #ECEEEF;
  --surface: #FFFFFF;
  --ink: #22262B;
  --muted: #5D656E;
  --line: #CDD2D6;
  --soft: #F6F7F8;
  --ok: #1E8E4E;
  --bad: #C2372B;
  --radius: 10px;
  --radius-sm: 6px;
  --font: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --num: "Barlow Condensed", "Noto Sans TC", sans-serif;
  --brand-ink: color-mix(in srgb, var(--brand) 78%, #000);
  --brand-wash: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #16181B;
  --surface: #202328;
  --ink: #E8EBEE;
  --muted: #A2AAB3;
  --line: #363B42;
  --soft: #1B1E22;
  --brand-ink: color-mix(in srgb, var(--brand) 70%, #fff);
  --brand-wash: color-mix(in srgb, var(--brand) 16%, var(--surface));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.75 var(--font); letter-spacing: .01em;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; letter-spacing: .02em; }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; }
.num { font-family: var(--num); font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---- 按鈕 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font: 700 16px/1 var(--font); text-decoration: none; cursor: pointer; letter-spacing: .04em;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-line { background: #06C755; color: #fff; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---- 公告與導覽 ---- */
.announce { background: var(--ink); color: var(--paper); font-size: 14px; text-align: center; padding: 8px 16px; }
.nav {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.brand .mark { width: 30px; height: 22px; border: 2px solid var(--ink); border-radius: 5px; position: relative; flex: none; }
.brand .mark::after { content: ""; position: absolute; inset: 4px 8px; border: 2px solid var(--brand); border-radius: 50%; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--brand-ink); }
.nav .btn { margin-left: 4px; }
@media (max-width: 860px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* ---- 首頁主視覺：對焦框 ---- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 64px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.af {
  position: relative; padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 36px);
  --c: var(--brand); --len: 26px; --w: 3px;
  background:
    linear-gradient(var(--c) 0 0) top left / var(--len) var(--w),
    linear-gradient(var(--c) 0 0) top left / var(--w) var(--len),
    linear-gradient(var(--c) 0 0) top right / var(--len) var(--w),
    linear-gradient(var(--c) 0 0) top right / var(--w) var(--len),
    linear-gradient(var(--c) 0 0) bottom left / var(--len) var(--w),
    linear-gradient(var(--c) 0 0) bottom left / var(--w) var(--len),
    linear-gradient(var(--c) 0 0) bottom right / var(--len) var(--w),
    linear-gradient(var(--c) 0 0) bottom right / var(--w) var(--len);
  background-repeat: no-repeat;
}
.hero h1 {
  font-size: clamp(38px, 6.4vw, 72px); line-height: 1.12; letter-spacing: .03em; margin: 0;
  white-space: pre-line; font-weight: 900;
}
.hero-text { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 34em; margin: 22px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.af-dot { position: absolute; right: 14px; top: 12px; font: 600 13px/1 var(--num); color: var(--brand-ink); letter-spacing: .08em; display: flex; align-items: center; gap: 6px; }
.af-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.hero-media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media.empty {
  background:
    linear-gradient(var(--line) 0 0) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line) 0 0) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line) 0 0) 0 33.33% / 100% 1px no-repeat,
    linear-gradient(var(--line) 0 0) 0 66.66% / 100% 1px no-repeat,
    var(--surface);
  display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 20px;
}
.hero-media .exif {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 18px; padding: 12px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font: 600 15px/1 var(--num); letter-spacing: .06em;
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 3 / 2; order: -1; }
}

/* ---- 區塊 ---- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); max-width: 36em; }

/* ---- 器材：規格表風格 ---- */
.gear-list { display: grid; gap: 18px; }
.gear {
  display: grid; grid-template-columns: 260px 1fr 300px; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.gear-img { background: var(--soft); aspect-ratio: 1; }
.gear-img img { width: 100%; height: 100%; object-fit: cover; }
.gear-img.empty { display: grid; place-items: center; color: var(--muted); }
.gear-body { padding: 22px 24px; min-width: 0; }
.gear-cat { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.gear-body h3 { font-size: 21px; margin-bottom: 8px; }
.gear-body p { color: var(--muted); font-size: 15px; }
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.spec li { padding: 5px 0; border-top: 1px dashed var(--line); }
.includes { font-size: 14px; color: var(--muted); margin-top: 10px; }
.rates { border-left: 1px solid var(--line); padding: 22px 22px; display: flex; flex-direction: column; gap: 12px; background: var(--soft); }
.rate-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.rate-grid div { background: var(--surface); padding: 8px 12px; }
.rate-grid small { display: block; color: var(--muted); font-size: 12px; }
.rate-grid .num { font-size: 26px; line-height: 1.1; }
.rate-grid .per { font-size: 12px; color: var(--muted); }
.deposit { font-size: 14px; color: var(--muted); }
.deposit .num { font-size: 18px; color: var(--ink); }
.qty-tag { font-size: 12px; color: var(--muted); }
@media (max-width: 980px) {
  .gear { grid-template-columns: 200px 1fr; }
  .rates { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .gear { grid-template-columns: 1fr; }
  .gear-img { aspect-ratio: 3 / 2; }
  .spec { grid-template-columns: 1fr; }
}

/* ---- 流程（真的是順序，所以用編號） ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; counter-reset: s; border-top: 2px solid var(--ink); }
.step { padding: 18px 20px 4px 0; counter-increment: s; }
.step::before { content: counter(s); font: 700 44px/1 var(--num); color: var(--brand); display: block; margin-bottom: 8px; }
.step h3 { font-size: 18px; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---- 關於 ---- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.about.no-img { grid-template-columns: minmax(0, 720px); }
.about img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about .text { white-space: pre-line; color: var(--ink); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* ---- 常見問題、須知 ---- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 36px 16px 0; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 26px/1 var(--num); color: var(--brand-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 18px; color: var(--muted); white-space: pre-line; }
.rules { max-width: 820px; padding-left: 1.4em; margin: 0; }
.rules li { padding: 6px 0 6px 4px; }
.rules li::marker { font-family: var(--num); font-weight: 600; color: var(--brand-ink); }

/* ---- 聯絡 ---- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.contact a, .contact div { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--ink); }
.contact a:hover { border-color: var(--brand); }
.contact small { display: block; color: var(--muted); font-size: 13px; }
.contact b { font-weight: 700; word-break: break-all; }

/* ---- 頁尾、手機底部列 ---- */
.footer { padding: 36px 0 110px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.footer a { color: var(--muted); }
.mbar { display: none; }
@media (max-width: 860px) {
  .mbar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .mbar .btn { flex: 1; }
  .mbar .btn-line { flex: 0 0 auto; }
}
@media (min-width: 861px) { .footer { padding-bottom: 36px; } }

/* ======================= 預約頁 ======================= */
.book-page { padding: 32px 0 60px; }
.book-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .book-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px; margin-bottom: 18px; }
.panel-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.panel-title .n { font: 700 30px/1 var(--num); color: var(--brand); }
.panel-title h2 { font-size: 20px; margin: 0; }
.panel.locked { opacity: .5; pointer-events: none; }

.pick-list { display: grid; gap: 10px; }
.pick {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; text-align: left;
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 14px 10px 10px; background: var(--surface);
  cursor: pointer; color: var(--ink); font: inherit; width: 100%;
}
.pick:hover { border-color: var(--muted); }
.pick[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-wash); }
.pick .thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--soft); overflow: hidden; }
.pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pick .t { font-weight: 700; display: block; line-height: 1.4; }
.pick .s { font-size: 13px; color: var(--muted); }
.pick .p { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pick .p .num { font-size: 24px; color: var(--ink); display: block; line-height: 1; }

/* 月曆 */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font: 700 22px/1 var(--num); letter-spacing: .04em; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 18px; }
.cal-nav button:disabled { opacity: .35; cursor: default; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.day {
  aspect-ratio: 1 / .9; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  font: 600 18px/1 var(--num); color: var(--ink); cursor: pointer; position: relative; padding: 0;
}
.day small { position: absolute; left: 0; right: 0; bottom: 4px; font: 400 10px/1 var(--font); color: var(--muted); }
.day:hover:not(:disabled) { border-color: var(--brand); }
.day:disabled { background: transparent; color: var(--muted); cursor: not-allowed; border-style: dashed; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.day.past:disabled { text-decoration: none; border-color: transparent; opacity: .45; }
.day.blank { visibility: hidden; }
.day.in { background: var(--brand-wash); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.day.edge { background: var(--brand); color: #fff; border-color: var(--brand); }
.day.edge small { color: rgba(255,255,255,.85); }
.day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.cal-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--line); background: var(--surface); }
.cal-legend .l-sel { background: var(--brand); border-color: var(--brand); }
.cal-legend .l-no { border-style: dashed; background: transparent; }
.cal-hint { margin-top: 10px; font-size: 14px; }

/* 表單 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
label.f { display: block; font-size: 14px; font-weight: 700; }
label.f span.req { color: var(--bad); font-weight: 400; }
.inp, select.inp, textarea.inp {
  width: 100%; margin-top: 6px; padding: 11px 13px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 16px/1.5 var(--font);
}
.inp:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.hp { position: absolute; left: -5000px; }
.rules-box { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--soft); font-size: 14px; }
.rules-box ol { padding-left: 1.3em; margin: 0; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 15px; }
.agree input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--brand); }

/* 摘要 */
.summary { position: sticky; top: 84px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 16px; font-size: 15px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 700; }
.summary .total { border-top: 2px solid var(--ink); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.summary .total .num { font-size: 40px; line-height: 1; }
.summary .btn { width: 100%; margin-top: 14px; }
.msg { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; margin-top: 12px; }
.msg.err { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
.msg.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }

.done { text-align: center; padding: 40px 22px; }
.done .code { font: 700 44px/1 var(--num); letter-spacing: .08em; margin: 10px 0 18px; }
.done .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
