/* =========================================================
   GAB 3D GAMES RETRÔ — estilo principal
   Visual original inspirado nos consoles dos anos 90.
   Paleta da marca Gab 3D: navy, azul e laranja.
   ========================================================= */
:root {
  --navy: #0A0F1C;
  --navy2: #111A2E;
  --navy3: #1A2540;
  --blue: #1E7BFF;
  --orange: #FF8A1A;
  --light: #E6ECF7;
  --green: #39FF88;
  --muted: #AEB9CF;
  --shell: #DCE3EF;
  --shell-dd: #8E9AB0;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --brand: 'Russo One', system-ui, sans-serif;
  --body: 'Montserrat', system-ui, -apple-system, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
  color: var(--light);
  font-family: var(--body);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.bg-grid {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 10% 0%, rgba(30,123,255,.28), transparent 70%),
    radial-gradient(50% 40% at 100% 35%, rgba(255,138,26,.16), transparent 70%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--navy);
}

/* ---------- botões genéricos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--pixel); font-size: 11px; letter-spacing: .04em; line-height: 1.2;
  padding: 14px 18px; border-radius: 10px; border: 0; cursor: pointer; text-decoration: none;
  color: var(--navy); background: var(--light);
  box-shadow: 0 4px 0 var(--shell-dd);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shell-dd); }
.btn-primary { background: var(--orange); color: #1B0D00; box-shadow: 0 4px 0 #B55A05; }
.btn-primary:active { box-shadow: 0 1px 0 #B55A05; }
.btn-ghost { background: transparent; color: var(--light); box-shadow: inset 0 0 0 2px rgba(230,236,247,.3); }
.btn-ghost:active { transform: translateY(1px); box-shadow: inset 0 0 0 2px rgba(230,236,247,.5); }

/* =========================================================
   TELA INICIAL
   ========================================================= */
#view-home {
  max-width: 1120px; margin: 0 auto;
  padding: calc(14px + var(--safe-t)) calc(20px + var(--safe-r)) calc(32px + var(--safe-b)) calc(20px + var(--safe-l));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 18px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 40px; height: auto; image-rendering: pixelated; display: block; filter: drop-shadow(0 0 10px rgba(30,123,255,.35)); }
