/* SnackBar Różana palette; presentation only, no external assets. */
:root {
  --rose-night: #050302;
  --rose-surface: #17100b;
  --rose-raised: #24180f;
  --rose-cream: #fff7ed;
  --rose-muted: #cbbbab;
  --rose-gold: #f6c453;
  --rose-gold-light: #f8d980;
  --rose-ember: #f97316;
  --rose-border: rgba(246, 196, 83, .25);
  --rose-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}
:root { font: 18px/1.5 var(--rose-font); color: var(--rose-cream); background: var(--rose-night); }
* { box-sizing: border-box; }
body { margin: 0; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
main { max-width: 540px; margin: auto; }
header { margin: 12px 0 30px; }
.badge { font-size: .75rem; letter-spacing: .16em; color: var(--rose-gold); }
h1 { font-size: 1.8rem; line-height: 1.2; }
h2 { font-size: 1.35rem; }
p, footer { color: var(--rose-muted); }
button { width: 100%; min-height: 70px; border: 2px solid var(--rose-border); border-radius: 12px; background: var(--rose-raised); color: #fff; font: inherit; font-weight: 650; padding: 14px; cursor: pointer; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
button:disabled { opacity: .5; cursor: wait; }
.primary { background: var(--rose-gold); border-color: var(--rose-gold); }
.pad { display: flex; align-items: stretch; justify-content: space-between; gap: clamp(16px, 5vw, 56px); }
.directions, .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1; min-width: 0; }
.directions button { font-size: 2rem; padding: 8px; }
.actions button { padding: 8px; }
.platformer .actions { grid-template-columns: 1fr; flex: .8; }
.platformer .actions button { font-size: 1.3rem; border-radius: 30px; }
.pad button { min-height: 100px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pad button.pressed { background: var(--rose-gold-light); color: #1b1007; }
#timer { font-variant-numeric: tabular-nums; }
#error { color: #ffad94; }
footer { margin-top: 30px; font-size: .8rem; }
[hidden] { display: none !important; }
body.playing { overscroll-behavior: none; }
body.playing main { max-width: 960px; min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
body.playing header, body.playing footer, body.playing #details { display: none; }
body.playing #session-status { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
body.playing #session-status h2, body.playing #timer { margin: 4px 0; }
body.playing #controls { margin-top: auto; padding-bottom: 8px; }
body.playing #control-help { font-size: .85rem; }
body.playing .pad button { min-height: clamp(110px, 27dvh, 180px); }
@media (max-width: 430px) {
  #controls:not(.platformer):not(.pacman):not(.pooyan):not(.tapper):not(.frogger):not(.arkanoid) .pad { flex-direction: column; gap: 12px; }
}
#pacman-pad, #frogger-pad { display: flex; align-items: stretch; justify-content: space-between; gap: clamp(24px, 8vw, 90px); width: 100%; min-height: clamp(180px, 42dvh, 280px); touch-action: none; }
.pacman-horizontal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 1.3; min-width: 0; }
.pacman-vertical { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; flex: 1; min-width: 0; }
body.playing #pacman-pad button, body.playing #frogger-pad button { min-height: 80px; padding: 8px; font-size: 2.3rem; border-radius: 22px; }
@media (orientation: landscape) and (max-height: 500px) {
  body { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  body.playing main { min-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  header { margin: 0; } h1 { font-size: 1.2rem; } footer { display: none; }
  body.playing .pad button { min-height: clamp(100px, 39dvh, 180px); }
  body.playing #control-help { margin: 8px 0; }
}

#control-game { margin: 6px 0; }

#pooyan-pad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 8vw, 90px); width: 100%; min-height: clamp(180px, 42dvh, 280px); touch-action: none; direction: ltr; }
.pooyan-movement { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 10px; min-width: 0; }
body.playing #pooyan-pad button { min-height: 80px; font-size: 2.4rem; padding: 8px; }
body.playing #pooyan-pad [data-control="fire"] { grid-column: 2; grid-row: 1; min-width: 0; font-size: 1.5rem; border-radius: 30px; }

#tapper-pad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 8vw, 90px); width: 100%; min-height: clamp(180px, 42dvh, 280px); touch-action: none; direction: ltr; }
.tapper-movement { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 10px; min-width: 0; }
body.playing #tapper-pad button { min-height: 80px; font-size: 2.4rem; padding: 8px; }
body.playing #tapper-pad [data-control="fire"] { grid-column: 2; grid-row: 1; min-width: 0; font-size: 1.5rem; border-radius: 30px; }

#arkanoid-pad { display: grid; grid-template-columns: minmax(0, 3fr) minmax(85px, 1fr); gap: 14px; min-height: clamp(180px, 40dvh, 280px); }
#paddle-touch { --paddle-position: 50%; position: relative; min-width: 0; border: 2px solid var(--rose-border); border-radius: 26px; background: linear-gradient(145deg, #342114, #17100b); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: hidden; }
#paddle-touch.pressed { border-color: var(--rose-gold-light); background: #3e2915; }
.paddle-caption { position: absolute; inset: 24px 8px auto; text-align: center; color: var(--rose-cream); font-size: .85rem; pointer-events: none; }
.paddle-track { position: absolute; inset: 65% 24px auto; height: 2px; background: #876332; pointer-events: none; }
.paddle-marker { position: absolute; left: var(--paddle-position); top: -7px; width: 38px; height: 16px; border-radius: 10px; background: var(--rose-gold); transform: translateX(-50%); }
body.playing #arkanoid-pad button { min-height: 100px; border-radius: 26px; padding: 8px; font-size: 1.15rem; }

#nickname-section { margin: 22px 0; padding: 18px; border: 1px solid var(--rose-border); border-radius: 14px; background: var(--rose-surface); }
#nickname-section label { display: block; font-weight: 650; margin-bottom: 10px; }
#nickname-section label span { color: var(--rose-muted); font-weight: 400; font-size: .8rem; }
#nickname { width: 100%; min-height: 52px; padding: 10px 14px; border: 2px solid var(--rose-gold); border-radius: 10px; background: var(--rose-night); color: #fff; font: inherit; }
#nickname:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#nickname[aria-invalid="true"] { border-color: #ffad94; }
#nickname-help, #nickname-status { font-size: .8rem; margin-bottom: 0; }
#nickname-status { color: var(--rose-gold); }

footer a { color: var(--rose-gold); display: inline-block; padding: 8px 0; }

/* Keep all game-pad geometry and touch behavior above unchanged. */
body { min-height: 100dvh; background: radial-gradient(circle at 85% 6%, rgba(249,115,22,.14), transparent 28rem), linear-gradient(180deg, #050302, #110905 52%, #050302); }
header { padding-bottom: 24px; border-bottom: 1px solid var(--rose-border); }
.badge { font-weight: 800; letter-spacing: .18em; }
h1 { margin: 16px 0 0; font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; }
h2 { letter-spacing: -.025em; }
button { border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.primary { color: #1b1007; border-color: var(--rose-gold); font-weight: 800; }
button:focus-visible, #nickname:focus-visible { outline-color: var(--rose-gold-light); }
body:not(.playing) #session-status { margin: 24px 0; padding: 20px; border: 1px solid var(--rose-border); border-radius: 12px; background: rgba(23,16,11,.9); box-shadow: 0 20px 70px rgba(0,0,0,.25); }
body:not(.playing) #session-status h2 { margin: 0 0 8px; }
body:not(.playing) #details { margin: 0; }
#timer { color: var(--rose-gold-light); font-weight: 800; }
#timer:empty { display: none; }
#nickname-section { border-radius: 12px; }
#nickname { border-width: 1px; border-color: rgba(246,196,83,.45); }
#nickname::placeholder { color: #9e8b79; }
footer { padding-top: 18px; border-top: 1px solid var(--rose-border); }
footer a { text-underline-offset: 4px; font-weight: 700; }
@media (hover: hover) {
  button:not(:disabled):hover { border-color: var(--rose-gold); }
  .primary:not(:disabled):hover { background: var(--rose-gold-light); }
}
