/* Tempus — dark luxury theme */

:root {
  --bg: #0e0e10;
  --bg-raised: #16161a;
  --bg-card: #1a1a1f;
  --line: #2a2a30;
  --bar: rgba(14, 14, 16, 0.92);
  --text: #e8e4dc;
  --text-dim: #9a958b;
  --gold: #c8a45c;
  --gold-bright: #e0bd74;
  --accent-alt: var(--gold-bright);
  --accent-ink: #141210;
  --green: #7fb98b;
  --red: #c96f6f;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="batman"]      { --gold: #4a7bd0; --gold-bright: #74a2ec; }
[data-theme="batgirl"]     { --gold: #7aa7e0; --gold-bright: #a7c6ef; }
[data-theme="bruce-wayne"] { --gold: #9aa2ae; --gold-bright: #cfd5de; }
[data-theme="pepsi"]       { --gold: #c94540; --gold-bright: #e0655f; --accent-alt: #4f7fd0; --accent-ink: #fdf6f2; }
[data-theme="coke"]        { --gold: #b8322c; --gold-bright: #d4544d; --accent-ink: #fdf4f2; }
[data-theme="sprite"]      { --gold: #3f9e5a; --gold-bright: #62c47f; }
[data-theme="hulk"]        { --gold: #2e8f4b; --gold-bright: #4fb26c; --bg: #0c100d; --bg-card: #171d18; --bg-raised: #131813; --line: #26302a; --bar: rgba(12, 16, 13, 0.92); }
[data-theme="kermit"]      { --gold: #6dab5c; --gold-bright: #8fca7e; }
[data-theme="smurf"]       { --gold: #4f8fe8; --gold-bright: #7cb2f4; --bg: #0c0e13; --bg-card: #161a22; --bg-raised: #12151c; --line: #262c38; --bar: rgba(12, 14, 19, 0.92); }
[data-theme="root-beer"]   { --gold: #a8763e; --gold-bright: #c99a5e; --bg: #100e0c; --bg-card: #1c1815; --bg-raised: #171412; --line: #2e2822; --bar: rgba(16, 14, 12, 0.92); }
[data-theme="tiffany"]     { --gold: #3fbfae; --gold-bright: #6cd9c9; }
[data-theme="panda"] {
  --bg: #f0eee9;
  --bg-raised: #e5e2da;
  --bg-card: #fbfaf7;
  --line: #d8d4ca;
  --bar: rgba(240, 238, 233, 0.92);
  --text: #1b1b1e;
  --text-dim: #6b675f;
  --gold: #17171a;
  --gold-bright: #3a3a40;
  --accent-ink: #f5f3ee;
  --green: #3e7d4d;
  --red: #ab4a44;
}

html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease, fill 0.5s ease, stroke 0.5s ease !important;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bar);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.topbar-right { display: flex; align-items: center; gap: 6px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.brand-mark { color: var(--gold); font-size: 22px; line-height: 1; }

.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.topnav { display: flex; gap: 4px; }

.topnav button {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.topnav button:hover { color: var(--text); }
.topnav button.active { color: var(--gold-bright); background: color-mix(in srgb, var(--gold) 10%, transparent); }

.theme-menu { position: relative; }

.theme-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.3s;
}
.theme-btn:hover { border-color: var(--gold); transform: rotate(180deg); }

.theme-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  width: min(320px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  z-index: 80;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.theme-pop::before {
  content: "Choose a theme";
  grid-column: 1 / -1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  padding: 4px 8px 8px;
}

.swatch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
}
.swatch:hover { background: var(--bg-raised); }
.swatch.active { border-color: var(--gold); }

.swatch-dots { display: flex; flex-shrink: 0; }
.swatch-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.swatch-dots span + span { margin-left: -5px; }

.swatch-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.swatch-name { font-size: 12.5px; font-weight: 500; color: var(--text); }
.swatch-sub { font-size: 10px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.view {
  display: none;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 48px) 64px;
  flex: 1;
}
.view.active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .view.active { animation: viewIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }

  .hero-copy > * { animation: viewIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
  .hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
  .hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
  .hero-copy > *:nth-child(4) { animation-delay: 0.28s; }

  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .reveal.in { opacity: 1; transform: none; }

  .btn { transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s; }
  .btn:active { transform: scale(0.97); }
}

.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-gold:hover::after { left: 130%; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(24px, 6vw, 72px) 0 clamp(32px, 5vw, 64px);
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-dial { display: none; }
}

.hero-dial { width: clamp(190px, 22vw, 260px); }
.hero-dial svg { width: 100%; height: auto; display: block; }
.dial-ring { fill: none; stroke: var(--line); stroke-width: 1.5; }
.dial-face { fill: var(--bg-card); stroke: var(--line); stroke-width: 1; }
.dial-index { stroke: var(--text-dim); stroke-width: 2; stroke-linecap: round; }
.dial-index.major { stroke: var(--gold); stroke-width: 3; }
.hand rect { fill: var(--text); }
.hand-sec rect, .hand-sec circle { fill: var(--gold); }
.hand { transform-origin: 100px 100px; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes handSpin { to { transform: rotate(360deg); } }
  .hand-sec { animation: handSpin 60s linear infinite; animation-delay: -22s; }
  .hand-min { animation: handSpin 3600s linear infinite; animation-delay: -1180s; }
  .hand-hr  { animation: handSpin 43200s linear infinite; animation-delay: -14700s; }
}

.hero-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 7vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-sub {
  max-width: 560px;
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 16px;
}

.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 24px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover { border-color: var(--gold); transform: translateY(-2px); }

.feature-num {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p { color: var(--text-dim); font-size: 14px; }

.feature-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 500;
}

.breakdown {
  height: 800vh;
  position: relative;
  margin-bottom: clamp(48px, 7vw, 88px);
}

.breakdown-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.breakdown-head {
  position: absolute;
  top: 10vh;
  text-align: center;
  z-index: 2;
}

.breakdown-head h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.1;
}

.watch-stage {
  position: relative;
  width: min(74vw, 400px);
  aspect-ratio: 1;
}

.watch-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  will-change: transform, opacity;
}

.breakdown-end {
  position: absolute;
  bottom: 10vh;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(18px, 2.6vw, 24px);
  font-style: italic;
  color: var(--text-dim);
  opacity: 0;
  padding: 0 24px;
}

.bd-captions {
  position: absolute;
  bottom: 9vh;
  left: 0;
  right: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}

.bd-caption {
  grid-area: 1 / 1;
  opacity: 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 2.4vw, 21px);
  color: var(--text-dim);
  padding: 0 24px;
  max-width: 520px;
}

.bd-caption span {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.bd-progress {
  position: absolute;
  right: clamp(14px, 3.5vw, 32px);
  top: 22vh;
  bottom: 22vh;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
  z-index: 3;
}
.bd-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gold);
  border-radius: 1px;
  transform: scaleY(0);
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes balanceSwing {
    from { transform: rotate(-16deg); }
    to   { transform: rotate(16deg); }
  }
  #wp-balance .balance-osc {
    animation: balanceSwing 0.27s ease-in-out infinite alternate;
    transform-origin: 160px 221px;
    transform-box: view-box;
  }
  @keyframes rotorSwing {
    from { transform: rotate(-12deg); }
    to   { transform: rotate(9deg); }
  }
  #wp-rotor .rotor-osc {
    animation: rotorSwing 3.6s ease-in-out infinite alternate;
    transform-origin: 200px 200px;
    transform-box: view-box;
  }
}

@media (prefers-reduced-motion: reduce) {
  .breakdown { height: auto; }
  .breakdown-sticky { position: static; height: auto; padding: 56px 0; flex-direction: column; gap: 32px; }
  .breakdown-head, .breakdown-end { position: static; opacity: 1; }
  .bd-captions, .bd-progress { display: none; }
}

.about h2, .page-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 600;
  margin-bottom: 16px;
}

.about-cols {
  columns: 2 320px;
  column-gap: 40px;
  color: var(--text-dim);
}
.about-cols p { margin-bottom: 16px; break-inside: avoid; }

.page-head { margin-bottom: 28px; }
.page-head p { color: var(--text-dim); max-width: 560px; }

.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.btn {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 7px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-gold { background: var(--gold); color: var(--accent-ink); }
.btn-gold:hover { background: var(--gold-bright); }

.btn-ghost { background: none; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn-sm { padding: 8px 14px; font-size: 13px; }

.file-btn { position: relative; overflow: hidden; display: inline-block; text-align: center; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

.fine-print {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--text-dim);
  font-size: 13px;
  max-width: 680px;
}
.fine-print summary { cursor: pointer; color: var(--text); font-weight: 500; margin-bottom: 8px; }
.fine-print p { margin-bottom: 10px; }

.tg-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 16px;
}
@media (max-width: 760px) { .tg-layout { grid-template-columns: 1fr; } }

.tg-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}

#tg-canvas {
  width: 100%;
  height: 200px;
  display: block;
  background: #101014;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.tg-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-dim);
  min-height: 20px;
}

.tg-controls {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.select-wrap { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); }

select, input, textarea {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14px;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--gold); }

.tg-readout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 760px) {
  .tg-readout { flex-direction: row; flex-wrap: wrap; }
  .tg-readout .readout-item { flex: 1 1 40%; }
}

.readout-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.readout-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.readout-value {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--gold-bright);
}
.readout-small { font-size: 24px; }
.readout-unit { font-size: 12px; color: var(--text-dim); }

