/* Block Lines — premium arcade presentation. No identity.css overrides. */
:root {
  color-scheme: dark;
  --bg: #030817;
  --panel: rgba(7, 17, 38, .96);
  --panel-strong: #08172c;
  --white: #f6fbff;
  --text: #eff9ff;
  --muted: #a0bdd0;
  --line: rgba(90, 199, 243, .22);
  --line-strong: rgba(117, 231, 255, .65);
  --aqua: #4deaff;
  --purple: #bc8bff;
  --gold: #ffd279;
  --shadow-white: 0 0 25px rgba(77,234,255,.16);
}
html, body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
body { background: #030817; }
.app {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  background: radial-gradient(ellipse 75% 90% at 50% 30%, #0c2541, #030817 75%);
  isolation: isolate;
}
.app::before {
  content: ''; pointer-events: none; position: absolute; inset: 0;
  background: radial-gradient(ellipse 45% 50% at 15% 35%, rgba(54,204,249,.1), transparent),
              radial-gradient(ellipse 45% 45% at 90% 70%, rgba(157,82,244,.11), transparent);
  z-index: 0;
}
#gameCanvas { z-index: 1; }
.hud {
  top: max(7px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  gap: 12px;
  align-items: center;
}
.hud-left { flex: 0 1 auto; gap: 7px; }
.hud-right { flex: 0 0 auto; gap: 7px; }
.hud-pill {
  min-height: 45px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 65px;
  padding: 6px 12px;
  border: 1px solid rgba(88, 197, 238, .26);
  border-radius: 11px;
  background: rgba(5, 21, 44, .87);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 5px 15px rgba(0,0,0,.22);
}
.hud-pill span {
  color: #9bb9cb; font-size: 9px; letter-spacing: .13em;
}
.hud-pill strong {
  min-width: 0; font-size: 17px; font-weight: 800;
  line-height: 1.1; color: #f4fbff; text-align: center;
  font-variant-numeric: tabular-nums;
}
.hud-pill.score-pill strong { color: var(--aqua); }
.hud-pill.best-pill strong { color: var(--gold); }
.player-chip {
  min-height: 42px; max-width: 105px; border-radius: 10px;
  background: rgba(6,23,42,.86); color: #b7cfdf;
}
.icon-btn {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(100,206,242,.38);
  background: rgba(5,24,48,.91); color: #eaf9ff;
  font-size: 17px; font-weight: 800;
  touch-action: manipulation;
}
.icon-btn:hover { background: rgba(28,66,92,.95); }
.screen {
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: safe center;
}
#introScreen, #pauseScreen, #gameOverScreen {
  background: linear-gradient(155deg, rgba(3,9,25,.92), rgba(6,16,39,.86) 56%, rgba(6,5,22,.94));
  backdrop-filter: blur(8px);
}
#introScreen::before {
  content: ''; pointer-events: none; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 49.7%, rgba(76,202,248,.08) 50%, transparent 50.3%),
              repeating-linear-gradient(0deg, transparent 0 47px, rgba(86,213,246,.045) 48px),
              repeating-linear-gradient(90deg, transparent 0 47px, rgba(86,213,246,.045) 48px);
}
.intro-card, .screen-panel {
  position: relative;
  width: min(92vw, 425px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: clamp(20px, 4.1vh, 34px) clamp(18px, 4vw, 32px);
  border: 1px solid rgba(98,218,250,.44);
  border-radius: 23px;
  background: linear-gradient(150deg, rgba(24,61,94,.38), rgba(7,20,44,.98) 43%, rgba(8,10,32,.98));
  box-shadow: inset 0 1px 0 rgba(239,250,255,.14), 0 0 0 5px rgba(77,211,251,.035), 0 26px 70px rgba(0,0,0,.54);
  overflow-y: auto; overscroll-behavior: contain;
  text-align: center;
}
.intro-card::before, .screen-panel::before {
  content: ''; position: absolute; top: 0; left: 19%; right: 19%;
  height: 2px; background: linear-gradient(90deg, transparent, #55eaff, transparent);
}
.intro-kicker {
  font-weight: 800; font-size: 10px; letter-spacing: .19em;
  color: #9feafb; margin: 0 auto 14px;
}
.brand-mark {
  width: 61px; height: 61px; margin: 0 auto 18px;
  border-radius: 16px; border: 1px solid rgba(100,236,252,.64);
  background: linear-gradient(140deg,#123f68,#0c1e44);
  color: #a9f6ff; box-shadow: 0 0 28px rgba(45,219,255,.2), inset 0 1px 0 rgba(255,255,255,.19);
  font-size: 33px; font-weight: 900;
}
h1 { color: #f4fcff; font-size: clamp(42px, 10vw, 62px); line-height: .94; letter-spacing: -.04em; font-weight: 900; text-shadow: 0 0 28px rgba(53,204,251,.25); }
h1 span { color: var(--aqua); text-shadow: 0 0 27px rgba(29,202,248,.45); }
h2 { color: #f0faff; font-size: clamp(30px, 7vw, 42px); font-weight: 900; letter-spacing: .025em; }
.tagline { color: #b2cad8; max-width: 330px; margin: 13px auto 0; font-size: 13px; line-height: 1.5; letter-spacing: 0; }
.block-preview { margin: 19px 0; gap: 7px; }
.block-preview span {
  width: 23px; height: 23px; border-radius: 4px; border: 1px solid rgba(255,255,255,.34);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.3), 0 0 14px rgba(75,207,244,.17);
}
.block-preview span:nth-child(1) { background: #36e8ff; }
.block-preview span:nth-child(2) { background: #bd91ff; }
.block-preview span:nth-child(3) { background: #ffce57; }
.block-preview span:nth-child(4) { background: #6df5a2; }
.intro-features { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; margin: 0 auto 18px; }
.intro-features span {
  font-size: 9px; font-weight: 800; padding: 6px 8px;
  color: #b6dbea; background: rgba(93,166,213,.11);
  border: 1px solid rgba(125,212,249,.2); border-radius: 7px; letter-spacing: .02em;
}
.primary-btn, .secondary-btn {
  min-height: 49px; border-radius: 12px; padding: 10px 12px;
  font-weight: 800; cursor: pointer; touch-action: manipulation;
}
#introScreen .primary-btn, #introScreen .secondary-btn { width: 100%; display: block; }
.primary-btn {
  color: #052037;
  background: linear-gradient(130deg,#a2f7ff,#42e1ff 62%,#5cabed);
  border: 1px solid #a9f8ff;
  box-shadow: 0 6px 26px rgba(45,220,249,.22);
  font-size: 14px; letter-spacing: .07em;
}
.secondary-btn {
  background: rgba(80,151,210,.08); color: #dcf3ff;
  border: 1px solid rgba(112,213,246,.29);
  font-size: 13px;
}
.secondary-btn:hover { background: rgba(80,151,210,.18); }
#continueBtn { margin-top: 9px; }
.controls-help {
  margin: 15px auto 0; max-width: 350px; line-height: 1.7;
  color: #97b4c7; font-size: 11px; letter-spacing: 0;
}
.eyebrow {
  color: #8de9f4; font-size: 10px; font-weight: 800; letter-spacing: .17em;
  margin-bottom: 10px;
}
.pause-copy { margin: 12px 0 18px; color: #afc6d6; font-size: 13px; }
.screen-panel { width: min(92vw, 430px); }
.small-panel { width: min(92vw, 380px); }
.wide-panel { width: min(92vw, 460px); }
.result-grid { margin: 17px 0; gap: 8px; }
.result-grid div {
  min-height: 72px; border-radius: 12px; padding: 11px;
  background: rgba(7,30,53,.65); border: 1px solid rgba(98,195,245,.21);
}
.result-grid span { color: #a9c1d1; font-size: 10px; }
.result-grid strong { color: #eafbff; font-size: 22px; font-weight: 800; }
#resultScore { color: #8df2ff; }
#resultBest { color: var(--gold); }
.submission-status { min-height: 16px; margin-bottom: 10px; color: #c4e8d2; }
#resultPlayer { margin: 0 auto; max-width: 100%; }
.menu-actions { gap: 9px; margin-top: 19px; }
.menu-actions.horizontal { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mobile-controls {
  bottom: max(10px, env(safe-area-inset-bottom)); gap: clamp(4px, 1.4vw, 10px);
  padding: 0 max(7px, env(safe-area-inset-left)) 0 max(7px, env(safe-area-inset-right));
}
.ctrl-btn {
  flex: 0 1 56px;
  width: 56px; height: 55px; min-width: 0; min-height: 52px;
  border-radius: 12px; border: 1px solid rgba(108,214,247,.35);
  background: rgba(5,23,48,.91); color: #d5f4ff;
  font-size: 23px; font-weight: 900; touch-action: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.28);
}
.ctrl-drop { color: #042237; background: linear-gradient(155deg,#a3f4ff,#47d8fd); border-color: #a7f9ff; }
.ctrl-rotate { color: #caa8ff; }
.ctrl-hold { color: var(--gold); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 779px), (pointer: coarse) {
  .hud {
    flex-direction: column-reverse; align-items: stretch;
    gap: 5px;
  }
  .hud-right { margin: 0; justify-content: flex-end; }
  .hud-left { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 5px; }
  .hud-pill { min-width: 0; min-height: 39px; padding: 4px; border-radius: 8px; }
  .hud-pill strong { font-size: 15px; }
  .hud-pill span { font-size: 8px; }
  .icon-btn { width: 43px; height: 43px; min-width: 43px; min-height: 43px; }
  .player-chip { max-width: min(45vw, 150px); }
  .mobile-controls { display: none; }
  .state-playing .mobile-controls { display: flex; }
}
@media (max-width: 420px) {
  .player-chip { display: none; }
  .intro-card, .screen-panel { padding: 18px 16px; }
  .brand-mark { width: 51px; height: 51px; margin-bottom: 13px; font-size: 27px; }
  h1 { font-size: clamp(37px, 11.5vw, 48px); }
  .intro-features span { padding: 5px 6px; font-size: 8px; }
  .ctrl-btn { flex-basis: 51px; width: 51px; height: 51px; }
}
@media (max-height: 690px) {
  .screen { align-items: start; }
  .intro-card,.screen-panel { max-height: calc(100dvh - 18px); margin: auto; padding-top: 13px; padding-bottom: 13px; }
  .intro-kicker { margin-bottom: 8px; }
  .brand-mark { width: 44px; height: 44px; font-size: 24px; margin-bottom: 11px; }
  .block-preview { margin: 11px 0; }
  .intro-features { margin-bottom: 12px; }
  .controls-help { margin-top: 10px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .hud { max-width: calc(100vw - 12px); }
  .hud-left { max-width: min(390px, 67vw); }
  .hud-right { position: absolute; right: 0; top: 0; }
  .player-chip { display: none; }
  .state-playing .mobile-controls { justify-content: flex-end; padding-right: 6px; }
  .ctrl-btn { width: 42px; height: 42px; min-height: 42px; flex-basis: 42px; font-size: 17px; }
  .controls-help { display: none; }
  .result-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (min-width: 780px) and (pointer: fine) {
  .mobile-controls { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .pop, .block-preview span, button { animation: none !important; transition: none !important; }
}

/* Do not make the pause and results panels unscrollable on touch screens. */
html, body { touch-action: auto; }
#gameCanvas { touch-action: none; }
.screen, .screen-panel, .intro-card { touch-action: pan-y; -webkit-overflow-scrolling: touch; }
