/* Colours, radii and button depth follow the app's theme (Color.kt, Theme.kt, Dimens.kt, GymButton).
   Dark is the default, as in the app. theme.js sets data-theme before the first paint. */
:root {
  color-scheme: dark;
  --bg: #050606;
  --surface: #0d0f0f;
  --card: #141616;
  --hover: #1a1a1a;
  --line: rgba(244, 246, 244, .08);
  --line-strong: rgba(244, 246, 244, .2);
  --text: #f4f6f4;
  --muted: #b3b8b6;
  --accent: #c6f432;
  --accent-text: #c6f432;
  --on-accent: #000;
  --face-top: #c8f43a;
  --face-bottom: #c0ed31;
  --side: #8bab23;
  --key-top: #242424;
  --key-bottom: #1a1a1a;
  --key-side: #0e0e0e;
  --tint: 14%;
  --edge-base: #000;
  --float: 0 8px 24px -12px rgba(0, 0, 0, .8);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f4;
  --surface: #fff;
  --card: #fff;
  --hover: #e9edeb;
  --line: rgba(23, 27, 25, .08);
  --line-strong: rgba(23, 27, 25, .2);
  --text: #171b19;
  --muted: #5b6662;
  --accent-text: #4a6300;
  --key-top: #fff;
  --key-bottom: #f6f8f7;
  --key-side: #d3dad6;
  --tint: 36%;
  --edge-base: #8d9a94;
  --float: 0 8px 24px -14px rgba(23, 27, 25, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.wrap { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
html:not(.js) .js-only { display: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 60; padding: 8px 12px; background: var(--surface); border-radius: 8px; }

/* Icons: one outlined set, drawn with the stroke the app's own illustrations use. */
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons: the app's raised button. A face with a slight top-to-bottom shade on a darker 4px
   side, 8px corners, 48px tall. Pressing moves the face down onto the side. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: 8px; border: 0;
  font: 600 15px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .09s, box-shadow .09s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { color: var(--on-accent); background: linear-gradient(var(--face-top), var(--face-bottom)); box-shadow: 0 4px 0 var(--side); }
.btn-secondary, .btn-tonal { background: linear-gradient(var(--key-top), var(--key-bottom)); box-shadow: 0 4px 0 var(--key-side), inset 0 0 0 1px var(--line-strong); }
.btn-secondary { color: var(--text); }
.btn-tonal { color: var(--accent-text); }
.btn-ink { color: #f4f6f4; background: linear-gradient(#242424, #171818); box-shadow: 0 4px 0 #000; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:active:not([aria-disabled]) { transform: translateY(3px); }
.btn-primary:active { box-shadow: 0 1px 0 var(--side); }
.btn-secondary:active:not([aria-disabled]), .btn-tonal:active { box-shadow: 0 1px 0 var(--key-side), inset 0 0 0 1px var(--line-strong); }
.btn-ink:active { box-shadow: 0 1px 0 #000; }
.btn[aria-disabled] { color: var(--muted); cursor: default; }
.btn small { font-weight: 500; color: var(--muted); }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn .moon, [data-theme="light"] .icon-btn .sun { display: none; }
[data-theme="light"] .icon-btn .moon { display: block; }

/* Top bar: one floating bar with the card radius. */
.nav { position: fixed; inset: 12px 0 auto; z-index: 20; padding: 0 16px; pointer-events: none; }
.bar {
  pointer-events: auto; max-width: 1120px; margin: 0 auto; height: 64px; padding: 0 12px 0 16px;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--float);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: 8px; image-rendering: pixelated; }
.bar nav { margin: 0 auto; display: flex; gap: 4px; }
.bar nav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); background: var(--hover); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-bottom: 4px; }
.nav-end .icon-btn { margin-top: 4px; }
.bar nav + .nav-end { margin-left: 0; }
@media (max-width: 900px) { .bar nav { display: none; } .bar nav + .nav-end { margin-left: auto; } }
/* Seven comparison links need about 730px, so that bar drops its links below 1180px; the footer lists them all. */
@media (max-width: 1180px) { .bar nav.many { display: none; } .bar nav.many + .nav-end { margin-left: auto; } }
/* 360px phones: the brand, the toggle and "Get the app" only fit with tighter spacing. */
@media (max-width: 380px) {
  .bar { gap: 8px; padding: 0 8px 0 12px; }
  .nav-end { gap: 4px; }
  .nav-end .btn-sm { padding: 0 12px; }
}

/* Type. One family; hierarchy from size and colour. */
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 20px; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 600; }
h3, b, strong { font-weight: 600; }
.lede { font-size: 1.0625rem; color: var(--muted); max-width: 540px; margin: 0; }
/* The marked word in a heading: the accent as a highlighter stroke. */
.hl { display: inline-block; padding: 0 .16em; border-radius: 8px; background: var(--accent); color: var(--on-accent); transform: rotate(-1.5deg); }
.label {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; margin-bottom: 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); font-size: .82rem; font-weight: 500;
}

