:root {
  --bg: #FFF6EE;
  --bg-deep: #F8E8D8;
  --primary: #3A2A22;
  --secondary: #8A7264;
  --card: #FFFFFF;
  --green: #6BAE7A;
  --amber: #E09A4E;
  --coral: #E8896B;
  --peach: #FFD4B8;
  --cream: #FFF1E4;
  --violet: #E8896B;
  --mint: #8FCBB0;
  --accent: #E8896B;
  --accent-soft: rgba(232, 137, 107, 0.14);
  --warm-brown: #A66B45;
  --line: rgba(58, 42, 34, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --pad-x: 20px;
  --gap: 14px;
  --shadow: 0 2px 8px rgba(166, 107, 69, 0.06), 0 12px 32px rgba(166, 107, 69, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-h: 80px;
  --font: "Nunito", "Noto Sans SC", sans-serif;
  --display: "Fraunces", "Noto Sans SC", serif;
  --app-max: 440px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  color-scheme: light only;
  overflow: hidden;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
input { font-family: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.app {
  width: min(100%, var(--app-max));
  height: 100dvh;
  height: 100svh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 手机端铺满全屏；桌面仍居中窄栏 */
@media (max-width: 719px) {
  .app {
    width: 100%;
    max-width: none;
    height: 100dvh;
    height: 100svh;
    margin: 0;
  }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
  .app {
    width: 100%;
    max-width: none;
    height: 100dvh;
  }
  body {
    background: var(--bg);
  }
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: calc(16px + var(--safe-top)) var(--pad-x) calc(var(--tab-h) + 36px + var(--safe-bottom));
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.surface {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.muted { color: var(--secondary); }
.hidden { display: none !important; }

.demo-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-brown);
  background: rgba(232, 137, 107, 0.14);
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 137, 107, 0.22);
}
.btn-soft {
  background: rgba(58, 42, 34, 0.06);
  color: var(--primary);
}
.btn-accent {
  background: rgba(232, 137, 107, 0.12);
  color: var(--primary);
}
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Avatar — real pet illustration */
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(166, 107, 69, 0.18);
  background: var(--cream);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.xl {
  width: 72px;
  height: 72px;
}
.avatar.hero-size {
  width: 88px;
  height: 88px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.7), 0 10px 24px rgba(166, 107, 69, 0.2);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab-h) + 20px + var(--safe-bottom));
  transform: translateX(-50%) translateY(10px);
  background: rgba(58, 42, 34, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 80;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.overlay-bottom { bottom: calc(28px + var(--safe-bottom)); }

/* Auth */
.auth-screen {
  padding: calc(48px + var(--safe-top)) var(--pad-x) calc(32px + var(--safe-bottom));
  overflow-y: auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.auth-brand { margin-bottom: 36px; }
.auth-brand .wordmark {
  font-family: var(--display);
  font-size: clamp(40px, 11vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
  color: var(--primary);
}
.auth-brand .tagline {
  font-size: 16px;
  line-height: 1.5;
  color: var(--secondary);
  max-width: 16em;
}
.auth-pets {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 16px;
  font-size: 16px;
  outline: none;
}
.field input:focus {
  border-color: rgba(232, 137, 107, 0.55);
  box-shadow: 0 0 0 3px rgba(232, 137, 107, 0.12);
}
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; }
.code-row .btn { flex-shrink: 0; padding: 0 14px; min-height: 52px; font-size: 13px; }
.auth-error { min-height: 20px; font-size: 13px; color: #c45c4a; }
.auth-actions { margin-top: 8px; display: flex; flex-direction: column; gap: 14px; }
.link-btn { text-align: center; color: var(--secondary); font-size: 14px; font-weight: 600; }
.link-btn strong { color: var(--primary); }
.auth-guest { margin-top: auto; padding-top: 28px; text-align: center; }
.auth-guest button {
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Tab bar */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding: 0 28px var(--safe-bottom);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(255, 246, 238, 0.96);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab-item {
  width: 76px;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
}
.tab-item.active { color: var(--coral); }
.tab-item svg { width: 22px; height: 22px; }
.tab-pawpal {
  width: 60px;
  height: 60px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(232, 137, 107, 0.28);
  animation: pawBreath 3s ease-in-out infinite;
  position: relative;
}
.tab-pawpal svg { width: 24px; height: 24px; }
.tab-pawpal .label {
  position: absolute;
  bottom: -20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}
@keyframes pawBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Guardian header */
.g-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.g-top .greet { font-size: 14px; color: var(--secondary); font-weight: 600; }
.g-top .headline {
  font-family: var(--display);
  font-size: clamp(26px, 7vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-top: 6px;
}
.g-top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 228px;
  padding: 20px;
  border-radius: var(--radius);
  border: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
  background: #FFE8D6;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.hero:active { transform: scale(0.985); }
.hero-meta { font-size: 13px; font-weight: 600; color: var(--secondary); }
.hero-title {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 10px 0 8px;
}
.hero-sub {
  font-size: 14px;
  color: var(--secondary);
  margin-bottom: 32px;
  line-height: 1.4;
}
.hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 7px;
  animation: livePulse 1.6s ease-in-out infinite alternate;
}
@keyframes livePulse {
  from { transform: scale(0.9); opacity: 0.55; }
  to { transform: scale(1.1); opacity: 1; }
}
.hero-cta { color: var(--warm-brown); font-weight: 700; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--coral);
  margin-bottom: 10px;
}
.section-label svg { width: 14px; height: 14px; }

.insight h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.insight p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--secondary);
  margin-bottom: 6px;
}
.why-link {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mini chart */
.chart-card .chart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.chart-tabs {
  display: flex;
  gap: 6px;
  background: rgba(58, 42, 34, 0.05);
  padding: 4px;
  border-radius: 12px;
}
.chart-tab {
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
}
.chart-tab.active {
  background: #fff;
  color: var(--coral);
  box-shadow: 0 1px 4px rgba(166, 107, 69, 0.1);
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 110px;
  padding-top: 8px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
  cursor: pointer;
}
.bar-track {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar {
  width: 70%;
  max-width: 28px;
  border-radius: 8px 8px 4px 4px;
  background: var(--coral);
  min-height: 8px;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.bar.show { transform: scaleY(1); }
.bar-col.active .bar {
  background: var(--green);
  box-shadow: none;
}
.bar-col .lab {
  font-size: 11px;
  font-weight: 700;
  color: var(--secondary);
}
.chart-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--secondary);
  font-weight: 600;
  min-height: 18px;
}

.event h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.event-time { font-size: 12px; font-weight: 700; color: var(--secondary); margin-bottom: 16px; }
.event-steps {
  display: grid;
  grid-template-columns: 1fr 10px 1fr 10px 1fr;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}
.event-step {
  background: rgba(232, 137, 107, 0.08);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.event-step.show { opacity: 1; transform: translateY(0); }
.event-step .ico {
  width: 28px; height: 28px;
  margin: 0 auto 8px;
  border-radius: 9px;
  background: rgba(232, 137, 107, 0.16);
  color: var(--coral);
  display: grid;
  place-items: center;
}
.event-step .ico svg { width: 14px; height: 14px; }
.event-step .t { font-size: 12px; font-weight: 800; }
.event-step .d { font-size: 11px; color: var(--secondary); margin-top: 3px; line-height: 1.3; }
.event-line { height: 1px; background: rgba(58, 42, 34, 0.12); }
.event-desc { font-size: 13px; line-height: 1.6; color: var(--secondary); }

/* Care card — fixed full display */
.care {
  position: relative;
  overflow: visible;
  padding-bottom: 20px;
}
.care-ornament {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  color: var(--green);
  opacity: 0.22;
  pointer-events: none;
}
.care h3 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  padding-right: 36px;
}
.care-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.care-ring {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.care-ring svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.care-ring circle {
  fill: none;
  stroke-width: 5;
}
.care-ring .bg { stroke: rgba(58, 42, 34, 0.08); }
.care-ring .fg {
  stroke: var(--coral);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.care-progress { font-size: 13px; color: var(--secondary); font-weight: 700; line-height: 1.35; }
.care-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.care-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--secondary);
  margin-bottom: 16px;
}
.care-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.care-actions .btn { width: 100%; }
.points-hint {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--amber);
}

/* Mood check-in */
.mood-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.mood-btn {
  background: rgba(58, 42, 34, 0.04);
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary);
  transition: transform 0.15s, background 0.15s, color 0.15s;
}
.mood-btn .emoji { font-size: 22px; display: block; margin-bottom: 4px; }
.mood-btn.active {
  background: var(--accent-soft);
  color: var(--coral);
  box-shadow: inset 0 0 0 1.5px rgba(232, 137, 107, 0.35);
}
.mood-btn:active { transform: scale(0.96); }

/* Memory */
.mem-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
}
.mem-head .texts { flex: 1; min-width: 0; }
.mem-head h1 {
  font-family: var(--display);
  font-size: clamp(32px, 8vw, 38px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.mem-head p {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

.trait-list { display: flex; flex-direction: column; gap: 12px; }
.trait-list li {
  font-size: 14px;
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
  font-weight: 600;
}
.trait-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.obs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.obs-item {
  background: rgba(58, 42, 34, 0.035);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  border: 1px solid transparent;
}
.obs-item:active { transform: scale(0.97); }
.obs-item.tone-good { background: rgba(107, 174, 122, 0.1); }
.obs-item.tone-watch { background: rgba(224, 154, 78, 0.12); }
.obs-item .k { font-size: 12px; color: var(--secondary); font-weight: 700; }
.obs-item .v { font-size: 14px; font-weight: 800; margin-top: 8px; }
.obs-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--secondary);
  font-weight: 600;
}

.surface-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mem-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.mem-item:last-child { border-bottom: none; padding-bottom: 0; }
.mem-item .when { font-size: 12px; font-weight: 700; color: var(--secondary); margin-bottom: 4px; }
.mem-item .what { font-size: 14px; line-height: 1.45; font-weight: 600; }

.points-card .bal {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 6px 0 10px;
  color: var(--amber);
}
.points-card p { font-size: 13px; line-height: 1.55; color: var(--secondary); font-weight: 600; }

/* Overlay */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: rise 0.28s ease;
}
@keyframes rise {
  from { transform: translateY(16px); opacity: 0.5; }
  to { transform: none; opacity: 1; }
}
.nav-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) var(--pad-x) 10px;
}
.nav-bar .back {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(58, 42, 34, 0.06);
  display: grid;
  place-items: center;
}
.nav-bar .back svg { width: 18px; height: 18px; }
.nav-bar .title { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px var(--pad-x) calc(28px + var(--safe-bottom));
  scrollbar-width: none;
}
.overlay-body::-webkit-scrollbar { display: none; }

