 :root {
  --topbar-height: 60px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Fredoka", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(216, 155, 43, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(185, 109, 34, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(240, 190, 99, 0.12), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 48%, var(--bg-deep) 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.9;
}

body::before {
  width: 320px;
  height: 320px;
  top: 5%;
  left: -6%;
  background: var(--glow-soft);
}

body::after {
  width: 420px;
  height: 420px;
  bottom: -6%;
  right: -8%;
  background: rgba(185, 109, 34, 0.14);
}

.page-shell,
.phone-page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--topbar-height) + 12px) 0 12px;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--topbar-height);
  width: 100%;
  background: var(--topbar-bg);
  z-index: 100;
}

.header {
  display: flex;
  gap: 10px;
  height: var(--topbar-height);
  min-height: auto;
  padding: 0 18px;
  color: #fff;
  user-select: none;
}

.constrain {
  position: relative;
  width: 100%;
  min-height: 100%;
  min-width: 320px;
  max-width: 450px;
  margin: 0 auto;
}

.center {
  display: flex;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
}

.logo {
  font-family: "Baloo 2", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.hero-copy {
  max-width: 760px;
}

.host-hero {
  margin-bottom: 16px;
}

.host-hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker,
.mini-label,
.join-label,
.avatar-preview-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.9rem, 5vw, 5.4rem);
  line-height: 0.92;
  max-width: 13ch;
}

.host-hero h1 {
  font-size: clamp(2.8rem, 4.8vw, 4.8rem);
  max-width: 12ch;
}

.phone-title {
  max-width: none;
  font-size: clamp(2.6rem, 10vw, 3.8rem);
}

.phone-domain-banner {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: center;
}

.phone-domain-banner .domain-lockup {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 11px 15px;
  font-size: clamp(1.45rem, 5.9vw, 1.95rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--glow-soft), var(--glow-secondary));
  border: 1px solid var(--line-strong);
}

h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.6rem);
}

h3 {
  font-size: 1.35rem;
}

.hero-text,
.phone-subtitle {
  max-width: 32ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.controller-subtitle {
  margin-top: 8px;
  margin-bottom: 2px;
}

.domain-highlight,
.domain-lockup {
  color: var(--accent);
  text-shadow: 0 0 24px var(--glow);
}

.domain-lockup {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(216, 155, 43, 0.18), rgba(185, 109, 34, 0.18));
  border: 1px solid rgba(216, 155, 43, 0.28);
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
  justify-content: end;
}

.host-page .top-bar {
  display: none;
}

.host-page .page-shell {
  padding-top: 12px;
}

.stat-card,
.setting-pill,
.lobby-status,
.count-chip {
  border: 1px solid var(--line);
  background: rgba(35, 28, 22, 0.78);
  backdrop-filter: blur(14px);
  border-radius: 18px;
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
  gap: 22px;
}

.host-only-grid {
  grid-template-columns: 1fr;
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(216, 155, 43, 0.14);
  box-shadow: var(--shadow);
  border-radius: 34px;
  backdrop-filter: blur(22px);
  padding: 26px;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 28%),
    radial-gradient(circle at top right, rgba(185, 109, 34, 0.12), transparent 30%);
  pointer-events: none;
}

.panel-header,
.player-zone-header,
.lobby-footer,
.player-card,
.ready-card,
.join-card,
.player-card-main,
.avatar-preview-card {
  position: relative;
  z-index: 1;
}

.panel-header,
.player-zone-header,
.lobby-footer,
.avatar-preview-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.panel-header {
  margin-bottom: 22px;
}

.lobby-status,
.count-chip {
  padding: 10px 14px;
  font-weight: 700;
}

.lobby-status {
  color: var(--accent);
}

.count-chip {
  min-width: 76px;
  text-align: center;
  color: var(--ink);
}

.host-layout {
  display: grid;
  gap: 20px;
}

.compact-host-layout {
  gap: 14px;
}

.join-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(216, 155, 43, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(185, 109, 34, 0.18), rgba(240, 190, 99, 0.08)),
    var(--panel-strong);
  border: 1px solid rgba(216, 155, 43, 0.18);
}

.compact-join-card {
  padding: 22px;
  min-height: 0;
}

.join-url {
  margin: 0;
  font-size: clamp(2rem, 3.3vw, 3.3rem);
  font-family: "Baloo 2", sans-serif;
}

