@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&display=swap');

/* Retro handheld theme. Shared game geometry and interaction states live in styles.css. */
:root { font-family:'DM Mono',monospace; color:#173b58; background:#eaf4fb; --cream:#fff5de; --ink:#173b58; --yellow:#ffdc62; --red:#187fcb; }
body { background-image:radial-gradient(#8a80672a .7px,transparent .7px); background-size:5px 5px; }
button:focus-visible,a:focus-visible,canvas:focus-visible { outline-color:var(--red); }
.site-header { height:auto; max-width:1336px; padding:28px 0 25px; border-bottom:2px solid var(--ink); }
.wordmark,.toy-brand { font-family:var(--pixel); font-weight:400; color:var(--ink); -webkit-text-stroke:0; text-shadow:none; transform:none; }
.wordmark { font-size:28px; line-height:1.4; letter-spacing:-1.5px; }
.wordmark>span { font-family:monospace; font-size:30px; top:-17px; right:-21px; color:var(--red); }
.site-header nav { font-size:14px; color:var(--ink); font-weight:400; }
.site-header nav button { padding:10px 0; border-bottom:2px solid transparent; }
.site-header nav button:hover { border-bottom-color:var(--red); }
.current { border-radius:0; background:var(--ink); color:var(--cream); padding:9px 15px; }
.nav-play { background:#f2eddb; border:2px solid var(--ink); border-radius:0; box-shadow:3px 3px 0 var(--ink); padding:12px 17px; font-size:13px; font-weight:400; }
.nav-play span { color:var(--red); }
.nav-play:hover { background:var(--yellow); }
.hero { max-width:1232px; padding:52px 0 46px; grid-template-columns:1fr 1fr; gap:76px; min-height:0; }
.hero-copy { padding:12px 0 28px; }
.eyebrow { color:#5f6454; font-size:11px; font-weight:400; letter-spacing:1.3px; margin-bottom:28px; }
.eyebrow span { color:var(--red); }
h1 { font:38px/1.55 var(--pixel); letter-spacing:-1.8px; color:var(--ink); text-shadow:3px 3px 0 #d3cbb3; margin:0 0 22px; }
h1 em { color:var(--red); font-style:normal; }
.title-heart { font-family:monospace; font-size:.8em; color:var(--red); transform:none; margin-left:12px; }
.intro { color:#596054; font-size:18px; font-weight:400; line-height:1.65; text-shadow:none; margin-bottom:28px; }
.primary-button { background:var(--red); color:var(--cream); border:2px solid var(--ink); border-radius:0; box-shadow:5px 5px 0 var(--ink); padding:20px 23px; font:12px/1.6 var(--pixel); gap:17px; }
.primary-button:hover { background:#12639f; transform:translate(-1px,-1px); box-shadow:6px 6px 0 var(--ink); }
.primary-button:active { transform:translate(4px,4px); box-shadow:1px 1px 0 var(--ink); }
.play-note { font-size:12px; font-weight:400; color:#696b5e; margin:19px 0 32px; }
.little-promises { color:var(--ink); gap:26px; border-top:1px dashed #979681; padding-top:24px; }
.little-promises>div { gap:9px; }
.little-promises span { font-family:monospace; font-size:29px; color:var(--red); }
.little-promises p { font-size:12px; line-height:1.65; font-weight:400; }
.little-promises strong { font-size:10px; font-weight:400; color:#686d5f; }
.pet-area { max-width:462px; padding:20px 0 0; }
.toy-top { height:22px; }
.keyring { width:43px; height:54px; border:8px solid #e6b641; left:calc(50% - 21px); top:-15px; transform:rotate(20deg); box-shadow:inset 2px 2px 0 #fff2bf,2px 2px 0 #956d25; }
.tiny-star,.shell-star { display:none; }
.toy { background:#fff0d1; border:3px solid var(--ink); border-radius:43% 43% 38% 38% / 29% 29% 32% 32%; padding:32px 29px 24px; box-shadow:inset 5px 5px 0 #fffaf0,inset -6px -7px 0 #e0cba2,5px 7px 0 #173b5838; }
.toy-brand { font-size:29px; line-height:1.3; letter-spacing:-2px; margin:0 auto; }
.toy-brand span { font-family:monospace; font-size:21px; color:var(--red); right:-17px; top:-8px; }
.toy-brand.logo-image { width:210px; max-width:84%; line-height:0; }
.toy-brand.logo-image img { display:block; width:100%; height:auto; image-rendering:pixelated; }
.toy-subtitle { font-size:12.6px; line-height:1.4; letter-spacing:.4px; font-weight:500; color:#173b58; margin:14px 0 22px; }
.screen-bezel { padding:10px; background:#259cf0; border:2px solid #155f98; border-radius:15px; box-shadow:inset 3px 3px 0 #86d5ff,2px 3px 0 #fffaf0; }
.screen { background:#e4f4ff; border:3px solid var(--ink); border-radius:5px; box-shadow:none; }
.screen-top { height:30px; padding:0 8px; background:#dcefff; font-size:6px; color:var(--ink); }
.screen-top button { font-family:monospace; }
.playfield { background:#72c5fb; }
canvas { filter:none; }
.playfield::after { content:''; position:absolute; inset:0; pointer-events:none; background:repeating-linear-gradient(transparent 0 3px,#2233240d 3px 4px); z-index:2; }
.bubble { font-size:10px; font-weight:400; background:var(--cream); border-color:var(--ink); box-shadow:2px 2px 0 var(--ink); padding:7px 8px; }
.meters { padding:10px 9px 12px; background:#e4f4ff; border-top:2px solid #99c7e5; }
.meters label { font-size:11px; font-weight:400; margin-bottom:6px; }
meter { height:14px; border-color:#245375; padding:1px; background:#f4fbff; box-shadow:1px 1px 0 #7ba8c6; }
meter::-webkit-meter-bar { background:#b9d9ec; }
meter::-webkit-meter-optimum-value { background:#85bc60; }
#joy::-webkit-meter-optimum-value { background:#f080a3; }
#energy::-webkit-meter-optimum-value { background:#9391dc; }
meter::-moz-meter-bar { background:#85bc60; }
#joy::-moz-meter-bar { background:#f080a3; }
#energy::-moz-meter-bar { background:#9391dc; }
.screen-caption { font-size:8px; font-weight:400; letter-spacing:1px; color:#3479a7; margin:13px 0 17px; }
.toy-controls { gap:25px; }
.toy-controls>div { gap:9px; }
.toy-controls>div>span { font-size:12px; font-weight:400; }
.toy-button { width:53px; height:53px; border:2px solid #a67b20; background:#ffdb58; box-shadow:inset 2px 2px 0 #fff2a5,2px 4px 0 #bd902b,0 0 0 4px #e6d5b0; }
.toy-button>span { font-family:monospace; font-size:21px; color:#775819; filter:none; }
.toy-button:active,.toy-button.pressed { box-shadow:inset 2px 2px 0 #d2a532,0 1px 0 #bd902b,0 0 0 4px #e6d5b0; }
.toy-bottom { font-size:7px; font-weight:400; letter-spacing:.6px; color:#6a6b55; margin-top:19px; }
.under-toy { font-size:10px; font-weight:400; color:#3c5144; margin:23px 0 0; }
.under-toy span { color:var(--red); font-size:14px; margin-right:3px; }
.game-hud { background:#173b58ed; color:var(--cream); font-size:9px; }
.game-hud button { color:var(--cream); }
.game-hud { z-index:3; }
#round-progress { appearance:none; position:absolute; top:100%; left:0; width:100%; height:3px; border:0; background:#173b58; }
#round-progress::-webkit-progress-bar { background:#173b58; }
#round-progress::-webkit-progress-value { background:#ffdc62; }
#round-progress::-moz-progress-bar { background:#ffdc62; }
.game-event { position:absolute; z-index:3; top:43px; left:5px; right:5px; padding:5px 3px; background:#fff5def2; border:1px solid #173b58; color:#173b58; text-align:center; font:500 9px/1.3 'DM Mono',monospace; pointer-events:none; }
.game-overlay { z-index:4; }
.game-overlay { background:#e4f4fff5; padding:10px; }
.overlay-kicker { font:6px/1.6 var(--pixel); color:#3479a7; }
.game-overlay h2 { font:12px/1.6 var(--pixel); margin:10px 0; }
.game-overlay p { font-size:11px; font-weight:400; line-height:1.45; margin-bottom:10px; }
.game-overlay>button:not(.text-button) { background:var(--yellow); border-color:var(--ink); box-shadow:2px 2px 0 var(--ink); font-size:12px; font-weight:400; padding:7px 13px; }
.text-button { font-size:10px; padding-top:9px; }
.loading { color:var(--ink); background:#dcefff; font-size:12px; font-weight:400; }
.touch-controls { gap:16px; margin-top:25px; }
.touch-controls button { height:44px; width:55px; border-color:var(--ink); background:var(--yellow); box-shadow:2px 2px 0 var(--ink); }
.touch-controls span { font:9px 'DM Mono',monospace; color:var(--ink); }
footer { max-width:1336px; margin:auto; background:transparent; border-top:2px solid var(--ink); padding:25px 0; font-size:11px; font-weight:400; color:#5f6557; }
footer>span:first-child { color:var(--ink); font-weight:500; letter-spacing:0; }
footer .footer-tag { font-weight:400; margin-left:10px; }
dialog { border:3px solid var(--ink); border-radius:0; background:#fff5de; color:var(--ink); padding:34px; max-width:510px; box-shadow:9px 9px 0 #173b5860; }
dialog::backdrop { background:#173b58b3; backdrop-filter:none; }
dialog h2 { font:19px/1.6 var(--pixel); margin:15px 0; }
dialog p { font-size:14px; line-height:1.8; }
dialog .primary-button { font-size:11px; padding:15px 18px; margin-top:10px; }
.dialog-star { color:var(--red); font-size:28px; }
kbd { border-color:#899078; border-radius:0; background:var(--cream); }
@media(min-width:1500px) { .hero { min-height:calc(100vh - 184px); } }
@media(max-width:1430px) { .site-header,footer { margin-left:46px; margin-right:46px; } .hero { padding-left:65px; padding-right:65px; gap:60px; } }
@media(max-width:1100px) {
  .site-header,footer { margin-left:30px; margin-right:30px; }
  .hero { padding:40px 35px; gap:35px; }
  h1 { font-size:31px; letter-spacing:-1px; }
  .eyebrow { font-size:9px; letter-spacing:.6px; }
  .toy { padding-left:23px; padding-right:23px; }
  .little-promises { gap:16px; }
  .little-promises strong { font-size:9px; }
  .little-promises>div { gap:6px; }
  .little-promises span { font-size:23px; }
  .game-overlay .overlay-kicker { display:none; }
  .game-overlay h2 { margin:5px 0 7px; font-size:11px; }
  .game-overlay p { font-size:10px; margin-bottom:7px; }
}
@media(max-width:800px) {
  .site-header { padding:23px 0; margin:0 24px; gap:12px; }
  .wordmark { font-size:22px; letter-spacing:-1px; }
  .wordmark>span { font-size:24px; right:-17px; top:-14px; }
  .site-header nav { font-size:12px; }
  .hero { grid-template-columns:1fr; gap:32px; padding:37px 24px 34px; }
  .hero-copy { padding:0; }
  .eyebrow { font-size:9px; margin-bottom:21px; }
  h1 { font-size:34px; line-height:1.55; margin-bottom:20px; }
  h1 br { display:initial; }
  .intro { font-size:16px; margin-bottom:24px; }
  .hero-copy .primary-button { font-size:11px; padding:17px 22px; }
  .play-note { font-size:11px; margin:19px 0 0; }
  .pet-area { max-width:420px; margin-top:0; padding:20px 0 0; }
  .toy { padding:29px 22px 21px; }
  .toy-brand { font-size:25px; }
  .toy-subtitle { font-size:11.2px; letter-spacing:.4px; }
  .screen-bezel { padding:8px; }
  .screen-top { font-size:5px; height:27px; padding:0 5px; }
  .bubble { font-size:9px; padding:6px; }
  .meters { gap:8px; padding:8px 7px 10px; }
  .meters label { font-size:10px; }
  .toy-controls { gap:24px; }
  .toy-button { width:48px; height:48px; }
  .toy-controls>div>span { font-size:11px; }
  .toy-bottom { font-size:6px; }
  .screen-caption { font-size:7px; letter-spacing:.5px; }
  .under-toy { font-size:9px; }
  .game-overlay { padding:6px; }
  .game-overlay h2 { font-size:10px; margin:3px 0 5px; }
  .game-overlay p { font-size:10px; line-height:1.3; margin-bottom:6px; }
  .game-overlay>button:not(.text-button) { padding:5px 10px; font-size:11px; }
  .game-overlay .text-button { padding-top:6px; font-size:9px; }
  footer { margin:0 24px; padding:21px 0; font-size:10px; line-height:1.6; gap:12px; }
  dialog { padding:30px 24px; }
  dialog h2 { font-size:16px; }
}
@media(max-width:380px) {
  .hero { padding-left:14px; padding-right:14px; }
  h1 { font-size:29px; }
  .toy { padding-left:19px; padding-right:19px; }
  .toy-controls { gap:20px; }
  .eyebrow { font-size:8px; letter-spacing:0; }
}

/* The entire experience is the handheld itself. */
body { background-image:none; }
.sr-only { top:0; left:0; margin:0; }
.pet-only { min-height:100svh; display:grid; place-items:center; padding:32px 20px; }
.pet-only .pet-area { width:100%; max-width:410px; margin:0; padding:20px 0 0; }
.screen-tools { display:flex; align-items:center; gap:2px; }
.screen-top .help-button { font:15px 'DM Mono',monospace; width:26px; }
.pet-only .touch-controls { gap:10px; margin-top:21px; }
.pet-only .touch-controls span { font-size:8px; text-align:center; }
.pet-only .touch-controls button { width:44px; flex-shrink:0; }
.pet-only .game-overlay .overlay-kicker { display:block; }
.pet-only .screen-caption { min-height:22px; line-height:1.6; margin:10px 0 12px; }
@media(max-width:380px) { .pet-only { padding:24px 12px; } }

.device-links { display:flex; justify-content:flex-end; gap:8px; margin:-8px 5px 9px; }
.device-link { width:26px; height:26px; display:grid; place-items:center; color:#173b58; opacity:.8; }
.device-link[aria-disabled="true"] { cursor:default; }
.device-link svg,.device-link img { display:block; width:19px; height:19px; }
.device-link img { filter:grayscale(1); }
.device-link[href]:hover { color:var(--red); opacity:1; }
.contract-plate { display:flex; align-items:center; justify-content:center; gap:9px; width:fit-content; max-width:85%; margin:23px auto 1px; padding:7px 8px; border-top:1px solid #c9b68f; border-bottom:1px solid #fffaf0; color:#647c8d; text-shadow:0 1px 0 #fffaf0; }
.contract-label { font:7px var(--pixel); }
.contract-plate code { font:9px/1.5 'DM Mono',monospace; letter-spacing:.5px; overflow-wrap:anywhere; min-width:0; }
@media(max-width:380px) { .contract-plate { gap:6px; padding:6px; } .contract-plate code { font-size:8px; } }