/* Hero */
.hero { position: relative; padding: 136px 0 48px; overflow-x: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero .lede { margin-bottom: 12px; }
.hero .lede + .stores { margin-top: 28px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; display: flex; justify-content: center; min-height: 720px; padding-top: 16px; }
.blob {
  position: absolute; top: -110px; left: 2%; width: 132%; height: 118%;
  background: var(--accent); border-radius: 46% 54% 38% 62% / 52% 44% 56% 48%;
}
/* The phone is a real 3D body in CSS: the screen, then a stack of plates behind it for the sides
   (site.js adds them), turned by --rx and --ry as the pointer and the page move. */
.hero-art { perspective: 1400px; }
.phone3d {
  position: relative; z-index: 2; width: min(312px, 78vw); align-self: flex-start; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -24deg)); transition: transform .25s ease-out;
}
.phone3d .shot { position: relative; }
.phone3d .plate { position: absolute; inset: 0; border-radius: 28px; background: #2a2d2d; transform: translateZ(calc(var(--i) * -1.5px)); }
.phone3d .plate:last-child { background: #101212; }
@media (max-width: 900px) {
  .hero { padding-top: 112px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { min-height: 0; padding: 40px 0 48px; }
  .blob { top: 0; left: -6%; width: 112%; height: 100%; }
}

/* His room: the app's pixel room at his own pixel size. He stands on .room-floor. */
.room { position: relative; height: 196px; max-width: 520px; margin-top: 32px; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; }
.room canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.room-floor { position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; }

/* Screenshots in a plain phone outline */
.shot { width: 100%; padding: 6px; border-radius: 28px; background: #161818; box-shadow: inset 0 0 0 1px #2a2d2d; }
.shot img { border-radius: 22px; width: 100%; height: auto; aspect-ratio: 640 / 1428; }
/* Each screenshot has a dark and a light take; only the theme's one is shown (and loaded). */
[data-theme="light"] .t-dark, :root:not([data-theme="light"]) .t-light { display: none; }

/* Sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
.head { max-width: 640px; margin-bottom: 40px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.top { grid-template-columns: 5fr 7fr; align-items: start; }
.split .head { margin-bottom: 0; }
@media (max-width: 900px) { .split, .split.top { grid-template-columns: 1fr; gap: 32px; } }

/* Features: one wide card each, the text beside a whole phone screen. Sides alternate. */
.feature {
  display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: center; margin-top: 12px;
  padding: 40px 56px; background: var(--card); border: 1px solid var(--line); border-radius: 24px;
}
.feature:nth-of-type(even) { grid-template-columns: 280px 1fr; }
.feature:nth-of-type(even) .shot { order: -1; }
.feature h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; }
.feature p { margin: 0 0 20px; max-width: 480px; color: var(--muted); font-size: 1.0625rem; }
.feature.accent { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.feature.accent p { color: rgba(0, 0, 0, .72); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 480px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: ""; position: absolute; left: 4px; top: .42em; width: 12px; height: 6px;
  border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg);
}
.feature.accent .checks li::before { border-color: #000; }
@media (max-width: 900px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; gap: 28px; padding: 28px 20px; }
  .feature:nth-of-type(even) .shot { order: 0; }
  .feature .shot { max-width: 280px; margin: 0 auto; }
}
/* Two half-width panels, then the grid of small cards. */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.panel { padding: 32px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; }
.panel h3 { font-size: 1.5rem; letter-spacing: -.02em; margin: 0 0 8px; }
.panel p { margin: 0; color: var(--muted); }
.feature + .panel { margin-top: 12px; }
.tag {
  display: inline-block; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--card); background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--accent-text);
}
.chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .88rem; }
.more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
.mini { padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.mini .ico { display: block; margin-bottom: 14px; color: var(--accent-text); }
.mini b { display: block; margin-bottom: 4px; }
.mini span { color: var(--muted); font-size: .92rem; }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } .more { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .more { grid-template-columns: 1fr; } }