.brand-text { font-family: var(--brand); font-size: 18px; letter-spacing: .04em; }
.brand-text b { color: var(--orange); font-weight: 400; }
.top-pill {
  font-family: var(--pixel); font-size: 8px; color: var(--green); letter-spacing: .06em;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px;
  background: rgba(57,255,136,.08); box-shadow: inset 0 0 0 1px rgba(57,255,136,.25);
}
.top-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.2s steps(2) infinite; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; padding: 26px 0 56px; }
.eyebrow { font-family: var(--pixel); font-size: 10px; color: var(--orange); letter-spacing: .1em; margin: 0 0 18px; }
.hero h1 { font-family: var(--brand); font-weight: 400; font-size: clamp(36px, 6vw, 62px); line-height: 1.02; margin: 0 0 18px; }
.hero h1 span { color: var(--blue); }
.lead { font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 46ch; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- console em CSS (desenho original) ---------- */
.console { position: relative; width: 100%; max-width: 470px; aspect-ratio: 5 / 4; justify-self: center; isolation: isolate; }
.console-body {
  position: absolute; left: 0; right: 0; bottom: 10%; height: 56%; z-index: 2;
  background: linear-gradient(180deg, #F2F5FA 0%, #D3DBE8 70%, #BCC6D8 100%);
  border-radius: 30px 30px 46px 46px / 26px 26px 60px 60px;
  box-shadow: inset 0 3px 0 #fff, inset 0 -12px 0 rgba(0,0,0,.08), 0 26px 44px rgba(0,0,0,.5);
}
.console-slot {
  position: absolute; left: 22%; right: 22%; top: -9%; height: 24%;
  background: linear-gradient(#E4E9F2, #BCC6D8); border-radius: 16px 16px 6px 6px;
  box-shadow: inset 0 2px 0 #fff, inset 0 -4px 0 rgba(0,0,0,.08);
}
.console-slot::after {
  content: ""; position: absolute; left: 14%; right: 14%; top: 34%; height: 26%;
  background: #252E45; border-radius: 4px; box-shadow: inset 0 3px 5px rgba(0,0,0,.7);
}
.console-cart {
  position: absolute; left: 30%; right: 30%; top: 2%; height: 40%; z-index: 1;
  background: linear-gradient(#2C3D69, #18233F); border-radius: 12px 12px 4px 4px;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.06), 0 8px 16px rgba(0,0,0,.4);
  animation: cartIn 3.6s ease-in-out infinite;
}
.console-cart::before {
  content: ""; position: absolute; top: 6%; left: 30%; right: 30%; height: 5%;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.35) 0 3px, transparent 3px 7px); border-radius: 2px;
}
.console-cart .label {
  position: absolute; inset: 18% 12% 30%; border-radius: 5px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), #0D4FB8);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); overflow: hidden;
  font-family: var(--brand); color: #fff; font-size: clamp(14px, 2.6vw, 22px);
}
.console-cart .label { background: linear-gradient(135deg, #16224A, #0A0F1C); }
.console-cart .label img { width: 38%; height: auto; image-rendering: pixelated; position: relative; z-index: 1; margin-bottom: 10%; }
.console-cart .label::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8%; height: 10%; background: linear-gradient(90deg, var(--blue) 0 50%, var(--orange) 50%); }
@keyframes cartIn { 0%, 15% { transform: translateY(-34%); } 45%, 85% { transform: translateY(0); } 100% { transform: translateY(-34%); } }
.sw {
  position: absolute; top: 20%; width: 15%; height: 15%;
  background: linear-gradient(#C3CCDB, #9CA8BE); border-radius: 8px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15), inset 0 2px 0 rgba(255,255,255,.6);
}
.sw.power { left: 7%; } .sw.reset { right: 7%; }
.sw small { position: absolute; top: 120%; left: -20%; right: -20%; text-align: center; font-family: var(--pixel); font-size: 7px; color: #6A768E; }
.console-led { position: absolute; left: 25%; top: 26%; width: 10px; height: 10px; border-radius: 50%; background: #FF2A2A; box-shadow: 0 0 10px #FF2A2A; animation: blink 2s steps(2) infinite; }
.console-badge { position: absolute; left: 50%; bottom: 33%; transform: translateX(-50%); font-family: var(--brand); color: #59647D; font-size: clamp(11px, 1.8vw, 15px); letter-spacing: .14em; white-space: nowrap; }
.console-stripe { position: absolute; left: 0; right: 0; bottom: 18%; height: 6%; background: linear-gradient(90deg, var(--blue) 0 50%, var(--orange) 50% 100%); }
.console-pad {
  position: absolute; right: -2%; bottom: -2%; width: 44%; aspect-ratio: 2.3; z-index: 3;
  background: linear-gradient(180deg, #F2F5FA, #C9D2E2); border-radius: 999px;
  box-shadow: inset 0 2px 0 #fff, inset 0 -6px 0 rgba(0,0,0,.08), 0 14px 24px rgba(0,0,0,.45);
}
.console-pad .cross {
  position: absolute; left: 18%; top: 50%; width: 20%; aspect-ratio: 1; transform: translateY(-50%);
  background: linear-gradient(#2A3250, #2A3250) center / 34% 100% no-repeat, linear-gradient(#2A3250, #2A3250) center / 100% 34% no-repeat;
}
.console-pad .b1, .console-pad .b2 { position: absolute; top: 50%; width: 13%; aspect-ratio: 1; border-radius: 50%; transform: translateY(-50%); }
.console-pad .b1 { right: 30%; background: var(--blue); margin-top: 6%; }
.console-pad .b2 { right: 14%; background: var(--orange); margin-top: -6%; }

/* ---------- biblioteca ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 22px; }
.section-title { font-family: var(--pixel); font-size: 16px; margin: 0; }
.section-title::before { content: "■ "; color: var(--orange); }
.section-count { font-family: var(--pixel); font-size: 9px; color: #7F8BA5; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.grid-msg { font-family: var(--pixel); font-size: 10px; line-height: 1.8; color: var(--muted); grid-column: 1 / -1; }
.grid-msg code { font-family: ui-monospace, monospace; color: var(--orange); }

.cart {
  --cart: var(--blue);
  display: flex; flex-direction: column; gap: 14px; padding: 14px;
  background: linear-gradient(180deg, var(--navy3), var(--navy2)); border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 18px 30px rgba(0,0,0,.35);
  transition: transform .2s ease;
}
.cart:hover { transform: translateY(-4px); }
.cart-shell {
  position: relative; padding: 20px 16px 28px; border-radius: 12px 12px 6px 6px;
  background: var(--cart);
  background: linear-gradient(180deg, color-mix(in srgb, var(--cart) 78%, #fff), var(--cart) 40%, color-mix(in srgb, var(--cart) 80%, #000));
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.3);
}
.cart-shell::before {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 40%; height: 6px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 3px, transparent 3px 7px); border-radius: 3px;
}
.cart-shell::after { content: "GAB 3D"; position: absolute; bottom: 8px; left: 16px; font-family: var(--pixel); font-size: 7px; color: rgba(255,255,255,.8); }
.cart-label { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 0 0 3px rgba(255,255,255,.88), 0 0 0 5px rgba(0,0,0,.25); }
.cart-label img { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: pixelated; }
.cart-info h3 { font-family: var(--brand); font-weight: 400; font-size: 20px; margin: 0 0 6px; }
.cart-info p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.cart-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.cart-meta span { font-family: var(--pixel); font-size: 8px; padding: 5px 7px; border-radius: 5px; background: rgba(255,255,255,.07); color: #C9D3E6; }
.cart-actions { display: flex; gap: 8px; }
.cart-actions .btn { flex: 1; font-size: 10px; padding: 12px 8px; }

/* ---------- como funciona ---------- */
.how { margin: 60px 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; scroll-margin-top: 20px; }
.how-step { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 18px; }
.how-step b { display: block; font-family: var(--pixel); font-size: 18px; color: var(--orange); margin-bottom: 12px; }
.how-step h4 { font-family: var(--brand); font-weight: 400; font-size: 18px; margin: 0 0 6px; }
.how-step p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
footer { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: #7F8BA5; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding-top: 0; }
  .console { order: -1; max-width: 330px; }
  .how { grid-template-columns: 1fr; }
  .top-pill { display: none; }
  .brand-text { font-size: 16px; }
}

/* =========================================================
   TELA DO JOGO — portátil original
   ========================================================= */
body[data-view="game"] { overflow: hidden; overscroll-behavior: none; position: fixed; inset: 0; }
#view-game {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) calc(8px + var(--safe-r)) calc(8px + var(--safe-b)) calc(8px + var(--safe-l));
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.handheld {
  position: relative;
  width: min(100%, 440px, calc((100vh - 290px) / 0.9));
  width: min(100%, 440px, calc((100dvh - 290px) / 0.9));
  min-width: min(100%, 290px);
  display: grid; grid-template-columns: 1fr; grid-template-areas: "bar" "bezel" "logo" "controls"; gap: 10px;
  padding: 12px 16px 18px;
  background: linear-gradient(160deg, #F3F6FB 0%, #DCE3EF 45%, #C5CEDF 100%);
  border-radius: 24px 24px 52px 52px;
  box-shadow: inset 0 2px 0 #fff, inset 0 -6px 0 rgba(0,0,0,.08), 0 30px 60px rgba(0,0,0,.55);
  color: #2B3550;
}
.hh-bar { grid-area: bar; display: flex; align-items: center; gap: 8px; }
.hh-icon {
  width: 38px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 10px; cursor: pointer;
  background: rgba(10,15,28,.08); color: #2B3550; font-size: 16px; line-height: 1; display: grid; place-items: center;
  font-family: system-ui, sans-serif;
}
.hh-icon:active { background: rgba(10,15,28,.18); }
.hh-icon.off { color: #9AA4BA; text-decoration: line-through; }
.hh-title { flex: 1; min-width: 0; text-align: center; font-family: var(--pixel); font-size: 10px; letter-spacing: .05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hh-bezel {
  grid-area: bezel; position: relative; min-width: 0;
  padding: 14px 22px 9px; border-radius: 14px 14px 30px 30px;
  background: linear-gradient(180deg, #2A3350, #1A2137); box-shadow: inset 0 2px 6px rgba(0,0,0,.5);
}
.hh-led { position: absolute; left: 8px; top: 45%; width: 7px; height: 7px; border-radius: 50%; background: #3A1414; transition: background .3s, box-shadow .3s; }
.hh-led.on { background: #FF3B3B; box-shadow: 0 0 8px #FF3B3B; }
.hh-screen { position: relative; width: 100%; aspect-ratio: 10 / 9; background: #05070D; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px #0B0F1B; }
.stage, .stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.crt::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px); }
.crt::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 36px rgba(0,0,0,.55); }
.hh-bezel-label { font-family: var(--pixel); font-size: 7px; color: #7D88A8; text-align: center; margin-top: 8px; letter-spacing: .1em; }

.insert {
  position: absolute; inset: 0; z-index: 2; padding: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center;
  background: radial-gradient(80% 70% at 50% 38%, #172552, #05070D);
  animation: boot .55s ease-out;
}
@keyframes boot { 0% { clip-path: inset(49% 0 49% 0); filter: brightness(3); } 60% { clip-path: inset(0); filter: brightness(1.5); } 100% { clip-path: inset(0); filter: none; } }
.insert img { width: 50%; max-width: 190px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 2px #fff, 0 6px 18px rgba(0,0,0,.6); image-rendering: pixelated; background: #000; }
.insert h2 { font-family: var(--pixel); font-size: clamp(9px, 3.2vw, 13px); line-height: 1.4; margin: 4px 0 0; color: #fff; }
.insert p { margin: 0; font-size: clamp(10px, 2.9vw, 13px); line-height: 1.4; color: #AAB6D0; max-width: 30ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-play {
  margin-top: 4px; padding: 11px 20px; border: 0; border-radius: 10px; cursor: pointer;
  font-family: var(--pixel); font-size: clamp(11px, 3.6vw, 15px); color: #1B0D00; background: var(--orange);
  box-shadow: 0 4px 0 #B55A05, 0 0 26px rgba(255,138,26,.45);
  animation: pulse 1.4s ease-in-out infinite;
}
.btn-play:active { transform: translateY(3px); box-shadow: 0 1px 0 #B55A05; animation: none; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.insert-hint { font-family: var(--pixel); font-size: 7px; color: #6F7EA3; margin: 2px 0 0 !important; }

.hh-logo { grid-area: logo; display: flex; align-items: center; gap: 8px; font-family: var(--brand); font-size: 19px; line-height: 1; color: #2F3B63; letter-spacing: .04em; padding-left: 6px; }
.hh-logo img { height: 24px; width: auto; image-rendering: pixelated; }

/* ---------- abertura Gab 3D (ao apertar JOGAR) ---------- */
.boot {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: #0A0F1C; animation: bootOut .35s ease-in 1.55s forwards;
}
.boot img { width: 30%; max-width: 120px; image-rendering: pixelated; animation: logoDrop .7s steps(7) both; }
.boot p { margin: 4px 0 0; font-family: var(--pixel); font-size: clamp(12px, 4vw, 18px); color: #fff; letter-spacing: .12em; animation: bootText .3s steps(2) .75s both; }
.boot small { font-family: var(--pixel); font-size: clamp(6px, 1.9vw, 8px); color: var(--orange); letter-spacing: .1em; animation: bootText .3s steps(2) 1s both; }
@keyframes logoDrop { 0% { transform: translateY(-160%); } 80% { transform: translateY(6%); } 100% { transform: translateY(0); } }
@keyframes bootText { from { opacity: 0; } to { opacity: 1; } }
@keyframes bootOut { to { opacity: 0; visibility: hidden; } }
.hh-logo em { font-style: italic; color: var(--orange); font-size: .85em; margin-left: 6px; }

/* ---------- controles ---------- */
.hh-controls {
  grid-area: controls; display: grid; grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "dpad . ab" "meta meta meta"; align-items: center; row-gap: 14px; padding: 2px 4px 4px;
}
.dpad { grid-area: dpad; justify-self: start; position: relative; width: min(132px, 34vw); aspect-ratio: 1; touch-action: none; cursor: pointer; isolation: isolate; }
.dpad::before { content: ""; position: absolute; inset: -9%; border-radius: 50%; background: rgba(10,15,28,.07); z-index: -1; }
.dpad .d, .dpad .d-center { position: absolute; background: #232A40; }
.dpad .d { box-shadow: inset 0 -3px 0 rgba(0,0,0,.4); }
.dpad .up    { left: 33.33%; top: 0;    width: 33.34%; height: 36%; border-radius: 6px 6px 0 0; }
.dpad .down  { left: 33.33%; bottom: 0; width: 33.34%; height: 36%; border-radius: 0 0 6px 6px; }
.dpad .left  { top: 33.33%;  left: 0;   height: 33.34%; width: 36%; border-radius: 6px 0 0 6px; }
.dpad .right { top: 33.33%;  right: 0;  height: 33.34%; width: 36%; border-radius: 0 6px 6px 0; }
.dpad .d-center { left: 33%; top: 33%; width: 34%; height: 34%; }
.dpad .d-center::after { content: ""; position: absolute; inset: 26%; border-radius: 50%; background: radial-gradient(#171C2D, #2E3756); }
.dpad .d::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -50%); border: 5px solid transparent; }
.dpad .up::after    { border-bottom-color: #46506E; margin-top: -3px; }
.dpad .down::after  { border-top-color: #46506E; margin-top: 3px; }
.dpad .left::after  { border-right-color: #46506E; margin-left: -3px; }
.dpad .right::after { border-left-color: #46506E; margin-left: 3px; }
.dpad .d.is-down { background: #141A2B; box-shadow: inset 0 2px 0 rgba(0,0,0,.5); }

.ab { grid-area: ab; justify-self: end; display: flex; gap: 14px; padding: 10px 8px; transform: rotate(-22deg); background: rgba(10,15,28,.07); border-radius: 999px; }
.round {
  width: min(60px, 15.5vw); aspect-ratio: 1; border: 0; border-radius: 50%; cursor: pointer; touch-action: none;
  font-family: var(--pixel); font-size: 13px; color: rgba(255,255,255,.92);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 4px 0 rgba(0,0,0,.25);
}
.round.a { background: radial-gradient(circle at 35% 30%, #FFB466, var(--orange) 60%, #C8650A); }
.round.b { background: radial-gradient(circle at 35% 30%, #6AA9FF, var(--blue) 60%, #1159C4); }
.round.is-down { transform: translateY(3px); filter: brightness(.9); box-shadow: inset 0 -1px 0 rgba(0,0,0,.25), 0 1px 0 rgba(0,0,0,.25); }

.meta-btns { grid-area: meta; display: flex; justify-content: center; gap: 22px; }
.pill {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px; border: 0; background: none; cursor: pointer; touch-action: none;
  font-family: var(--pixel); font-size: 7px; color: #56617D;
}
.pill::before { content: ""; width: 46px; height: 12px; border-radius: 999px; background: #7C869D; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); transform: rotate(-22deg); }
.pill.is-down::before { background: #5A6378; box-shadow: none; }

.hh-speaker { position: absolute; right: 26px; bottom: 16px; display: flex; gap: 6px; transform: rotate(-28deg); pointer-events: none; }
.hh-speaker i { width: 5px; height: 30px; border-radius: 3px; background: rgba(10,15,28,.16); box-shadow: inset 0 1px 2px rgba(0,0,0,.25); }

.kbd-hint { font-family: var(--pixel); font-size: 8px; line-height: 1.8; color: #55617F; text-align: center; margin: 0; }
@media (hover: none) { .kbd-hint { display: none; } }

/* celular deitado: controles nas laterais */
@media (orientation: landscape) and (max-height: 560px) {
  #view-game { padding: calc(4px + var(--safe-t)) calc(8px + var(--safe-r)) calc(4px + var(--safe-b)) calc(8px + var(--safe-l)); }
  .handheld {
    width: 100%; max-width: 980px; min-width: 0;
    height: calc(100vh - 8px); height: calc(100dvh - 8px - var(--safe-t) - var(--safe-b));
    grid-template-columns: 1fr auto 1fr; grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "bar bar bar" "dpad bezel ab" "logo meta spk";
    gap: 6px 18px; padding: 6px 18px 8px; border-radius: 28px;
  }
  .hh-controls { display: contents; }
  .dpad { justify-self: center; align-self: center; width: min(140px, 22vw, 50dvh); }
  .ab { justify-self: center; align-self: center; }
  .round { width: min(58px, 9vw, 20dvh); }
  .hh-bezel { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 20px; }
  .hh-screen { flex: 1 1 auto; min-height: 0; height: 100%; width: auto; max-width: 100%; }
  .hh-bezel-label, .kbd-hint { display: none; }
  .hh-logo { align-self: center; font-size: 15px; }
  .hh-logo img { height: 18px; }
  .hh-speaker { position: static; grid-area: spk; justify-self: end; align-self: center; }
  .hh-speaker i { height: 22px; }
  .hh-bar .hh-icon { height: 28px; }
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); z-index: 50;
  max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 10px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere;
  background: #111A2E; color: var(--light); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

@keyframes blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
