/* 光塩開發 · 大地色系：亞麻白、沙色、陶土、灰褐、鼠尾草綠 */
:root {
  --bg: #f7f2ec;
  --sand: #efe6db;
  --sand-2: #e7dccf;
  --card: #fffdfa;
  --ink: #3b302a;
  --ink-2: #6b5d53;
  --muted: #a0938a;
  --line: #e6dcd1;
  --clay: #b2715b;
  --clay-dark: #8e5a47;
  --taupe: #a98b73;
  --sage: #8b9479;
  --sage-bg: #e9ebe1;
  --logo-en: #292928;
  /* 後台沿用的變數 */
  --brand: var(--clay-dark);
  --brand-2: var(--clay);
  --gold: #d9b48f;
  --line-green: #06c755;
  --red: #b4532a;
  --red-bg: #fbeee6;
  --radius: 18px;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.75; letter-spacing: .02em; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .04em; color: var(--ink); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; padding: 80px 20px; }
.empty { color: var(--muted); text-align: center; padding: 40px; }
.eyebrow { font-size: 12px; letter-spacing: .28em; color: var(--clay); font-weight: 500; margin: 0 0 14px; text-transform: uppercase; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(247, 242, 236, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--sans); font-weight: 500; font-size: 21px; letter-spacing: .14em; color: var(--taupe); }
.brand-text small { font-size: 10.5px; letter-spacing: .06em; color: var(--logo-en); }
.head-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; color: var(--ink-2); }
.head-nav a:not(.btn-primary):hover { color: var(--clay); }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--clay-dark); color: #fffaf4;
  border: 0; border-radius: 999px; padding: 11px 22px; font-weight: 500; letter-spacing: .08em; cursor: pointer;
  transition: background .2s ease; }