.demo-banner { text-align: center; margin-bottom: 16px; }
.demo-banner .mode {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 4px;
}
.demo-banner .loc { font-size: 14px; color: var(--secondary); font-weight: 600; }

.live-hero {
  height: 300px;
  border-radius: var(--radius);
  background: #f5e6d8;
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.live-hero canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.live-scene-hint {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  font-size: 11px;
  font-weight: 800;
  color: rgba(58, 42, 34, 0.7);
  background: rgba(255, 255, 255, 0.72);
  padding: 5px 10px;
  border-radius: 999px;
  pointer-events: none;
}
.live-scene-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--secondary);
  font-size: 14px;
  font-weight: 700;
}
.live-hero .pet-big {
  display: none;
}
.flash-white {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 5;
}
.flash-white.on { opacity: 0.85; }

.robot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.robot-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 12px 6px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 76px;
}
.robot-btn:active { transform: scale(0.97); }
.robot-btn.loading { opacity: 0.55; }
.robot-btn .ico {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--coral);
  display: grid;
  place-items: center;
}
.robot-btn .ico svg { width: 16px; height: 16px; }
.robot-btn .lab { font-size: 12px; font-weight: 800; }

.dpad {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 18px 16px 20px;
  box-shadow: var(--shadow);
}
.dpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(3, 64px);
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.dpad-grid > button {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(58, 42, 34, 0.05);
  display: grid;
  place-items: center;
  color: var(--primary);
}
.dpad-grid > button:active { background: var(--accent-soft); }
.dpad-grid > button svg { width: 22px; height: 22px; }
.dpad-find {
  background: var(--coral) !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 6px 16px rgba(232, 137, 107, 0.28);
}
.dpad-find.loading { opacity: 0.55; }
.dpad-find:active { filter: brightness(0.95); }

