@font-face {
  font-family: "Corki";
  src: url("./Corki/Corki-Tuscan.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Corki Rounded";
  src: url("./Corki/Corki-Rounded.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky: #80b8df;
  --sky-deep: #4e97cf;
  --orange: #d16a38;
  --yellow: #f5bf45;
  --paper: #f7f4ee;
  --card: rgba(247, 244, 238, 0.9);
  --ink: #2453a4;
  --ink-dark: #173d7d;
  --muted: rgba(36, 83, 164, 0.78);
  --seat: #ffffff;
  --seat-border: rgba(36, 83, 164, 0.26);
  --seat-selected: #d16a38;
  --seat-selected-border: #9e4d26;
  --shadow: 0 30px 80px rgba(26, 70, 123, 0.18);
  --seat-size: 24px;
  --seat-gap: 4px;
  --row-number-width: 24px;
  --seat-font-size: 12.48px;
  --row-number-size: 24px;
  --zoom-scale: 1;
  --upper-sector-offset-base: 16px;
  --upper-sector-gap-base: 92px;
}

* {
  box-sizing: border-box;
}

button {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--ink);
  background: linear-gradient(90deg, var(--sky) 0 57%, #ffffff 57% 100%);
  touch-action: manipulation;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 90;
  width: min(calc(100vw - 28px), 760px);
  transform: translateX(-50%);
}

.cookie-banner__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 2px solid rgba(36, 83, 164, 0.12);
  background: rgba(247, 244, 238, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 34px rgba(36, 83, 164, 0.18);
}

.cookie-banner__text {
  margin: 0;
  color: var(--ink-dark);
  font-size: 0.92rem;
  line-height: 1.45;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.cookie-banner__link {
  color: var(--ink-dark);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.cookie-banner__link:hover,
.cookie-banner__link:focus-visible {
  color: var(--orange);
  outline: none;
}

.cookie-banner__button {
  min-width: 110px;
  height: 40px;
  padding: 0 16px;
  border: 2px solid rgba(158, 77, 38, 0.26);
  border-radius: 999px;
  background: linear-gradient(180deg, #e8874d 0%, #d16a38 100%);
  color: #ffffff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 12px 22px rgba(209, 106, 56, 0.2);
}

.cookie-banner__button:hover,
.cookie-banner__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(209, 106, 56, 0.24);
  outline: none;
}

.app {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 32px;
  overflow: hidden;
}

.hall-card {
  position: relative;
  z-index: 1;
  width: min(1380px, 100%);
  padding: 34px;
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
}

.policy-app {
  overflow: hidden;
}

.policy-card {
  width: min(920px, 100%);
}

.poster-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 999px;
}

.shape--orange-left {
  width: 320px;
  height: 320px;
  top: -88px;
  left: -72px;
  background: var(--orange);
}

.shape--orange-top {
  display: none;
}

.shape--orange-bottom {
  width: 300px;
  height: 300px;
  left: -86px;
  bottom: -94px;
  background: var(--orange);
}

.shape--yellow-top {
  width: 220px;
  height: 220px;
  top: 210px;
  left: 56%;
  background: rgba(255, 255, 255, 0.88);
}

.shape--yellow-right {
  width: 120px;
  height: 120px;
  top: 300px;
  right: 54px;
  background: rgba(255, 255, 255, 0.72);
}

.shape--yellow-bottom {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -190px;
  background: rgba(255, 255, 255, 0.96);
}

.shape--white {
  background: rgba(255, 255, 255, 0.95);
}

.white-1 {
  width: 150px;
  height: 150px;
  top: 88px;
  left: 240px;
}

.white-2 {
  width: 124px;
  height: 124px;
  top: 228px;
  left: 62px;
}

.white-3 {
  width: 134px;
  height: 134px;
  top: 344px;
  left: 108px;
}

.white-4 {
  width: 88px;
  height: 88px;
  top: -16px;
  left: 744px;
}

.shape--diagonal {
  width: 1040px;
  height: 1040px;
  right: -210px;
  top: 38px;
  border-radius: 0;
  background: linear-gradient(140deg, transparent 0 31%, rgba(78, 151, 207, 0.92) 31% 100%);
}

.shape--line {
  left: 0;
  right: 0;
  bottom: 82px;
  height: 18px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent 0 6%, rgba(209, 106, 56, 0.9) 6% 68%, transparent 68% 100%);
}

.hero {
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: "Corki", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 1.64rem;
  font-weight: 700;
  color: var(--ink);
}

.eyebrow-line {
  display: inline;
}

.eyebrow-line--first::after {
  content: " ";
}

h1 {
  margin: 0;
  font-family: "Corki", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(1.35rem, 3.5vw, 2.7rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.description {
  margin: 16px 0 0;
  max-width: 52ch;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.hall-panel {
  display: block;
}

.hall-stack {
  display: grid;
  gap: 18px;
}

.policy-content {
  display: grid;
  gap: 12px;
  padding: 24px 28px;
  border-radius: 28px;
  border: 3px solid rgba(36, 83, 164, 0.12);
  background:
    linear-gradient(135deg, rgba(128, 184, 223, 0.16) 0 38%, rgba(255, 255, 255, 0) 38% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 246, 252, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.policy-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 2px solid rgba(36, 83, 164, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-dark);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.policy-nav__link:hover,
.policy-nav__link:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(36, 83, 164, 0.14);
  color: var(--orange);
  outline: none;
}

.policy-nav__link.is-current {
  background: linear-gradient(180deg, #fff4e7 0%, #ffe0b9 100%);
  border-color: rgba(209, 106, 56, 0.24);
  color: var(--orange);
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.92);
}

.policy-content h2 {
  margin: 12px 0 0;
  font-family: "Corki Rounded", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-dark);
}

.policy-content p {
  margin: 0;
  line-height: 1.65;
  font-size: 1rem;
  color: var(--ink-dark);
}

.policy-compact-list {
  display: grid;
  gap: 4px;
}

.policy-compact-list p {
  line-height: 1.45;
}

.policy-content code {
  padding: 0 0.3em;
  border-radius: 0.45em;
  background: rgba(36, 83, 164, 0.08);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
}

.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 16px;
}

.site-footer__brand {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.site-footer__text {
  margin: 0;
  color: var(--ink-dark);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 1;
  text-align: left;
}

.site-footer__copyright {
  margin: 0;
  color: var(--ink-dark);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 1;
  text-align: center;
  justify-self: center;
}

.site-footer__links {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.site-footer--page {
  width: min(1380px, 100%);
  padding: 0 8px;
  margin-top: 10px;
}

.site-footer__link {
  display: inline-block;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-dark);
  text-decoration: none;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 1;
  transition: color 0.18s ease;
}

.site-footer__link:hover,
.site-footer__link:focus-visible {
  color: var(--orange);
  outline: none;
}

.site-footer--policy {
  margin-top: 22px;
}

.game-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(36, 83, 164, 0.12);
}

.game-play-button,
.game-help-button,
.game-sound-button,
.game-start-button,
.game-cancel-button {
  height: 36px;
  padding: 0 14px;
  border: 2px solid rgba(36, 83, 164, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-dark);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.game-sound-preset {
  height: 36px;
  padding: 0 10px;
  border: 2px solid rgba(36, 83, 164, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-dark);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.game-sound-preset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78, 151, 207, 0.22);
}

.game-help-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 800;
}

.game-play-button:hover,
.game-play-button:focus-visible,
.game-help-button:hover,
.game-help-button:focus-visible,
.game-sound-button:hover,
.game-sound-button:focus-visible,
.game-start-button:hover,
.game-start-button:focus-visible,
.game-cancel-button:hover,
.game-cancel-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(36, 83, 164, 0.14);
  outline: none;
}

.game-sound-button[aria-pressed="false"] {
  background: rgba(236, 242, 249, 0.95);
  color: rgba(23, 61, 125, 0.72);
}

.game-sound-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  position: relative;
}

.sound-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--ink-dark);
}