.host-page .join-url {
  font-size: clamp(1.95rem, 3vw, 3rem);
}

.join-code {
  margin: 12px 0;
  display: inline-block;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  padding: 14px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(216, 155, 43, 0.22), rgba(185, 109, 34, 0.18));
  border: 1px solid rgba(216, 155, 43, 0.28);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.host-page .join-code {
  margin: 10px 0;
  font-size: clamp(1.95rem, 3.6vw, 3.5rem);
  padding: 12px 18px;
}

.join-helper,
.ready-copy,
.player-meta,
.ready-room,
.inline-note,
.form-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.qr-card {
  width: 164px;
  height: 164px;
  padding: 12px;
  justify-self: end;
  align-self: center;
  background: #211913;
  border-radius: 24px;
  border: 1px solid rgba(216, 155, 43, 0.18);
  display: grid;
  place-items: center;
}

.host-page .qr-card {
  width: 152px;
  height: 152px;
}

.qr-image {
  display: block;
  width: 128px;
  height: 128px;
  border-radius: 16px;
}

.host-page .qr-image {
  width: 128px;
  height: 128px;
}

.player-zone {
  display: grid;
  gap: 16px;
  padding: 16px 18px 18px;
  border-radius: 28px;
  background: rgba(31, 24, 19, 0.72);
  border: 1px solid rgba(216, 155, 43, 0.12);
}

.compact-player-zone {
  gap: 12px;
}

.compact-ready-preview {
  margin: 8px 0 4px;
}

.simple-avatar-customizer {
  margin: 6px 0 10px;
  padding-top: 8px;
}

#playerReadyView .avatar-picker {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.host-player-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.player-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(216, 155, 43, 0.14);
  background: rgba(41, 31, 23, 0.86);
  transform: translateY(10px);
  opacity: 0;
  animation: rise-in 360ms ease forwards;
}

.host-player-card {
  padding: 12px 14px;
  gap: 10px;
  border-radius: 18px;
  min-height: 84px;
}

.player-card-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.host-player-card .player-card-main {
  gap: 10px;
}