.signal-meter {
  height: 8px;
  background: var(--bg-raised);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.signal-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--accent-alt));
  transition: width 0.12s linear;
}

.tg-verdict {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 20px 22px;
  font-size: 15px;
}
.tg-verdict strong { color: var(--gold-bright); font-weight: 600; }

.col-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.watch-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.watch-card:hover { border-color: var(--gold); }

.watch-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--bg-raised);
}

.watch-photo-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--line);
  background: var(--bg-raised);
}

.watch-body { padding: 16px; }

.watch-brand {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 3px;
}

.watch-model {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.2;
}

.watch-meta { font-size: 13px; color: var(--text-dim); }
.watch-meta div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.watch-meta dt { color: var(--text-dim); }
.watch-meta dd { color: var(--text); text-align: right; }

.watch-notes { margin-top: 8px; font-size: 13px; color: var(--text-dim); font-style: italic; }

.watch-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}
.watch-actions button {
  flex: 1;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 7px 0;
  font-size: 12px;
  cursor: pointer;
}
.watch-actions button:hover { border-color: var(--gold); color: var(--gold-bright); }
.watch-actions button.danger:hover { border-color: var(--red); color: var(--red); }

.empty-state {
  text-align: center;
  padding: 72px 20px;
  color: var(--text-dim);
}
.empty-icon { font-size: 44px; color: var(--gold); display: block; margin-bottom: 14px; }
.empty-state p { margin-bottom: 20px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px;
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
}