.walk-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 0 28px;
}
.walk-ring {
  width: 168px; height: 168px;
  border-radius: 50%;
  border: 1.5px solid rgba(107, 174, 122, 0.3);
  display: grid;
  place-items: center;
  animation: ringBreath 2.6s ease-in-out infinite;
  margin-bottom: 22px;
  background: rgba(143, 203, 176, 0.12);
  overflow: hidden;
}
.walk-ring img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
@keyframes ringBreath {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.04); opacity: 1; }
}
.walk-timer {
  font-family: var(--display);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.walk-label { margin-top: 10px; color: var(--secondary); font-size: 14px; font-weight: 700; }
.moment-ok { margin-top: 14px; color: var(--green); font-size: 14px; font-weight: 800; }

.summary-wrap { text-align: center; padding-top: 48px; }
.summary-wrap h2 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.summary-mins {
  font-family: var(--display);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.summary-points {
  font-family: var(--display);
  font-size: 44px;
  font-weight: 600;
  color: var(--amber);
  margin: 24px 0;
  transform: scale(0.82);
  animation: pointsPop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}
@keyframes pointsPop { to { transform: scale(1); } }

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(58, 42, 34, 0.32);
  z-index: 70;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 12px var(--pad-x) calc(28px + var(--safe-bottom));
  animation: sheetUp 0.28s ease;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.08);
}
@keyframes sheetUp {
  from { transform: translateY(36%); }
  to { transform: none; }
}
.sheet-handle {
  width: 36px; height: 4px;
  border-radius: 2px;
  background: rgba(58, 42, 34, 0.12);
  margin: 0 auto 18px;
}
.sheet h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.evidence-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.evidence-row .k { font-weight: 800; }
.evidence-row .v { color: var(--secondary); }
.evidence-tip {
  font-size: 12px;
  color: var(--secondary);
  font-weight: 600;
  line-height: 1.45;
  padding: 0 0 10px;
  display: none;
}
.evidence-row.open + .evidence-tip { display: block; }
.sheet-note {
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--secondary);
  font-weight: 600;
}
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet-actions .btn { flex: 1; }

