/* ---------- skins: one per pet (colours taken from each pet's palette in the app) ---------- */
:root, [data-skin="phone"] {
  /* Flip the flip phone: indigo body, LCD green */
  --accent: #6270DE; --accent-l: #96A6F8; --accent-d: #3E4AA4; --on-accent: #FFFFFF; --accent-2: #B2E298;
  --outline: #1A1C36; --ink: #1E2036; --muted: #5F6488;
  --bg: #EDF0FF; --paper: #FAFBFF; --line: #D7DCF5; --stage: #E2E7FF; --halo: #D5DCFF; --warm-1: #DFE5FF; --warm-2: #F5F7FF;
  --night: #161A33;
}
[data-skin="frog"] {
  /* Hopper the frog: leaf green, cream belly */
  --accent: #68C454; --accent-l: #A4E678; --accent-d: #3E923E; --on-accent: #10301A; --accent-2: #F0F4C2;
  --outline: #1A4828; --ink: #17291B; --muted: #546E57;
  --bg: #ECF7E2; --paper: #FAFEF4; --line: #D0E7C0; --stage: #DFF2D0; --halo: #CDEAB8; --warm-1: #DBF1C9; --warm-2: #F4FBEC;
  --night: #12241A;
}
[data-skin="pancake"] {
  /* Flapjack the pancake: golden stack, syrup, butter */
  --accent: #ECAC5C; --accent-l: #FCD690; --accent-d: #BA5C1E; --on-accent: #3F200A; --accent-2: #FFF2A4;
  --outline: #603216; --ink: #33210F; --muted: #78603F;
  --bg: #FFF4DE; --paper: #FFFCF2; --line: #F1DDB4; --stage: #FFEAC2; --halo: #FFDFA6; --warm-1: #FFE6B8; --warm-2: #FFF8EA;
  --night: #2A1A10;
}
[data-skin="clawd"] {
  /* Clawd (classic): the original orange */
  --accent: #D97757; --accent-l: #EB9675; --accent-d: #BA5E40; --on-accent: #FFFFFF; --accent-2: #FFD3BD;
  --outline: #703220; --ink: #2B201D; --muted: #7A6258;
  --bg: #FFF3E8; --paper: #FFFBF6; --line: #F1DCCB; --stage: #FFEDE0; --halo: #FFE1CC; --warm-1: #FFE5D3; --warm-2: #FFF6EE;
  --night: #1E1830;
}
:root {
  --spark: #FFD246; --heart: #F05073; --teal: #32C3AF; --purple: #A078FF; --blue: #6EAFFF;
  --tb-h: 52px; --px: 4px; --radius: 14px;
  --shadow: 0 var(--px) 0 var(--outline);
  --soft: color-mix(in srgb, var(--outline) 16%, transparent);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 'Nunito', system-ui, sans-serif;
  padding-bottom: calc(var(--tb-h) + 40px);
  overflow-x: hidden;
  transition: background-color .5s, color .5s;
}
a { color: var(--accent-d); text-underline-offset: 3px; }
a:hover { color: var(--outline); }
h1, h2, h3 { font-family: 'Pixelify Sans', system-ui, sans-serif; line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.88em; background: #fff; border: 2px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px dashed var(--accent-d); outline-offset: 3px; }

canvas.pix { image-rendering: pixelated; image-rendering: crisp-edges; display: block; width: 100%; height: auto; }

main { position: relative; z-index: 1; }
section { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cloud {
  position: absolute; width: 96px; height: 24px; background: #fff; opacity: 0.5;
  box-shadow: 24px -16px 0 #fff, 48px -16px 0 #fff, 24px -32px 0 #fff, 72px 0 0 #fff;
  animation: drift linear infinite;
}
.c1 { top: 12%; animation-duration: 70s; animation-delay: -10s; }
.c2 { top: 34%; transform: scale(0.7); animation-duration: 95s; animation-delay: -60s; opacity: 0.35; }
.c3 { top: 62%; animation-duration: 120s; animation-delay: -30s; opacity: 0.3; }
@keyframes drift { from { left: -200px; } to { left: 110vw; } }
.twinkle { position: absolute; width: 8px; height: 8px; background: var(--spark); animation: twinkle 3s ease-in-out infinite; }
.twinkle::before, .twinkle::after { content: ''; position: absolute; background: inherit; }
.twinkle::before { left: -8px; top: 0; width: 24px; height: 8px; opacity: 0.6; }
.twinkle::after { top: -8px; left: 0; width: 8px; height: 24px; opacity: 0.6; }
.t1 { top: 9%; left: 8%; } .t2 { top: 22%; left: 88%; animation-delay: -1s; background: var(--accent-l); }
.t3 { top: 48%; left: 4%; animation-delay: -2s; background: var(--teal); } .t4 { top: 70%; left: 93%; animation-delay: -0.5s; background: var(--purple); }
.t5 { top: 85%; left: 46%; animation-delay: -1.6s; background: var(--heart); }
@keyframes twinkle { 0%, 100% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(0.7); opacity: 0.9; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 18px/1 'Pixelify Sans', sans-serif; text-decoration: none; cursor: pointer;
  padding: 14px 22px; border: 3px solid var(--outline); border-radius: 12px;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s, background .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 calc(var(--px) + 2px) 0 var(--outline); }
.btn:active { transform: translateY(var(--px)); box-shadow: 0 0 0 var(--outline); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-l); color: var(--on-accent); }
.btn-ghost { background: var(--paper); color: var(--outline); }
.btn-ghost:hover { background: #fff; color: var(--outline); }

/* ---------- hero ---------- */
.hero {
  min-height: calc(100vh - var(--tb-h));
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  padding-top: 48px; padding-bottom: 24px; position: relative;
}
.pill {
  display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 99px; padding: 4px 14px 4px 4px;
  text-decoration: none; color: var(--ink); animation: pop .6s .1s both;
}
.pill b { background: var(--accent); color: var(--on-accent); border-radius: 99px; padding: 2px 10px; font-size: 12px; }
.pill:hover { border-color: var(--accent-l); color: var(--ink); }
h1 { font-size: clamp(56px, 9vw, 112px); margin: 18px 0 12px; animation: pop .6s .2s both; }
h1 .name { color: var(--accent); position: relative; display: inline-block; text-shadow: 4px 4px 0 var(--outline); }
.lede { font-size: 20px; max-width: 36ch; color: color-mix(in srgb, var(--ink) 85%, var(--bg)); margin: 0 0 28px; animation: pop .6s .3s both; }
.lede b { color: var(--accent-d); }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; animation: pop .6s .4s both; }
.fine { color: var(--muted); font-size: 14px; margin-top: 16px; animation: pop .6s .5s both; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.stage { position: relative; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero-stage { cursor: pointer; width: min(100%, 460px); animation: pop .8s .3s both; }
.hero-stage canvas { position: relative; z-index: 1; }
.desk { height: 18px; margin: -6px 6% 0; background: var(--accent-d); border: 3px solid var(--outline); border-radius: 6px; box-shadow: 0 8px 0 var(--soft); transition: background .5s; }
.hero-stage::before {
  content: ''; position: absolute; left: 50%; top: 48%; width: 86%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--halo) 0 55%, transparent 56%);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.04); } }
