:root {
  color-scheme: dark;
  --bg: #06080f;
  --text: #eef3ff;
  --muted: #7d89a8;
  --faint: #4d5875;
  --line: rgba(255, 255, 255, 0.085);
  --panel: rgba(17, 22, 37, 0.72);
  --cyan: #5ee7ff;
  --violet: #8b7bff;
  --pink: #ff6cab;
  --lime: #9dff7d;
  --rail: clamp(48px, 14vw, 62px);
  --radius: 16px;
  --font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", "Roboto Mono",
    monospace;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(120% 70% at 50% -10%, #131a31 0%, transparent 58%),
    linear-gradient(180deg, #080b14 0%, #05070d 62%, #070a12 100%);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button {
  margin: 0;
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top);
  overflow: hidden;
  isolation: isolate;
}

/* Ambient background */
.aurora {
  position: fixed;
  inset: -15%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  filter: blur(10px);
}

.aurora-blob {
  position: absolute;
  display: block;
  width: 54vmax;
  height: 54vmax;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.17;
  will-change: transform;
}

.aurora-blob--cyan {
  top: -20%;
  left: -18%;
  background: #1fd8ff;
  animation: drift-a 19s ease-in-out infinite alternate;
}

.aurora-blob--violet {
  top: 24%;
  right: -26%;
  background: #6f55ff;
  opacity: 0.2;
  animation: drift-b 23s ease-in-out infinite alternate;
}

.aurora-blob--pink {
  bottom: -30%;
  left: 16%;
  background: #ff3f8d;
  opacity: 0.1;
  animation: drift-c 26s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate3d(12vw, 8vh, 0) scale(1.14);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-10vw, 6vh, 0) scale(0.9);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(8vw, -7vh, 0) scale(1.1);
  }
}

/* Header */
.topbar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 6px clamp(12px, 4vw, 20px) 2px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  width: 25px;
  height: 18px;
  overflow: visible;
  filter: drop-shadow(0 0 8px rgba(94, 231, 255, 0.3));
}

.brand-word {
  padding-top: 1px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.32em;
  color: #e9f0ff;
  text-shadow: 0 0 24px rgba(139, 123, 255, 0.32);
}

.top-actions {
  display: flex;
  gap: 7px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  color: #aebada;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.22);
  transition:
    transform 120ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.icon-button:active {
  transform: scale(0.92);
  color: var(--cyan);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button .sound-slash {
  display: none;
}

.icon-button.is-muted .sound-wave {
  display: none;
}

.icon-button.is-muted .sound-slash {
  display: block;
  stroke: var(--pink);
}

.icon-button .icon-play {
  display: none;
  fill: currentColor;
  stroke: none;
}

.icon-button.is-play .icon-pause {
  display: none;
}

.icon-button.is-play .icon-play {
  display: block;
}

/* Game layout */
.game-area {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 6px clamp(10px, 3.2vw, 18px) 4px;
}

.rail {
  display: flex;
  flex: 0 0 var(--rail);
  flex-direction: column;
  gap: 7px;
  align-self: center;
  width: var(--rail);
  min-width: 0;
}

.board-wrap {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
}

.board-frame {
  position: relative;
  flex: none;
  overflow: hidden;
  background: #070a13;
  border: 1px solid rgba(163, 183, 255, 0.16);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 18px 46px rgba(0, 0, 0, 0.52),
    0 0 38px rgba(94, 231, 255, 0.07),
    inset 0 0 26px rgba(31, 50, 99, 0.2);
  transform: translateZ(0);
}

.board-frame::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.5);
  content: "";
}

#boardCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: none;
}

.board-shine {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 25%),
    linear-gradient(0deg, rgba(105, 130, 255, 0.04), transparent 40%);
  border-radius: inherit;
  opacity: 0.8;
}

.board-frame.shake {
  animation: board-shake 170ms ease-out;
}

@keyframes board-shake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-2px, 1px, 0) rotate(-0.2deg);
  }
  45% {
    transform: translate3d(2px, -1px, 0) rotate(0.2deg);
  }
  70% {
    transform: translate3d(-1px, 1px, 0);
  }
}