.player-avatar,
.ready-avatar,
.avatar-option {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--avatar-a), var(--avatar-b));
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.host-player-card .player-avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.player-name {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.host-player-card .player-name {
  font-size: 1.04rem;
  margin-bottom: 2px;
}

.host-player-card .player-meta {
  font-size: 0.84rem;
}

.player-ready-state {
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.host-player-card .player-ready-state {
  padding: 7px 10px;
  font-size: 0.74rem;
}

.player-ready-state.ready {
  color: #24170a;
  background: linear-gradient(135deg, #d89b2b, #f1c15f);
}

.player-ready-state.disconnected {
  color: var(--danger-text);
  background: var(--danger-bg);
}

.settings-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.setting-pill {
  padding: 12px 14px;
}

.host-page .setting-pill {
  padding: 10px 12px;
}

.setting-pill span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.button-link {
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  color: #24170a;
  background: linear-gradient(135deg, #d89b2b, #f1c15f);
  box-shadow: 0 16px 30px rgba(216, 155, 43, 0.22);
}

.secondary-button {
  color: var(--ink);
  background: linear-gradient(135deg, rgba(185, 109, 34, 0.3), rgba(216, 155, 43, 0.16));
  border: 1px solid rgba(216, 155, 43, 0.2);
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.phone-page {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100svh;
  height: 100svh;
  display: grid;
  justify-items: center;
  align-content: start;
  overflow: hidden;
  overscroll-behavior: none;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.phone-page::before,
.phone-page::after {
  display: none;
}

.phone-page #joinApp {
  position: fixed;
  inset: var(--topbar-height) 0 0 0;
  overflow: hidden;
}

.phone-page-shell {
  width: min(100%, 402px);
  height: calc(100svh - var(--topbar-height) - env(safe-area-inset-top));
  padding-top: 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.spa-phone-shell {
  display: grid;
  grid-template-rows: 10svh 76svh 14svh;
  gap: 0;
  height: 100%;
  min-height: calc(100svh - var(--topbar-height) + env(safe-area-inset-bottom));
  align-content: start;
}

.phone-branding {
  min-height: 10svh;
  display: grid;
  place-items: end center;
  padding: calc(4px + env(safe-area-inset-top)) 18px 8px;
  border-bottom: 1px solid rgba(161, 177, 255, 0.1);
}

.phone-screen {
  grid-row: 2;
  align-self: start;
  width: calc(100% - 2px);
  min-height: 0;
  height: min(75svh, 820px);
  max-height: min(75svh, 820px);
  margin: 2px auto 0;
  padding: 14px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top, var(--glow-soft), transparent 28%),
    linear-gradient(180deg, #0e1528 0%, #0a101e 100%);
  border: 1px solid rgba(216, 155, 43, 0.18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.phone-topbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 0 10px;
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.phone-body {
  min-height: 0;
  padding: 20px 16px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(38, 29, 22, 0.96) 0%, rgba(23, 18, 14, 0.98) 100%);
  border: 1px solid rgba(216, 155, 43, 0.12);
}

.join-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.join-form label {
  display: grid;
  gap: 8px;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0;
}

input {
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(216, 155, 43, 0.18);
  border-radius: 16px;
  appearance: none;
  -webkit-appearance: none;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-transform: uppercase;
  box-shadow: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder {
  color: rgba(204, 176, 138, 0.66);
}

#playerNameInput {
  text-transform: none;
}

input:focus,
input:active {
  outline: none;
  border-color: rgba(216, 155, 43, 0.56);
  box-shadow: 0 0 0 3px rgba(216, 155, 43, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.avatar-option {
  width: 100%;
  height: 60px;
  border: 1px solid rgba(216, 155, 43, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--avatar-a), var(--avatar-b));
  box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.16);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.avatar-option.selected {
  border-color: rgba(216, 155, 43, 0.78);
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(216, 155, 43, 0.22), 0 10px 18px rgba(216, 155, 43, 0.14);
}

.avatar-option.taken {
  opacity: 0.28;
  filter: grayscale(0.15);
  box-shadow: none;
}

.avatar-customizer {
  display: grid;
  gap: 12px;
  margin: 14px 0 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(161, 177, 255, 0.1);
}

.avatar-customizer-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}


.avatar-preview-card {
  justify-content: start;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.avatar-preview-label {
  margin: 0 0 2px;
  color: var(--muted);
}

.avatar-preview-name {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
}

.ready-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 14px 0;
  padding: 14px 0 16px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(161, 177, 255, 0.1);
}

.ready-room {
  font-weight: 700;
}

.full-width {
  width: 100%;
}

.hidden {
  display: none !important;
}

.host-page {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.host-shell {
  min-height: 100svh;
  height: 100svh;
  padding: 10px 0 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.host-main {
  min-height: 0;
}

.host-panel {
  height: 100%;
  padding: 20px;
}

.host-panel-header {
  margin-bottom: 14px;
}

.compact-lobby-footer {
  align-items: end;
}

@keyframes rise-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .host-player-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .hero,
  .lobby-footer,
  .panel-header,
  .player-zone-header {
    align-items: start;
    flex-direction: column;
  }

  .experience-grid,
  .join-card,
  .player-list,
  .host-player-list {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 8px;
  }

  .phone-page-shell {
    width: min(100% - 18px, 100%);
  }

  .panel {
    padding: 18px;
    border-radius: 26px;
  }

  .phone-screen {
    min-height: 0;
  }

  .phone-body {
    min-height: 0;
    padding: 20px 16px;
  }

  .phone-branding {
    min-height: 10svh;
    padding: calc(3px + env(safe-area-inset-top)) 16px 6px;
  }
}
.phone-page .phone-screen {
  align-self: start;
}

.phone-page .phone-body {
  display: grid;
  align-content: start;
}
#joinApp.joining .phone-branding {
  min-height: 6svh;
  border-bottom: 0;
}

#joinApp.joining .phone-screen {
  width: min(100% - 22px, 360px);
  height: auto;
  max-height: none;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#joinApp.joining .phone-topbar {
  display: none;
}

#joinApp.joining .phone-join-minimal {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.minimal-join-form {
  gap: 14px;
  margin-top: 0;
}

.minimal-join-form label span {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.minimal-join-form input {
  height: 56px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.minimal-join-form .primary-button {
  margin-top: 6px;
  height: 56px;
  font-size: 1.08rem;
}
#joinApp:not(.joining) .phone-branding {
  min-height: 6svh;
  border-bottom: 0;
}

#joinApp:not(.joining) .phone-screen {
  width: min(100% - 22px, 360px);
  height: auto;
  max-height: none;
  margin-top: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#joinApp:not(.joining) .phone-topbar {
  display: none;
}

#joinApp:not(.joining) #playerReadyView {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#joinApp:not(.joining) #toggleReady {
  margin-top: 4px;
}
.ready-preview-card {
  margin: 14px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(161, 177, 255, 0.1);
}
.host-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.simplified-host-header {
  grid-template-columns: 1fr auto auto;
  display: grid;
  align-items: center;
  gap: 16px;
}

.host-actions-compact {
  justify-content: end;
}

.host-page .join-card {
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  padding: 18px 20px;
}

.host-join-copy {
  display: grid;
  gap: 10px;
}

.host-join-lockup {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.host-page .join-url {
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.01em;
}

.host-page .join-code {
  min-width: 190px;
  text-align: center;
  font-size: clamp(2.25rem, 3.8vw, 3.6rem);
  font-family: "Baloo 2", sans-serif;
  letter-spacing: 0.08em;
}

.host-page .join-helper {
  max-width: 34ch;
  font-size: 0.98rem;
}

.host-page .panel-header h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.host-page .host-panel {
  padding: 18px;
}
#hostJoinUrl {
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.host-join-lockup .join-code {
  min-width: 210px;
  text-align: center;
  font-size: clamp(2.35rem, 3.8vw, 3.75rem);
  font-family: "Baloo 2", sans-serif;
  letter-spacing: 0.08em;
}

.player-zone-header h3 {
  color: var(--ink);
}

#playerReadyView .avatar-preview-label {
  margin-bottom: 0;
}

#playerReadyView .avatar-preview-name {
  font-size: 1.08rem;
}
.game-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  gap: 18px;
  background: rgba(15, 12, 9, 0.82);
  backdrop-filter: blur(10px);
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(216, 155, 43, 0.2), transparent 26%),
    linear-gradient(180deg, rgba(19, 15, 12, 0.16), rgba(15, 12, 9, 0.84));
}

.beer-animation-stage {
  position: relative;
  width: 420px;
  height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  z-index: 2;
}
.beer-particle-canvas {
  position: absolute;
  top: 40px;
  left: 40px;
  width: 340px;
  height: 340px;
  display: block;
  z-index: 2;
  image-rendering: auto;
  transform-origin: center center;
  transform: translateZ(0);
}

.beer-liquid-rise-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
  background: transparent !important;
  image-rendering: auto;
}

