:root {
  --orange: #ff6b45;
  --orange-dark: #ed5834;
  --orange-soft: #fff0ea;
  --cream: #fffaf4;
  --ink: #242321;
  --muted: #7a7772;
  --line: #eee8e1;
  --white: #ffffff;
  --green: #4f9e7b;
  --green-soft: #e8f5ef;
  --yellow: #f6c759;
  --yellow-soft: #fff7dc;
  --blue: #5b82c4;
  --blue-soft: #edf3fd;
  --shadow: 0 14px 40px rgba(66, 45, 33, .08);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: #eee8e1;
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  width: min(100%, 520px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: clip;
  background: var(--cream);
  box-shadow: 0 0 70px rgba(53, 40, 31, .12);
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
img { max-width: 100%; }

.app-shell { min-height: 100dvh; }
.main-shell { min-height: 100dvh; padding-bottom: 92px; }
.content { width: calc(100% - 32px); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 250, 244, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(238, 232, 225, .75);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--orange);
  color: white;
  transform: rotate(-4deg);
  box-shadow: 0 8px 18px rgba(255, 107, 69, .25);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text strong { display: block; font-size: 16px; line-height: 1.1; }
.brand-text small { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
}
.icon-btn svg { width: 21px; height: 21px; }
.notification-dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border: 2px solid white; border-radius: 50%; background: var(--orange); }

.page-head { padding: 28px 0 20px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 5px; color: var(--orange-dark); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(28px, 6vw, 40px); line-height: 1.2; letter-spacing: -.03em; }
h2 { margin-bottom: 14px; font-size: 22px; line-height: 1.3; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; font-size: 17px; }
.subtitle, .muted { color: var(--muted); }
.subtitle { margin: 0; font-size: 14px; line-height: 1.65; }

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ff7955, #ff5d39);
  color: white;
  box-shadow: 0 18px 40px rgba(244, 88, 48, .22);
}
.hero-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -48px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: 92px; bottom: -115px; border-radius: 50%; border: 32px solid rgba(255,255,255,.08); }
.hero-copy { position: relative; z-index: 2; width: 62%; }
.hero-copy .tag { margin-bottom: 30px; background: rgba(255,255,255,.18); color: white; }
.hero-copy h1 { font-size: clamp(29px, 6vw, 43px); }
.hero-copy p { margin: 10px 0 22px; color: rgba(255,255,255,.85); }
.hero-pets { position: absolute; right: 4%; bottom: -8px; z-index: 1; width: 37%; min-width: 150px; }
.hero-pets svg { display: block; width: 100%; height: auto; }

.grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.stat-card, .card {
  border: 1px solid rgba(238, 232, 225, .85);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.stat-card { padding: 18px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; }
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon.orange { color: var(--orange); background: var(--orange-soft); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-number { display: block; font-size: 26px; font-weight: 800; line-height: 1; }
.stat-label { margin-top: 7px; color: var(--muted); font-size: 12px; }

.section { margin-top: 32px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.text-btn { padding: 4px 0; border: 0; background: transparent; color: var(--orange-dark); font-weight: 700; }

.pet-scroll, .activity-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 78%); gap: 14px; overflow-x: auto; padding: 2px 2px 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.pet-scroll::-webkit-scrollbar, .activity-scroll::-webkit-scrollbar { display: none; }
.pet-card { position: relative; padding: 18px; overflow: hidden; scroll-snap-align: start; }
.pet-card-main { display: flex; align-items: center; gap: 15px; }
.avatar { flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; width: 68px; height: 68px; border-radius: 22px; background: var(--yellow-soft); font-size: 38px; }
.avatar.large { width: 96px; height: 96px; border-radius: 30px; font-size: 54px; }
.pet-card h3 { margin-bottom: 4px; font-size: 19px; }
.pet-meta { color: var(--muted); font-size: 13px; }
.pet-status { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 6px 10px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); font-size: 11px; font-weight: 700; }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.yellow { background: var(--yellow-soft); color: #a9780c; }
.tag.blue { background: var(--blue-soft); color: var(--blue); }

.reminder-list { display: grid; gap: 10px; }
.reminder-item { display: flex; align-items: center; gap: 14px; padding: 15px; border-radius: 19px; background: white; border: 1px solid var(--line); }
.date-badge { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 52px; border-radius: 15px; background: var(--orange-soft); color: var(--orange-dark); }
.date-badge strong { font-size: 19px; line-height: 1; }
.date-badge small { margin-top: 3px; font-size: 10px; }
.reminder-body { min-width: 0; flex: 1; }
.reminder-body strong { display: block; margin-bottom: 3px; font-size: 14px; }
.reminder-body span { color: var(--muted); font-size: 12px; }
.chevron { color: #bbb5ae; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: 100%;
  max-width: 520px;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border: 1px solid rgba(238,232,225,.9);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 -8px 28px rgba(51,37,28,.08);
}
.nav-item { position: relative; display: grid; justify-items: center; gap: 4px; padding: 5px 2px; border: 0; background: transparent; color: #9a958f; font-size: 10px; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--orange); font-weight: 700; }
.nav-item.active::before { content: ""; position: absolute; top: -10px; width: 25px; height: 3px; border-radius: 999px; background: var(--orange); }

.primary-btn, .secondary-btn, .danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-btn { border: 0; background: var(--orange); color: white; box-shadow: 0 10px 24px rgba(255,107,69,.22); }
.primary-btn:hover { background: var(--orange-dark); transform: translateY(-1px); }
.primary-btn:active, .secondary-btn:active { transform: scale(.98); }
.secondary-btn { border: 1px solid var(--line); background: white; color: var(--ink); }
.danger-btn { border: 1px solid #ffd8d2; background: #fff4f1; color: #cf482f; }
.wide { width: 100%; }
.small-btn { min-height: 40px; padding: 0 15px; border-radius: 13px; }

.auth-page { min-height: 100vh; display: grid; background: white; }
.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: max(26px, env(safe-area-inset-top)) 28px 28px;
  background: linear-gradient(155deg, #ff6b45 0%, #ff6b45 58%, #ff8268 58.3%, #ff8268 100%);
  color: white;
}
.auth-visual::before { content: ""; position: absolute; width: 340px; height: 340px; right: -190px; top: -190px; border: 50px solid rgba(255,255,255,.08); border-radius: 50%; }
.auth-visual .brand { color: white; position: relative; z-index: 2; }
.auth-visual .brand-mark { background: white; color: var(--orange); box-shadow: none; }
.auth-visual .brand-text small { color: rgba(255,255,255,.78); }
.auth-message { position: relative; z-index: 2; width: 53%; margin-top: 70px; }
.auth-message h1 { font-size: clamp(29px, 7vw, 45px); }
.auth-message p { color: rgba(255,255,255,.85); line-height: 1.65; }
.auth-art { position: absolute; right: -8px; bottom: 0; width: 52%; max-width: 260px; }
.auth-art svg { display: block; }
.auth-panel { position: relative; z-index: 3; margin-top: -28px; padding: 36px 28px 42px; border-radius: 30px 30px 0 0; background: white; }
.auth-panel-inner { width: min(100%, 440px); margin: 0 auto; }
.auth-panel h2 { margin-bottom: 6px; font-size: 28px; }
.form { display: grid; gap: 16px; margin-top: 28px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 700; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--orange); pointer-events: none; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid transparent;
  outline: 0;
  border-radius: 16px;
  background: #f6f4f1;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.input, .select { height: 54px; padding: 0 16px; }
.input.has-icon { padding-left: 48px; }
.textarea { min-height: 110px; padding: 15px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(255,107,69,.5); box-shadow: 0 0 0 4px rgba(255,107,69,.1); background: white; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { color: var(--muted); font-size: 12px; line-height: 1.55; }
.form-error { min-height: 18px; margin: -6px 0 0; color: #d7462e; font-size: 12px; }
.password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 8px; border: 0; background: transparent; color: var(--muted); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 2px; font-size: 13px; }
.auth-links button, .link-btn { padding: 0; border: 0; background: none; color: var(--orange-dark); font-weight: 700; }
.auth-switch { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.auth-switch button { margin-left: 3px; }
.demo-hint { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--yellow-soft); color: #76591b; font-size: 12px; line-height: 1.6; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; margin-top: 24px; border: 1px solid #dedbd7; border-radius: 16px; background: white; color: #312e2b; font-weight: 700; box-shadow: 0 5px 18px rgba(40,35,31,.05); }
.google-mark { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #4285f4; font: 800 18px/1 Arial, sans-serif; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 19px 0 -12px; color: var(--muted); font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-error { margin: 18px 0 -8px; }

.pet-grid, .activity-grid { grid-template-columns: repeat(2, 1fr); }
.pet-list-card { padding: 20px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.pet-list-card:hover { transform: translateY(-3px); box-shadow: 0 18px 46px rgba(66,45,33,.12); }
.pet-list-top { display: flex; gap: 16px; align-items: center; }
.pet-list-card .more { margin-left: auto; align-self: flex-start; }
.empty-state { grid-column: 1 / -1; padding: 50px 24px; text-align: center; }
.empty-state .empty-icon { display: grid; place-items: center; width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 30px; background: var(--orange-soft); font-size: 46px; }

.detail-hero { display: flex; align-items: center; gap: 20px; padding: 24px; }
.detail-hero-info { flex: 1; }
.detail-hero-info h1 { margin-bottom: 7px; }
.detail-actions { display: flex; gap: 8px; }
.info-grid { grid-template-columns: repeat(3, 1fr); }
.info-tile { padding: 18px; text-align: center; }
.info-tile span { display: block; color: var(--muted); font-size: 11px; }
.info-tile strong { display: block; margin-top: 6px; font-size: 16px; }
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 20px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 10px 0; }
.timeline-dot { position: relative; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; border: 5px solid white; border-radius: 50%; background: var(--orange-soft); color: var(--orange); }
.timeline-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.timeline-card time { color: var(--muted); font-size: 11px; }

.featured-activities { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.featured-activities::-webkit-scrollbar { display: none; }
.featured-activity { position: relative; min-height: 235px; overflow: hidden; padding: 24px; border-radius: 28px; scroll-snap-align: center; color: var(--ink); cursor: pointer; }
.featured-activity::after { content: ""; position: absolute; width: 180px; height: 180px; right: -55px; top: -70px; border: 32px solid rgba(255,255,255,.35); border-radius: 50%; }
.featured-copy { position: relative; z-index: 2; width: 68%; }
.featured-copy h2 { margin: 13px 0 8px; font-size: 25px; }
.featured-copy p { color: rgba(36,35,33,.67); font-size: 12px; line-height: 1.6; }
.featured-emoji { position: absolute; z-index: 2; right: 13px; bottom: 5px; font-size: 88px; filter: drop-shadow(0 12px 12px rgba(53,38,28,.12)); }
.category-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 10px; scrollbar-width: none; }
.category-chips::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 12px; font-weight: 700; }
.category-chip.active { border-color: var(--orange); background: var(--orange); color: white; }
.activity-card { overflow: hidden; cursor: pointer; }
.activity-cover { position: relative; display: grid; place-items: center; height: 128px; overflow: hidden; font-size: 58px; }
.activity-cover::before { content: ""; position: absolute; width: 170px; height: 170px; right: -40px; top: -70px; border: 28px solid rgba(255,255,255,.3); border-radius: 50%; }
.activity-cover span { position: relative; z-index: 2; filter: drop-shadow(0 8px 10px rgba(53,38,28,.1)); }
.activity-body { padding: 13px; }
.activity-body h3 { min-height: 43px; margin: 9px 0 7px; font-size: 15px; line-height: 1.45; }
.activity-body p { display: -webkit-box; margin-bottom: 10px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.activity-meta { display: grid; gap: 3px; color: var(--muted); font-size: 10px; }
.cover-orange { background: #ffd6c9; }
.cover-green { background: #dff2e8; }
.cover-blue { background: #dfe9fa; }
.cover-yellow { background: #fff0ba; }
.article-hero { padding: 30px; text-align: center; }
.article-emoji { display: block; margin-bottom: 12px; font-size: 80px; }
.article-body { padding: 24px; color: #4b4844; line-height: 1.9; }
.article-body h2 { margin-top: 26px; color: var(--ink); }

.profile-card { display: flex; align-items: center; gap: 17px; padding: 22px; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 66px; height: 66px; overflow: hidden; border-radius: 22px; background: var(--orange-soft); color: var(--orange); font-size: 28px; font-weight: 800; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { min-width: 0; flex: 1; }
.profile-info h2 { margin: 0 0 4px; }
.profile-info p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.settings-list { overflow: hidden; }
.setting-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); background: white; color: var(--ink); text-align: left; }
.setting-item:last-child { border-bottom: 0; }
.setting-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--orange-soft); color: var(--orange); }
.setting-label { flex: 1; }
.setting-value { color: var(--muted); font-size: 12px; }
.toggle { position: relative; width: 45px; height: 26px; border: 0; border-radius: 99px; background: #d8d5d1; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(0,0,0,.14); transition: transform .2s; }
.toggle.on { background: var(--orange); }
.toggle.on::after { transform: translateX(19px); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 18px 0; border: 0; background: transparent; text-align: left; font-weight: 700; }
.faq-answer { display: none; padding: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.faq-item.open .faq-answer { display: block; }

.avatar.has-photo { padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.verify-badge { display: inline-flex; margin-top: 7px; padding: 4px 8px; border-radius: 999px; background: #fff0d8; color: #a36a05; font-size: 10px; font-weight: 700; }
.verify-badge.verified { background: var(--green-soft); color: var(--green); }
.health-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.health-state { padding: 15px 10px; text-align: center; }
.health-state span { display: block; color: var(--muted); font-size: 11px; }
.health-state strong { display: block; margin-top: 4px; color: #a6634b; font-size: 13px; }
.health-state.done strong { color: var(--green); }

.pet-editor, .owner-editor { margin-top: 0; }
.pet-editor h3, .owner-editor h3 { margin: 10px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.photo-upload { display: grid; place-items: center; min-height: 230px; overflow: hidden; border: 2px dashed #e4dfda; border-radius: 25px; background: #faf9f7; color: #aaa49e; cursor: pointer; text-align: center; }
.photo-upload > span { display: grid; place-items: center; width: 76px; height: 60px; color: #d7d2cd; }
.photo-upload > span svg { width: 58px; height: 58px; }
.photo-upload strong { margin-top: 8px; font-size: 14px; }
.photo-upload small { margin-top: 5px; font-size: 11px; }
.photo-upload img { width: 100%; height: 270px; object-fit: cover; }
.photo-upload input { display: none; }
.health-field, .privacy-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.health-field legend, .privacy-field legend { margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.segment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segment-options label { position: relative; }
.segment-options input { position: absolute; opacity: 0; pointer-events: none; }
.segment-options span { display: grid; place-items: center; min-height: 51px; border: 1px solid var(--line); border-radius: 16px; background: white; color: #aaa49e; font-size: 13px; font-weight: 700; }
.segment-options input:checked + span { border-color: var(--orange); background: var(--orange); color: white; box-shadow: 0 8px 20px rgba(255,107,69,.16); }
.privacy-field { display: grid; gap: 11px; padding: 16px; border-radius: 16px; background: #f7f5f2; }
.privacy-field label { display: flex; align-items: center; gap: 9px; color: #514c47; font-size: 13px; }
.privacy-field input { width: 18px; height: 18px; accent-color: var(--orange); }

.qr-panel { text-align: center; }
.qr-image { display: block; width: min(100%, 330px); margin: 0 auto 15px; border: 1px solid var(--line); border-radius: 24px; background: white; }
.qr-panel p { color: var(--muted); line-height: 1.7; }
.qr-panel code { display: block; overflow-wrap: anywhere; padding: 11px; border-radius: 12px; background: #f6f4f1; color: #645e58; font-size: 10px; }
.verification-copy { padding: 4px 0 10px; text-align: center; }
.verification-copy p { margin-bottom: 4px; color: var(--muted); }
.otp-input { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: 8px; }
.verify-success { padding: 12px 0 24px; text-align: center; }
.verify-success .empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: auto; border-radius: 24px; background: var(--green-soft); color: var(--green); font-size: 32px; }

.public-page { min-height: 100vh; padding: max(22px, env(safe-area-inset-top)) 16px max(34px, env(safe-area-inset-bottom)); background: radial-gradient(circle at 20% 0%, #fff3ee 0, transparent 35%), radial-gradient(circle at 100% 15%, #f0f5e9 0, transparent 30%), #f8f6f3; }
.public-brand { width: min(100%, 560px); margin: 0 auto 20px; }
.public-card { width: min(100%, 560px); margin: auto; overflow: hidden; border: 1px solid rgba(230,223,216,.8); border-radius: 30px; background: rgba(255,255,255,.94); box-shadow: 0 24px 70px rgba(58,42,32,.12); }
.public-loading { padding: 70px 25px; text-align: center; }
.public-loading .empty-icon { display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto 18px; border-radius: 28px; background: var(--orange-soft); font-size: 42px; }
.lost-banner, .safe-banner { padding: 14px 20px; text-align: center; font-size: 13px; font-weight: 800; }
.lost-banner { background: var(--orange); color: white; }
.safe-banner { background: var(--green-soft); color: var(--green); }
.public-pet-hero { padding: 28px 24px 20px; text-align: center; }
.public-pet-photo, .public-pet-emoji { display: grid; place-items: center; width: 154px; height: 154px; margin: 0 auto 20px; border-radius: 40px; object-fit: cover; font-size: 80px; box-shadow: 0 15px 35px rgba(45,35,28,.1); }
.public-pet-hero h1 { margin: 4px 0; font-size: 34px; }
.public-pet-hero > p:last-child { color: var(--muted); }
.public-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 20px; border: 1px solid var(--line); border-radius: 19px; background: #faf9f7; }
.public-facts div { padding: 14px 7px; text-align: center; border-right: 1px solid var(--line); }
.public-facts div:last-child { border-right: 0; }
.public-facts span, .public-facts strong { display: block; }
.public-facts span { color: var(--muted); font-size: 10px; }
.public-facts strong { margin-top: 5px; font-size: 12px; }
.public-note, .public-contact { margin: 22px 20px 0; padding: 20px; border-radius: 21px; background: #fff7f3; }
.public-note p, .public-contact p { color: #6b625c; line-height: 1.75; }
.public-contact { margin-bottom: 20px; background: white; border: 1px solid var(--line); }
.public-contact h2 { margin-top: 3px; }
.public-actions { display: grid; gap: 10px; margin-top: 17px; }
.public-actions svg { width: 19px; height: 19px; }
.public-address { margin-top: 14px; font-size: 12px; }
.privacy-note { padding: 0 25px 24px; color: #aaa39d; text-align: center; font-size: 10px; line-height: 1.6; }

.modal-backdrop { position: fixed; z-index: 80; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); display: grid; align-items: end; width: min(100%, 520px); background: rgba(33,28,24,.45); backdrop-filter: blur(3px); animation: fade .2s ease; }
.modal { width: 100%; max-height: 92vh; overflow-y: auto; padding: 24px 22px calc(28px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: white; animation: rise .25s ease; }
.modal-inner { width: min(100%, 560px); margin: 0 auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h2 { margin: 0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 24px; }
.confirm-copy { padding: 12px 0; color: var(--muted); line-height: 1.7; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: 105px; transform: translate(-50%, 20px); max-width: calc(100% - 40px); padding: 11px 17px; border-radius: 999px; background: #292725; color: white; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: .7; } }

@media (min-width: 760px) {
  .modal-backdrop { align-items: center; padding: 30px; }
  .modal { max-height: 90vh; padding: 28px; border-radius: 28px; }
}

@media (max-width: 600px) {
  .stats-grid { gap: 9px; }
  .stat-card { padding: 13px 11px; }
  .stat-icon { width: 33px; height: 33px; }
  .stat-number { font-size: 22px; }
  .pet-grid { grid-template-columns: 1fr; }
  .info-grid { gap: 8px; }
  .info-tile { padding: 14px 8px; }
  .detail-hero { align-items: flex-start; flex-wrap: wrap; }
  .detail-hero-info { min-width: calc(100% - 120px); }
  .detail-actions { width: 100%; }
  .detail-actions button { flex: 1; }
  .page-head .primary-btn span { display: none; }
  .page-head .primary-btn { width: 50px; padding: 0; }
}

@media (max-width: 390px) {
  .content { width: calc(100% - 24px); }
  .hero-card { padding: 23px; }
  .hero-copy { width: 70%; }
  .hero-pets { right: -9%; width: 48%; }
  .auth-visual { min-height: 310px; padding-left: 22px; }
  .auth-panel { padding-left: 22px; padding-right: 22px; }
  .auth-message { width: 59%; margin-top: 58px; }
}