.sound-icon__svg {
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.sound-icon__svg path,
.sound-icon__svg circle,
.sound-icon__svg rect {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-icon__speaker-fill {
  fill: rgba(128, 184, 223, 0.72);
  stroke: none;
}

.sound-icon__speaker-stroke {
  fill: none;
  stroke: var(--ink-dark);
  stroke-width: 1.7;
}

.sound-icon__wave-line {
  fill: none;
  stroke: var(--ink-dark);
  stroke-width: 1.7;
  opacity: 0.95;
}

.game-sound-button[aria-pressed="false"] .sound-icon {
  color: var(--orange);
}

.game-sound-button[aria-pressed="false"] .sound-icon__wave-line {
  opacity: 0;
}

.game-sound-button[aria-pressed="false"] .sound-icon::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 2.6px;
  border-radius: 999px;
  background: var(--orange);
  transform: rotate(-45deg);
  box-shadow: 0 0 0 1px rgba(247, 244, 238, 0.55);
}

.game-help-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 12px;
  z-index: 30;
  width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(36, 83, 164, 0.18);
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink-dark);
  box-shadow: 0 16px 28px rgba(36, 83, 164, 0.16);
}

.game-help-popover h3 {
  margin: 0 0 8px;
  font-size: 0.96rem;
}