.beer-silhouette {
  position: absolute;
  width: 340px;
  height: 340px;
  top: 40px;
  left: 40px;
  z-index: 1;
  overflow: visible;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.28));
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
  image-rendering: auto;
}
.silhouette-shell {
  fill: rgba(35, 28, 21, 0.42);
}

.game-start-copy {
  position: relative;
  z-index: 5;
  margin: 0;
}

.game-start-wordmark {
  width: min(82vw, 620px);
  display: grid;
  place-items: center;
  pointer-events: none;
}

.game-start-wordmark-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.game-start-wordmark text {
  font-family: "Baloo 2", sans-serif;
  font-size: 82px;
  font-weight: 800;
  letter-spacing: 0.03em;
  paint-order: stroke fill;
  text-transform: lowercase;
}

.wordmark-stroke {
  fill: transparent;
  stroke: rgba(14, 12, 10, 0.96);
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1600;
  stroke-dashoffset: 1600;
}

.wordmark-fill {
  fill: rgba(14, 12, 10, 0.98);
  opacity: 0;
}

@keyframes game-start-wordmark-draw {
  0% {
    stroke-dashoffset: 1600;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes game-start-wordmark-fill {
  0%,
  58% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.game-start-overlay.playing .wordmark-stroke {
  animation: game-start-wordmark-draw 1s cubic-bezier(0.22, 0.8, 0.2, 1) 2.8s forwards;
}

.game-start-overlay.playing .wordmark-fill {
  animation: game-start-wordmark-fill 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) 2.95s forwards;
}
.animation-preview-page {
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(216, 155, 43, 0.18), transparent 30%),
    linear-gradient(180deg, #261d16, #161210 72%);
  color: var(--ink);
}

.animation-preview-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  gap: 20px;
  padding: 28px;
}

.animation-preview-copy {
  text-align: center;
}

.animation-preview-copy h1 {
  margin: 0;
  font-family: "Baloo 2", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
}

.animation-preview-copy p {
  margin: 6px 0 0;
}

.animation-preview-overlay {
  position: relative;
  inset: auto;
  width: min(90vw, 760px);
  min-height: min(80svh, 660px);
  border: 1px solid rgba(255, 232, 193, 0.12);
  border-radius: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  isolation: isolate;
}

.animation-preview-actions {
  display: flex;
  justify-content: center;
}

.geometry-editor {
  position: absolute;
  inset: 40px;
  width: 340px;
  height: 340px;
  z-index: 4;
  overflow: visible;
}

.editor-segment {
  stroke-width: 0.38;
  stroke-linecap: round;
}

.editor-segment.bottle {
  stroke: rgba(109, 255, 132, 0.95);
}

.editor-segment.container {
  stroke: rgba(78, 227, 255, 0.92);
}

.editor-handle {
  stroke: rgba(19, 15, 12, 0.95);
  stroke-width: 0.22;
  cursor: grab;
}

.editor-handle.bottle {
  fill: #6dff84;
}

.editor-handle.bottle-interior {
  fill: #8cff98;
}

.editor-handle.container-interior {
  fill: #7fd6ff;
}

.editor-handle.container {
  fill: #4ee3ff;
}

.editor-handle.spawn {
  fill: #ffd166;
}

.editor-handle:active {
  cursor: grabbing;
}

.geometry-output-card {
  width: min(90vw, 760px);
  padding: 18px 20px;
  border: 1px solid rgba(255, 232, 193, 0.12);
  border-radius: 20px;
  background: rgba(30, 23, 18, 0.84);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.geometry-output {
  margin: 8px 0 0;
  max-height: 240px;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(14, 11, 9, 0.92);
  color: #f5d488;
  font: 600 0.95rem/1.45 Consolas, "SFMono-Regular", monospace;
}

.animation-preview-actions {
  gap: 12px;
}

.beer-head-overlay {
  position: absolute;
  width: 41px;
  height: 41px;
  top: 65px;
  left: 180px;
  z-index: 4;  image-rendering: auto;
  transform: translateZ(0);
  opacity: 0.96;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22));
}

