@import url("/petgopia/theme.css");

:root {
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", sans-serif;
  scrollbar-width: thin;
  scrollbar-color: var(--control-line) transparent;
}
:root:lang(th) { font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif; line-height: 1.6; }
:root:lang(zh) { font-family: "Noto Sans CJK SC", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif; line-height: 1.6; }
:lang(th) :is(h1, h2, h3, h4) { letter-spacing: normal; }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 35rem 24rem at 92% 5rem, var(--page-wash), transparent),
    radial-gradient(ellipse 32rem 22rem at 10% 30rem, var(--page-blush), transparent),
    linear-gradient(180deg, var(--surface-warm) 0, var(--canvas) 47rem);
}
[hidden] { display: none !important; }
html:has(#detail[open]) { overflow: hidden; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.g-top { background: var(--paper); border-bottom: 1px solid var(--line); }
.g-top-inner { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 70px; padding: .65rem 1rem; max-width: 1040px; margin: auto; }
.g-brand { display: flex; align-items: center; gap: .4rem; min-height: 44px; color: var(--emergency); text-decoration: none; font-family: system-ui, sans-serif; font-size: 1.36rem; font-weight: 800; letter-spacing: -.055em; white-space: nowrap; }
.g-brand-mark { flex: none; width: 38px; height: 38px; }
.g-brand-emblem { display: block; width: 100%; height: 100%; }
.g-brand-word { direction: ltr; line-height: 1.2; }
.g-brand-i {
  position: relative;
  display: inline-block;
  inline-size: .245em;
  block-size: .54em;
  margin-inline-end: -.025em;
}
.g-brand-i::before {
  content: "";
  position: absolute;
  inset: 0;
  inline-size: .145em;
  margin-inline: auto;
  background: currentColor;
}
.g-brand-plus {
  position: absolute;
  inset-block-end: calc(100% + .085em);
  inset-inline-start: 50%;
  inline-size: .30em;
  block-size: .30em;
  margin-inline-start: -.15em;
  transform-origin: center;
  background: #3d637b;
  clip-path: polygon(37.5% 0%,62.5% 0%,66.667% 33.333%,91.667% 37.5%,91.667% 62.5%,66.667% 66.667%,62.5% 91.667%,37.5% 91.667%,33.333% 66.667%,8.333% 62.5%,8.333% 37.5%,33.333% 33.333%);
  pointer-events: none;
}
@media (forced-colors: active) {
  .g-brand-i::before, .g-brand-plus { forced-color-adjust: none; background: CanvasText; }
}
.g-top-actions { display: flex; gap: .38rem; align-items: center; }
.g-emergency { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .55rem; background: var(--rose); border-color: var(--emergency-line); color: var(--emergency); font-size: .87rem; font-weight: 750; white-space: nowrap; }
.g-emergency .icon { width: .97rem; height: .97rem; }
.g-emergency:is(:hover,:active) { background: var(--rose-hover); border-color: var(--emergency); }
.g-language { font-size: .83rem; padding: .4rem .52rem; background: transparent; }
.g-language-switch {
  display: inline-flex;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}
.g-language-switch button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: .75rem;
  background: transparent;
  color: var(--ink);
  font-size: .88rem;
  font-weight: 750;
  line-height: 1;
}
.g-language-switch button:is(:hover,:active) { background: var(--mint); }
.g-language-switch button[aria-pressed="true"] { background: var(--action); border-color: var(--control-line); color: var(--ink); }
.g-language-switch button[aria-pressed="true"]:is(:hover,:active) { background: var(--action-hover); }
.g-language-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; position: relative; }
main { max-width: 1040px; padding: 1rem 1rem 2.5rem; }
.g-emergency-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-column: 1 / -1;
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 64px;
  margin: 0 0 .65rem;
  padding: .55rem .75rem;
  color: var(--emergency);
  background: var(--rose);
  border: 1px solid var(--emergency-line);
  border-radius: 1rem;
  text-align: start;
  box-shadow: 0 4px 10px #772b431a;
}
.g-emergency-strip:is(:hover,:active) { background: var(--rose-hover); border-color: var(--emergency); }
.g-emergency-strip { text-decoration: none; }
.g-emergency-strip:focus-visible { outline: 2px solid var(--emergency); outline-offset: 3px; }
.g-emergency-strip-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .65rem;
  color: var(--emergency);
  background: var(--paper);
}
.g-emergency-strip-copy :is(strong, small) { display: block; }
.g-emergency-strip-copy strong { font-size: 1.05rem; line-height: 1.3; }
.g-emergency-strip-copy small { color: inherit; font-size: .83rem; }
.g-emergency-strip-arrow { justify-self: end; }
.g-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 38%);
  align-items: center;
  container-type: inline-size;
  gap: .6rem;
  padding: 1.05rem;
  min-height: 194px;
  background:
    radial-gradient(ellipse at 95% 23%, var(--peach) 0, transparent 60%),
    linear-gradient(128deg, var(--surface-cool) 12%, var(--mint) 100%);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: var(--surface-shadow);
}
.g-hero-copy { min-width: 0; }
.g-area { display: flex; align-items: center; gap: .35rem; margin: 0 0 .65rem; color: var(--accent); font-size: .81rem; font-weight: 700; }
.g-area .icon { width: .95rem; height: .95rem; }
.g-hero h1 { font-size: clamp(1.65rem,10cqi,3.25rem); font-weight: 800; line-height: 1.19; white-space: pre-line; }
.g-intro { max-width: 26rem; margin: .52rem 0 0; color: var(--subtle); font-size: .94rem; line-height: 1.55; }
.g-pets { display: block; width: 100%; max-width: 235px; height: auto; align-self: end; justify-self: center; }
.g-search-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 1.35rem; margin-top: .8rem; padding: .9rem; box-shadow: var(--surface-shadow); }
#search { display: grid; grid-template-columns: minmax(0,1fr); gap: .36rem; }
#search label, #symptom-form label { font-size: .9rem; font-weight: 700; }
.g-owner-observations {
  min-inline-size: 0;
  margin: .2rem 0 .4rem;
  padding: .3rem .55rem .55rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface-cool);
}
.g-owner-observations legend { padding-inline: .3rem; font-size: .9rem; font-weight: 750; }
.g-owner-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .34rem; }
.g-owner-options label {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  padding: .28rem .35rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper);
  cursor: pointer;
}
.g-owner-options label:has(input:checked) { border-color: var(--control-line); background: var(--action); }
.g-owner-options label:is(:hover,:active) { border-color: var(--control-line); background: var(--mint); }
.g-owner-options label:focus-within { outline: 2px solid var(--focus); }
.g-owner-options input { flex: none; width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.g-owner-options span { min-inline-size: 0; overflow-wrap: anywhere; }
.g-field { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; background: var(--surface-cool); border: 1px solid var(--control-line); border-radius: .77rem; padding: 0 .68rem; margin-bottom: .24rem; color: var(--accent); }
.g-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.g-select { grid-template-columns: auto minmax(0,1fr) auto; }
#search .g-field :is(input,select) { width: 100%; height: 44px; background: transparent; border: 0; outline: 0; color: var(--ink); min-width: 0; padding: 0 .5rem; font: inherit; }
#search input::placeholder { color: var(--subtle); opacity: 1; }
#search select { appearance: none; }
.g-search-button, .g-path-body .primary { min-height: 48px; background: var(--action); color: var(--ink); border: 1px solid var(--control-line); font-weight: 750; }
.g-search-button:is(:hover,:active), .g-path-body .primary:is(:hover,:active) { background: var(--action-hover); }
.g-search-button { display: flex; justify-content: center; align-items: center; gap: .5rem; margin-top: .19rem; }
.g-home-shortcuts {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .42rem;
  margin-top: .54rem;
}
.g-home-shortcuts a {
  --shortcut-color: #6b344a;
  --shortcut-surface: #f9d9e3;
  --shortcut-edge: #d79eaf;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .33rem;
  min-height: 50px;
  padding: .22rem .36rem;
  border: 1px solid var(--shortcut-edge);
  border-radius: .75rem;
  background: var(--shortcut-surface);
  color: var(--shortcut-color);
  box-shadow: 0 .14rem .25rem #3b384113;
  font-size: .88rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}
.g-home-shortcuts a + a {
  --shortcut-color: #225677;
  --shortcut-surface: #d9edf9;
  --shortcut-edge: #86b4d2;
}
.g-home-shortcuts .shortcut-icon { flex: 0 0 2.15rem; width: 2.15rem; height: 2.15rem; overflow: visible; }
.g-home-shortcuts a:is(:hover,:focus-visible) {
  border-color: var(--shortcut-color);
  text-decoration: underline;
}
.g-home-shortcuts a:focus-visible { outline: 2px solid var(--shortcut-color); outline-offset: 1px; }
body[data-screen="results"] .g-home-shortcuts { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .g-home-shortcuts a { transition: box-shadow .18s ease, border-color .18s ease; }
  .g-home-shortcuts a:is(:hover,:focus-visible) { box-shadow: 0 .22rem .48rem #35536728; }
  .g-home-shortcuts a:active { box-shadow: none; }
  .picks-basket {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: petgopia-basket-hop 3.8s .15s ease-in-out infinite;
  }
  .knowledge-page {
    transform-box: fill-box;
    transform-origin: left center;
    animation: petgopia-page-turn 3.8s 1.1s ease-in-out infinite;
  }
  :is(.picks-spark, .knowledge-spark) {
    transform-box: fill-box;
    transform-origin: center;
    animation: petgopia-shortcut-sparkle 3.8s .15s ease-in-out infinite;
  }
  .knowledge-spark { animation-delay: 1.1s; }
}
@keyframes petgopia-basket-hop {
  0%, 35%, 100% { transform: translateY(0) rotate(0); }
  10% { transform: translateY(-5px) rotate(-12deg); }
  21% { transform: translateY(-2px) rotate(9deg); }
  29% { transform: translateY(0) rotate(-3deg); }
}
@keyframes petgopia-page-turn {
  0%, 36%, 100% { transform: rotate(0) scaleX(1); }
  13% { transform: rotate(-9deg) scaleX(.23); }
  24% { transform: rotate(3deg) scaleX(1.07); }
}
@keyframes petgopia-shortcut-sparkle {
  0%, 35%, 100% { transform: scale(1); opacity: .68; }
  13% { transform: scale(1.26) rotate(14deg); opacity: 1; }
}
.g-care { display: grid; gap: .6rem; margin: .85rem 0 0; }
.g-knowledge-callout { display:grid; grid-template-columns:auto minmax(0,1fr); gap:.76rem; align-items:center; padding:.7rem .8rem; border:1px solid #e7d1bb; border-radius:1.1rem; background:linear-gradient(120deg,var(--surface-warm),var(--paper)); text-decoration:none; }
.g-knowledge-callout:is(:hover,:active) { border-color:#a87943; }
.g-knowledge-callout strong, .g-knowledge-callout small { display:block; }
.g-knowledge-callout small { color:var(--subtle); font-size:.86rem; }
.g-transport-entry {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.65rem;
  min-height:44px;
  padding:.55rem .8rem;
  border:1px solid var(--line);
  border-radius:.85rem;
  background:var(--surface-cool);
  color:var(--accent);
  font-weight:750;
  text-decoration:none;
}
.g-transport-entry:is(:hover,:active) { background:var(--mint); border-color:var(--control-line); }
.g-knowledge-beacon { display:grid; place-items:center; width:40px; height:40px; border-radius:.78rem; background:#f8e9cc; color:#7f4c18; }
.g-knowledge-beacon .icon { width:1.4rem; height:1.4rem; transform-origin:50% 80%; }
.g-knowledge-lamp { fill:#f3d8a0; }
@media (prefers-reduced-motion: no-preference) {
  .g-brand-plus {
    transform: rotate(-360deg);
    animation: brand-plus-turn 3.2s cubic-bezier(.32,.18,.68,.82);
  }
  body[data-screen="home"] .g-emergency-strip-icon .icon { animation: emergency-phone-ring 11s ease-in-out 1s infinite; }
  body[data-screen="home"] :is(.g-area .icon, .g-search-button .icon, .g-path-icon .icon, .g-pets) {
    animation: home-icon-lift 10s ease-in-out 1.2s infinite;
  }
  body[data-screen="home"] .g-search-button .icon { animation-delay: 2.6s; }
  body[data-screen="home"] .g-path-icon .icon { animation-delay: 4s; }
  body[data-screen="home"] .g-referral .g-path-icon .icon { animation-delay: 5.4s; }
  body[data-screen="home"] .g-pets { animation-delay: 6.8s; }
  body[data-screen=home] .g-knowledge-beacon { --beacon-cycle:8s; }
  body[data-screen=home] .g-knowledge-beacon .icon { animation: knowledge-beacon-sway var(--beacon-cycle) ease-in-out infinite; }
  body[data-screen=home] .g-knowledge-rays { animation: knowledge-beacon var(--beacon-cycle) ease-in-out infinite; }
  body[data-screen=home] .g-knowledge-lamp { animation: knowledge-lamp var(--beacon-cycle) ease-in-out infinite; }
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  a.g-brand:is(:hover,:focus-visible) .g-brand-plus {
    transform: rotate(-720deg);
    transition: transform 3.2s cubic-bezier(.32,.18,.68,.82);
  }
}
@keyframes brand-plus-turn {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}
@keyframes emergency-phone-ring {
  0%, 14%, 100% { transform: rotate(0); }
  4% { transform: rotate(-12deg); }
  9% { transform: rotate(9deg); }
}
@keyframes home-icon-lift {
  0%, 17%, 100% { transform: translateY(0); }
  8% { transform: translateY(-3px); }
}
@keyframes knowledge-beacon-sway {
  0%, 15%, 100% { transform:rotate(0deg); }
  5% { transform:rotate(-12deg); }
  10% { transform:rotate(12deg); }
}
@keyframes knowledge-beacon {
  0%, 15%, 100% { opacity:.7; }
  7.5% { opacity:1; filter:drop-shadow(0 0 2px #b17c32); }
}
@keyframes knowledge-lamp {
  0%, 15%, 100% { fill:#f3d8a0; }
  7.5% { fill:#f6d699; filter:drop-shadow(0 0 2px #b17c32); }
}
.g-intake-link { display:flex; flex-wrap:wrap; gap:.45rem 1rem; grid-column:1/-1; margin-top:1rem; font-size:.9rem; color:var(--accent); }
.g-path { background: var(--paper); border: 1px solid var(--line); border-radius: 1.1rem; overflow: hidden; }
.g-path summary, .g-filters summary { list-style: none; cursor: pointer; }
.g-path summary::-webkit-details-marker, .g-filters summary::-webkit-details-marker { display: none; }
.g-path summary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .76rem; padding: .7rem .8rem; }
.g-path summary strong, .g-path summary small { display: block; }
.g-path summary small { margin-top: .1rem; color: var(--subtle); font-size: .86rem; }
.g-path-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: var(--peach); border-radius: .78rem; }
.g-referral .g-path-icon { background: var(--mint); }
details[open] > summary .g-chevron { transform: rotate(180deg); }
.g-path-body { display: grid; gap: .55rem; padding: 0 .8rem .82rem; margin-top: .1rem; }
.g-path-body :is(p,textarea) { margin: 0; }
.g-path-body textarea { width: 100%; resize: vertical; font: inherit; border: 1px solid var(--control-line); border-radius: .65rem; padding: .55rem; background: var(--surface-cool); color: var(--ink); }
.g-path-body p { color: var(--subtle); font-size: .88rem; }
.g-observations { display: flex; flex-wrap: wrap; gap: .4rem; }
.g-observations button, .g-referral-options button { font-size: .88rem; text-align: left; }
.g-back, .g-detail-top button { min-height: 44px; padding: .34rem .1rem; color: var(--accent); font-weight: 700; background: none; border: 0; font-size: .9rem; text-align: left; }
.g-results-head {
  margin-bottom: .68rem;
  padding: .56rem clamp(.72rem, 2vw, 1.25rem) .68rem;
  background: linear-gradient(114deg, var(--paper), var(--surface-cool));
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  box-shadow: var(--surface-shadow);
}
body[data-urgent="true"] .g-results-head { border-color: var(--emergency-line); background: linear-gradient(114deg, var(--paper), var(--rose)); }
.g-results-head h1 { font-size: clamp(1.85rem,6.8vw,2.85rem); font-weight: 800; line-height: 1.24; margin: .08rem 0 .24rem; }
.g-results-head p { margin: 0; color: var(--subtle); }
#summary { font-size: .88rem; }
#result-context:not(:empty) { margin: .27rem 0; font-weight: 700; overflow-wrap: anywhere; }
.g-result-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .8rem 0 0; }
.g-switch { display: flex; padding: 3px; border: 1px solid var(--line); background: var(--surface-cool); border-radius: .9rem; }
.g-switch button, .g-edit { display: inline-flex; gap: .31rem; align-items: center; justify-content: center; font-size: .87rem; padding: .32rem .56rem; white-space: nowrap; font-weight: 700; }
.g-switch button { background: transparent; border: 1px solid transparent; min-width: 76px; }
.g-switch button:is(:hover,:active) { background: var(--mint); }
.g-switch button[aria-pressed="true"] { background: var(--action); border-color: var(--control-line); color: var(--ink); }
.g-switch button[aria-pressed="true"]:is(:hover,:active) { background: var(--action-hover); }
.g-edit { background: var(--paper); }
.g-switch .icon, .g-edit .icon { width: 1rem; height: 1rem; }
.g-filters { background: var(--paper); border: 1px solid var(--line); border-radius: .82rem; margin-bottom: .7rem; }
.g-filters summary { display: flex; align-items: center; gap: .45rem; min-height: 43px; padding: .35rem .7rem; font-size: .89rem; font-weight: 700; }
.g-filters summary .icon { width: 1rem; height: 1rem; }
.g-filters .g-chevron { margin-left: auto; }
.g-filters :is(#filters,.quick-filters,.g-location) { padding: .25rem .7rem .65rem; margin: 0; }
.g-filters .filter[data-key="exotic"], .g-exotic-filter label { display: inline-flex; align-items: center; gap: .35rem; }
.g-exotic-filter { display: grid; gap: .3rem; padding: .25rem .7rem .65rem; }
.g-exotic-filter label { font-size: .9rem; font-weight: 700; }
.g-exotic-filter select {
  width: 100%;
  min-height: 44px;
  padding: .4rem .65rem;
  color: var(--ink);
  background: var(--surface-cool);
  border: 1px solid var(--control-line);
  border-radius: .65rem;
  font: inherit;
}
.g-exotic-filter small, .g-exotic-hint { color: var(--subtle); font-size: .86rem; }
.g-exotic-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .13rem .42rem;
  color: var(--lilac-ink);
  background: var(--lilac);
  border: 1px solid #c9b7d5;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}
.g-exotic-badge .icon, .g-exotic-filter .icon, .g-filters .filter[data-key="exotic"] .icon {
  width: 1rem;
  height: 1rem;
}
.g-pin-exotic {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.g-pin-exotic .g-exotic-badge { padding: .1rem .28rem; font-size: .65rem; gap: .16rem; }
.g-pin-exotic .icon { width: .8rem; height: .8rem; }
.g-exotic-legend { flex-basis: 100%; gap: .4rem; }
.g-exotic-legend .g-exotic-badge { flex: none; }
.g-location p { margin: .35rem 0 0; font-size: .85rem; color: var(--subtle); }
body[data-screen="results"] .g-search-panel { margin: 0 0 .75rem; }
.g-notice, .g-path-notice { background: var(--mint); border: 1px solid var(--line); color: var(--ink); padding: .69rem .8rem; border-radius: .88rem; margin: 0 0 .68rem; font-size: .92rem; }
.g-path-notice p { margin: .16rem 0 0; }
.g-path-notice button { margin-top: .55rem; }
.g-related-articles { background: var(--paper); }
.g-related-articles-heading { display: flex; align-items: center; justify-content: space-between; gap: .65rem; }
.g-related-articles-heading button { flex: 0 0 auto; min-height: 2.5rem; }
.g-related-articles p { margin: 0 0 .35rem; color: var(--subtle); font-size: .88em; }
.g-related-articles ul { display: grid; gap: .3rem; margin: .18rem 0 .12rem; padding-inline-start: 1.15rem; }
.g-related-articles a { color: var(--accent); text-underline-offset: .19em; }
body[data-urgent="true"] .g-path-notice { background: var(--rose); border-color: var(--emergency-line); }
body[data-urgent="true"] .g-path-notice strong { color: var(--emergency); }
.g-card-list #results { display: grid; gap: .65rem; }
.g-card-list .result { padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 1.08rem; box-shadow: 0 4px 15px #213d3110; }
.g-card-list .result h3 { font-size: 1.09rem; line-height: 1.35; overflow-wrap: anywhere; }
.g-card-list .result.selected { background: var(--surface-cool); border-color: var(--control-line); }
.g-card-list .match-reason { display: flex; align-items: flex-start; gap: .27rem; color: var(--accent); font-size: .91rem; font-weight: 680; margin: .45rem 0 .36rem; }
.g-card-list .match-reason .icon, .result-area .icon { width: 1.05rem; height: 1.05rem; margin-top: .05rem; }
.g-card-list .result-area { display: flex; gap: .29rem; align-items: center; color: var(--subtle); margin-bottom: .58rem; }
.g-card-list .rate-line { margin-bottom: .62rem; }
.g-card-list .result-actions { margin-top: .66rem; }
.contact-action .icon { width: 1rem; height: 1rem; margin-right: .32rem; }
.g-results .call-action, .g-detail-hero .call-action { background: var(--action); color: var(--ink); border-color: var(--control-line); }
.g-results .call-action:is(:hover,:active), .g-detail-hero .call-action:is(:hover,:active) { background: var(--action-hover); }
body[data-urgent="true"] :is(.g-results, .g-detail-hero) .call-action { background: var(--rose); border-color: var(--emergency-line); color: var(--emergency); }
body[data-urgent="true"] :is(.g-results, .g-detail-hero) .call-action:is(:hover,:active) { background: var(--rose-hover); border-color: var(--emergency); }
.result .result-actions .g-details { border: 0; background: transparent; padding-inline: .33rem; text-decoration: underline; }
.g-map { position: static; background: var(--paper); margin-bottom: 1rem; }
.g-map .map-body { height: clamp(340px,58vh,580px); }
.g-map .panel-heading { background: var(--mint); }
#detail { padding: 0; width: min(570px,100% - 2rem); max-height: min(92dvh,840px); background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 1.35rem; scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }
.g-detail-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .42rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.g-detail-top .g-detail-brand { font-size: 1.13rem; }
.g-detail-brand .g-brand-mark { width: 28px; height: 28px; }
#detail-body { padding: .85rem 1rem 1.35rem; }
.g-detail-hero { background: linear-gradient(120deg, var(--mint), var(--surface-cool)); border: 1px solid var(--line); padding: .92rem; border-radius: 1.15rem; box-shadow: var(--surface-shadow); }
.g-detail-hero h2 { margin: .15rem 0 .45rem; font-size: clamp(1.5rem,6vw,2rem); overflow-wrap: anywhere; }
.g-detail-hero p { margin: .28rem 0; color: var(--subtle); }
.detail-actions { margin: .65rem 0 .12rem; }
.g-detail-section, #detail-body .clinic-scope { padding: .8rem .92rem; margin-top: .6rem; background: var(--paper); border: 1px solid var(--line); border-radius: .9rem; }
.g-detail-section h3, #detail-body .clinic-scope h3 { display: flex; align-items: center; gap: .37rem; margin: 0; font-size: 1rem; }
.g-detail-section h3 .icon { width: 1.08rem; height: 1.08rem; }
.g-detail-section p { margin: .26rem 0 0; }
.g-detail-section small, .clinic-scope small { display: block; margin-top: .3rem; font-size: .86rem; color: var(--subtle); }
.g-exotic-detail h4 { margin: .7rem 0 .25rem; color: var(--ink); }
.g-exotic-species { list-style: none; margin: 0; padding: 0; }
.g-exotic-species li { padding: .42rem 0; border-bottom: 1px solid var(--line); }
.g-exotic-species li:last-child { border-bottom: 0; }
.g-exotic-species li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; }
.clinic-scope ul { padding: 0; list-style: none; margin: .55rem 0 0; }
.clinic-scope li + li { margin-top: .64rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.g-evidence-status { display: block; font-weight: 650; color: var(--subtle); font-size: .86rem; }
#detail-body a:not(.contact-action) { color: var(--accent); text-underline-offset: .14em; }
@media (max-width: 560px) {
  #detail { margin: 0; width: 100%; height: 100dvh; max-height: 100dvh; max-width: 100%; border: 0; border-radius: 0; }
}
@media (max-width: 355px) {
  .g-top-inner, main { padding-inline: .7rem; }
  .g-brand { font-size: 1.2rem; }
  .g-brand-mark { width: 32px; height: 32px; }
}
@media (max-width: 699px) {
  .g-top-inner { flex-wrap: wrap; }
  .g-top-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; margin-inline-start: auto; }
  body[data-screen="home"] main { padding-top: .7rem; }
  body[data-screen="home"] .g-top-inner { min-height: 58px; padding-block: .35rem; }

  .g-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 36%);
    align-items: start;
    gap: .55rem;
    padding: .57rem .78rem .55rem;
    min-height: 0;
    border-radius: 1.3rem;
  }
  .g-hero-copy { padding-block-start: .36rem; }
  .g-hero h1 { font-size: clamp(1.62rem, 8.6cqi, 2.45rem); }
  .g-area { margin-bottom: .3rem; }
  .g-intro { margin-top: .3rem; font-size: .9rem; line-height: 1.45; }
  .g-pets { align-self: center; min-width: 0; }

  body[data-screen="home"] .g-search-panel { margin-top: .55rem; padding: .7rem .8rem .45rem; }
  .g-care { gap: .45rem; margin-top: .65rem; }
  :is(.g-path summary, .g-knowledge-callout) { gap: .58rem; padding: .57rem .7rem; }
  .g-path summary:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }
}
@media (min-width: 700px) {
  body[data-screen="home"] main { display: grid; grid-template-columns: 1.12fr 1fr; gap: 1rem; padding-top: 1.7rem; }
  .g-emergency-strip { margin: 0; }
  .g-hero { grid-row: span 2; grid-template-columns: minmax(0, 1fr) minmax(0, 40%); padding: 1.5rem; min-height: 330px; }
  .g-pets { align-self: center; }
  .g-search-panel, .g-care { margin: 0; }
  .g-card-list #results { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .g-card-list :is(.empty,.more) { grid-column: 1 / -1; }
}


.g-hero-visual { display: grid; justify-items: center; align-self: start; gap: .24rem; min-width: 0; }
.g-hero-visual > .g-pets { width: min(100%, 12rem); }
.gn-open {
  display: grid;
  justify-items: center;
  gap: .38rem;
  max-width: 100%;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: .8rem;
  background: transparent;
  color: #2b5671;
  text-align: center;
  font-size: .8rem;
  font-weight: 750;
  line-height: 1.25;
}
.gn-open:is(:hover,:active) { background: transparent; text-decoration: underline; }
.gn-open:focus-visible { outline: 2px solid #2b5671; outline-offset: .25rem; }
.gn-circle {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: clamp(5.9rem, 24cqi, 7.65rem);
  max-width: 100%;
  aspect-ratio: 1;
  padding: .39rem;
  border: 1px solid #7aa6c2;
  border-radius: 50%;
  background: conic-gradient(#a0cbdf, #eef9ff, #9ec5df, #e4f3fa, #a0cbdf);
  box-shadow: 0 0 0 2px #e2f2fb, 0 .4rem .95rem -.38rem #345b7963;
}
.gn-circle canvas { display: block; width: 100%; height: 100%; border: 1px solid #f0f9ff; border-radius: 50%; background: var(--mint); }
.gn-preview-placeholder { position: absolute; color: var(--accent); }
.gn-open[data-preview="ready"] .gn-preview-placeholder { display: none; }
.gn-expand {
  position: absolute;
  z-index: 1;
  inset: auto -.13rem .05rem auto;
  display: grid;
  place-items: center;
  width: 1.87rem;
  aspect-ratio: 1;
  border: 2px solid #f0faff;
  border-radius: 50%;
  background: #285976;
  color: #fff;
  box-shadow: 0 .12rem .25rem #345b7963;
}
.gn-expand .icon { width: 1rem; height: 1rem; }
@media (max-width: 699px) {
  .g-hero-visual { gap: .1rem; margin-block-start: -.64rem; }
  .g-hero-visual > .g-pets { width: min(100%, 3.3rem); }
  .gn-circle { width: clamp(4.7rem, 25vw, 6.65rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .gn-expand { transition: translate .18s ease; }
  .gn-open:is(:hover,:focus-visible) .gn-expand { translate: .07rem -.08rem; }
}

html:has(#gn-dialog[open]) { overflow: hidden; }
#gn-dialog {
  box-sizing: border-box; inset: 0; width: 100%; height: 100%; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0; overflow: auto;
  overscroll-behavior: contain; border: 0; border-radius: 0; background: var(--canvas);
}
.gn-header {
  display: flex; justify-content: space-between; align-items: center; gap: .65rem;
  padding: max(.6rem, env(safe-area-inset-top)) max(.85rem, env(safe-area-inset-right)) .6rem max(.85rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.gn-header h2 { margin: 0; font-size: clamp(1.08rem, 3.1vw, 1.65rem); overflow-wrap: anywhere; }
.gn-content { max-width: 88rem; margin: auto; padding: .6rem max(.65rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left)); }
.gn-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .34rem .45rem; margin-bottom: .5rem; }
.gn-area-control { display: grid; gap: .25rem; min-width: 0; }
.gn-tools label { font-size: .9rem; font-weight: 720; }
.gn-tools select { min-width: 0; width: 100%; margin: 0; padding: .4rem .55rem; border: 1px solid var(--control-line); border-radius: .8rem; background: var(--paper); color: var(--ink); font: inherit; }
.gn-tools :is(select,button), .gn-header button { min-height: 44px; }
.gn-tools button, .gn-header button { margin: 0; }
#gn-location-slot, #gn-location-slot .g-location { display: contents; }
#gn-location-slot #locate { grid-column: 2; grid-row: 1; font-weight: 700; }
#gn-location-slot #location-note { grid-column: 1 / -1; margin: 0; }
#gn-show-list { grid-column: 1 / -1; justify-self: start; font-weight: 650; }
#gn-dialog .g-map .panel-heading { display: none; }
#gn-dialog .map-body { height: max(22rem, calc(100dvh - 16rem)); }
#gn-dialog .map-controls { inset: .55rem .55rem auto auto; }
#gn-dialog :is(.map-controls button,#gn-close) { min-width: 44px; min-height: 44px; }
.gn-thumb-credit { color: var(--subtle); font-size: .62rem; }