/* Side panels */
.panel {
  width: 100%;
  padding: 6px 4px;
  background: linear-gradient(160deg, rgba(27, 35, 57, 0.74), rgba(11, 15, 26, 0.7));
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 8px 24px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel-label {
  margin: 0 0 5px;
  font-size: 6.5px;
  font-weight: 750;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-align: center;
}

.hold-slot {
  display: block;
  width: 100%;
  aspect-ratio: 1.18;
  min-height: 38px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 7, 14, 0.52), rgba(20, 27, 45, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
}

.hold-slot:active {
  border-color: rgba(94, 231, 255, 0.4);
}

.hold-slot.is-locked,
.ctrl.is-locked {
  opacity: 0.48;
}

.hold-slot.is-locked canvas {
  filter: saturate(0.4);
}

.hold-slot canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.stat {
  min-width: 0;
  padding: 6px 2px 5px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
}

.stat-label {
  display: block;
  overflow: hidden;
  font-size: 5.8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: var(--faint);
  white-space: nowrap;
  text-overflow: clip;
}

.stat-value {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: clamp(10px, 3.05vw, 14px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -0.055em;
  color: #edf3ff;
  text-overflow: clip;
  white-space: nowrap;
}

.stat-value.is-bumping {
  animation: stat-bump 240ms ease-out;
}

@keyframes stat-bump {
  40% {
    color: var(--cyan);
    text-shadow: 0 0 14px rgba(94, 231, 255, 0.65);
    transform: translateY(-1px);
  }
}

.next-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.next-canvas {
  display: block;
  width: 100%;
  height: clamp(27px, 5.5vh, 40px);
}

.swipe-note {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 1px 0 0;
  font-size: 5.3px;
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.5;
  color: #3c4763;
  text-align: center;
}

/* Toast over the board */
.toast {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  pointer-events: none;
  text-align: center;
  opacity: 0;
}

.toast strong {
  font-size: clamp(24px, 8vw, 38px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: #f8fbff;
  text-shadow:
    0 0 12px rgba(94, 231, 255, 0.8),
    0 0 40px rgba(139, 123, 255, 0.65);
}

.toast span {
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.toast.show {
  animation: toast-pop 1050ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes toast-pop {
  0% {
    opacity: 0;
    transform: scale(0.82) translateY(10px);
  }
  16% {
    opacity: 1;
    transform: scale(1.03) translateY(0);
  }
  30% {
    transform: scale(1);
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
}

/* Controls */
.controls {
  flex: none;
  padding: 5px clamp(10px, 3.2vw, 18px) calc(8px + env(safe-area-inset-bottom));
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.ctrl {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  height: clamp(43px, 7.1vh, 55px);
  padding: 4px 3px;
  color: #c3cde6;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.067), rgba(255, 255, 255, 0.022));
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 16px rgba(0, 0, 0, 0.25);
  transition:
    transform 90ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.ctrl svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.ctrl span {
  font-size: 6.2px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.13em;
  color: #74819f;
}

.ctrl:active,
.ctrl.is-active {
  transform: translateY(1px) scale(0.975);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045));
  border-color: rgba(94, 231, 255, 0.34);
}

.ctrl:active svg,
.ctrl.is-active svg {
  color: var(--cyan);
}

.ctrl--rotate {
  color: #d9d3ff;
  background: linear-gradient(180deg, rgba(139, 123, 255, 0.22), rgba(104, 86, 226, 0.11));
  border-color: rgba(164, 150, 255, 0.22);
}

.ctrl--rotate:active {
  background: linear-gradient(180deg, rgba(139, 123, 255, 0.38), rgba(104, 86, 226, 0.18));
  border-color: rgba(184, 173, 255, 0.55);
}

.ctrl--drop {
  color: #071018;
  background: linear-gradient(145deg, #7aeaff 0%, #59d8ff 45%, #9d8dff 100%);
  border-color: rgba(185, 245, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 5px 20px rgba(63, 211, 255, 0.25);
}

.ctrl--drop span {
  color: rgba(5, 17, 27, 0.7);
}

.ctrl--drop svg,
.ctrl--drop:active svg {
  color: #071018;
}

.ctrl--drop:active {
  background: linear-gradient(145deg, #9ef2ff, #76e6ff 45%, #b7aaff);
  border-color: #c8f8ff;
}

/* Modal screens */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding:
    calc(18px + env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  place-items: center;
  visibility: hidden;
  background:
    radial-gradient(90% 60% at 50% 35%, rgba(27, 37, 68, 0.68) 0%, rgba(5, 8, 15, 0.9) 62%),
    rgba(4, 6, 12, 0.72);
  opacity: 0;
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-card {
  position: relative;
  width: min(100%, 342px);
  padding: 24px 20px 20px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(29, 37, 61, 0.97), rgba(10, 14, 24, 0.98) 72%);
  border: 1px solid rgba(184, 199, 255, 0.13);
  border-radius: 27px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.65),
    0 0 70px rgba(94, 231, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transform: translateY(16px) scale(0.975);
  transition: transform 340ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card::before {
  position: absolute;
  top: 0;
  left: 16%;
  width: 68%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 231, 255, 0.75), rgba(139, 123, 255, 0.6), transparent);
  content: "";
}

.modal.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card--start {
  padding-top: 20px;
}

.logo-tetromino {
  display: grid;
  grid-template-columns: repeat(3, 16px);
  grid-template-rows: repeat(2, 16px);
  gap: 4px;
  justify-content: center;
  margin: 0 auto 14px;
  filter: drop-shadow(0 0 12px rgba(139, 123, 255, 0.46));
  animation: logo-float 4.5s ease-in-out infinite;
}

.logo-tetromino i {
  display: block;
  border-radius: 4px;
  background: linear-gradient(145deg, #c1b7ff, #7c67ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.logo-tetromino i:nth-child(1) {
  grid-area: 1 / 1;
  background: linear-gradient(145deg, #a8f6ff, #42d6f2);
}

.logo-tetromino i:nth-child(2) {
  grid-area: 1 / 2;
}

.logo-tetromino i:nth-child(3) {
  grid-area: 1 / 3;
  background: linear-gradient(145deg, #ffb3ce, #f2548b);
}

.logo-tetromino i:nth-child(4) {
  grid-area: 2 / 2;
}

@keyframes logo-float {
  50% {
    transform: translateY(-4px);
  }
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.28em;
  color: #697696;
}

.modal-card h1,
.modal-card h2 {
  margin: 0;
  font-size: clamp(31px, 10vw, 40px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #f2f6ff;
}

.modal-card h1 {
  padding-right: 0.08em;
  background: linear-gradient(110deg, #ffffff 5%, #b9f5ff 35%, #a99bff 68%, #ffb4d3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(139, 123, 255, 0.26));
}

.modal-card h2 {
  font-size: clamp(27px, 8.6vw, 34px);
}

.modal-subtitle {
  max-width: 250px;
  margin: 10px auto 0;
  font-size: 11px;
  line-height: 1.45;
  color: #8b97b5;
}

.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0 0;
}

.rule {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding: 9px 3px 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
}

.rule-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  color: var(--cyan);
  background: rgba(94, 231, 255, 0.07);
  border: 1px solid rgba(94, 231, 255, 0.14);
  border-radius: 8px;
}

.rule span:last-child {
  font-size: 5.9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #7f8aa7;
}

.modal-note {
  margin: 11px 0 15px;
  font-size: 8px;
  line-height: 1.45;
  color: #56617e;
}

.btn {
  display: flex;
  width: 100%;
  height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.17em;
  border-radius: 15px;
  transition:
    transform 100ms ease,
    filter 160ms ease;
}

.btn:active {
  transform: scale(0.975);
}

.btn--primary {
  color: #07121c;
  background: linear-gradient(135deg, #8bf1ff 0%, #61dfff 40%, #a494ff 100%);
  border: 1px solid rgba(205, 250, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 9px 28px rgba(62, 207, 255, 0.24);
}

.btn--primary:active {
  filter: brightness(1.08);
}

.btn--ghost {
  height: 46px;
  margin-top: 8px;
  font-size: 9px;
  color: #98a4c3;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.best-line {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin: 13px 0 0;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #626e8d;
}

.best-line strong {
  color: #c8d3ec;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0;
}

.best-dot {
  width: 5px;
  height: 5px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(157, 255, 125, 0.75);
}

.pause-score {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0;
  padding: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
}

.pause-score span {
  font-size: 6.5px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.pause-score strong {
  font-family: var(--mono);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: #f2f6ff;
}

.result-score {
  margin: 15px 0 13px;
  font-family: var(--mono);
  font-size: clamp(42px, 13vw, 55px);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, #ffffff, #9eefff 60%, #a99bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(94, 231, 255, 0.24));
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.result-grid > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 2px;
  background: rgba(255, 255, 255, 0.033);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.result-grid span {
  font-size: 5.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: var(--faint);
}

.result-grid strong {
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #dce5f9;
}

.new-record {
  margin-bottom: 12px;
  padding: 7px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #0c1b12;
  background: linear-gradient(90deg, #9dff7d, #5effd0);
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(125, 255, 160, 0.25);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  padding: 24px;
  place-items: center;
  color: #fff;
  text-align: center;
  background: #070a12;
}

/* Compact phones */
@media (max-height: 710px) {
  .topbar {
    min-height: 38px;
    padding-top: 3px;
  }

  .game-area {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .ctrl {
    height: 43px;
  }

  .controls {
    padding-top: 4px;
  }

  .next-canvas {
    height: 28px;
  }

  .stat {
    padding: 4px 2px;
  }

  .hold-slot {
    min-height: 34px;
  }

  .swipe-note {
    display: none;
  }

  .modal-card {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .logo-tetromino {
    margin-bottom: 10px;
  }

  .modal-subtitle {
    margin-top: 7px;
  }

  .rules {
    margin-top: 12px;
  }

  .modal-note {
    margin: 8px 0 12px;
  }

  .btn {
    height: 47px;
  }

  .result-score {
    margin: 10px 0;
  }
}

@media (max-width: 360px) {
  .brand-word {
    font-size: 11px;
    letter-spacing: 0.25em;
  }

  .icon-button {
    width: 34px;
    height: 34px;
  }

  .ctrl span {
    font-size: 5.7px;
  }

  .ctrl svg {
    width: 19px;
    height: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-blob,
  .logo-tetromino {
    animation: none;
  }

  .board-frame.shake {
    animation: none;
  }

  .modal,
  .modal-card {
    transition-duration: 0.01ms;
  }
}
