:root {
    --page: #fcfaf7;
    --surface: #fff;
    --ink: #342820;
    --muted: #72645a;
    --accent: #a34f2d;
    --accent-hover: #843c21;
    --soft: #f2e7dc;
    --line: #e8ded4;
    --focus: #784021;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { position: absolute; top: 8px; left: 16px; z-index: 10; padding: 12px 20px; background: var(--surface); border: 2px solid var(--focus); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .page-wrap, .footer-inner { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 96px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 800; line-height: 1.3; letter-spacing: .06em; }
.brand small { display: block; color: var(--muted); font-size: 12px; letter-spacing: .15em; font-weight: 500; margin-top: 4px; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: var(--accent); background: var(--soft); }
.brand-mark svg { width: 30px; height: 30px; }
.header-nav { display: flex; align-items: center; gap: 36px; font-size: 14px; font-weight: 600; }
.header-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.header-nav .nav-current { color: var(--accent); }
.header-nav a:hover, .site-footer a:hover { color: var(--accent); }
.page-wrap { padding-top: 36px; padding-bottom: 64px; }
.teddy-hero { display: grid; grid-template-columns: 1fr 1fr; border-radius: 28px; overflow: hidden; background: #f2e6d8; min-height: 370px; }
.hero-copy { padding: 44px 48px; align-self: center; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .1em; }
.eyebrow > span { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
h1 { font-size: clamp(32px, 3.7vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.35; margin-top: 16px; }
h1 > span { color: var(--accent); }
.hero-description { color: #665043; font-size: 15px; line-height: 1.9; margin-top: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 10px; font-size: 15px; font-weight: 600; transition: background-color .18s ease, box-shadow .18s ease; }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover, .button-primary:active { background: var(--accent-hover); }
.hero-copy .button { margin-top: 24px; }
.hero-photo { position: relative; min-width: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption { position: absolute; right: 16px; bottom: 12px; padding: 4px 10px; color: #665043; background: #fff9; border-radius: 6px; font-size: 11px; }
.search-panel { margin-top: 28px; padding: 24px 28px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.search-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.search-heading h2 { font-size: 18px; font-weight: 700; }
.search-heading p { font-size: 13px; color: var(--muted); }
.search-form { display: grid; grid-template-columns: 1fr 1.6fr 1fr auto; gap: 16px; align-items: end; }
.search-field { min-width: 0; }
.search-field label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; font-weight: 500; }
.search-field input, .search-field select { display: block; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #b9ada1; border-radius: 9px; color: var(--ink); background: var(--surface); font-size: 14px; }
.search-field input::placeholder { color: var(--muted); }
.listing-section { margin-top: 44px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 27px; letter-spacing: -.02em; line-height: 1.5; font-weight: 750; }
.section-heading .eyebrow { margin-bottom: 4px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.section-note { color: var(--muted); font-size: 13px; padding-bottom: 5px; }
.count-pill { display: inline-block; border-radius: 20px; padding: 3px 11px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--accent); letter-spacing: 0; }
.publish-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid #b9ada1; border-radius: 9px; font-size: 14px; font-weight: 600; background: var(--surface); }
.publish-link:hover { background: var(--soft); }
.pet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; list-style: none; padding: 0; margin: 0; }
.pet-grid > li { min-width: 0; }
.pet-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: box-shadow .2s ease, border-color .2s ease; }
.pet-card:hover, .pet-card:focus-visible { border-color: #ba8a6b; box-shadow: 0 8px 24px #57321d0d; }
.pet-card:active { background: #fdf6ee; }
.pet-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #f3ede7; }
.pet-media img { width: 100%; height: 100%; object-fit: cover; }
.seller-badge { position: absolute; left: 12px; top: 12px; padding: 4px 9px; background: #fff; color: #456348; border-radius: 6px; font-size: 12px; font-weight: 600; box-shadow: 0 2px 8px #0000000a; }
.photo-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; height: 100%; color: var(--muted); font-size: 13px; }
.photo-empty svg { width: 40px; height: 40px; }
.pet-body { display: flex; flex-direction: column; flex: 1; padding: 18px; min-width: 0; }
.pet-city { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.pet-city svg { width: 14px; height: 14px; }
.pet-body h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 16px; line-height: 1.65; font-weight: 650; margin-top: 8px; min-height: 3.3em; }
.pet-seller { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; margin-top: 8px; }
.pet-bottom { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.pet-bottom strong { color: var(--accent); font-size: 19px; font-weight: 700; }
.pet-bottom > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--accent); background: #f8f1ea; }
.pet-bottom svg { width: 16px; height: 16px; }
.active-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 8px 16px; font-size: 14px; margin-bottom: 20px; }
.active-filters span { overflow-wrap: anywhere; min-width: 0; }
.active-filters a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.pagination-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 28px; }
.pagination-row > p { color: var(--muted); font-size: 13px; }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font-size: 14px; }
.pagination span { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination a:hover { background: var(--soft); }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.empty-state > svg { width: 48px; height: 48px; color: var(--accent); margin-bottom: 16px; }
.empty-state h3 { font-size: 21px; }
.empty-state p { margin: 8px 0 24px; color: var(--muted); }
.site-footer { background: #f3eee8; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 32px; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; }
.footer-brand span { font-size: 12px; color: var(--muted); font-weight: 500; }
.footer-inner p { margin-top: 8px; font-size: 12px; color: var(--muted); }
.footer-inner > a { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 13px; white-space: nowrap; }
@media (max-width: 1023px) {
    .header-inner, .page-wrap, .footer-inner { width: calc(100% - 48px); }
    .hero-copy { padding: 32px; }
    .teddy-hero { min-height: 340px; }
    .pet-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .search-form { grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; }
    .search-form .button { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .header-inner, .page-wrap, .footer-inner { width: calc(100% - 32px); }
    .header-inner { min-height: 76px; gap: 12px; }
    .brand { gap: 8px; font-size: 19px; }
    .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
    .brand-mark svg { width: 26px; height: 26px; }
    .brand small { font-size: 10px; margin-top: 2px; }
    .header-nav { gap: 0; font-size: 12px; }
    .header-nav .nav-current { display: none; }
    .header-nav a { gap: 4px; }
    .header-nav svg { width: 16px; height: 16px; }
    .page-wrap { padding-top: 20px; padding-bottom: 40px; }
    .teddy-hero { grid-template-columns: 1fr; border-radius: 20px; }
    .hero-copy { padding: 28px 28px 24px; }
    .hero-copy .eyebrow { font-size: 11px; }
    h1 { font-size: 36px; line-height: 1.3; margin-top: 12px; }
    .hero-description { font-size: 14px; margin-top: 12px; }
    .hero-copy .button { margin-top: 18px; }
    .hero-photo { height: 240px; }
    .hero-photo img { object-fit: contain; background: #f1e3d2; }
    .hero-photo figcaption { right: 10px; bottom: 8px; font-size: 10px; }
    .search-panel { margin-top: 20px; padding: 20px; border-radius: 16px; }
    .search-heading { display: block; margin-bottom: 16px; }
    .search-heading h2 { font-size: 17px; }
    .search-heading p { margin-top: 4px; font-size: 12px; }
    .search-form { grid-template-columns: 1fr 1fr; gap: 12px; }
    .keyword-field { grid-column: 1 / -1; grid-row: 1; }
    .search-field input, .search-field select { font-size: 16px; }
    .listing-section { margin-top: 32px; }
    .section-heading { gap: 8px; margin-bottom: 16px; }
    .section-heading h2 { gap: 8px; font-size: 23px; }
    .section-heading .eyebrow { font-size: 10px; letter-spacing: .04em; }
    .section-note { font-size: 11px; }
    .count-pill { padding-inline: 8px; font-size: 11px; }
    .publish-link { padding-inline: 9px; gap: 2px; font-size: 12px; }
    .publish-link svg { width: 16px; height: 16px; }
    .pet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pet-card { border-radius: 12px; }
    .pet-body { padding: 12px; }
    .pet-body h3 { font-size: 15px; line-height: 1.6; min-height: 3.2em; }
    .pet-seller { font-size: 11px; }
    .pet-bottom { margin-top: 12px; padding-top: 10px; }
    .pet-bottom strong { font-size: 16px; }
    .pet-bottom > span { width: 24px; height: 24px; }
    .seller-badge { left: 8px; top: 8px; font-size: 10px; padding: 3px 7px; }
    .pagination-row { flex-direction: column; align-items: center; padding-top: 24px; }
    .footer-inner { display: block; padding-block: 24px; }
    .footer-inner > a { margin-top: 12px; }
}
@media (max-width: 359px) {
    h1 { font-size: 31px; }
    .hero-copy { padding-inline: 20px; }
    .pet-grid { grid-template-columns: 1fr; }
    .pet-body h3 { font-size: 16px; }
    .pet-bottom strong { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    a, button { transition: none !important; }
}