.game-help-popover p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.32;
}

.game-help-popover p + p {
  margin-top: 6px;
}

.game-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-name-input {
  width: 184px;
  height: 36px;
  padding: 0 10px;
  border: 2px solid rgba(36, 83, 164, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-dark);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}

.game-name-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(78, 151, 207, 0.22);
}

.zoom-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 2px solid rgba(36, 83, 164, 0.12);
  flex-wrap: wrap;
  flex: 0 1 auto;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.control-group--left {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.control-group--right {
  justify-content: flex-end;
  margin-left: 96px;
}

.zoom-button {
  min-width: 54px;
  height: 44px;
  padding: 0 14px;
  border: 2px solid rgba(36, 83, 164, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink-dark);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#zoom-reset {
  width: 78px;
  min-width: 78px;
  padding: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.zoom-button:hover,
.zoom-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(36, 83, 164, 0.14);
  outline: none;
}

.zoom-button:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.stage {
  margin: 0;
  width: min(520px, 100%);
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 18px;
  text-align: center;
  font-family: "Corki Rounded", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 4.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 24px;
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(36, 83, 164, 0.26);
}

.stage:not(.stage--winner) {
  padding-left: calc(18px + 0.5ch);
}

.stage.stage--winner {
  font-family: "Corki Rounded", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 4.5rem;
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.stage-result {
  margin: 10px auto 0;
  width: min(520px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-dark);
}

.stage-result[hidden] {
  display: none;
}

.stage-result__label {
  display: inline-block;
}

.stage-result__counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(209, 106, 56, 0.18);
  background: linear-gradient(180deg, #fff4e7 0%, #ffe0b9 100%);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.92),
    0 6px 12px rgba(209, 106, 56, 0.18);
  color: var(--orange);
  font-size: 1rem;
  line-height: 1;
}

.hall {
  padding: 28px;
  border-radius: 28px;
  overflow: auto;
  border: 3px solid rgba(36, 83, 164, 0.18);
  background:
    linear-gradient(135deg, rgba(128, 184, 223, 0.18) 0 38%, rgba(255, 255, 255, 0) 38% 100%),
    linear-gradient(315deg, rgba(36, 83, 164, 0.08) 0 24%, rgba(255, 255, 255, 0) 24% 100%),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.95) 0 38px, rgba(255, 255, 255, 0) 39px),
    radial-gradient(circle at 84% 80%, rgba(209, 106, 56, 0.12) 0 92px, rgba(209, 106, 56, 0) 93px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 252, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.hall-scrollbar {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(36, 83, 164, 0.12);
}

.hall-scrollbar-track {
  height: 8px;
}

.hall-viewport {
  position: relative;
  width: fit-content;
  min-width: 100%;
  min-height: 100%;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 44px;
}

.hall-viewport .seat-grid {
  transition: none;
}

.seat-grid {
  display: grid;
  gap: calc(28px + var(--seat-size) + var(--seat-gap));
  width: fit-content;
  min-width: 0;
  justify-items: center;
  margin: 0 auto;
}

.upper-sections {
  display: grid;
  gap: 6px;
  align-items: start;
}

.upper-paired-row {
  display: grid;
  grid-template-columns: max-content calc(var(--upper-sector-gap-base) * var(--zoom-scale)) max-content;
  align-items: center;
  width: max-content;
  position: relative;
  isolation: isolate;
}

.upper-paired-row > .seat-row:first-child {
  transform: translateX(calc(var(--upper-sector-offset-base) * var(--zoom-scale)));
}

.upper-paired-row > .seat-row:last-child {
  transform: translateX(calc(var(--upper-sector-offset-base) * var(--zoom-scale) * -1));
}

.upper-paired-row.row-selected::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(36, 83, 164, 0.12);
  z-index: 0;
}

.upper-paired-row.upper-paired-row--mid.row-selected::before {
  left: calc((var(--seat-size) + var(--seat-gap)) * 4);
  right: calc((var(--seat-size) + var(--seat-gap)) * 3);
}

.upper-paired-row.upper-paired-row--top.row-selected::before {
  left: calc(var(--seat-size) + var(--seat-gap));
}

.upper-row-gap {
  width: calc(var(--upper-sector-gap-base) * var(--zoom-scale));
  height: 100%;
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.section-block,
.lower-section {
  display: grid;
  gap: 6px;
}

.seat-row {
  display: grid;
  gap: var(--seat-gap);
  align-items: center;
  width: max-content;
  position: relative;
  isolation: isolate;
}

.seat-row.row-selected::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: rgba(36, 83, 164, 0.12);
  z-index: 0;
}

.seat-row.seat-row--spread {
  grid-template-columns:
    var(--row-number-width)
    calc((var(--seat-size) * 27) + (var(--seat-gap) * 26))
    var(--row-number-width);
}

.seat-row.lower-shifted {
  transform: translateX(calc((var(--seat-size) + var(--seat-gap)) / 2));
}

.row-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--seat-size);
  font-family: "Corki", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: var(--row-number-size);
  font-weight: 700;
  color: var(--orange);
  position: relative;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.row-number.marker-col-3 {
  transform: translateX(calc((var(--seat-size) + var(--seat-gap)) * 4));
}