.psst {
  grid-column: 1 / -1; justify-self: center; text-align: center; color: var(--muted);
  background: var(--paper); border: 2px dashed var(--line); border-radius: 99px; padding: 10px 22px; margin: 8px 0 0; font-size: 15px;
}
.psst .arrow { display: inline-block; margin-left: 8px; animation: bob 1.2s ease-in-out infinite; color: var(--accent-d); font-weight: 800; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* the four-pet switcher under the hero */
.switcher { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; animation: pop .8s .5s both; }
.switcher button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; padding: 8px 6px 6px;
  font: 700 13px/1 'Pixelify Sans', sans-serif; color: var(--ink); background: var(--paper);
  border: 3px solid var(--line); border-radius: 14px; cursor: pointer; transition: transform .15s, border-color .2s, box-shadow .2s;
}
.switcher button canvas { width: 44px; height: 44px; }
.switcher button:hover { transform: translateY(-3px); border-color: var(--accent-l); }
.switcher button[aria-checked="true"] { border-color: var(--outline); box-shadow: 0 4px 0 var(--outline); background: var(--stage); }

/* ---------- speech bubbles ---------- */
/* Draw-Bubble from the app: white box, 1-unit ink border, Segoe UI Bold, a stepped pixel tail */
.bubble {
  --u: 2px;
  position: absolute; left: 50%; bottom: 80%; z-index: 3; transform: translate(-50%, 0);
  background: #FAFAFA; color: #28201E; border: var(--u) solid #28201E; border-radius: 0;
  font: 700 15px/1.25 'Segoe UI', system-ui, -apple-system, sans-serif; padding: 1px 6px 1px 6px; white-space: nowrap;
  display: flex; align-items: center;
  visibility: hidden; pointer-events: none;
}
.bubble::after {
  content: ''; position: absolute; left: 50%; top: 100%; width: calc(var(--u) * 4); height: calc(var(--u) * 3);
  margin: calc(var(--u) * -1) 0 0 calc(var(--u) * -2);
  background:
    linear-gradient(#FAFAFA, #FAFAFA) 0 0 / 100% 33.34% no-repeat,
    linear-gradient(90deg, #28201E 25%, #FAFAFA 25% 75%, #28201E 75%) 0 50% / 100% 33.34% no-repeat,
    linear-gradient(90deg, transparent 25%, #28201E 25% 75%, transparent 75%) 0 100% / 100% 33.34% no-repeat;
}
.bubble.show { visibility: visible; }
.bubble .spin {
  display: inline-block; flex: none; width: 15px; height: 15px; margin-right: 4px;
  background: var(--spin-strip) 0 0 / 90px 15px no-repeat; image-rendering: pixelated;
  animation: spin .72s steps(6) infinite;
}
@keyframes spin { to { background-position: -90px 0; } }
.hero-stage .bubble { font-size: 20px; --u: 3px; }

/* ---------- windows ---------- */
.window {
  background: #fff; border: 3px solid var(--outline); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 8px 0 var(--outline), 0 24px 60px var(--soft);
}
.titlebar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--accent); border-bottom: 3px solid var(--outline); }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--outline); }
.dots i:nth-child(2) { background: var(--spark); } .dots i:nth-child(3) { background: var(--teal); }
.wtitle { font: 700 15px/1 'Pixelify Sans', sans-serif; color: var(--on-accent); }

