/* 呼呼臘腸徵信
   Organised in sections. Keep it light: no framework, no utility dump.
   All dachshund art lives in the SVG sprite; this file only colours and motion.
*/

/* ---------- 0. tokens ---------- */
:root {
  --ink: #1c140e;
  --ink-soft: #4e3b2a;
  --ink-mute: #7a6552;
  --paper: #fbf6ee;
  --paper-2: #f3ead8;
  --paper-3: #eadcc2;
  --cream: #f8e9c6;
  --line: #e2d3b8;
  --red: #c05627;
  --red-deep: #8c3b16;
  --tan: #d4924a;
  --navy: #243447;
  --teal: #3b6a60;
  --ok: #2d6a49;
  --warn: #8a5410;
  --focus: #c05627;
  --shadow: 0 10px 28px -16px rgba(28, 20, 14, .35);
  --radius: 18px;
  --font: "PingFang TC", "Source Han Sans TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --font-serif: "Iwanami Ming", "Source Han Serif TC", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --max: 72rem;
  --gutter: 1.25rem;

  /* coat variables (default: red smooth) */
  --coat: #c56a2e;
  --belly: #f3d7a8;
  --ear: #a84e1c;
  --nose: #1a120c;
  --eye: #1a120c;
  --paw: #5c3317;
  --spot: #8a8a98;
  --spot2: #d8d4cc;
}

