:root { color-scheme: dark; --paper: #fff7e9; --ink: #29251f; --orange: #ffb451; --edge: clamp(24px, 3.4vw, 60px); font-family: Arial, Helvetica, sans-serif; color: var(--paper); background: var(--ink); }
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; }
body { min-height: 100svh; }
button, a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
a { text-decoration: none; }
button { cursor: pointer; }
.scene { position: relative; min-height: 650px; height: 100svh; overflow: hidden; isolation: isolate; }
.warehouse { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 53%; z-index: -3; }
.shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, #17161193 0%, #17161112 28%, transparent 52%, #17161115 64%, #171611eb 100%), linear-gradient(90deg, #17161115, transparent 50%); }
.header { position: absolute; top: max(var(--edge), env(safe-area-inset-top)); left: var(--edge); right: var(--edge); display: flex; align-items: center; justify-content: space-between; gap: 16px; z-index: 3; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-cat { display: block; width: 62px; height: 62px; object-fit: contain; flex-shrink: 0; }
h1 { margin: 0; font-size: clamp(24px, 2.65vw, 43px); line-height: 1; letter-spacing: -.065em; font-weight: 800; }
.ticker { font: bold 13px 'Courier New', monospace; padding: 11px 18px; border: 1px solid #fff7e966; background: #29251f30; }
.character-stage { position: absolute; left: 50%; bottom: 14%; height: min(76svh, 770px); width: min(76svh, 770px); transform: translateX(-50%); z-index: 0; }
.cat { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; filter: drop-shadow(8px 12px 8px #21140d35); }
.contact-shadow { position: absolute; bottom: 6.8%; left: 26%; width: 53%; height: 7%; border-radius: 50%; background: #21180ec9; filter: blur(12px); transform: rotate(-4deg); }
.shipping-note { position: absolute; top: 39%; right: var(--edge); display: flex; align-items: center; gap: 12px; opacity: .8; }
.shipping-note > span { font-size: 29px; letter-spacing: -.15em; }
.shipping-note p { font: 9px/1.6 'Courier New', monospace; letter-spacing: .12em; }
.footer { position: absolute; left: var(--edge); right: var(--edge); bottom: max(var(--edge), env(safe-area-inset-bottom)); display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 9px 'Courier New', monospace; letter-spacing: .12em; }
.eyebrow span { width: 6px; height: 6px; background: var(--orange); border-radius: 50%; }
h2 { margin: 0 0 12px; max-width: 460px; font-size: clamp(30px, 3vw, 44px); line-height: 1.04; font-weight: 500; letter-spacing: -.055em; }
.description { margin: 0; font-size: 13px; line-height: 1.65; color: #f6edde; }
.controls { flex-shrink: 0; width: 346px; }
.contract { width: 100%; display: flex; align-items: center; gap: 18px; border: 1px solid #fff7e955; background: #29251f80; padding: 14px 16px; min-height: 49px; text-align: left; }
.contract:disabled { cursor: default; opacity: 1; }
.control-label { font: 10px 'Courier New', monospace; color: #fff7e9bb; }
#ca-value { flex: 1; font: 10px 'Courier New', monospace; letter-spacing: .07em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contract svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.2; flex-shrink: 0; }
.contract:disabled svg { opacity: .45; }
.links { display: grid; grid-template-columns: 1.15fr 1fr; gap: 7px; margin-top: 7px; }
.action { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 49px; padding: 12px 14px; border: 1px solid #fff7e955; font: 10px 'Courier New', monospace; letter-spacing: .03em; transition: background 150ms, border-color 150ms; }
.pons { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.pons > span { font-size: 17px; }
.pons:hover { background: var(--orange); border-color: var(--orange); }
.x-link { background: #29251f80; }
.x-mark { font: 18px Arial, sans-serif; }
.x-link[aria-disabled="true"] { cursor: default; }
.x-link[href]:hover, .contract:not(:disabled):hover { background: #655543; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; }
.toast { position: absolute; bottom: calc(var(--edge) + 121px); right: var(--edge); max-width: min(346px, calc(100% - 2 * var(--edge))); background: var(--paper); color: var(--ink); padding: 12px 16px; font: 12px/1.5 'Courier New', monospace; opacity: 0; transition: opacity 150ms; pointer-events: none; overflow-wrap: anywhere; z-index: 5; }
.toast.visible { opacity: 1; }
@media (min-width: 1700px) { .character-stage { bottom: 12%; height: 78svh; width: 78svh; } }
@media (max-width: 760px) {
  :root { --edge: 24px; }
  .scene { min-height: 740px; }
  .header { align-items: center; }
  .brand { gap: 10px; }
  .brand-cat { width: 46px; height: 46px; }
  h1 { font-size: 27px; }
  .ticker { font-size: 11px; padding: 9px 11px; }
  .warehouse { object-position: 50% 50%; }
  .shade { background: linear-gradient(180deg, #171611a1, #17161112 25%, transparent 48%, #1716116e 64%, #171611f2 100%); }
  .character-stage { bottom: max(38%, 320px); height: min(52svh, 445px); width: min(104vw, 445px); }
  .shipping-note { display: none; }
  .footer { display: block; }
  .story { margin-bottom: 23px; }
  .eyebrow { font-size: 8px; margin-bottom: 11px; }
  h2 { max-width: 350px; font-size: 32px; margin-bottom: 12px; }
  .description { font-size: 12px; line-height: 1.6; }
  .controls { width: 100%; }
  .toast { bottom: calc(var(--edge) + 113px); }
}
@media (max-width: 360px) { :root { --edge: 18px; } h1 { font-size: 23px; } h2 { font-size: 29px; } .description { font-size: 11px; } }
@media (max-height: 600px) and (min-width: 761px) { :root { --edge: 22px; } .scene { min-height: 450px; } .character-stage { bottom: 10%; height: 79svh; width: 79svh; } h1 { font-size: 28px; } h2 { font-size: 30px; } .description { font-size: 11px; } .eyebrow { margin-bottom: 10px; } .controls { width: 310px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Character motion uses independent wrappers so pointer, idle and tap effects compose. */
.header-actions { display: flex; gap: 12px; align-items: center; }
.motion-toggle { width: 44px; height: 44px; padding: 0; border: 1px solid #fff7e94d; background: #29251f50; font-size: 16px; }
.motion-toggle:hover { background: #655543; }
.motion-toggle:disabled { cursor: default; opacity: .6; }
.pet-cat { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; touch-action: manipulation; }
.pet-cat:disabled { cursor: default; }
.pet-cat:focus-visible { outline-offset: -25px; border-radius: 35%; }
.cat-look, .cat-reaction { display: block; width: 100%; height: 100%; transform-origin: 50% 91%; }
.cat-look { transform: translateX(var(--look-x, 0px)) rotate(var(--look-turn, 0deg)); transition: transform 650ms cubic-bezier(.2,.65,.25,1); }
.cat-reaction { position: relative; }
.cat { transform-origin: 50% 91%; }
.pet-hint { display: none; position: absolute; bottom: 4%; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 8px 12px; border: 1px solid #fff7e970; border-radius: 30px; background: #29251fba; font: 9px 'Courier New', monospace; letter-spacing: .1em; transition: background 180ms; }
.pet-hint > span { font: 15px Arial, sans-serif; margin-left: 5px; vertical-align: -1px; }
.scene[data-motion] .pet-hint { display: block; }
.pet-cat:hover .pet-hint, .pet-cat:focus-visible .pet-hint { background: #fff7e9; color: #29251f; }
.cat-response { position: absolute; left: 50%; top: 0; transform: translateX(-50%); background: var(--paper); color: var(--ink); border-radius: 18px 18px 18px 3px; padding: 10px 17px; font: 12px 'Courier New', monospace; opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity 160ms; }
.cat-response.visible { opacity: 1; }
.hearts { position: absolute; inset: 0; pointer-events: none; }
.heart { position: absolute; left: var(--heart-x); top: 43%; font: 25px Arial, sans-serif; color: #ffc28d; text-shadow: 0 2px 5px #42241066; animation: heart-float 1100ms ease-out both; animation-delay: var(--delay); }
.scene[data-motion="on"] .cat { animation: cat-breathe 4200ms ease-in-out infinite; }
.scene[data-motion="on"] .cat-reaction.is-petted { animation: cat-wiggle 650ms ease-in-out; }
.scene[data-motion="on"] .warehouse { transform: scale(1.025) translate(var(--background-x, 0px), var(--background-y, 0px)); transition: transform 900ms ease-out; }
.scene[data-motion="off"] .cat-look { transform: none; }
.scene[data-motion="off"] *, .scene[data-motion="off"] *::before, .scene[data-motion="off"] *::after { animation: none !important; transition: none !important; }
.scene[data-motion="off"] .hearts { display: none; }
@keyframes cat-breathe { 0%, 100% { transform: scale(1, 1) rotate(-.35deg); } 50% { transform: scale(1.008, 1.014) rotate(.35deg); } }
@keyframes cat-wiggle { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-12px) rotate(-3deg); } 55% { transform: translateY(-7px) rotate(3deg); } 78% { transform: translateY(-2px) rotate(-1deg); } }
@keyframes heart-float { from { opacity: 0; transform: translate(0, 5px) scale(.5); } 15% { opacity: 1; } to { opacity: 0; transform: translate(var(--drift), -100px) scale(1.2) rotate(var(--twist)); } }
@media (max-width: 760px) { .header-actions { gap: 7px; } .motion-toggle { width: 36px; height: 36px; } .cat-response { top: 3%; font-size: 10px; padding: 8px 12px; } }
@media (max-width: 360px) { .header-actions { gap: 4px; } .motion-toggle { width: 30px; min-height: 36px; } .brand { gap: 4px; } .brand-cat { width: 38px; height: 42px; } }
@media (prefers-reduced-motion: reduce) { .cat-look, .warehouse { transform: none !important; } .hearts { display: none; } }