/* ---------- sections ---------- */
.sec-head { text-align: center; max-width: 660px; margin: 0 auto 36px; }
.sec-head.sub { margin-top: 72px; }
.kicker { display: inline-block; font: 700 14px/1 'Pixelify Sans', sans-serif; color: var(--accent-d); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px; }
h2 { font-size: clamp(34px, 5vw, 52px); }
.sec-head p { color: var(--muted); margin: 12px 0 0; }
.pets, .tricks, .install, .privacy, .typebox, .changes, .tinker { padding-top: 90px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--paper); border: 3px solid var(--outline); border-radius: var(--radius); padding: 14px 18px 18px;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, background .5s;
}
.card .stage { background: var(--stage); border-radius: 10px; margin-bottom: 14px; padding-top: 18px; overflow: visible; transition: background .5s; }
.card .stage canvas { width: 100%; max-width: 260px; margin: 0 auto; }
.card h3 { font-size: 22px; margin-bottom: 4px; }
.card p { margin: 0; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); font-size: 16px; }
.card.dark { background: var(--night); color: #F5EEFF; }
.card.dark p { color: #CFC5E8; }
.stage.movie { --glow: #A5D4FF; background: radial-gradient(120% 90% at 50% -10%, var(--glow) 0, #2C2547 55%, #15111F 100%); }
.card.plain { text-align: left; padding: 22px; }
.card.plain .ico { font-size: 34px; display: block; margin-bottom: 6px; }
[data-skin="clawd"] .hide-clawd { display: none; }

.extras { list-style: none; padding: 0; margin: 36px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 920px; }
.extras li { background: var(--paper); border: 2px solid var(--line); border-radius: 99px; padding: 6px 16px; font-weight: 600; font-size: 15px; }

/* ---------- pets ---------- */
.pet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pet-card {
  display: flex; flex-direction: column; background: var(--paper); border: 3px solid var(--line); border-radius: 18px; padding: 14px 16px 18px;
  transition: border-color .3s, box-shadow .3s, transform .2s;
}
.pet-card .stage { border-radius: 12px; margin-bottom: 12px; padding-top: 22px; }
.pet-card .stage canvas { max-width: 220px; margin: 0 auto; }
.pet-card[data-pet="phone"] .stage { background: #E2E7FF; }
.pet-card[data-pet="frog"] .stage { background: #DFF2D0; }
.pet-card[data-pet="pancake"] .stage { background: #FFEAC2; }
.pet-card[data-pet="clawd"] .stage { background: #FFEDE0; }
.pet-card h3 { font-size: 26px; display: flex; align-items: baseline; gap: 8px; }
.pet-card h3 small { font: 700 11px/1 'Nunito', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 2px solid var(--line); border-radius: 99px; padding: 3px 7px; }
.pet-card .tag { font-weight: 800; color: var(--accent-d); margin: 2px 0 6px; }
.pet-card p { margin: 0 0 6px; font-size: 15px; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); }
.pet-card .sig { font-size: 14px; color: var(--muted); }
.pet-card .btn-pick { margin-top: auto; align-self: flex-start; padding: 10px 16px; font-size: 16px; background: var(--paper); color: var(--outline); }
.pet-card.on { border-color: var(--outline); box-shadow: 0 6px 0 var(--outline); transform: translateY(-4px); }
.pet-card.on .btn-pick { background: var(--accent); color: var(--on-accent); }
.pets-note { text-align: center; color: var(--muted); max-width: 640px; margin: 28px auto 0; font-size: 15px; }

/* ---------- type box ---------- */
.type-card {
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 24px;
  background: linear-gradient(135deg, var(--warm-1), var(--warm-2)); border: 3px solid var(--outline); border-radius: 20px; padding: 28px 32px;
  box-shadow: 0 8px 0 var(--outline);
}
.type-card h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 16px; }
textarea {
  width: 100%; resize: vertical; font: 600 17px/1.5 'Nunito', sans-serif; color: var(--ink);
  background: #fff; border: 3px solid var(--outline); border-radius: 12px; padding: 12px 14px;
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--halo); }
.counters { display: flex; gap: 18px; margin-top: 10px; font: 600 15px/1 'Pixelify Sans', sans-serif; color: var(--muted); }
.counters b { color: var(--accent-d); }
.typer { padding-top: 30px; }
.typer canvas { max-width: 300px; margin: 0 auto; }

/* ---------- install ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--paper); border: 3px solid var(--outline); border-radius: var(--radius); padding: 26px 22px 22px; box-shadow: var(--shadow); position: relative; }
.step .num {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px;
  font: 700 28px/1 'Pixelify Sans', sans-serif; color: var(--on-accent); background: var(--accent);
  border: 3px solid var(--outline); border-radius: 12px; box-shadow: 0 4px 0 var(--outline);
}
.step.ok .num { background: var(--teal); color: #fff; }
.step h3 { font-size: 23px; margin-bottom: 6px; }
.step h3 a { color: var(--accent-d); }
.step p { margin: 0; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); }
.notes { max-width: 760px; margin: 34px auto 0; color: color-mix(in srgb, var(--ink) 78%, var(--bg)); font-size: 16px; }
.notes p { margin: 8px 0; }
.warn { background: #FFF8DA; border: 2px solid #F2DB83; border-radius: 12px; padding: 12px 16px; margin-top: 16px !important; }

.nothing { text-align: center; font: 700 22px/1.2 'Pixelify Sans', sans-serif; color: var(--accent-d); margin: 28px 0 0; }
.site-note { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* ---------- changelog ---------- */
.log { max-width: 760px; margin: 0 auto; background: var(--paper); }
.versions { list-style: none; margin: 0; padding: 10px 22px; }
.versions li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px 0; border-bottom: 2px dashed var(--line); }
.versions li:last-child { border-bottom: 0; }
.versions li > b { font: 700 20px/1.2 'Pixelify Sans', sans-serif; color: var(--accent-d); }
.versions li:first-child > b::after { content: 'latest'; display: block; font: 800 10px/1 'Nunito', sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
.log-foot { margin: 0; padding: 12px 22px 16px; border-top: 3px solid var(--outline); font-weight: 700; }

/* ---------- tinker ---------- */
.term { max-width: 860px; margin: 0 auto; background: #241C2B; }
.term .titlebar { background: #3A2E44; }
.term .wtitle { color: #fff; }
.copy { margin-left: auto; font: 700 13px/1 'Pixelify Sans', sans-serif; background: var(--accent); color: var(--on-accent); border: 2px solid #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.copy:hover { background: var(--accent-l); }
.term pre { margin: 0; padding: 20px 22px; color: #F7E7DA; font: 15px/1.7 ui-monospace, 'Cascadia Code', Consolas, monospace; overflow-x: auto; }
.term .c { color: #A890B8; }

.foot { text-align: center; padding: 90px 20px 30px; color: var(--muted); font-size: 15px; }
.foot p { margin: 4px 0; } .foot .tiny { font-size: 13px; opacity: .85; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .9, .3, 1.2); }
.reveal.in { opacity: 1; transform: none; }
.grid .reveal:nth-child(3n+2), .steps .reveal:nth-child(2), .pet-grid .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3n), .steps .reveal:nth-child(3), .pet-grid .reveal:nth-child(3) { transition-delay: .16s; }
.pet-grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tb-h); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 0 10px;
  background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-top: 3px solid var(--outline);
}
.taskbar a, .tray-btn { color: var(--ink); text-decoration: none; }
.start {
  display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 8px; border-radius: 10px;
  font: 700 17px/1 'Pixelify Sans', sans-serif; background: var(--accent); color: var(--on-accent) !important; border: 2px solid var(--outline);
}
.start canvas { width: 24px; height: 24px; }
.start:hover { background: var(--accent-l); }
.apps { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.apps a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; font-weight: 700; font-size: 15px; white-space: nowrap; position: relative; }
.apps a:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.apps a::after { content: ''; position: absolute; left: 40%; right: 40%; bottom: 3px; height: 3px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.apps a:hover::after { transform: none; }
.tray { display: flex; align-items: center; gap: 10px; font: 600 14px/1 'Nunito', sans-serif; color: var(--muted); }
.tray-btn {
  font: 700 13px/1 'Nunito', sans-serif; background: transparent; border: 2px solid var(--line);
  border-radius: 99px; padding: 6px 12px; cursor: pointer; color: var(--muted);
}
.tray-btn:hover { border-color: var(--accent-l); color: var(--accent-d); }
.tray-btn[aria-pressed="false"] { background: var(--accent); color: var(--on-accent); border-color: var(--outline); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-2px); } }
#clock { font-variant-numeric: tabular-nums; }

/* ---------- the roaming pet ---------- */
.roamer { position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none; image-rendering: pixelated; image-rendering: crisp-edges; transition: opacity .3s; }
.roamer-hit { position: fixed; left: 0; top: 0; z-index: 46; cursor: grab; touch-action: none; border-radius: 8px; }
.roamer-hit:active { cursor: grabbing; }
.roamer-bubble { position: fixed; bottom: auto; z-index: 47; transform: translate(-50%, -100%); }
.gone { opacity: 0 !important; pointer-events: none !important; visibility: hidden; }
body.file-over .roamer-hit { outline: 3px dashed var(--accent); outline-offset: 4px; }

/* the thought-cloud menus: a pixel cloud (canvas) with the items laid over it */
.roamer-overlay { position: fixed; left: 0; top: 0; z-index: 44; pointer-events: none; }
.cloud-menu { position: fixed; z-index: 60; pointer-events: none; }
.cloud-bg { position: absolute; left: 0; top: 0; image-rendering: pixelated; }
.cloud-menu button, .cloud-menu hr, .cloud-menu .moods { position: absolute; pointer-events: auto; }
.cloud-menu button {
  margin: 0; text-align: left; font: inherit; color: #28201E; background: none; border: 0; border-radius: 0;
  cursor: pointer; white-space: nowrap; line-height: 1.15;
}
.cloud-menu button:hover, .cloud-menu button:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.cloud-menu hr {
  margin: 0; border: 0; height: var(--u);
  background: repeating-linear-gradient(90deg, rgb(200,204,212) 0 calc(var(--u) * 2), transparent calc(var(--u) * 2) calc(var(--u) * 3));
}
.cloud-menu[hidden] { display: none; }
/* mood bars on top of his menu */
.moods { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font: 700 11px/1 'Segoe UI', system-ui, sans-serif; pointer-events: none !important; }
.moods span { display: flex; align-items: center; gap: 4px; }
.moods i { font-style: normal; font-size: 11px; width: 14px; text-align: center; }
.moods b { flex: 1; height: 7px; border: var(--u, 2px) solid #28201E; background: #E4E7EE; position: relative; }
.moods u { position: absolute; inset: 0 auto 0 0; width: 50%; background: var(--teal); text-decoration: none; transition: width .4s; }
.moods u.low { background: var(--heart); }
.moods u.mid { background: var(--spark); }
/* "Change pet...": items with live previews */
.picker button { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 2px; }
.picker button canvas { width: 100%; }
.picker button[aria-checked="true"] span::after { content: ' ✓'; }
.picker button span { font-size: .9em; }

.confetti {
  position: fixed; z-index: 70; width: 8px; height: 8px; pointer-events: none;
  animation: confetti 1.1s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes confetti { to { transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--rot)); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .pet-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; gap: 10px; min-height: 0; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  h1 { font-size: clamp(40px, 12vw, 80px); white-space: nowrap; }
  .hero-side { order: -1; margin-top: 30px; }
  .hero-stage { width: min(80%, 300px); }
  .lede { font-size: 18px; }
  .ctas { justify-content: center; }
  .type-card { grid-template-columns: 1fr; padding: 22px; }
  .typer { order: -1; }
  .apps .l { display: none; }
  .apps a { padding: 8px 10px; font-size: 18px; }
  .start span { display: none; }
  .tray-btn span { display: none; }
  .tray-btn::before { content: '👋'; font-size: 16px; }
  .tray-btn[aria-pressed="false"]::before { content: '💙'; }
  #clock { display: none; }
}
@media (max-width: 520px) {
  .grid, .grid.three { grid-template-columns: 1fr; }
  .pet-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pet-card { padding: 10px 10px 14px; }
  .pet-card h3 { font-size: 20px; flex-wrap: wrap; }
  .pet-card p:not(.tag) { display: none; }
  .pet-card .btn-pick { font-size: 14px; padding: 8px 10px; }
  .switcher button { width: 72px; }
  .switcher button canvas { width: 38px; height: 38px; }
  section { padding-left: 16px; padding-right: 16px; }
  .versions li { grid-template-columns: 44px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