.row-number.marker-col-26 {
  transform: translateX(calc((var(--seat-size) + var(--seat-gap)) * -3));
}

.row-number.marker-col-left-top {
  transform: translateX(calc(var(--seat-size) + var(--seat-gap)));
}

.row-number.top-right-after-24 {
  transform: translateX(calc((var(--seat-size) + var(--seat-gap)) * -3));
}

.row-number.overlay-center {
  position: absolute;
  top: 50%;
  left: calc(
    var(--row-number-width) +
    ((var(--seat-size) + var(--seat-gap)) * 17.625) - 1px
  );
  transform: translate(-50%, -50%);
}

.seat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--seat-size);
  height: var(--seat-size);
  padding: 0;
  border: 1px solid var(--seat-border);
  border-radius: 50%;
  background: var(--seat);
  color: var(--ink-dark);
  font: inherit;
  font-size: var(--seat-font-size);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(36, 83, 164, 0.08);
  touch-action: pan-x pan-y;
}

.seat,
.zoom-button,
.reset-button,
.summary-pill {
  position: relative;
  overflow: visible;
}

.press-burst {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--burst-angle, 45deg));
  z-index: 12;
  filter: saturate(1.18) drop-shadow(0 0 8px rgba(245, 191, 69, 0.22));
}

.press-burst--fixed {
  position: fixed;
  z-index: 60;
}

.press-burst::before,
.press-burst::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  opacity: 0;
}

.press-burst::before {
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  margin-top: -4.5px;
  background: transparent;
  box-shadow:
    0 -14px 0 0 #ffd157,
    14px 0 0 0 #54a7e6,
    0 14px 0 0 #ef7c43,
    -14px 0 0 0 #9ed6fb;
  animation: burst-dots-cardinal var(--burst-duration, 560ms) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.press-burst::after {
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-top: -3.5px;
  background: transparent;
  box-shadow:
    10px -10px 0 0 #ef7c43,
    10px 10px 0 0 #ffd157,
    -10px 10px 0 0 #54a7e6,
    -10px -10px 0 0 #9ed6fb;
  animation: burst-dots-diagonal var(--burst-duration, 560ms) cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes burst-dots-cardinal {
  0% {
    transform: scale(0.3);
    opacity: 0.18;
  }
  16% {
    opacity: 1;
  }
  46% {
    opacity: 0.96;
  }
  100% {
    transform: scale(var(--burst-scale, 1.45));
    opacity: 0;
  }
}

@keyframes burst-dots-diagonal {
  0% {
    transform: scale(0.3);
    opacity: 0.18;
  }
  16% {
    opacity: 1;
  }
  46% {
    opacity: 0.96;
  }
  100% {
    transform: scale(var(--burst-scale, 1.45));
    opacity: 0;
  }
}

.seat:hover,
.seat:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 8px 16px rgba(36, 83, 164, 0.18);
  outline: none;
}

.seat.selected {
  border-color: var(--seat-selected-border);
  background: var(--seat-selected);
  color: #ffffff;
  transform: scale(1.5);
  transform-origin: center center;
  text-shadow: none;
  z-index: 1;
  padding-bottom: 2px;
  box-shadow: 0 10px 20px rgba(209, 106, 56, 0.28);
}

.seat.seat--raised-half {
  transform: translateY(-5px);
}

.seat.seat--raised-half.selected {
  transform: translateY(-5px) scale(1.5);
}

.seat.game-seat {
  box-shadow: 0 4px 10px rgba(36, 83, 164, 0.08);
}

.seat.game-seat--blue {
  background: #4e97cf;
  border-color: #2453a4;
  color: transparent;
}

.seat.game-seat--orange {
  background: #d16a38;
  border-color: #9e4d26;
  color: transparent;
}

.seat.game-seat--orange.game-seat--revealed {
  background: #ffffff;
  border-color: #d16a38;
  color: #d16a38;
  font-size: calc(var(--seat-font-size) * 1.7);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
  text-shadow: none;
}

.seat.game-seat:hover,
.seat.game-seat:focus-visible {
  transform: none;
  box-shadow: 0 4px 10px rgba(36, 83, 164, 0.08);
}

.seat-gap {
  width: var(--seat-size);
  height: var(--seat-size);
  position: relative;
  z-index: 1;
}

.seat-spread-track {
  width: calc((var(--seat-size) * 27) + (var(--seat-gap) * 26));
}

.seat-spread-lane {
  display: flex;
  justify-content: space-between;
  width: calc((var(--seat-size) * 21) + (var(--seat-gap) * 20));
  margin-left: calc((var(--seat-size) + var(--seat-gap)) * 1);
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--ink);
  flex: 0 0 auto;
}