/* Raised cards: a slab with a solid side. On hover it lifts, leans toward the pointer and is lit
   where the pointer is (site.js sets --rx, --ry, --mx and --my). */
.lift {
  --edge: color-mix(in srgb, var(--t, var(--muted)) 32%, var(--edge-base));
  position: relative; box-shadow: 0 5px 0 var(--edge);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--up, 0px));
  transition: transform .18s ease-out, box-shadow .18s ease-out;
}
.lift::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .18s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--t, var(--accent)) 36%, transparent), transparent 72%);
}
.lift:hover { --up: -6px; box-shadow: 0 11px 0 var(--edge); }
.lift:hover::before { opacity: 1; }
.lift > * { position: relative; }

/* Accounts: tinted raised cards. The tints are the app's accent and partner colours. */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
.fact {
  --t: var(--accent);
  padding: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); background: color-mix(in srgb, var(--t) var(--tint), var(--card));
}
.fact:nth-child(2) { --t: #78d7ff; }
.fact:nth-child(3) { --t: #ffc857; }
.fact:nth-child(4) { --t: #b9a8ff; }
.fact:nth-child(5) { --t: #7fe0c2; }
.fact:nth-child(6) { --t: #ff92ba; }
.fact .ico { display: block; width: 28px; height: 28px; margin-bottom: 16px; }
.fact b { display: block; font-size: 1.0625rem; margin-bottom: 4px; }
.fact span { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* The cat */
.howto { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 10px; }
.howto li { display: flex; gap: 12px; align-items: baseline; }
.howto b { flex: none; width: 72px; color: var(--accent-text); }
.howto span { color: var(--muted); }
#call-cat { margin-top: 20px; }
#the-cat .lede + .lede { margin-top: 16px; }
/* His garden: night with the moon on the dark theme, day with the sun on the light one. */
.stage { position: relative; height: 320px; border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden; }
.stage canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.garden-floor { position: absolute; left: 0; right: 0; bottom: 23px; height: 1px; }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 20px;
  font-weight: 600; cursor: pointer; list-style: none; border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform .18s;
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* Policies */
.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.link-card {
  position: relative; display: block; padding: 20px 48px 20px 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); color: var(--text); text-decoration: none;
}
.link-card:hover { background: var(--hover); }
.link-card b { display: block; font-size: 1.0625rem; margin-bottom: 4px; }
.link-card span { color: var(--muted); font-size: .95rem; }
.link-card::after {
  content: ""; position: absolute; right: 22px; top: 26px; width: 9px; height: 9px;
  border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg);
}
.contact { margin: 24px 0 0; color: var(--muted); }
@media (max-width: 900px) { .links { grid-template-columns: 1fr; } }
.page { padding: 112px 0 64px; }
.doc { max-width: 820px; margin-top: 24px; padding: 4px 28px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.legal h1 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.02em; margin: 24px 0 12px; }
.legal h2 { font-size: 1.1rem; line-height: 1.4; letter-spacing: 0; margin: 28px 0 6px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal .meta { font-size: .9rem; }
@media (max-width: 560px) { .doc { padding: 0 16px 16px; } }
/* Comparison pages: the two apps side by side in the doc card, rows split by hairlines. */
.compare { width: 100%; margin: 20px 0 8px; border-collapse: collapse; font-size: .95rem; line-height: 1.5; }
.compare th, .compare td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare thead th { border-top: 0; padding-top: 0; font-weight: 600; }
.compare thead th:nth-child(2) { color: var(--accent-text); }
.compare thead td { border-top: 0; }
.compare tbody th { width: 30%; font-weight: 600; }
.compare td { color: var(--muted); }
.legal .sources li { font-size: .9rem; }
/* Phones: each row's label takes its own line, with the two answers side by side under it. */
@media (max-width: 560px) {
  .compare { font-size: .875rem; }
  .compare tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .compare thead td { display: none; }
  .compare th, .compare td { padding-right: 0; }
  .compare tbody th { grid-column: 1 / -1; width: auto; padding-bottom: 2px; }
  .compare tbody td { border-top: 0; padding-top: 0; }
}
/* Several apps, one row each (/cat-workout-apps). Meow's Gym's row comes first, its name in the
   accent. On phones each row stacks: the app's name, then every answer under its column's name. */
.compare.apps thead th:nth-child(2) { color: inherit; }
.compare.apps tbody th { width: auto; white-space: nowrap; }
.compare.apps tbody tr:first-child th { color: var(--accent-text); }
@media (max-width: 560px) {
  .compare.apps thead { display: none; }
  .compare.apps tr { display: block; padding: 10px 0 6px; border-top: 1px solid var(--line); }
  .compare.apps th, .compare.apps td { display: block; border-top: 0; padding: 0 0 4px; }
  .compare.apps td::before { content: attr(data-label) ": "; color: var(--text); font-weight: 500; }
}
/* Program pages: small fact tiles under the intro, then each day's exercises in a table. The
   number columns have fixed widths so they line up from one day to the next. */
.prog-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.legal .prog-facts li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: .85rem; line-height: 1.35; }
.prog-facts b { display: block; color: var(--text); font-size: 1rem; font-weight: 600; }
.legal h3 { font-size: 1rem; line-height: 1.4; margin: 24px 0 2px; }
.plan { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .95rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
/* rem, not em: the header row sets the widths and its type is smaller than the rows'. */
.plan thead th:nth-child(2) { width: 6rem; }
.plan thead th:nth-child(3) { width: 4.6rem; }
.plan th, .plan td { padding: 8px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.plan thead th { border-top: 0; font-size: .8rem; font-weight: 500; color: var(--muted); }
.plan tbody th { font-weight: 500; }
.plan tr > :not(:first-child) { padding-left: 16px; white-space: nowrap; }
.plan td { color: var(--muted); }
@media (max-width: 560px) {
  .legal .prog-facts li { padding: 6px 10px; font-size: .8rem; }
  .prog-facts b { font-size: .9rem; }
  .plan { font-size: .875rem; }
  .plan tr > :not(:first-child) { padding-left: 12px; }
  .plan thead th:nth-child(2) { width: 5.4rem; }
  .plan thead th:nth-child(3) { width: 4.1rem; }
}

/* Closing band */
.cta-sec { padding-top: 0; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(32px, 6vw, 64px) clamp(24px, 5vw, 56px); border-radius: 24px; background: var(--accent); color: var(--on-accent);
}
.cta h2 { margin-bottom: 8px; }
.cta p { margin: 0; color: rgba(0, 0, 0, .72); }

footer { padding: 32px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--muted); }
footer .fine { font-size: .8rem; }

/* Disabled filled button: a neutral key with muted text, like the app's, never a faded accent. */
.btn-primary:disabled { color: var(--muted); background: linear-gradient(var(--key-top), var(--key-bottom)); box-shadow: 0 4px 0 var(--key-side), inset 0 0 0 1px var(--line-strong); cursor: not-allowed; transform: none; }

/* The usage data question (analytics.js): a floating card like the top bar, above the cat. Two
   equal answers, neither styled as the expected one. */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 520px; margin: 0 auto; padding: 16px 16px 20px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--float);
}
.consent p { margin: 4px 0 14px; color: var(--muted); font-size: .95rem; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* The iPhone waitlist (waitlist.js): a native dialog with one field and one primary action. */
.sheet {
  width: min(440px, calc(100% - 32px)); padding: 24px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--float);
}
.sheet::backdrop { background: rgba(0, 0, 0, .6); }
.sheet h2 { font-size: 1.4rem; margin: 0 0 8px; }
.sheet p { margin: 0 0 16px; color: var(--muted); }
.sheet .status { min-height: 1.6em; margin: 8px 0 4px; font-size: .9rem; }
.sheet .fine { font-size: .85rem; }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
/* Form fields: the name above the box in small muted text, the box a well darker than its card. */
.field-label { display: block; margin-bottom: 6px; font-size: .85rem; color: var(--muted); }
.field {
  width: 100%; height: 48px; padding: 0 14px; color: var(--text); font: inherit;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px;
}
.field:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* The roaming cat (site.js). A 104px canvas (SIZE in site.js), a little over the app's 85.3dp. */
#roam-cat { position: fixed; left: 0; top: 0; z-index: 40; width: 104px; height: 104px; pointer-events: none; will-change: transform; }
.cat-pose { position: absolute; inset: 0; }
.cat-sprite {
  position: absolute; left: 0; top: 0; width: 64px; height: 64px; transform-origin: 0 0;
  background: url(/cat.webp) 0 0 / 704px 384px no-repeat; image-rendering: pixelated;
}
.cat-hit {
  position: absolute; left: 50%; bottom: 0; width: 64px; height: 64px; margin-left: -32px; padding: 0; border: 0; border-radius: 8px;
  background: none; pointer-events: auto; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none;
}
.cat-hit.held { cursor: grabbing; }
.cat-fx { position: absolute; left: -28px; top: 0; width: 160px; height: 104px; pointer-events: none; }
.cat-heart {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 14px; margin: -8px 0 0 -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23171616' d='M1 0h2v1H1zM5 0h2v1H5zM0 1h8v3H0zM1 4h6v1H1zM2 5h4v1H2zM3 6h2v1H3z'/%3E%3Cpath fill='%23f25a68' d='M1 1h2v1H1zM5 1h2v1H5zM1 2h6v2H1zM2 4h4v1H2zM3 5h2v1H3z'/%3E%3C/svg%3E") 0 0 / 16px 14px;
  animation: cat-heart .76s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes cat-heart {
  from { opacity: 1; transform: translate(var(--hx), var(--hy)); }
  to { opacity: 0; transform: translate(calc(var(--hx) + var(--dx)), calc(var(--hy) - 26px)); }
}

/* His speech bubble: pixel font, 2px grid, stepped corners and tail, dark ink on light paper in both themes. */
#cat-bubble { position: fixed; left: 0; top: 0; z-index: 41; will-change: transform; }
.bub {
  position: relative; isolation: isolate; max-width: min(200px, calc(100vw - 16px)); padding: 8px 10px 12px; cursor: pointer;
  font: 11px/15px "Silkscreen", monospace; color: #101211; transform-origin: 50% 100%; animation: cat-pop .24s linear;
}
.bub.wide { max-width: min(260px, calc(100vw - 16px)); }
.bub i { font-style: normal; color: transparent; }
.bub::before, .bub::after {
  content: ""; position: absolute; z-index: -2; inset: 0 0 4px; background: #101211;
  clip-path: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
}
.bub::after { z-index: -1; inset: 2px 2px 6px; background: #f4f6f4; }
.bub-tail {
  position: absolute; bottom: 0; width: 8px; height: 6px; margin-left: -4px;
  background:
    linear-gradient(#f4f6f4, #f4f6f4) 0 0 / 8px 2px no-repeat,
    linear-gradient(#f4f6f4, #f4f6f4) 2px 2px / 4px 2px no-repeat,
    linear-gradient(#101211, #101211) 0 2px / 8px 2px no-repeat,
    linear-gradient(#101211, #101211) 2px 4px / 4px 2px no-repeat;
}
@keyframes cat-pop { 0% { transform: scale(0); } 58% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* His long-press menu */
#cat-menu {
  position: fixed; z-index: 42; min-width: 140px; padding: 6px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line-strong); box-shadow: var(--float);
}
#cat-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font: 500 15px/1 inherit; font-family: inherit; cursor: pointer;
}
#cat-menu button:hover { background: var(--hover); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: .01s !important; }
}

/* The App Links fallback pages (/redeem and /open): a code to copy and a row of buttons. */
.legal .link-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.legal .code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0; }
.legal .code-row code { flex: 1 1 240px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: 600 1rem/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.legal [hidden] { display: none; }
