/* Handheld shell with a square comic-colour display. */
body { background: #d4c8a9; }
.stars { opacity: .25; background: linear-gradient(90deg, transparent 0 38%, #ad343c 38% 43%, #d99a28 43% 48%, #b8ac37 48% 53%, #347f78 53% 58%, transparent 58%); }
.start-screen { padding: 26px 14px 42px; }
.game-card {
  width: min(100%, 430px); padding: 16px 23px 8px;
  border: 2px solid #6c6857; border-radius: 12px 12px 72px 12px;
  background: linear-gradient(115deg, #e2d8b9, #c5bca0);
  box-shadow: inset 3px 3px 2px #fff4cf, inset -7px -5px 3px #a49c82, 10px 13px 0 #91876c, 16px 22px 30px #554d3c44;
}
.game-card::after { display: none; }
.console-top { margin: -3px -22px 16px; padding: 0 20px 10px; border-bottom: 2px solid #ada58c; color: #8a8269; font: 700 9px Arial,sans-serif; letter-spacing: 2px; }
.console-display {
  --ink: #293b1c; --night: #293b1c; --cream: #c0ca76; --shell: #a1af60;
  --pink: #344523; --soft-ink: #354826; --mustard: #8a9b4b;
  position: relative; padding: 23px 16px 17px 27px; border: 3px solid #51524a;
  border-radius: 10px 10px 40px 10px; background: #64685f;
  box-shadow: inset 2px 3px 4px #393d35, 1px 2px 0 #ece2c2;
}
.console-display::before { position: absolute; content: "DOT MATRIX • POCKET DISPLAY"; top: 8px; right: 20px; left: 20px; text-align: center; color: #d4d1b8; font: 7px Arial,sans-serif; letter-spacing: 1px; }
.console-display::after { position: absolute; left: 9px; top: 62px; width: 6px; height: 6px; border-radius: 50%; background: #9e342b; box-shadow: 0 0 4px #e0753b66; content: ""; }
.comic-masthead { display: none; }
.game-card__header { background: #a1af60; padding: 8px 9px 4px; font-size: 7px; border: 2px solid #414c2c; border-bottom: 0; }
.status-light { background: #344523; width: 6px; height: 6px; border: 0; }
.icon-button { width: 23px; height: 23px; background: #b0bd6c; border-width: 1px; box-shadow: 1px 1px 0 var(--ink); }
.screen-frame { margin: 0; padding: 0 6px; background: #a1af60; border: 2px solid #414c2c; border-top: 0; border-bottom: 0; box-shadow: none; transform: none; }
.screen { height: 174px; border: 0; background: #a1af60; }
.screen__shine { background: #b5c16e; border: 0; top: 9px; width: 145px; height: 145px; }
.screen::before { background: repeating-linear-gradient(0deg, #293b1c10 0 1px, transparent 1px 3px); opacity: 1; }
.cloud { background: #bac673; box-shadow: 10px -8px 0 #bac673, 20px 0 0 #bac673; }
.ground { height: 15px; background: repeating-linear-gradient(90deg,#81934b 0 7px,#94a653 7px 14px); border-top: 2px solid #344523; }
.pet { bottom: 18px; transform-origin: 50% 100%; filter: none; --pet: #80934c; --pet-shadow: #5a7137; }
.pet--blop { --pet: #b4c070; --pet-shadow: #80934c; }
.pet--spark { --pet: #6b813d; --pet-shadow: #465d2d; }
.pet .pet__cheek { background: #536c34; }
.pet__eye { box-shadow: 3px 3px 0 #c0ca76 inset; }
.picker-arrow { width: 24px; height: 30px; font-size: 27px; border-width: 1px; box-shadow: 2px 2px 0 var(--ink); background: #b0bd6c; }
.picker-arrow--left { left: 2px; }.picker-arrow--right { right: 2px; }
.intro { background: #a1af60; padding: 7px 4px 8px; border: 2px solid #414c2c; border-top: 0; border-bottom: 0; }
.eyebrow { font-size: 7px; letter-spacing: 1px; }
.intro h1 { font: 900 30px/1.1 'Courier New',monospace; letter-spacing: -1px; color: #293b1c; -webkit-text-stroke: 0; text-shadow: none; transform: none; margin-top: 3px; }
.tagline { font: 700 9px/1.3 'Courier New',monospace; margin-top: 5px; }
.pet-dots { gap: 9px; margin-top: 8px; }.pet-dot { width: 8px; height: 8px; border-width: 1px; }.pet-dot--active { box-shadow: 1px 1px 0 var(--ink); }
.actions { background: #a1af60; padding: 2px 14px 10px; gap: 6px; border: 2px solid #414c2c; border-top: 0; box-shadow: inset 2px -2px 4px #35482633; }
.pixel-button { min-height: 27px; font-size: 9px; border-width: 1px; box-shadow: 2px 2px 0 var(--ink); }
.pixel-button--primary { background: #344523; color: #c0ca76; transform: none; }.pixel-button--primary span { color: #c0ca76; }.pixel-button--secondary { background: #b0bd6c; }
.console-brand { margin-top: 11px; color: #303c5b; font: 900 14px Arial,sans-serif; letter-spacing: -.5px; }
.console-brand strong { font-size: 19px; font-style: italic; }.console-brand > span { font-size: 7px; vertical-align: top; }
.console-controls { display: flex; justify-content: space-between; align-items: center; margin: 22px 3px 0; height: 85px; }
.dpad { position: relative; width: 92px; height: 86px; display: flex; align-items: center; justify-content: center; }
.dpad__vertical { position: absolute; left: 31px; top: 0; width: 30px; height: 86px; background: #30332f; border: 2px solid #171e1c; border-radius: 4px; box-shadow: 2px 3px 1px #77715f; }
.dpad button { z-index: 1; width: 32px; height: 30px; padding: 0; border: 0; border-top: 2px solid #54584e; border-bottom: 2px solid #171e1c; background: #30332f; color: #181f1b; cursor: pointer; font-size: 12px; }
.dpad button:first-of-type { border-left: 2px solid #171e1c; border-radius: 4px 0 0 4px; }.dpad button:last-child { border-right: 2px solid #171e1c; border-radius: 0 4px 4px 0; }
.dpad__center { z-index: 2; width: 26px; height: 30px; background: radial-gradient(circle,#252b27 0 8px,#363c34 9px 10px,#30332f 11px); }
.console-ab { display: flex; gap: 15px; padding: 8px; border-radius: 28px; background: #b5aa9180; transform: rotate(-23deg); }
.console-ab > div { text-align: center; position: relative; }.console-ab button { display: block; width: 40px; height: 40px; border: 2px solid #5e2531; border-radius: 50%; background: #922d4c; box-shadow: inset 2px 2px 2px #c15668, 2px 3px 0 #746653; cursor: pointer; }.console-ab span { position: absolute; top: 45px; left: 16px; color: #303c5b; font: 900 10px Arial,sans-serif; }
.console-bottom { display: flex; align-items: center; justify-content: flex-end; gap: 16px; height: 85px; padding-top: 12px; }
.speaker { display: flex; gap: 6px; transform: rotate(-25deg); padding: 0 6px; }.speaker i { display: block; height: 43px; width: 5px; background: #7f7a65; border-radius: 5px; box-shadow: inset 2px 1px 1px #514e40, 1px 1px 0 #e4d9b9; }
.game-card__footer { margin: 0 10px 0 0; padding: 6px 0; border: 0; background: transparent; color: #7d765e; font-size: 6px; gap: 5px; }.footer-heart { color: #922d4c; }
.console-controls button:active { filter: brightness(.8); box-shadow: none; }.console-controls button:focus-visible { outline: 3px solid #922d4c; outline-offset: 4px; }
@media(max-width:450px) { .start-screen { padding: 16px 12px 30px; }.game-card { padding: 15px 18px 8px; border-radius: 12px 12px 65px 12px; }.screen-frame { margin: 0; }.screen { height: 167px; }.console-display { padding-left: 21px; padding-right: 12px; }.console-top { margin-left: -17px; margin-right: -17px; }.speaker { gap: 5px; }.console-bottom { gap: 10px; } }

/* Screen takes priority over the compact control deck. */
.game-card { width: min(100%, 500px); padding-left: 18px; padding-right: 18px; }
.console-display {
  --ink: #23281f; --night: #23281f; --cream: #eedca4;
  --shell: #73918a; --pink: #b83e24; --soft-ink: #4c5142; --mustard: #d9ad3c;
  display: grid; grid-template-rows: 32px minmax(0, 1fr) 88px 72px;
  aspect-ratio: 1; padding: 19px 12px 12px; border-radius: 8px 8px 22px 8px;
}
.console-display::before { content: "ЦВЕТНОЙ ЭКРАН • КАРМАННЫЕ ПРИКЛЮЧЕНИЯ"; font-size: 6px; top: 6px; }
.console-display::after { left: 5px; top: 29px; width: 4px; height: 4px; }
.game-card__header, .screen-frame, .intro, .actions { background: #73918a; border-color: #343a2d; }
.game-card__header { padding: 4px 8px; }
.screen-frame { min-height: 0; }
.screen { height: 100%; min-height: 0; background: #9aaa89; }
.screen__shine { background: #d9ad3c; height: 135px; width: 135px; top: 5px; }
.cloud { background: #eedca488; box-shadow: 10px -8px 0 #eedca488,20px 0 0 #eedca488; }
.ground { background: repeating-linear-gradient(174deg,#7c572f 0 1px,#c69751 2px 13px); border-color: #23281f; }
.pet { --pet: #90917b; --pet-shadow: #646e5e; zoom: 1; top: 50%; left: calc(50% - 68px); bottom: auto; margin-top: -75px; scale: .64; transform: none; transform-origin: 50% 50%; animation-name: console-pet-bob; }
@keyframes console-pet-bob { 0%,100% { transform: translateY(3px); } 50% { transform: translateY(-3px); } }
.pet--blop { --pet: #c6994d; --pet-shadow: #996b31; }
.pet--spark { --pet: #65a5a1; --pet-shadow: #39717b; }
.pet .pet__cheek { background: #b9573c; }.pet__eye { box-shadow: 3px 3px 0 #eedca4 inset; }
.icon-button,.picker-arrow { background: #eedca4; }
.intro { padding: 6px 3px; }.intro h1 { color: #b83e24; font: italic 900 29px/1 Georgia,serif; text-shadow: 1px 1px 0 #23281f; }
.eyebrow { font-size: 8px; }.tagline { font: bold italic 10px/1.2 Georgia,serif; margin-top: 5px; }.pet-dots { margin-top: 7px; }
.actions { padding: 3px 12px 9px; grid-template-rows: 26px; grid-auto-rows: 26px; gap: 5px; box-shadow: none; }
.pixel-button { min-height: 26px; }.pixel-button--primary { background: #b83e24; color: #eedca4; }.pixel-button--primary span { color: #eedca4; }.pixel-button--secondary { background: #eedca4; }
.menu-selected { outline: 2px solid #eedca4; outline-offset: 2px; }
.console-brand { margin-top: 8px; font-size: 12px; }.console-brand strong { font-size: 12px; }
.console-controls { height: 72px; margin-top: 12px; }.dpad { height: 72px; width: 82px; }.dpad__vertical { display: none; }
.dpad button { position: absolute; width: 28px; height: 26px; border: 2px solid #171e1c; border-radius: 3px; }
#console-left { left: 0; top: 24px; }#console-right { right: 0; top: 24px; }
#console-up { left: 27px; top: 0; border-bottom: 0; }#console-down { left: 27px; bottom: 0; border-top: 0; }
.dpad__center { position: absolute; left: 27px; top: 24px; width: 28px; height: 26px; }
.console-ab button { width: 34px; height: 34px; }.console-ab span { left: 0; right: 0; top: 39px; font-size: 7px; }
.console-bottom { height: 48px; padding-top: 3px; }.speaker i { height: 29px; }
@media(max-width:390px) {
  .game-card { padding-left: 12px; padding-right: 12px; }
  .console-display { grid-template-rows: 27px minmax(0,1fr) 77px 66px; padding: 17px 8px 8px; }
  .pet { zoom: 1; scale: .52; }.intro h1 { font-size: 25px; }.tagline { font-size: 9px; }.eyebrow { font-size: 7px; }
  .intro { padding-top: 3px; }.console-display::before { letter-spacing: .3px; font-size: 5px; }
}

.pet--spark .pet__ear { height: 28px; top: 29px; width: 33px; }
.birth-screen {
  position: absolute; inset: 19px 12px 12px; z-index: 10;
  display: flex; flex-direction: column; overflow: hidden;
  background: #73918a; border: 2px solid #343a2d;
}
.birth-screen canvas { display: block; width: 100%; flex: 1; min-height: 0; object-fit: contain; image-rendering: pixelated; background: #283b39; }
.birth-caption { flex-shrink: 0; margin: 0; padding: 9px 3px; color: #eedca4; background: #344a40; font: bold 10px/1.2 'Courier New', monospace; text-align: center; }
.birth-return { flex-shrink: 0; margin: 6px 12px; padding: 5px; border: 1px solid #23281f; color: #eedca4; background: #b83e24; box-shadow: 2px 2px 0 #23281f; font: bold 10px 'Courier New',monospace; cursor: pointer; }
.screen[data-habitat] { background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
.screen[data-habitat="pixie"] { background-image: url('../assets/island.svg'); }
.screen[data-habitat="blop"] { background-image: url('../assets/desert.svg'); }
.screen[data-habitat="spark"] { background-image: url('../assets/ocean.svg'); }
.screen[data-habitat] .screen__shine,.screen[data-habitat] .cloud,.screen[data-habitat] .ground { display: none; }
.screen[data-habitat] .pet {
  top: auto; bottom: 10%; margin-top: 0;
  scale: .5; transform-origin: 50% 100%; animation-name: grounded-pet;
}
.screen[data-habitat] { background-size: 100% 100%; }
@media(min-width:451px) { .screen[data-habitat] .pet { scale: .65; } }
@keyframes grounded-pet { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.96); } }
@media(max-width:390px) { .birth-screen { inset: 17px 8px 8px; }.birth-caption { font-size: 8px; padding: 6px 2px; } }