@keyframes beer-stage-head-zoom {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  40% {
    transform: translate3d(30px, 220px, 0) scale(3);
  }

  100% {
    transform: translate3d(130px, 1600px, 0) scale(12.4);
  }
}

.game-start-overlay.playing .beer-animation-stage {
  animation: beer-stage-head-zoom 2.4s ease forwards;
  will-change: transform;
}

@keyframes beer-layer-boost {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1);
  }

  100% {
    transform: translate3d(50px, 30px, 0) scale(1.4);
  }
}

@keyframes beer-silhouette-fade {
  0% {
    opacity: 1;
  }

  60% {
    opacity: 1.0;
  }

  80% {
    opacity: 0.3;
  }

  100% {
    opacity: 0.0;
  }
}

.game-start-overlay.playing .beer-silhouette,
.game-start-overlay.playing .beer-particle-canvas {
  animation: beer-layer-boost 3s ease forwards;
}

.game-start-overlay.playing .beer-silhouette {
  animation: beer-layer-boost 3s ease forwards, beer-silhouette-fade 2s ease forwards;
}


.animation-preview-copy,
.animation-preview-actions,
.geometry-output-card,
.geometry-editor {
  display: none !important;
}























.game-start-overlay.priming,
.game-start-overlay.playing {
  opacity: 1;
}

.game-start-overlay.playing .beer-animation-stage,
.game-start-overlay.playing .game-start-copy {
  opacity: 1;
}

.game-start-overlay.priming .beer-animation-stage,
.game-start-overlay.priming .game-start-copy {
  opacity: 0;
}

.game-start-copy {
  opacity: 0;
  transition: opacity 180ms ease;
}

.main-game-start-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  inset: auto;
  width: min(82vmin, 760px);
  height: min(82vmin, 760px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 232, 193, 0.12);
  border-radius: 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  isolation: isolate;
  background: rgba(15, 12, 9, 0.82);
  backdrop-filter: blur(10px);
}

.main-game-start-overlay .overlay-backdrop {
  inset: 0;
}

@media (max-width: 900px) {
  .main-game-start-overlay {
    width: min(92vw, 640px);
    height: min(92vw, 640px);
    border-radius: 26px;
  }
}