.coat-red      { --coat:#c56a2e; --belly:#f3d7a8; --ear:#a84e1c; --paw:#5c3317; }
.coat-blacktan { --coat:#1c1612; --belly:#c56a2e; --ear:#1c1612; --paw:#3a2416; }
.coat-cream    { --coat:#eed6a0; --belly:#f8ebc8; --ear:#d4b56a; --paw:#b08948; }
.coat-chocolate{ --coat:#5c3317; --belly:#e8c9a0; --ear:#3e220f; --paw:#2a160a; }
.coat-dapple   { --coat:#2a2628; --belly:#c56a2e; --ear:#1c1612; --paw:#3a2416; --spot:#9a9aaa; --spot2:#e6e0d4; }
.coat-wire     { --coat:#8b5a2b; --belly:#e6cc9a; --ear:#6a421c; --paw:#4a2e12; }

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 1.05rem;
  min-height: 100vh;
  text-underline-offset: .18em;
}
img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--red-deep); }
a:hover { color: var(--red); }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: .5rem; top: -4rem;
  background: var(--ink); color: #fff;
  padding: .5rem 1rem;
  z-index: 20;
  border-radius: 8px;
}
.skip:focus { top: .5rem; }

/* ---------- 2. custom dachshund cursor ---------- */
/* Injected data URIs sit on these custom properties. */
html {
  cursor: var(--cursor-dog, auto), auto;
}
a, button, [role="button"], summary, input, select, label, .card {
  cursor: var(--cursor-ptr, pointer), pointer;
}
@media (pointer: coarse) {
  html, a, button, [role="button"], summary, input, select, label, .card {
    cursor: auto;
  }
  a, button, [role="button"], summary, label, .card { cursor: pointer; }
}

/* ---------- 3. layout ---------- */
.wrap { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-header {
  background: rgba(251, 246, 238, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-header .bar {
  display: flex; align-items: center; gap: 1rem;
  justify-content: space-between;
  padding: .7rem 0;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .02em;
  flex: none;
  flex-wrap: nowrap;
}
.brand svg { width: 2.4rem; height: 2.4rem; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.brand small { display: block; font-family: var(--font); font-weight: 400; font-size: .72rem; color: var(--ink-mute); letter-spacing: 0; white-space: nowrap; }
@media (max-width: 720px) {
  .site-header .bar { flex-direction: column; align-items: flex-start; gap: .45rem; }
  nav.main { width: 100%; }
}
nav.main { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
nav.main a {
  text-decoration: none; color: var(--ink-soft);
  font-size: .95rem;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover, nav.main a[aria-current="page"] {
  color: var(--red-deep);
  border-bottom-color: var(--tan);
}

/* ---------- 4. hero ---------- */
.hero {
  position: relative;
  padding: 2rem 0 1.5rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 800px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 2rem; }
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.25;
  margin: 0 0 .8rem;
  letter-spacing: .01em;
}
.hero .lead { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1.2rem; max-width: 38rem; }
.hero-art { width: 100%; height: auto; }
.stats {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin: 1rem 0 0;
  padding: 0; list-style: none;
}
.stats li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .92rem;
}
.stats b { font-family: var(--font-serif); font-size: 1.1rem; color: var(--red-deep); margin-right: .2rem; }

/* ---------- 5. search ---------- */
.search-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.search-box form, .search-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem;
}
@media (min-width: 640px) {
  .search-box form, .search-row { grid-template-columns: 1fr 10rem auto; align-items: end; }
}
label.field { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--ink-mute); }
input[type="search"], input[type="text"], select {
  font: inherit;
  font-size: 1.05rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  min-height: 2.85rem;
  width: 100%;
}
input:focus, select:focus { background: #fff; border-color: var(--tan); }
button, .btn {
  font: inherit;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: .7rem 1.15rem;
  min-height: 2.85rem;
  font-weight: 600;
}
button:hover, .btn:hover { background: var(--red-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .25rem .7rem;
  font-size: .85rem;
  text-decoration: none;
  min-height: 2rem;
  display: inline-flex; align-items: center;
}
.chip:hover, .chip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- 6. cards ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: .8rem;
  margin: 1.2rem 0;
}
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  display: flex; flex-direction: column; gap: .35rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(28,20,14,.4);
  color: var(--ink);
}
/* paw-print hover, decorative only */
.card::after {
  content: "";
  position: absolute; right: .7rem; bottom: .55rem;
  width: 1.35rem; height: 1.35rem;
  opacity: 0;
  background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><ellipse cx="20" cy="26" rx="11" ry="10"/><ellipse cx="8" cy="14" rx="5" ry="6.5"/><ellipse cx="16" cy="9" rx="5" ry="6.5"/><ellipse cx="24" cy="9" rx="5" ry="6.5"/><ellipse cx="32" cy="14" rx="5" ry="6.5"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><ellipse cx="20" cy="26" rx="11" ry="10"/><ellipse cx="8" cy="14" rx="5" ry="6.5"/><ellipse cx="16" cy="9" rx="5" ry="6.5"/><ellipse cx="24" cy="9" rx="5" ry="6.5"/><ellipse cx="32" cy="14" rx="5" ry="6.5"/></svg>') center / contain no-repeat;
  color: var(--tan);
  transition: opacity .15s ease;
  pointer-events: none;
}
.card:hover::after, .card:focus-visible::after { opacity: .45; }
.card h2, .card h3 { font-family: var(--font-serif); font-size: 1.12rem; margin: 0; line-height: 1.4; }
.meta { color: var(--ink-mute); font-size: .88rem; }
.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.tag {
  font-size: .75rem;
  background: var(--paper-2);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .1rem .5rem;
}
.tag-name { background: #f3d9c4; color: var(--red-deep); }
.tag-same { background: #dce8e4; color: var(--teal); }

/* ---------- 7. sections, divider, bullets ---------- */
section { margin: 2.4rem 0; }
.section-h {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin: 0 0 .6rem;
}
.dash-div {
  display: block;
  width: 100%;
  height: 3.4rem;
  margin: 1.4rem 0 2rem;
  overflow: hidden;
  --coat: #c56a2e;
  --belly: #f3d7a8;
  --ear: #a84e1c;
  --nose: #1a120c;
  --eye: #1a120c;
}
.dash-div svg {
  width: 100%;
  height: 3.4rem;
  max-width: none;
}
.prose { max-width: 46rem; }
.prose h2, .prose h3 { font-family: var(--font-serif); }
.prose ul { list-style: none; padding: 0; }
.prose ul li {
  position: relative;
  padding-left: 1.6rem;
  margin: .4rem 0;
}
.prose ul li::before {
  content: "";
  position: absolute; left: 0; top: .45rem;
  width: 1.15rem; height: .8rem;
  background: var(--red);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 28"><path d="M4 22c10-4 16-16 28-18" fill="none" stroke="black" stroke-width="5" stroke-linecap="round"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 28"><path d="M4 22c10-4 16-16 28-18" fill="none" stroke="black" stroke-width="5" stroke-linecap="round"/></svg>') center / contain no-repeat;
}

/* can / cannot */
.split { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 700px) { .split { grid-template-columns: 1fr 1fr; } }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.panel h2 { font-family: var(--font-serif); font-size: 1.2rem; margin: 0 0 .5rem; }
.panel.do { border-top: 4px solid var(--ok); }
.panel.dont { border-top: 4px solid var(--red); }

/* ---------- 8. listing detail ---------- */
.kicker { font-size: .85rem; color: var(--ink-mute); letter-spacing: .04em; margin: 0 0 .3rem; }
.detail-h { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .5rem; }
.dl {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: .35rem 1rem;
  margin: 0;
}
.dl dt { color: var(--ink-mute); font-size: .88rem; }
.dl dd { margin: 0; }
.src {
  display: block;
  font-size: .75rem;
  color: var(--ink-mute);
  margin-top: .1rem;
}
.same-box {
  background: #fff;
  border: 1px dashed var(--teal);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.2rem 0;
}
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--ink-mute); font-weight: 500; width: 9rem; }

/* ---------- 9. FAQ ---------- */
.faq-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.4rem; }
details.qa {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  margin: .5rem 0;
}
details.qa summary {
  font-weight: 600;
  padding: .85rem 1.1rem;
  list-style: none;
  display: flex; align-items: center; gap: .6rem;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::before {
  content: "";
  width: 1.15rem; height: .8rem; flex: none;
  background: var(--red);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 28"><path d="M4 22c10-4 16-16 28-18" fill="none" stroke="black" stroke-width="5" stroke-linecap="round"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 28"><path d="M4 22c10-4 16-16 28-18" fill="none" stroke="black" stroke-width="5" stroke-linecap="round"/></svg>') center / contain no-repeat;
}
details.qa .ans { padding: 0 1.15rem 1.05rem 2.85rem; color: var(--ink-soft); }
details.qa .ans a { word-break: break-all; }
.cat-h { font-family: var(--font-serif); font-size: 1.35rem; margin: 1.8rem 0 .6rem; }

/* ---------- 10. spinner, empty, 404, back-to-top ---------- */
.spinner {
  width: 7rem; height: 3.6rem;
  --coat: #c56a2e; --belly:#f3d7a8; --ear:#a84e1c; --nose:#1a120c; --eye:#1a120c; --paw:#5c3317;
}
.spinner svg { width: 100%; height: 100%; transform-origin: 50% 80%; animation: run .55s infinite alternate ease-in-out; }
@keyframes run {
  from { transform: translateX(-8%) rotate(-4deg); }
  to   { transform: translateX(8%) rotate(4deg); }
}
.empty, .err404 {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
}
.empty svg, .err404 svg { width: min(18rem, 90%); margin: 0 auto 1rem; }
.topbtn {
  position: fixed;
  right: 1rem; bottom: 1rem;
  width: 3.4rem; height: 3.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: .3rem;
  z-index: 9;
  --coat:#c56a2e; --belly:#f3d7a8; --ear:#a84e1c; --nose:#1a120c; --eye:#1a120c; --paw:#5c3317;
}
.topbtn:hover { background: var(--cream); }
.topbtn svg { width: 100%; height: 100%; }
.topbtn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 11. footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  margin-top: 3rem;
  padding: 1.6rem 0 2.4rem;
  font-size: .88rem;
  color: var(--ink-soft);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; margin-bottom: .8rem; }
.site-footer a { color: var(--ink-soft); }
.disclaimer { max-width: 50rem; }
.consult-note { margin: 2.5rem auto 0; }
.consult-note p { max-width: 50rem; margin: 0; font-size: .9rem; color: var(--ink-soft); }
.consult-note + .site-footer { margin-top: 1rem; }

/* ---------- 12. a11y, motion, print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spinner svg, .card, .card::after { animation: none; transition: none; }
}
@media (prefers-color-scheme: dark) {
  /* Stay on the paper theme: this is a print-like document site.
     Forcing a dark inversion would muddy the coats. Leave as-is. */
}
@media print {
  .site-header, .topbtn, .search-box, nav.main { display: none !important; }
  body { background: #fff; }
  a { color: #000; text-decoration: underline; }
}
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.muted { color: var(--ink-mute); }
.notice {
  background: #fff8e6;
  border: 1px solid #e6d09a;
  border-radius: 12px;
  padding: .8rem 1rem;
  color: var(--ink-soft);
  font-size: .95rem;
}
.breadcrumbs { font-size: .88rem; color: var(--ink-mute); margin: 1rem 0; }
.breadcrumbs a { color: var(--ink-soft); }
.count-line { color: var(--ink-mute); margin: .4rem 0 0; }
.cluster { margin: 1rem 0; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.cluster h2 { font-family: var(--font-serif); font-size: 1.15rem; margin: 0 0 .4rem; }

/* ----- 聯絡表單與聯絡區塊（t243u） ----- */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form {
  max-width: 36rem;
  margin: 1.2rem 0 2rem;
  padding: 1.1rem 1.15rem 1.3rem;
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: 14px;
}
.contact-form .field { margin: 0 0 .95rem; }
.contact-form .req { font-weight: 400; color: var(--ink-mute); font-size: .85em; }
.contact-form .hint { display: block; margin-top: .25rem; font-size: .82rem; color: var(--ink-mute); font-weight: 400; }
.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  padding: .5rem .65rem;
  border: 1px solid var(--paper-3);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus,
.contact-form .consent input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 1rem 0 1.1rem;
  font-size: .95rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  margin-top: .15rem;
  accent-color: var(--ink);
}
.contact-dog { display: block; margin: .4rem 0 1rem; }
.contact-block, .contact-result .fallback {
  border: 1px solid var(--paper-3);
  background: var(--paper-2);
  border-radius: 12px;
  padding: .85rem 1rem .95rem;
  margin: 1rem 0;
  max-width: 40rem;
}
.contact-block .contact-k {
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--ink-mute);
  margin: 0 0 .35rem;
  text-transform: none;
}
.contact-block p { margin: .25rem 0; }
.contact-mini {
  margin-top: .65rem;
  padding-top: .5rem;
  border-top: 1px dashed var(--paper-3);
  font-size: .86rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  align-items: center;
}
.contact-mini .k { color: var(--ink-mute); font-size: .78rem; letter-spacing: .05em; }
.card-main {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-main:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
article.card { cursor: default; }
article.card .card-main { cursor: var(--cursor-ptr, pointer); }
.extra-box { margin-top: 1.2rem; }
.extra-box ul { margin: .4rem 0; padding-left: 1.2rem; }
.contact-result { padding-bottom: 3rem; }
