:root {
  --ink: #1c2724;
  --ink-soft: #43524e;
  --muted: #7a8783;
  --line: #e4e7e2;
  --line-strong: #cfd6d1;
  --bg: #f6f4ee;
  --bg-warm: #efeae0;
  --card: #ffffff;
  --brand: #145c4e;
  --brand-dark: #0d4438;
  --brand-soft: #e6f0ec;
  --accent: #c25b34;
  --accent-soft: #fbeee7;
  --gold: #a9843f;
  --danger: #b3402f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 40, 34, .05), 0 8px 24px rgba(20, 40, 34, .06);
  --shadow-lg: 0 16px 48px rgba(18, 36, 30, .12);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  padding-bottom: 0;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
button { font-family: inherit; }
input, select, textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 92, 78, .1);
}
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(820px, calc(100% - 40px)); }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ta-r { text-align: right; }
.hidden { display: none !important; }
.pre-line { white-space: pre-line; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 238, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--brand);
  color: #f7f4ec;
  font-size: 19px;
  font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.main-nav { display: flex; gap: 4px; margin-right: auto; }
.main-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--bg-warm); color: var(--ink); }
.main-nav a.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.header-account { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.ghost-link { color: var(--ink-soft); }
.ghost-link:hover { color: var(--brand); }
.msg-dot { position: relative; color: var(--ink-soft); }
.msg-dot i {
  position: absolute; top: -7px; right: -12px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: grid; place-items: center;
  padding: 0 4px;
}
.inline-form { display: inline; }
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--muted); font-size: 13px; cursor: pointer;
}
.link-btn:hover { color: var(--danger); }
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-warm);
  white-space: nowrap;
}
.lang-switch a {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.lang-switch a:hover { color: var(--brand); }
.lang-switch a.is-active { background: var(--brand); color: #fff; font-weight: 600; }
.footer-bottom .lang-switch { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.06); }
.footer-bottom .lang-switch a { color: #a9bdb6; }
.footer-bottom .lang-switch a.is-active { background: rgba(255,255,255,.9); color: #145c4e; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #a84a28; }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-ghost:hover { background: #fff; border-color: var(--brand); color: var(--brand); }
.btn-disabled { background: #dfe3df; color: #8b948f; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1100px 480px at 78% -10%, rgba(194, 91, 52, .14), transparent 60%),
    radial-gradient(900px 420px at 10% 0%, rgba(20, 92, 78, .16), transparent 55%),
    linear-gradient(180deg, #fbf9f4 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  padding: 68px 0 60px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-copy h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.18; letter-spacing: -.02em; }
.hero-copy > p { margin-top: 18px; color: var(--ink-soft); font-size: 16px; max-width: 32em; }
.hero-search {
  margin-top: 26px;
  display: flex;
  gap: 8px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: 520px;
}
.hero-search input { border: 0; box-shadow: none; background: transparent; padding-left: 16px; }
.hero-search input:focus { box-shadow: none; }
.hero-search .btn { border-radius: 999px; padding-inline: 24px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.hero-panel { display: flex; flex-direction: column; gap: 14px; }
.hero-card {
  background: var(--brand);
  color: #eef5f1;
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.hero-card-head { display: flex; justify-content: space-between; font-size: 13px; letter-spacing: .08em; opacity: .9; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8fe0b6; box-shadow: 0 0 0 4px rgba(143, 224, 182, .16); }
.hero-price-list { margin-top: 16px; display: flex; flex-direction: column; }
.hero-price-list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  font-size: 14px;
}
.hero-price-list li:last-child { border-bottom: 0; }
.hero-price-list strong { font-size: 15px; }
.hero-card-foot { margin-top: 14px; font-size: 12px; opacity: .7; line-height: 1.6; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hero-stats div {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; text-align: center;
}
.hero-stats strong { display: block; font-size: 22px; color: var(--brand); }
.hero-stats span { font-size: 12px; color: var(--muted); }

/* ---------------- Sections ---------------- */
.section { padding: 52px 0 8px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-size: 24px; }
.section-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.text-link { color: var(--brand); font-size: 14px; font-weight: 600; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

.district-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.district-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.district-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.district-name { font-weight: 600; font-size: 15px; }
.district-count { font-size: 12px; color: var(--muted); }

/* ---------------- Listing cards ---------------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 18px;
}
.listing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-warm); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.media-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.media-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(28, 39, 36, .72);
  color: #fff;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.media-free {
  position: absolute; top: 10px; right: 10px;
  background: var(--accent); color: #fff;
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
}
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-price { display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 21px; font-weight: 700; color: var(--accent); letter-spacing: -.01em; }
.price-free { font-size: 18px; color: var(--brand); }
.price-note { font-size: 11px; color: var(--muted); }
.card-title { font-size: 15px; font-weight: 600; line-height: 1.45; }
.card-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 5px; flex-wrap: wrap; }
.card-meta .dot { opacity: .6; }
.card-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.card-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.is-inactive .card-media img { filter: grayscale(.7); opacity: .75; }
.is-inactive .price { color: var(--muted); }

.chip {
  display: inline-flex; align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}
.chip-line { border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft); }
.chip-line:hover { border-color: var(--brand); color: var(--brand); }
.chip-soft { background: var(--bg-warm); color: var(--ink-soft); font-size: 11.5px; padding: 3px 9px; }
.chip-warn { background: var(--accent-soft); color: #9c4526; font-size: 11.5px; padding: 3px 9px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- Steps & CTA ---------------- */
.section-steps { padding-top: 60px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.step-no { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.steps h3 { margin-top: 8px; font-size: 17px; }
.steps p { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.publish-cta { padding: 56px 0 72px; }
.publish-cta-inner {
  background: linear-gradient(115deg, var(--brand) 0%, #1b6f5d 60%, #2a8070 100%);
  color: #fff;
  border-radius: 22px;
  padding: 38px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}
.publish-cta-inner h2 { font-size: 24px; }
.publish-cta-inner p { margin-top: 6px; opacity: .8; font-size: 14px; }

/* ---------------- Page head / list ---------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 40px 0 22px;
}
.page-head h1 { font-size: 28px; }
.page-head p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.sort-bar { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.sort-pill { padding: 6px 12px; border-radius: 999px; border: 1px solid transparent; }
.sort-pill:hover { background: #fff; border-color: var(--line); }
.sort-pill.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.list-layout { display: grid; grid-template-columns: 260px 1fr; gap: 26px; padding-bottom: 64px; align-items: start; }
.filter-panel { position: sticky; top: 86px; }
.filter-panel details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px;
}
.filter-panel summary {
  cursor: pointer; font-weight: 700; font-size: 14px; margin-bottom: 4px;
  list-style: none;
}
.filter-panel summary::-webkit-details-marker { display: none; }
.filter-form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.filter-block { display: flex; flex-direction: column; gap: 7px; }
.filter-title { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.chip-select { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-select label { cursor: pointer; }
.chip-select input { display: none; }
.chip-select span {
  display: inline-block; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 12px; color: var(--ink-soft);
  background: #fff;
}
.chip-select input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.price-range { display: flex; align-items: center; gap: 6px; }
.price-range input { padding: 8px; font-size: 13px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }
.check-line input { width: auto; }
.filter-actions { display: flex; flex-direction: column; gap: 8px; }
.list-results { min-height: 400px; }

.pager { display: flex; align-items: center; gap: 6px; margin: 30px 0 10px; flex-wrap: wrap; }
.pager-btn, .pager-num {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 13px; background: #fff;
}
.pager-btn:hover, .pager-num:hover { border-color: var(--brand); color: var(--brand); }
.pager-num.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-btn.is-disabled { opacity: .45; }
.pager-total { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------------- Detail ---------------- */
.breadcrumb { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); padding: 22px 0 14px; }
.breadcrumb a:hover { color: var(--brand); }
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; padding-bottom: 50px; align-items: start; }
.gallery { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.gallery-main { aspect-ratio: 4 / 3; background: var(--bg-warm); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #f2efe8; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.gallery-thumb {
  width: 76px; height: 60px; padding: 0; border: 2px solid transparent;
  border-radius: 8px; overflow: hidden; background: none; cursor: pointer; flex-shrink: 0;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active { border-color: var(--brand); }
.detail-head { margin-top: 22px; }
.detail-price { display: flex; align-items: baseline; gap: 10px; }
.detail-price .price { font-size: 32px; }
.detail-head h1 { font-size: 26px; margin-top: 8px; }
.detail-sub { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-top: 20px;
}
.panel h2 { font-size: 17px; margin-bottom: 14px; }
.panel > h2:not(:first-child) { margin-top: 8px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.spec-list > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.spec-list dt { color: var(--muted); flex-shrink: 0; }
.spec-list dd { text-align: right; }
.notice {
  margin-top: 14px; padding: 11px 14px; border-radius: var(--radius-sm);
  background: var(--brand-soft); color: #1c4c40; font-size: 13px;
  border-left: 3px solid var(--brand);
}
.notice-warn { background: var(--accent-soft); color: #8e4223; border-left-color: var(--accent); }
.seller-row { display: flex; gap: 12px; align-items: center; }
.seller-row p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-weight: 700; font-size: 17px; flex-shrink: 0;
}
.detail-side { position: sticky; top: 90px; }
.side-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.side-card + .side-card { margin-top: 16px; }
.side-card h3 { font-size: 15px; margin-bottom: 8px; }
.side-price { font-size: 28px; font-weight: 700; color: var(--accent); }
.side-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 16px; }
.share-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-title { font-size: 12px; color: var(--muted); letter-spacing: .06em; margin-bottom: 8px; }
.share-input { display: flex; gap: 6px; }
.share-input input { font-size: 12px; padding: 8px 10px; background: var(--bg); }
.share-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.report-link { display: inline-block; margin-top: 14px; font-size: 12px; color: var(--muted); text-decoration: underline; }
.side-trust ul { margin-top: 10px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--ink-soft); }
.side-trust li { padding-left: 16px; position: relative; }
.side-trust li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); }

/* ---------------- Share page ---------------- */
.share-wrap { max-width: 640px; margin: 0 auto; padding: 0 0 40px; background: #fff; min-height: 100vh; }
.share-brand { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.share-brand a { font-weight: 700; color: var(--brand); font-size: 16px; letter-spacing: .02em; }
.share-card { background: #fff; }
.share-body { padding: 18px 20px 4px; }
.share-price-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.share-price-row .price { font-size: 28px; }
.share-body h1 { font-size: 21px; margin-top: 10px; line-height: 1.4; }
.share-estate { color: var(--muted); font-size: 13px; margin-top: 8px; }
.share-body .card-chips { margin-top: 12px; }
.share-desc { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.75; }
.share-seller { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-seller p { font-size: 12px; color: var(--muted); }
.share-cta { position: sticky; bottom: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.share-cta-sub { display: flex; gap: 8px; justify-content: center; font-size: 11.5px; color: var(--muted); margin-top: 10px; flex-wrap: wrap; }
.share-cta-sub a { text-decoration: underline; }
.share-similar { padding: 26px 20px 6px; border-top: 8px solid var(--bg); }
.share-similar h2 { font-size: 17px; margin-bottom: 16px; }
.share-similar .listing-grid { grid-template-columns: 1fr; }
.share-footer { padding: 26px 20px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.share-unavailable { padding: 80px 24px; text-align: center; }
.share-unavailable h1 { font-size: 22px; }
.share-unavailable p { color: var(--muted); margin: 10px 0 24px; }
.share-invite {
  margin: 18px 20px 6px;
  padding: 18px 18px 16px;
  border: 1px solid #dfe7e1;
  border-radius: 14px;
  background: linear-gradient(150deg, #eef5f1 0%, #fbf3e6 100%);
}
.share-invite-copy strong { display: block; font-size: 16px; color: var(--ink); }
.share-invite-copy p { margin: 7px 0 14px; font-size: 12.5px; line-height: 1.75; color: var(--muted); }

/* ---------------- Publish ---------------- */
.publish-layout { display: grid; grid-template-columns: 1fr 300px; gap: 26px; padding-bottom: 60px; align-items: start; }
.publish-form { padding: 26px 28px; }
.form-section { padding: 22px 0; border-bottom: 1px dashed var(--line); }
.form-section:first-of-type { padding-top: 8px; }
.form-section:last-of-type { border-bottom: 0; }
.form-section h2 { font-size: 16px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field-label em { color: var(--accent); font-style: normal; margin-left: 3px; }
.field-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.field-static { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.switch { display: inline-block; position: relative; width: 46px; height: 26px; }
.switch input { display: none; }
.switch span { position: absolute; inset: 0; background: #d9ded9; border-radius: 999px; transition: background .18s; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.upload-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.upload-thumb { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; }
.upload-thumb img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.upload-thumb figcaption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(28,39,36,.66); color: #fff; font-size: 10.5px; padding: 3px 6px; }
.upload-thumb .thumb-remove { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.55); color: #fff; border: 0; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; }
.upload-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  padding: 18px; cursor: pointer; color: var(--brand); font-weight: 600; font-size: 13.5px;
  background: #fbfaf7;
}
.upload-drop small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.upload-existing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.upload-existing figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; }
.upload-existing img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.upload-existing figcaption { font-size: 10.5px; padding: 4px 6px; background: var(--bg); color: var(--muted); }
.form-actions { display: flex; gap: 12px; padding-top: 24px; }
.publish-side { position: sticky; top: 90px; }
.tip-list { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.tip-list li { padding-left: 18px; position: relative; line-height: 1.7; }
.tip-list li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ---------------- Auth ---------------- */
.auth-wrap { display: grid; place-items: center; padding: 70px 20px; min-height: 60vh; }
.auth-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 22px; }
.auth-sub { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.7; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 22px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.dev-code { background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--brand); }
.auth-alt { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.auth-alt > span { font-size: 12px; color: var(--muted); text-align: center; }

/* ---------------- Misc pages ---------------- */
.legal-page { padding: 40px 0 70px; max-width: 820px; }
.legal-page h1 { font-size: 28px; }
.legal-updated { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legal-page section { margin-top: 26px; }
.legal-page section h2 { font-size: 16px; margin-bottom: 8px; }
.legal-page section p { color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.back-link { font-size: 13px; color: var(--muted); display: inline-block; margin-bottom: 10px; }
.back-link:hover { color: var(--brand); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-mark { font-size: 34px; color: var(--line-strong); }
.empty h3 { margin-top: 10px; font-size: 17px; color: var(--ink); }
.empty p { margin: 8px 0 20px; font-size: 13.5px; }

.flash { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 16px; background: var(--brand-soft); color: #17493d; }
.flash-error { background: #fbe9e6; color: #97301f; }
.flash-success { background: #e7f4ec; color: #1c6b45; }

/* ---------------- Tabs / my ---------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs-sm { margin-bottom: 16px; }
.tab {
  padding: 10px 16px; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab span { background: var(--brand-soft); color: var(--brand); font-size: 11px; border-radius: 999px; padding: 1px 7px; }

.my-listings { display: flex; flex-direction: column; gap: 16px; padding-bottom: 50px; }
.my-listing { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.my-listing-media { width: 150px; height: 112px; border-radius: 10px; overflow: hidden; background: var(--bg-warm); flex-shrink: 0; }
.my-listing-media img { width: 100%; height: 100%; object-fit: cover; }
.my-listing-body { flex: 1; min-width: 0; }
.my-listing-top { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.my-listing h3 { margin-top: 6px; font-size: 16px; }
.my-listing h3 a:hover { color: var(--brand); }
.my-listing-body > p { font-size: 12.5px; margin-top: 4px; }
.my-listing-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.badge { display: inline-flex; align-items: center; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--bg-warm); color: var(--ink-soft); white-space: nowrap; }
.badge-active, .badge-completed { background: #e4f2ea; color: #1c6b45; }
.badge-pending, .badge-pending_confirm, .badge-pending_quote { background: #fdf1dd; color: #92601a; }
.badge-sold { background: #ece9f5; color: #564587; }
.badge-offline, .badge-cancelled { background: #eceae6; color: #7c7a74; }
.badge-rejected, .badge-exception { background: #fbe6e3; color: #a23826; }
.badge-reserved, .badge-scheduled { background: #e3eef7; color: #2a5b80; }
.badge-assigned, .badge-shipping, .badge-working { background: #e5f0ee; color: #175c4e; }

/* ---------------- Notifications ---------------- */
.notice-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 60px; }
.notice-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.notice-item.is-unread { border-left: 3px solid var(--accent); background: #fffdfa; }
.notice-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.notice-head span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.notice-item p { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }

/* ---------------- Orders ---------------- */
.order-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 60px; }
.order-row { display: flex; justify-content: space-between; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.order-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.order-row-top { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.order-no { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.order-row h3 { font-size: 15.5px; margin-top: 8px; }
.order-row p { font-size: 12.5px; margin-top: 4px; }
.order-row-amount { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.order-row-amount strong { font-size: 18px; }
.order-row-amount span { font-size: 11.5px; }
.paid { color: #1c6b45; }
.unpaid { color: var(--accent); }

/* ---------------- Chat ---------------- */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; padding-bottom: 60px; align-items: start; }
.chat-threads { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-thread { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-thread:last-child { border-bottom: 0; }
.chat-thread:hover { background: #fbfaf7; }
.chat-thread.is-active { background: var(--brand-soft); }
.chat-thread-top { display: flex; justify-content: space-between; font-size: 13px; }
.chat-thread-top span { font-size: 11px; color: var(--muted); }
.chat-thread p { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-empty { padding: 30px; text-align: center; color: var(--muted); font-size: 13px; }
.chat-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-height: 540px; display: flex; flex-direction: column; }
.chat-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-head p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chat-messages { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 14px; max-height: 460px; overflow-y: auto; }
.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 72%; }
.chat-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.chat-bubble { background: var(--bg-warm); padding: 10px 14px; border-radius: 14px 14px 14px 4px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.chat-msg.is-mine .chat-bubble { background: var(--brand); color: #fff; border-radius: 14px 14px 4px 14px; }
.chat-time { font-size: 10.5px; color: var(--muted); }
.chat-form { display: flex; gap: 10px; padding: 14px 20px 20px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { flex: 1; }

/* ---------------- Booking ---------------- */
.booking-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; padding-bottom: 60px; align-items: start; }
.booking-form { display: flex; flex-direction: column; gap: 0; }
.booking-listing { display: flex; gap: 16px; align-items: center; margin-top: 0; }
.booking-listing-media { width: 110px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--bg-warm); flex-shrink: 0; }
.booking-listing-media img { width: 100%; height: 100%; object-fit: cover; }
.booking-listing h2 { font-size: 16px; margin-top: 3px; }
.booking-listing p { font-size: 12.5px; margin-top: 4px; }
.booking-form .panel:not(.booking-listing) { margin-top: 16px; }
.booking-submit { padding: 22px 0 0; }
.booking-submit p { margin-top: 10px; font-size: 12px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 6px; cursor: pointer;
  font-size: 12.5px; text-align: center;
}
.slot input { display: none; }
.slot small { font-size: 10.5px; color: var(--muted); }
.slot:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.slot.is-full { opacity: .5; }
.quote-panel { position: sticky; top: 90px; }
.quote-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.quote-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.quote-badge { background: var(--brand-soft); color: var(--brand); font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 500; }
.quote-body { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; min-height: 80px; }
.quote-placeholder { font-size: 12.5px; color: var(--muted); }
.quote-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.quote-line span:first-child { color: var(--ink-soft); }
.quote-line small { display: block; font-size: 11px; color: var(--muted); }
.quote-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.quote-total strong { font-size: 22px; color: var(--accent); }
.quote-notes { margin-top: 14px; display: flex; flex-direction: column; gap: 7px; font-size: 11.5px; color: var(--muted); line-height: 1.65; }
.quote-notes li { padding-left: 12px; position: relative; }
.quote-notes li::before { content: "·"; position: absolute; left: 2px; }

/* ---------------- Order detail ---------------- */
.order-head-side { flex-shrink: 0; }
.order-layout { display: grid; grid-template-columns: 1fr 340px; gap: 26px; padding-bottom: 60px; align-items: start; }
.order-main .panel:first-child { margin-top: 0; }
.order-side { position: sticky; top: 90px; }
.order-amount { font-size: 30px; font-weight: 700; color: var(--accent); }
.order-side .side-note { margin-bottom: 16px; }
.progress { display: flex; justify-content: space-between; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.progress li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); flex: 1; min-width: 64px; position: relative; }
.progress li::before { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: -1; }
.progress li:first-child::before { display: none; }
.progress-dot { width: 26px; height: 26px; border-radius: 50%; background: #eceae4; color: var(--muted); display: grid; place-items: center; font-size: 12px; }
.progress li.is-done { color: var(--brand); }
.progress li.is-done .progress-dot { background: var(--brand); color: #fff; }
.progress li.is-done::before { background: var(--brand); }
.progress li.is-current .progress-dot { box-shadow: 0 0 0 4px var(--brand-soft); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); letter-spacing: .04em; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tfoot td { border-bottom: 0; padding-top: 14px; font-size: 14px; }
.timeline { display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 14px; }
.timeline-time { font-size: 11.5px; color: var(--muted); width: 130px; flex-shrink: 0; }
.timeline p { font-size: 12px; margin-top: 2px; }
.reschedule { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.reschedule summary { font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.reschedule form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

/* ---------------- Staff ---------------- */
.staff-wrap { max-width: 760px; margin: 0 auto; padding: 24px 18px 60px; }
.staff-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.staff-head h1 { font-size: 22px; }
.staff-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.staff-tasks { display: flex; flex-direction: column; gap: 16px; }
.staff-task { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.staff-task-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
.staff-task-head > div { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.staff-task h2 { font-size: 17px; margin-top: 10px; }
.staff-task-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.staff-label { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.staff-task-grid p { font-size: 13px; margin-top: 4px; line-height: 1.6; }
.staff-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.staff-photos figure { margin: 0; width: 84px; }
.staff-photos img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; }
.staff-photos figcaption { font-size: 10px; color: var(--muted); text-align: center; }
.staff-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.staff-photo-actions { display: flex; gap: 8px; align-items: center; }
.staff-photo-actions select { width: auto; padding: 7px 28px 7px 10px; font-size: 12.5px; }
.staff-status-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.staff-footer { margin-top: 30px; text-align: center; font-size: 12px; color: var(--muted); }

/* ---------------- Admin ---------------- */
.admin-wrap { padding: 32px 0 70px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.admin-head h1 { font-size: 26px; margin-top: 6px; }
.admin-badges { display: flex; gap: 8px; }
.admin-badge { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--muted); }
.admin-badge strong { color: var(--accent); margin-left: 4px; }
.admin-tabs { display: flex; gap: 4px; margin-top: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.admin-tabs a { padding: 11px 15px; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.admin-body { padding-top: 24px; }
.admin-body .panel { margin-top: 0; }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.admin-columns .panel { margin-top: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat-grid-sm { grid-template-columns: repeat(4, 1fr); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 24px; letter-spacing: -.01em; }
.stat-note { font-size: 11.5px; color: var(--muted); }
.simple-list { display: flex; flex-direction: column; }
.simple-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.simple-list li:last-child { border-bottom: 0; }
.simple-list strong { font-size: 13.5px; display: block; }
.admin-table td { vertical-align: middle; }
.admin-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.order-admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-order { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.admin-order summary { display: flex; gap: 12px; align-items: center; padding: 13px 16px; cursor: pointer; flex-wrap: wrap; font-size: 12.5px; }
.admin-order summary::-webkit-details-marker { display: none; }
.admin-order-title { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 160px; }
.admin-order-amount { color: var(--accent); }
.admin-order-body { border-top: 1px solid var(--line); padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-order-info p { font-size: 12.5px; margin-bottom: 6px; line-height: 1.6; }
.admin-order-info strong { color: var(--muted); font-weight: 600; margin-right: 4px; }
.admin-order-forms { display: flex; flex-direction: column; gap: 10px; }

/* ---------------- 配送調度（手機優先） ---------------- */
.dispatch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.dispatch-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.dispatch-stat strong { display: block; font-size: 22px; line-height: 1.2; color: var(--brand); }
.dispatch-stat span { font-size: 11.5px; color: var(--muted); }
.dispatch-stat.is-warn strong { color: var(--accent); }
.dispatch-fleet { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.dispatch-fleet-item { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.dispatch-fleet-item b { color: var(--brand); }
.dispatch-list { display: grid; gap: 12px; margin-top: 16px; }
.dispatch-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px 12px; }
.dispatch-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dispatch-slot { font-weight: 700; font-size: 14px; color: var(--brand); background: var(--bg-warm); border-radius: 8px; padding: 2px 8px; }
.dispatch-amount { margin-left: auto; font-size: 14px; color: var(--accent); }
.dispatch-title { margin: 8px 0 10px; font-size: 13px; color: var(--ink-soft); }
.dispatch-route { display: grid; gap: 8px; }
.dispatch-stop { display: flex; gap: 9px; align-items: flex-start; }
.dispatch-dot { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.dispatch-dot.is-drop { background: var(--accent); }
.dispatch-stop strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.45; }
.dispatch-stop small { font-size: 11.5px; color: var(--muted); }
.dispatch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.dispatch-chips span { font-size: 11.5px; color: var(--ink-soft); background: #f6f4ee; border-radius: 6px; padding: 3px 8px; }
.dispatch-chips .is-warn { background: #fdeee7; color: #a8482a; }
.dispatch-chips .is-ok { background: #e9f4ee; color: #14624f; }
.dispatch-chips .is-accent { background: #f4ecdf; color: #8a6a2f; }
.dispatch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dispatch-actions .btn { min-height: 34px; }
.dispatch-assign { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dispatch-assign select, .dispatch-assign input { flex: 1 1 120px; min-width: 0; }
.inline-admin-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-admin-form label { font-size: 11.5px; color: var(--muted); min-width: 56px; }
.inline-admin-form input, .inline-admin-form select { width: auto; flex: 1; min-width: 90px; padding: 7px 9px; font-size: 12.5px; }
.capacity-table td.is-full { background: var(--accent-soft); color: #92401f; }
.pricing-form { display: flex; flex-direction: column; gap: 16px; }
.stack-form { display: flex; flex-direction: column; gap: 10px; }
.stack-form h3 { font-size: 14px; }
.panel-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }

/* ---------------- Footer ---------------- */
.site-footer { background: #12211d; color: #c9d4cf; margin-top: 40px; padding: 46px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 36px; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #8ba29a; }
.footer-note { font-size: 12.5px; color: #8ba29a; margin-top: 14px; max-width: 34em; line-height: 1.8; }
.site-footer h4 { font-size: 12px; letter-spacing: .1em; color: #8ba29a; margin-bottom: 12px; }
.site-footer a { display: block; font-size: 13px; padding: 4px 0; color: #c9d4cf; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: #7d918a; border-top: 1px solid rgba(255,255,255,.09); margin-top: 34px; padding: 18px 0 22px; flex-wrap: wrap; }

/* ---------------- Mobile tabbar ---------------- */
.tabbar { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .district-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-layout, .booking-layout, .order-layout, .publish-layout { grid-template-columns: 1fr; }
  .detail-side, .quote-panel, .order-side, .publish-side { position: static; }
  .admin-columns { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .header-inner { height: 60px; gap: 10px; }
  .main-nav { display: none; }
  .brand { min-width: 0; }
  .brand-mark { flex-shrink: 0; }
  .brand-text { min-width: 0; }
  .brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-text small { display: none; }
  .header-account { margin-left: auto; gap: 8px; flex-shrink: 0; }
  .msg-dot, .link-btn, .header-account .btn-sm { white-space: nowrap; }
  .ghost-link { display: none; }
  .header-account .admin-link {
    display: inline-block;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    color: var(--brand);
    white-space: nowrap;
  }
  .hero-inner { grid-template-columns: 1fr; padding: 40px 0 34px; gap: 30px; }
  .hero-copy h1 { font-size: 34px; }
  .hero-panel { order: 2; }
  .steps { grid-template-columns: 1fr 1fr; }
  .list-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-threads { max-height: 220px; overflow-y: auto; }
  .site-footer { padding-bottom: 70px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tabbar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; color: var(--muted); padding: 4px 8px; border-radius: 10px; flex: 1;
  }
  .tabbar a.is-active { color: var(--brand); }
  .tab-ico { font-size: 17px; line-height: 1; }
  .tabbar .tab-publish .tab-ico {
    background: var(--brand); color: #fff; width: 34px; height: 34px;
    border-radius: 50%; display: grid; place-items: center; font-size: 18px;
    margin-top: -12px; box-shadow: 0 4px 12px rgba(20,92,78,.3);
  }
  .share-cta { bottom: 0; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-copy h1 { font-size: 29px; }
  .list-layout { gap: 18px; }
  .district-grid { grid-template-columns: repeat(3, 1fr); }
  .listing-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-body { padding: 10px 11px 12px; gap: 5px; }
  .price { font-size: 17px; }
  .card-title { font-size: 13.5px; }
  .card-chips { display: none; }
  .card-foot { font-size: 11px; }
  .section { padding: 38px 0 4px; }
  .section-head h2 { font-size: 20px; }
  .section-head p { font-size: 13px; }
  .publish-cta-inner { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
  .steps { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .spec-list { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: 1fr; }
  .my-listing { flex-direction: column; }
  .my-listing-media { width: 100%; height: 160px; }
  .order-row { flex-direction: column; gap: 12px; }
  .order-row-amount { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .staff-task-grid { grid-template-columns: 1fr; }
  .admin-head { flex-direction: column; align-items: flex-start; }
  .stat-grid-sm { grid-template-columns: repeat(2, 1fr); }
  .admin-order-body { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .page-head { flex-direction: column; align-items: flex-start; padding-top: 26px; }
  .upload-grid, .upload-existing { grid-template-columns: repeat(3, 1fr); }
  .publish-form { padding: 18px; }
  .panel { padding: 18px; }
  .share-similar .listing-grid { grid-template-columns: 1fr 1fr; }
  .timeline-time { width: 96px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 6px; }
  .admin-wrap { padding: 18px 0 70px; }
  .admin-head h1 { font-size: 21px; }
  .admin-tabs { position: sticky; top: 60px; z-index: 20; background: var(--bg); padding-top: 2px; }
  .admin-tabs a { padding: 10px 12px; font-size: 13px; }
  .dispatch-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dispatch-stat { padding: 10px 12px; }
  .dispatch-stat strong { font-size: 19px; }
  .dispatch-card { padding: 13px 13px 11px; }
  .dispatch-amount { flex-basis: 100%; margin-left: 0; }
  .dispatch-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 40px; }
  .dispatch-assign label { min-width: 0; }
}

@media (max-width: 480px) {
  .header-inner { gap: 8px; }
  .brand-text { display: none; }
  .header-account { gap: 6px; }
  .lang-switch a { padding: 3px 7px; font-size: 11.5px; }
  .header-account .admin-link { padding: 4px 8px; font-size: 11.5px; }
}