/* Realtime */
.rt-overlay {
  position: absolute;
  inset: 0;
  background: #0c0c0c;
  z-index: 90;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.rt-video-wrap { position: absolute; inset: 0; }
.rt-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.rt-grad {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.rt-grad::before,
.rt-grad::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 28%;
  pointer-events: none;
}
.rt-grad::before {
  top: 0;
  background: rgba(0, 0, 0, 0.45);
}
.rt-grad::after {
  bottom: 0;
  height: 42%;
  background: rgba(0, 0, 0, 0.55);
}
.rt-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) 20px 12px;
}
.rt-icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}
.rt-icon-btn svg { width: 16px; height: 16px; }
.rt-status {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}
.rt-status.ok { color: #84CFB5; }
.rt-status.err { color: #f0a090; }
.rt-bottom {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 0 20px calc(32px + var(--safe-bottom));
}
.rt-transcript {
  background: rgba(0,0,0,0.42);
  border-radius: 18px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.55;
  min-height: 64px;
  margin-bottom: 22px;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  backdrop-filter: blur(12px);
}
.rt-transcript::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.rt-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.rt-brand { font-size: 13px; font-weight: 600; opacity: 0.75; }
.rt-end {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #e04848;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(224, 72, 72, 0.35);
}
.rt-end svg { width: 26px; height: 26px; }
.rt-end-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
}
.rt-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #141414;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  text-align: center;
  padding: 24px;
  line-height: 1.5;
}
.rt-debug {
  margin-top: 12px;
  max-height: 110px;
  overflow-y: auto;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0.55;
  white-space: pre-wrap;
}

@media (min-width: 720px) {
  body { display: flex; align-items: stretch; justify-content: center; }
  .app {
    border-left: 1px solid rgba(58, 42, 34, 0.04);
    border-right: 1px solid rgba(58, 42, 34, 0.04);
    background: var(--bg);
  }
}