.modal h3 { font-family: var(--serif); font-size: 26px; font-weight: 600; margin-bottom: 18px; }

.modal form { display: flex; flex-direction: column; gap: 14px; }
.modal label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

#cf-photo-preview { max-width: 160px; border-radius: 8px; margin-top: 8px; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.id-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.id-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
  margin-bottom: -1px;
}
.id-tab.active { color: var(--gold-bright); border-bottom-color: var(--gold); }

.id-pane { display: none; }
.id-pane.active { display: block; }

.search-bar input { width: 100%; padding: 13px 16px; font-size: 15px; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; }

.chip {
  background: none;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--sans);
}
.chip.active, .chip:hover { border-color: var(--gold); color: var(--gold-bright); }

.db-results { display: flex; flex-direction: column; gap: 10px; }

.db-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

.db-main { flex: 1; min-width: 200px; }
.db-brand { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); }
.db-model { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.db-detail { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.db-ref {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--gold-bright);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  border-radius: 5px;
  padding: 4px 10px;
  white-space: nowrap;
}

.no-results { color: var(--text-dim); padding: 24px 4px; font-size: 14px; }

.photo-id-box {
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#photo-prompt p { color: var(--text-dim); margin-bottom: 16px; }
#photo-preview { max-width: 100%; max-height: 380px; border-radius: 8px; }

.photo-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

.id-result { margin-top: 20px; }

.id-guess {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 10px;
}
.id-guess.top { border-color: var(--gold); }
.id-conf { font-size: 12px; color: var(--text-dim); float: right; }
.id-guess .db-detail { margin-top: 6px; }

.id-loading { color: var(--text-dim); padding: 18px 4px; }
.id-error { color: var(--red); padding: 14px 4px; font-size: 14px; }

.key-row { display: flex; gap: 8px; margin-top: 4px; }
.key-row input { flex: 1; }
.key-status { margin-top: 8px; font-size: 12px; color: var(--green); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px clamp(16px, 4vw, 48px);
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  color: var(--text-dim);
  font-size: 12.5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.footer-version {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.65;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 10px;
  letter-spacing: 0.06em;
}

button, select, input, textarea, .chip, .swatch, .id-tab, .feature-card {
  touch-action: manipulation;
}
@media (pointer: coarse) {
  select, input, textarea { font-size: 16px; }
  .watch-actions button { padding: 10px 0; font-size: 13px; }
}

@media (max-width: 560px) {
  .topbar { padding: 10px 12px; }
  .brand-name { font-size: 19px; }
  .brand { gap: 7px; }
  .topnav { gap: 0; }
  .topnav button { padding: 8px 7px; font-size: 12px; }
  .readout-value { font-size: 30px; }

  .tg-controls { flex-direction: column; align-items: stretch; }
  .tg-controls .select-wrap { width: 100%; }
  .tg-controls .btn { width: 100%; padding: 14px 20px; }

  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }

  .col-grid { grid-template-columns: 1fr; }

  .photo-actions { flex-direction: column; }
  .photo-actions .btn { width: 100%; }

  .hero-actions .btn { flex: 1; text-align: center; }
}