.summary-label {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-dark);
  line-height: 1.05;
  text-align: center;
  justify-self: stretch;
}

.summary-label > span {
  display: block;
}

.summary-pill {
  width: 72px;
  min-width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid rgba(209, 106, 56, 0.18);
  border-radius: 50%;
  background: var(--yellow);
  color: #ffffff;
  font: inherit;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3px;
  -webkit-text-stroke: 0.6px var(--orange);
  text-shadow:
    0.4px 0 0 var(--orange),
    -0.4px 0 0 var(--orange),
    0 0.4px 0 var(--orange),
    0 -0.4px 0 var(--orange);
  justify-self: center;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.free {
  background: var(--seat);
  border: 1px solid var(--seat-border);
}

.legend-dot.selected {
  background: var(--seat-selected);
  border: 1px solid var(--seat-selected-border);
}

.actions {
  margin-top: 0;
  flex: 0 0 auto;
}

.summary-row {
  display: grid;
  grid-template-columns: auto minmax(84px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.reset-button {
  width: 84px;
  min-width: 84px;
  height: 46px;
  padding: 4px 8px;
  border: 2px solid rgba(36, 83, 164, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f0f5fb);
  color: var(--ink-dark);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.05;
  justify-self: end;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.reset-button > span {
  display: block;
}

.reset-button:hover,
.reset-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(36, 83, 164, 0.14);
  outline: none;
}

.summary {
  margin: 0;
}

.mobile-floating-summary {
  display: none;
}

@media (max-width: 960px) {
  .hall {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }

  .zoom-controls {
    border-radius: 26px;
    justify-content: center;
  }

  .game-controls {
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
  }

}

@media (min-width: 641px) and (max-width: 960px) {
  .control-group--right {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  :root {
    --upper-sector-offset-base: 17px;
  }

  body {
    background:
      radial-gradient(circle at top center, rgba(255, 255, 255, 0.95) 0 28%, rgba(255, 255, 255, 0) 29%),
      linear-gradient(180deg, #86b7de 0 34%, #f7f4ee 34% 100%);
  }

  .app {
    padding: 18px;
    place-items: start center;
    overflow: visible;
  }

  .cookie-banner {
    bottom: 14px;
    width: min(calc(100vw - 16px), 520px);
  }

  .cookie-banner__content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .cookie-banner__text {
    font-size: 0.86rem;
    text-align: center;
  }

  .cookie-banner__actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cookie-banner__link {
    text-align: center;
  }

  .cookie-banner__button {
    min-width: 120px;
  }

  .hall-card {
    width: min(100%, 540px);
    padding: 20px;
    margin-inline: auto;
  }

  .policy-card {
    width: min(100%, 680px);
  }

  .policy-content {
    padding: 18px;
    border-radius: 24px;
  }

  .policy-nav {
    justify-content: center;
    margin-bottom: 12px;
  }

  .policy-nav__link {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.74rem;
    text-align: center;
  }

  .policy-content h2 {
    font-size: 1.24rem;
  }

  .policy-content p {
    font-size: 0.96rem;
  }

  .site-footer__link {
    font-size: 0.52rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    gap: 10px;
  }

  .site-footer__brand {
    order: 1;
    justify-items: center;
  }

  .site-footer__text {
    font-size: 0.5rem;
    max-width: none;
    text-align: center;
  }

  .site-footer__link {
    order: 2;
    text-align: center;
  }

  .site-footer__links {
    order: 2;
    justify-items: center;
    gap: 4px;
  }

  .site-footer__copyright {
    order: 3;
    font-size: 0.5rem;
    text-align: center;
  }

  .site-footer--page {
    width: min(100%, 540px);
    padding: 0 4px;
    margin-top: 8px;
  }

  .hall {
    padding: 18px;
  }

  .upper-sections {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .shape--line,
  .white-4,
  .shape--orange-top {
    display: none;
  }

  .shape--orange-left {
    width: 220px;
    height: 220px;
    top: -54px;
    left: -86px;
  }

  .shape--orange-bottom {
    width: 220px;
    height: 220px;
    left: -82px;
    bottom: -82px;
  }

  .shape--yellow-top {
    width: 160px;
    height: 160px;
    top: 122px;
    left: auto;
    right: -38px;
    background: rgba(255, 255, 255, 0.78);
  }

  .shape--yellow-right {
    width: 92px;
    height: 92px;
    top: 250px;
    right: 14px;
  }

  .shape--yellow-bottom {
    width: 240px;
    height: 240px;
    right: -66px;
    bottom: -122px;
  }

  .white-1 {
    width: 104px;
    height: 104px;
    top: 92px;
    left: 34px;
  }

  .white-2 {
    width: 86px;
    height: 86px;
    top: 258px;
    left: 18px;
  }

  .white-3 {
    width: 92px;
    height: 92px;
    top: 142px;
    right: 22px;
    left: auto;
  }

  .shape--diagonal {
    width: 620px;
    height: 620px;
    top: 52px;
    right: -120px;
    background: linear-gradient(140deg, transparent 0 42%, rgba(78, 151, 207, 0.86) 42% 100%);
  }

  .hero {
    text-align: center;
  }

  .eyebrow {
    font-size: 1.68rem;
    letter-spacing: 0.18em;
  }

  .eyebrow-line {
    display: block;
  }

  .eyebrow-line--first::after {
    content: "";
  }

  h1 {
    white-space: normal;
    font-size: clamp(1.67rem, 10vw, 2.67rem);
    line-height: 1.08;
  }

  .zoom-button {
    min-width: 46px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.95rem;
  }

  .row-number.overlay-center {
    left: calc(
      var(--row-number-width) +
      ((var(--seat-size) + var(--seat-gap)) * 17.625) - 1px
    );
  }

  .summary {
    text-align: center;
  }

  .summary-row {
    gap: 8px;
  }

  .summary-label {
    font-size: 0.98rem;
    transform: translateX(-10px);
  }

  .summary-pill {
    width: 62px;
    min-width: 62px;
    height: 62px;
    font-size: 1.75rem;
    transform: translateX(-15px);
  }

  .reset-button {
    width: 76px;
    min-width: 76px;
    height: 42px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }

  .zoom-controls {
    display: grid;
    justify-items: center;
    text-align: center;
    border-radius: 24px;
    width: 100%;
    padding: 10px 12px;
    gap: 8px;
  }

  .control-group {
    justify-content: center;
    gap: 8px;
  }

  .game-form {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .game-help-popover {
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100vw - 44px));
  }

  .game-name-input {
    width: min(100%, 220px);
  }

  .control-group--right {
    margin-left: 0;
  }

  .actions {
    width: 100%;
  }

  .summary-row {
    position: static;
  }

  .control-group--left {
    align-items: center;
  }

  .mobile-floating-summary {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: 50%;
    z-index: 40;
    display: none;
    width: min(calc(100vw - 24px), 520px);
    transform: translateX(-50%);
  }

  .mobile-floating-summary.is-visible {
    display: block;
  }

  .mobile-floating-summary__inner {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 22px;
    background: rgba(247, 244, 238, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 28px rgba(36, 83, 164, 0.14);
  }

  .mobile-floating-summary .summary-label {
    position: absolute;
    top: 50%;
    left: 34px;
    right: calc(50% + 39px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.98rem;
    text-align: center;
    transform: translateY(-50%);
  }

  .mobile-floating-summary .summary-pill {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    min-width: 62px;
    height: 62px;
    font-size: 1.75rem;
  }

  .mobile-floating-summary .reset-button {
    width: 76px;
    min-width: 76px;
    height: 42px;
    padding: 4px 6px;
    font-size: 0.68rem;
  }
}