.btn-primary:hover { background: var(--clay); }
.btn-primary.sm { padding: 8px 18px; font-size: 13px; }
.btn-primary.block { display: flex; width: 100%; padding: 14px; }
.btn-primary .dot { width: 7px; height: 7px; border-radius: 50%; background: #9fd4a8; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.3; margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--clay); }
.lead { color: var(--ink-2); max-width: 30em; margin: 0 0 32px; font-size: 16px; }
.search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px; max-width: 600px; box-shadow: 0 10px 30px rgba(91, 62, 45, .06); }
.search select { flex: 1 1 140px; border: 0; background: transparent; padding: 10px 14px; outline: none; color: var(--ink); cursor: pointer; }
.search .divider { width: 1px; height: 24px; background: var(--line); }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; white-space: nowrap; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.chk input { accent-color: var(--clay); }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13.5px; color: var(--ink-2); }
.hero-points li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); margin: 0 8px 2px 0; }
.hero-media { position: relative; }
.hero-media .arch { aspect-ratio: 5 / 6; max-height: 600px; margin-left: auto; border-radius: 999px 999px 26px 26px; overflow: hidden; background: var(--sand); }
.hero-media .arch img { width: 100%; height: 100%; object-fit: cover; }
.hero-note { position: absolute; left: -28px; bottom: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 18px; box-shadow: 0 12px 30px rgba(91, 62, 45, .1); display: flex; gap: 12px; align-items: center; }
.hero-note b { font-family: var(--serif); font-size: 28px; color: var(--clay); line-height: 1; }
.hero-note span { font-size: 13px; color: var(--ink-2); line-height: 1.4; }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 28px; }
.section-head h2 { margin: 0; font-size: 28px; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.listings { padding-bottom: 80px; }
section[id] { scroll-margin-top: 96px; }

/* ---------- cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(91, 62, 45, .1); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--sand); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.badge { position: absolute; top: 12px; left: 12px; font-size: 12px; font-weight: 500; letter-spacing: .06em; padding: 5px 12px;
  border-radius: 999px; background: rgba(255, 253, 250, .94); color: var(--clay-dark); }
.badge.now { background: var(--clay-dark); color: #fffaf4; }
.badge.subsidy { left: auto; right: 12px; background: var(--sage-bg); color: #5d6650; }
.card-body { padding: 16px 8px 8px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.5; }
.meta { color: var(--ink-2); font-size: 13px; margin: 0 0 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tags span { font-size: 12px; background: var(--sand); color: var(--ink-2); padding: 3px 10px; border-radius: 999px; }
.tags .hl { background: var(--sage-bg); color: #5d6650; }
.tags.big span { font-size: 13px; padding: 5px 13px; }
.price { margin: auto 0 0; color: var(--clay-dark); padding-top: 12px; border-top: 1px dashed var(--line); }
.price b { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.price small { color: var(--muted); }

/* ---------- how it works ---------- */
.how { background: var(--sand); padding: 72px 0; }
.how .section-head { justify-content: center; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { background: var(--card); border-radius: var(--radius); padding: 28px; counter-increment: s; }
.steps li::before { content: "0" counter(s); font-family: var(--serif); font-size: 30px; color: var(--clay); display: block; margin-bottom: 8px; }
.steps h3 { margin: 0 0 6px; font-size: 18px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* ---------- detail ---------- */
.crumb { display: inline-block; margin: 24px 0 18px; font-size: 13px; color: var(--muted); }
.crumb:hover { color: var(--clay); }
.gallery { display: grid; gap: 10px; border-radius: 22px; overflow: hidden; height: min(60vh, 540px); }
.gallery a { display: block; overflow: hidden; background: var(--sand); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery.n1 { grid-template-columns: 1fr; }
.gallery.n2 { grid-template-columns: 2fr 1fr; }
.gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery.n3 .g0 { grid-row: 1 / 3; }
.gallery.n4, .gallery.n5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery.n4 .g0, .gallery.n5 .g0 { grid-row: 1 / 3; }
.gallery.n4 .g3 { grid-column: 2 / 4; }
.gallery a:nth-child(n+6) { display: none; }
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 56px; margin: 40px 0 72px; }
.detail h1 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 8px; line-height: 1.4; }
.detail h2 { font-size: 21px; margin: 40px 0 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 26px 0 0; }
.facts div { background: var(--sand); border-radius: 14px; padding: 14px 16px; }
.facts dt { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.desc p { margin: 0 0 12px; color: var(--ink-2); }
.book { position: sticky; top: 96px; align-self: start; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.book .price { border: 0; padding: 0; }
.book .price b { font-size: 34px; }
.avail { display: inline-block; background: var(--sand); color: var(--clay-dark); padding: 4px 14px; border-radius: 999px; margin: 10px 0 22px; font-size: 14px; }
.book-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; text-align: center; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.share span { color: var(--muted); width: 100%; letter-spacing: .1em; }
.share a, .share button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 5px 14px; cursor: pointer; color: var(--ink-2); }
.share a:hover, .share button:hover { border-color: var(--clay); color: var(--clay); }
.related { padding-bottom: 80px; }
#lightbox { position: fixed; inset: 0; background: rgba(43, 33, 28, .92); display: flex; align-items: center; justify-content: center; z-index: 50; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 94vw; max-height: 90vh; border-radius: 10px; }
#lightbox button { position: absolute; top: 14px; right: 20px; font-size: 36px; color: #fff; background: none; border: 0; cursor: pointer; }

/* ---------- footer ---------- */
.foot { background: var(--sand); border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 13px; padding: 56px 24px 40px; }
.foot-logo { height: 120px; margin: 0 auto 18px; }
.foot p { margin: 0; }
body.embed { background: transparent; padding: 8px; }
.embed-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; }
  .hero-media { max-width: 460px; }
  .hero-note { left: 16px; }
  .detail-grid, .case-grid, .two-col { grid-template-columns: 1fr; }
  .book, .side { position: static; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 28px; padding-bottom: 48px; }
  .hero-media .arch { aspect-ratio: 1 / 1; }
  .head-inner { height: 64px; }
  .brand-mark { height: 38px; }
  .brand-text b { font-size: 18px; }
  .head-nav a:not(.btn-primary) { display: none; }
  .search { border-radius: 20px; }
  .search .divider { display: none; }
  .search select { flex-basis: 100%; border-bottom: 1px solid var(--line); border-radius: 0; }
  .search .btn-primary { flex: 1; }
  .gallery { display: flex; height: auto; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; gap: 8px; }
  .gallery a { flex: 0 0 88%; aspect-ratio: 4 / 3; scroll-snap-align: start; display: block !important; border-radius: 14px; }
  .section-head h2 { font-size: 24px; }
}

/* ---------- admin ---------- */
body.admin { background: var(--bg); font-size: 14px; letter-spacing: .01em; }
.admin-bar { background: var(--card); color: var(--ink); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px; position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.admin-bar .brand-mark { height: 34px; }
.admin-bar .brand-text b { font-size: 17px; }
.admin-bar .tag { font-size: 12px; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; margin-left: 4px; }

.admin-bar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-bar nav a { padding: 6px 12px; border-radius: 8px; opacity: .85; }
.admin-bar nav a:hover { background: var(--sand); opacity: 1; }
.admin-main { max-width: 1400px; padding-bottom: 60px; }
.admin-main.narrow { max-width: 980px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; }
.page-head h1 small { font-weight: 400; color: var(--ink-2); font-size: 16px; margin-left: 6px; }
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 9px 18px;
  font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--brand-2); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid #e3d2c6; }
.link { background: none; border: 0; color: var(--brand-2); cursor: pointer; padding: 0; font-size: 13px; }
.link.danger { color: var(--red); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel h2 { font-size: 16px; margin: 0; }
.panel h2 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.panel h3 { font-size: 14px; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.panel h3 small { color: var(--muted); font-weight: 400; }
.banner { background: #fff4dc; border: 1px solid #f0d08a; color: #6b4700; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 16px; line-height: 1.7; }
.banner code { background: rgba(0, 0, 0, .06); padding: 1px 6px; border-radius: 4px; }
.banner.ok-banner { background: #e2f5e9; border-color: #a8dcbc; color: #18794e; }
.inline-assign { display: flex; gap: 6px; align-items: center; }
.inline-assign select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; max-width: 200px; }
.sub.err { color: var(--red); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--card); border-radius: 14px; padding: 14px 16px; border-left: 4px solid var(--brand); }
.tile span { display: block; font-size: 12px; color: var(--muted); }
.tile b { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.3; font-weight: 600; }
.tile small { color: var(--ink-2); font-size: 12px; }
.tile.warn { border-color: var(--red); }
.tile.warn b { color: var(--red); }
.tile.good { border-color: var(--line-green); }
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid #f1eee8; vertical-align: middle; }
.tbl tr.urgent td { background: var(--red-bg); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub { font-size: 12px; color: var(--muted); }
.thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #eee; white-space: nowrap; }
.pill.blue { background: #e3effa; color: #1d5a92; }
.pill.green { background: #e2f5e9; color: #18794e; }
.pill.amber { background: #fdf0d5; color: #8a5a00; }
.pill.gray { background: #eceae6; color: #6b6b6b; }
.ad { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; font-style: normal; }
.ad.on { background: #e2f5e9; color: #18794e; font-weight: 700; }
.ad.on.nolink { background: #fdf0d5; color: #8a5a00; }
.ad.off { color: #c5c0b8; }
.ad.down { background: #eceae6; color: #777; }
.legend { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.photo-count.zero { color: var(--red); font-weight: 700; }
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.bar { height: 8px; background: #f1eee8; border-radius: 4px; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 4px; }
.feed { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow: auto; }
.feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1eee8; }
.feed p { margin: 2px 0; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.feed time { font-size: 12px; color: var(--muted); }
.src { flex: none; font-size: 11px; font-weight: 700; background: #eceae6; color: #555; border-radius: 6px;
  padding: 2px 6px; height: fit-content; }
.src.line { background: var(--line-green); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; }
.filters input[name=q] { flex: 1 1 220px; }
.form .fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; }
.form label.full { grid-column: 1 / -1; }
.form label span { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.form label small { font-size: 11px; color: var(--muted); }
.form input, .form select, .form textarea, .ads-form input, .ads-form select, .note input, .upload input[type=url],
.copy-row input, .share-tools textarea {
  border: 1px solid #ddd8cf; border-radius: 9px; padding: 8px 10px; background: #fdfcfa; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #e6c9b8; border-color: var(--brand-2); }
.actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.ok { color: #18794e; font-weight: 700; }
.case-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.side { position: sticky; top: 70px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats span { display: block; font-size: 12px; color: var(--muted); }
.stats b { font-size: 18px; }
.stats small { display: block; font-size: 12px; color: var(--ink-2); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.ph-actions { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px; }
.upload { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.upload input[type=url] { flex: 1 1 200px; width: auto; }
.share-tools { display: grid; gap: 16px; }
.share-tools > div > span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.copy-row, .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-tools textarea { margin-bottom: 6px; font-size: 13px; }
.hidden-photos { margin-top: 12px; }
.hidden-photos summary { cursor: pointer; color: var(--ink-2); font-size: 13px; margin-bottom: 10px; }
.hidden-photos img { opacity: .55; }
.history { max-height: 520px; overflow: auto; }
.history td.old { color: var(--muted); text-decoration: line-through; white-space: pre-wrap; max-width: 280px; }
.history td.new { white-space: pre-wrap; max-width: 280px; }
.nowrap { white-space: nowrap; }
.keep-note { padding: 0 4px; }
.note { display: flex; gap: 8px; margin-bottom: 8px; }
form.inline { display: inline; margin-right: 10px; }
code.bind { font-size: 15px; letter-spacing: .1em; background: #f1eee8; padding: 2px 8px; border-radius: 6px; }
.guide pre { background: #f7f5f1; border-radius: 10px; padding: 14px; overflow: auto; font-size: 13px; }
.guide code { background: #f1eee8; padding: 1px 6px; border-radius: 4px; }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login form { width: 340px; display: flex; flex-direction: column; gap: 12px; }
.login h1 { font-size: 20px; margin: 0 0 6px; }
.login input { border: 1px solid #ddd8cf; border-radius: 10px; padding: 11px 12px; }
.login button { background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 11px; font-weight: 700; cursor: pointer; }
.err { color: var(--red); margin: 0; }

