:root {
  --ink: #160c08;
  --ink-soft: #3c2118;
  --cream: #f7ebd0;
  --cream-bright: #fffaf0;
  --gold: #d2a245;
  --gold-bright: #f2c96b;
  --breakpoint-purple: #9d2cff;
  --breakpoint-purple-bright: #b52eff;
  --breakpoint-violet: #742cff;
  --breakpoint-blue: #2f86ff;
  --breakpoint-cyan: #08cadc;
  --breakpoint-mint: #11edb1;
  --green: #0e6248;
  --danger: #a23f32;
  --glass: rgba(22, 12, 8, 0.76);
  --glass-deep: rgba(16, 8, 5, 0.9);
  --stroke: rgba(247, 235, 208, 0.24);
  --radius-card: 22px;
  --radius-control: 999px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cream);
  background: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

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

button:focus-visible,
a:focus-visible,
label:focus-within {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}

.landing-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #130a06 url("assets/landing-barman-moustache.png") 50% 50% / cover no-repeat;
}

.landing-screen[hidden] { display: none; }

.landing-screen::before,
.landing-screen::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.landing-screen::before {
  background:
    linear-gradient(90deg, rgba(11, 5, 3, 0.88) 0%, rgba(11, 5, 3, 0.58) 30%, rgba(11, 5, 3, 0.04) 58%, rgba(11, 5, 3, 0.2) 100%),
    linear-gradient(180deg, rgba(11, 5, 3, 0.54) 0%, transparent 27%, transparent 68%, rgba(11, 5, 3, 0.62) 100%);
}

.landing-screen::after {
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.landing-header {
  position: absolute;
  top: 22px;
  left: 50%;
  width: min(calc(100% - 48px), 1320px);
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transform: translateX(-50%);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--cream-bright);
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.landing-brand img {
  width: 45px;
  height: auto;
  display: block;
}

.landing-brand-title-art,
.landing-brand small { display: block; }

.landing-brand-copy {
  min-width: 0;
}

.landing-brand-title-art {
  --lockup-source-width: 126px;
  --lockup-left-width: 102px;
  --lockup-right-width: 24px;
  --lockup-gap: 4px;
  width: 130px;
  height: 42px;
}

.landing-brand small {
  margin-top: 4px;
  color: rgba(247, 235, 208, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-host-logo {
  width: min(220px, 25vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.45));
}

.landing-copy {
  position: absolute;
  top: 56%;
  left: max(34px, calc((100vw - 1320px) / 2));
  width: min(420px, calc(100% - 68px));
  padding: 28px 30px 26px;
  border: 1px solid rgba(247, 235, 208, 0.22);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(18, 9, 5, 0.84), rgba(18, 9, 5, 0.58));
  box-shadow: 0 26px 70px rgba(8, 3, 2, 0.34);
  backdrop-filter: blur(16px) saturate(1.08);
  transform: translateY(-42%);
}

.landing-copy h1 {
  margin: 0;
  color: var(--cream-bright);
  font: 700 clamp(50px, 5vw, 68px)/0.96 Georgia, serif;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.landing-copy h1 em {
  color: var(--gold-bright);
  font-weight: 700;
}

.landing-title-line {
  display: block;
}

.landing-title-highlight {
  margin-top: 0.09em;
}

.landing-intro {
  max-width: 340px;
  margin: 18px 0 20px;
  color: rgba(247, 235, 208, 0.78);
  font-size: 15px;
  line-height: 1.55;
}

.landing-login {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-inline: 24px;
  box-shadow: 0 14px 32px rgba(8, 3, 2, 0.26);
}

.landing-login .x-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cream-bright);
  background: var(--ink);
  flex: 0 0 auto;
  overflow: hidden;
}

.landing-login .x-logo {
  width: 100%;
  height: 100%;
  display: block;
  clip-path: circle(45%);
  object-fit: cover;
  transform: scale(1.1);
}

.landing-auth-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: rgba(247, 235, 208, 0.66);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.landing-auth-message:empty {
  display: none;
}

.game-experience[aria-hidden="true"] { pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  .landing-screen { transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1); }
  .landing-screen.is-leaving { opacity: 0; transform: scale(1.015); }
}

@media (max-width: 820px) {
  .landing-screen { background-position: 58% center; }

  .landing-screen::before {
    background:
      linear-gradient(180deg, rgba(11, 5, 3, 0.58) 0%, rgba(11, 5, 3, 0.02) 35%, rgba(11, 5, 3, 0.12) 56%, rgba(11, 5, 3, 0.9) 100%),
      linear-gradient(90deg, rgba(11, 5, 3, 0.12), transparent 62%, rgba(11, 5, 3, 0.14));
  }

  .landing-header {
    top: 14px;
    width: calc(100% - 28px);
  }

  .landing-brand img { width: 38px; }
  .landing-brand-title-art {
    --lockup-source-width: 104px;
    --lockup-left-width: 84px;
    --lockup-right-width: 20px;
    --lockup-gap: 3px;
    width: 107px;
    height: 35px;
  }
  .landing-host-logo { width: min(118px, 31vw); }

  .landing-copy {
    top: auto;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 14px;
    width: auto;
    padding: 24px 22px 18px;
    border-radius: 20px;
    transform: none;
  }

  .landing-copy h1 {
    font-size: clamp(45px, 14vw, 64px);
    line-height: 0.96;
  }

  .landing-intro {
    margin: 15px 0 17px;
    font-size: 13px;
    line-height: 1.45;
  }

  .landing-login {
    min-height: 54px;
    gap: 10px;
    padding-inline: 12px;
    font-size: 10px;
  }

  .landing-login span:last-child {
    min-width: 0;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
  }

  .landing-auth-message { margin-top: 8px; }
}

@media (max-height: 690px) and (max-width: 820px) {
  .landing-copy { padding-top: 18px; }
  .landing-copy h1 { font-size: clamp(40px, 12vw, 54px); }
  .landing-intro { margin-block: 10px 12px; }
  .landing-login { min-height: 48px; }
  .landing-auth-message { display: none; }
}

.pub-backdrop,
.scene-vignette,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.pub-backdrop {
  z-index: 0;
  background: url("assets/pub-background.png") center 48% / cover no-repeat;
  transform: scale(1.01);
}

.scene-vignette {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(15, 7, 4, 0.6) 0%, rgba(15, 7, 4, 0.08) 24%, transparent 54%, rgba(11, 5, 3, 0.48) 100%),
    radial-gradient(circle at 50% 48%, transparent 24%, rgba(15, 7, 4, 0.22) 72%, rgba(15, 7, 4, 0.56) 100%);
}

.grain {
  z-index: 10;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.scene-header,
.scene-footer {
  position: fixed;
  left: 50%;
  z-index: 5;
  width: min(calc(100% - 40px), 1280px);
  transform: translateX(-50%);
}

.scene-header {
  top: 18px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid rgba(247, 235, 208, 0.2);
  border-radius: var(--radius-control);
  background: rgba(22, 12, 8, 0.42);
  box-shadow: 0 14px 35px rgba(11, 5, 3, 0.18);
  backdrop-filter: blur(14px) saturate(1.15);
}

.wordmark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.wordmark-logo {
  width: 38px;
  height: auto;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.wordmark-title-art,
.wordmark small { display: block; }

.wordmark-copy {
  min-width: 0;
}

.wordmark-title-art {
  --lockup-source-width: 112px;
  --lockup-left-width: 91px;
  --lockup-right-width: 21px;
  --lockup-gap: 4px;
  width: 116px;
  height: 37px;
}

.landing-brand-title-art,
.wordmark-title-art {
  display: flex;
  gap: var(--lockup-gap);
}

.landing-brand-title-art::before,
.landing-brand-title-art::after,
.wordmark-title-art::before,
.wordmark-title-art::after {
  content: "";
  height: 100%;
  display: block;
  flex: 0 0 auto;
  background: var(--cream-bright);
  -webkit-mask-image: url("assets/split-the-g-guinness-style.png");
  mask-image: url("assets/split-the-g-guinness-style.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--lockup-source-width) 100%;
  mask-size: var(--lockup-source-width) 100%;
}

.landing-brand-title-art::before,
.wordmark-title-art::before {
  width: var(--lockup-left-width);
  -webkit-mask-position: left center;
  mask-position: left center;
}

.landing-brand-title-art::after,
.wordmark-title-art::after {
  width: var(--lockup-right-width);
  -webkit-mask-position: right center;
  mask-position: right center;
}

.wordmark small {
  margin-top: 3px;
  color: rgba(247, 235, 208, 0.68);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.header-tools,
.auth-shell,
.account-chip {
  display: flex;
  align-items: center;
}

.header-tools {
  min-width: 0;
  gap: 8px;
  margin-left: auto;
}

.auth-shell {
  position: relative;
  min-width: 0;
}

.auth-shell[hidden],
.auth-login[hidden],
.account-chip[hidden] { display: none; }

.auth-login,
.account-chip {
  min-height: 42px;
  border: 1px solid rgba(247, 235, 208, 0.22);
  border-radius: var(--radius-control);
  color: var(--cream-bright);
  background: rgba(10, 5, 3, 0.34);
  backdrop-filter: blur(10px);
}

.auth-login {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px 0 7px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.auth-login:disabled { cursor: wait; opacity: 0.66; }

.x-mark,
.account-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--cream-bright);
  background: #050505 center / cover no-repeat;
  font-size: 12px;
  font-weight: 900;
}

.account-chip {
  gap: 8px;
  max-width: 270px;
  padding: 4px 5px 4px 6px;
}

.account-copy {
  min-width: 0;
  max-width: 116px;
}

.account-copy strong,
.account-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong { font-size: 10px; line-height: 1.2; }

.account-copy small {
  margin-top: 2px;
  color: rgba(247, 235, 208, 0.56);
  font-size: 8px;
}

.logout-button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid rgba(247, 235, 208, 0.16);
  color: rgba(247, 235, 208, 0.66);
  background: transparent;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.auth-message {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: 270px;
  color: rgba(247, 235, 208, 0.72);
  font-size: 9px;
  text-align: right;
}

.auth-message:empty { display: none; }
.auth-message.has-error { color: #ffd1c9; }

.host-mark {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid rgba(247, 235, 208, 0.16);
}

.host-logo {
  width: 112px;
  height: auto;
  display: block;
  object-fit: contain;
}

.pub-scene {
  --hold-control-top: clamp(260px, 32vh, 360px);
  --hold-control-gap: 16px;
  --hold-control-height: 54px;
  --pint-stage-bottom: 88px;
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
}

.hero-copy {
  position: fixed;
  top: 104px;
  left: 50%;
  z-index: 2;
  width: min(calc(100% - 40px), 620px);
  max-width: none;
  text-align: center;
  transform: translateX(-50%);
  text-shadow: 0 3px 24px rgba(11, 5, 3, 0.72);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-wordmark-title {
  margin: 0;
}

.hero-wordmark-art {
  width: min(76vw, 420px);
  aspect-ratio: 2170 / 725;
  display: block;
  margin-inline: auto;
  background: linear-gradient(
    90deg,
    var(--cream-bright) 0 81.25%,
    var(--gold-bright) 81.25% 100%
  );
  -webkit-mask: url("assets/split-the-g-guinness-style.png") center / contain no-repeat;
  mask: url("assets/split-the-g-guinness-style.png") center / contain no-repeat;
  filter: drop-shadow(0 3px 24px rgba(11, 5, 3, 0.72));
}

.play-area {
  position: relative;
  width: 100%;
  min-height: 100svh;
}

.pint-stage {
  position: fixed;
  inset: calc(var(--hold-control-top) + var(--hold-control-height) + var(--hold-control-gap)) 0 var(--pint-stage-bottom);
  z-index: 1;
  display: grid;
  place-items: end center;
}

.pint-button {
  position: relative;
  width: min(33vw, 360px);
  min-width: 250px;
  height: min(100%, 650px);
  min-height: 0;
  display: grid;
  place-items: end center;
  padding: 0;
  border: 0;
  border-radius: 36px;
  color: inherit;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pint-button:active { cursor: grabbing; }

.pint-photo {
  --tilt: 0deg;
  --liquid-top: 7.5%;
  --foam-height: 7.2%;
  position: relative;
  width: min(31vw, 330px);
  min-width: 232px;
  aspect-ratio: 1122 / 1402;
  display: block;
  transform: rotate(var(--tilt));
  transform-origin: 50% 90%;
  filter: drop-shadow(0 24px 22px rgba(9, 4, 2, 0.55));
  will-change: transform;
}

.pint-photo::after {
  content: "";
  position: absolute;
  left: 19%;
  right: 19%;
  bottom: -2%;
  z-index: -1;
  height: 7%;
  border-radius: 50%;
  background: rgba(8, 3, 1, 0.5);
  filter: blur(9px);
}

.pint-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.pint-empty { z-index: 1; }

.liquid-window {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  -webkit-mask-image: url("assets/glass-liquid-mask.png");
  mask-image: url("assets/glass-liquid-mask.png");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  mask-mode: alpha;
}

.pint-full {
  z-index: 1;
  clip-path: polygon(
    0 var(--beer-top-left, var(--liquid-top)),
    100% var(--beer-top-right, var(--liquid-top)),
    100% 100%,
    0 100%
  );
  will-change: clip-path;
}

.foam-art {
  position: absolute;
  z-index: 2;
  display: block;
  object-fit: fill;
  pointer-events: none;
  opacity: 0;
  transform-origin: 50% 50%;
  will-change: top, opacity;
}

.foam-active {
  left: -3%;
  top: calc(var(--liquid-top) - 4.3%);
  width: 106%;
  height: 18%;
  transform: scaleY(1);
}

.foam-settled {
  left: -5%;
  top: calc(var(--liquid-top) - 6.9%);
  width: 110%;
  height: 15%;
  transform: scaleY(1.18);
}

.pint-photo.is-drinking .foam-active {
  opacity: var(--foam-opacity, 0);
}

.pint-photo.is-settling .foam-settled {
  opacity: var(--foam-opacity, 0);
  transform: scaleY(1);
}

.glass-wordmark {
  position: absolute;
  left: 50%;
  top: 40.4%;
  z-index: 5;
  color: #fffaf0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 700;
  font-kerning: normal;
  line-height: 0.9;
  letter-spacing: -0.07em;
  text-rendering: geometricPrecision;
  text-shadow: 0 2px 4px rgba(20, 7, 3, 0.88);
  transform: translateX(-50%) scaleX(0.96);
  transform-origin: 50% 50%;
  white-space: nowrap;
}

.glass-harp {
  position: absolute;
  left: 50%;
  top: 25.5%;
  z-index: 5;
  width: 18%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 2px 3px rgba(20, 7, 3, 0.58));
}

.hold-hint {
  position: fixed;
  top: var(--hold-control-top);
  left: 50%;
  z-index: 4;
  min-height: var(--hold-control-height);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 7px 18px 7px 8px;
  border: 1px solid rgba(247, 235, 208, 0.24);
  border-radius: var(--radius-control);
  background: rgba(22, 12, 8, 0.68);
  box-shadow: 0 12px 32px rgba(11, 5, 3, 0.25);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.hold-hint > span:last-child,
.hold-hint strong,
.hold-hint small { display: block; }

.hold-hint strong {
  color: var(--cream-bright);
  font-size: 12px;
}

.hold-hint small {
  margin-top: 2px;
  color: rgba(247, 235, 208, 0.56);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hold-ring {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(247, 235, 208, 0.38);
  border-radius: 50%;
}

.hold-ring i {
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 5px rgba(242, 201, 107, 0.14);
}

.score-panel {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 98px 20px 70px;
  background: rgba(10, 5, 3, 0.64);
  backdrop-filter: blur(15px) saturate(0.85);
}

.score-panel[hidden],
.result-loader[hidden],
.score-panel-inner[hidden],
.pint-stage[hidden] { display: none; }

.result-loader {
  position: relative;
  width: min(calc(100% - 32px), 480px);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  border: 1px solid rgba(247, 235, 208, 0.24);
  border-radius: var(--radius-card);
  color: var(--cream);
  background:
    radial-gradient(circle at 78% 8%, rgba(210, 162, 69, 0.16), transparent 34%),
    var(--glass-deep);
  box-shadow: 0 30px 90px rgba(7, 3, 2, 0.56);
  text-align: center;
}

.result-loader-close {
  top: 14px;
  right: 14px;
}

.result-loader-mark {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 24px;
}

.result-loader-mark img {
  position: relative;
  z-index: 1;
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 18px 26px rgba(7, 3, 2, 0.38));
  object-fit: contain;
}

.result-loader-mark::before,
.result-loader-mark::after {
  position: absolute;
  z-index: 0;
  display: block;
  border: 1px solid rgba(242, 201, 107, 0.58);
  border-radius: 50%;
  content: "";
}

.result-loader-mark::before {
  left: 4px;
  bottom: -2px;
  width: 9px;
  height: 9px;
}

.result-loader-mark::after {
  right: 7px;
  bottom: 5px;
  width: 6px;
  height: 6px;
}

.result-loader .eyebrow {
  margin: 0 0 12px;
}

.result-loader h2 {
  min-height: 2.1em;
  max-width: 410px;
  margin: 0;
  color: var(--cream-bright);
  font: 700 clamp(28px, 4vw, 32px)/1.05 Georgia, serif;
  letter-spacing: -0.035em;
}

.result-loader h2:focus,
.score-heading h2:focus {
  outline: none;
}

.result-loader-helper {
  max-width: 360px;
  margin: 14px 0 0;
  color: rgba(247, 235, 208, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.result-loader-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.result-loader-actions .button {
  min-width: 148px;
}

.result-loader-actions .text-button {
  justify-content: center;
  padding: 0 12px;
}

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

.result-loader[data-state="error"] .result-loader-mark::before,
.result-loader[data-state="error"] .result-loader-mark::after {
  display: none;
}

.score-panel-inner {
  position: relative;
  width: min(100%, 760px);
  max-height: calc(100svh - 168px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(247, 235, 208, 0.24);
  border-radius: var(--radius-card);
  color: var(--cream);
  background:
    radial-gradient(circle at 90% 8%, rgba(210, 162, 69, 0.13), transparent 28%),
    var(--glass-deep);
  box-shadow: 0 30px 90px rgba(7, 3, 2, 0.56);
}

.score-panel-inner.is-preparing {
  position: fixed;
  top: 0;
  left: -200vw;
  width: 760px;
  max-height: none;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}

.close-result {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 235, 208, 0.22);
  border-radius: 50%;
  color: var(--cream);
  background: rgba(247, 235, 208, 0.06);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.score-heading {
  display: block;
  padding-right: 48px;
}

.score-heading h2 {
  margin: 0;
  color: var(--cream-bright);
  font: 700 clamp(34px, 5vw, 48px)/0.95 Georgia, serif;
  letter-spacing: -0.04em;
}

.result-copy {
  max-width: 330px;
  margin: 11px 0 0;
  color: rgba(247, 235, 208, 0.68);
  font-size: 12px;
  line-height: 1.5;
}

.full-card-preview {
  position: relative;
  aspect-ratio: 1200 / 675;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid rgba(247, 235, 208, 0.2);
  border-radius: 14px;
  background: #060302;
  box-shadow: 0 18px 45px rgba(7, 3, 2, 0.35);
}

.full-card-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.button {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.button-primary {
  color: var(--ink);
  background: var(--gold-bright);
}

.button:disabled { cursor: wait; opacity: 0.64; }

.next-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.text-button,
.event-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  color: rgba(247, 235, 208, 0.68);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.event-link {
  color: var(--cream-bright);
  text-decoration: none;
}

.share-note {
  min-height: 15px;
  margin: 3px 0 0;
  color: rgba(247, 235, 208, 0.55);
  font-size: 9px;
  text-align: center;
}

.scene-footer {
  bottom: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(247, 235, 208, 0.65);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-shadow: 0 2px 10px rgba(11, 5, 3, 0.9);
  text-transform: uppercase;
}

.footer-host {
  min-width: 88px;
}

.footer-host-logo {
  width: 88px;
  height: auto;
  display: block;
  object-fit: contain;
}

.footer-event {
  position: absolute;
  left: 50%;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translateX(-50%);
}

.footer-event img {
  width: 148px;
  height: auto;
  display: block;
  object-fit: contain;
}

.footer-event .footer-event-location {
  width: 140px;
  height: auto;
}

.noscript-message {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 20;
  padding: 14px;
  border-radius: 10px;
  color: var(--cream-bright);
  background: var(--danger);
  text-align: center;
}

@media (hover: hover) {
  .button,
  .wordmark,
  .text-button,
  .event-link,
  .close-result {
    transition: transform 100ms ease-out, color 100ms ease-out, background-color 100ms ease-out;
  }

  .button:hover,
  .wordmark:hover,
  .text-button:hover,
  .event-link:hover,
  .close-result:hover { transform: translateY(-2px); }

  .close-result:hover { background: rgba(247, 235, 208, 0.1); }
}

@media (prefers-reduced-motion: no-preference) {
  .pint-photo { transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1); }
  .pint-photo.is-drinking { transition-duration: 400ms; }

  .foam-art {
    transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .pint-photo.is-drinking .foam-active {
    transition: none;
  }

  .pint-photo.is-settling .pint-full {
    transition: clip-path 250ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  .pint-photo.is-settling .foam-active {
    transform: scaleY(0.68);
  }

  .hold-ring i { animation: hold-pulse 1.4s ease-in-out infinite; }

  .score-panel[data-state="loading"] .result-loader:not([hidden]) {
    animation: result-loader-in 250ms ease-out both;
  }

  .score-panel[data-state="ready"] .score-panel-inner:not([hidden]) {
    animation: result-in 250ms ease-out both;
  }

  .result-loader[data-state="loading"] .result-loader-mark::before {
    animation: result-bubble 1.8s ease-out infinite;
  }

  .result-loader[data-state="loading"] .result-loader-mark::after {
    animation: result-bubble 1.8s 0.65s ease-out infinite;
  }

  @keyframes hold-pulse {
    0%, 100% { transform: scale(0.7); opacity: 0.62; }
    50% { transform: scale(1); opacity: 1; }
  }

  @keyframes result-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  @keyframes result-loader-in {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  @keyframes result-bubble {
    0% { opacity: 0; transform: translateY(0) scale(0.72); }
    18% { opacity: 0.78; }
    100% { opacity: 0; transform: translateY(-45px) scale(1.08); }
  }
}

@media (max-width: 900px) {
  .pub-backdrop { background-position: center center; }

  .scene-vignette {
    background:
      linear-gradient(180deg, rgba(15, 7, 4, 0.65) 0%, rgba(15, 7, 4, 0.04) 28%, transparent 58%, rgba(11, 5, 3, 0.52) 100%),
      radial-gradient(circle at 50% 52%, transparent 18%, rgba(15, 7, 4, 0.2) 70%, rgba(15, 7, 4, 0.5) 100%);
  }

  .pint-button {
    width: min(48vw, 340px);
  }

  .pint-photo { width: min(42vw, 310px); }

}

@media (max-width: 560px) {
  .pub-scene {
    --hold-control-top: 260px;
    --hold-control-height: 50px;
    --pint-stage-bottom: 82px;
  }

  .scene-header {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 58px;
    padding: 6px 8px;
  }

  .wordmark-title-art {
    --lockup-source-width: 94px;
    --lockup-left-width: 76px;
    --lockup-right-width: 18px;
    --lockup-gap: 3px;
    width: 97px;
    height: 31px;
  }
  .wordmark small { font-size: 8px; }

  .host-mark { display: none; }

  .auth-login { padding-right: 11px; }

  .account-chip { max-width: 178px; }
  .account-copy { max-width: 76px; }
  .logout-button { padding: 0 7px; }

  .hero-copy {
    top: 82px;
    width: calc(100% - 28px);
  }

  .hero-wordmark-art {
    width: min(100%, 360px);
  }

  .pint-button {
    width: min(82vw, 318px);
    min-width: 220px;
  }

  .pint-photo {
    width: min(72vw, 285px);
    min-width: 218px;
  }

  .scene-footer {
    width: calc(100% - 24px);
    min-height: 48px;
    justify-content: center;
  }

  .scene-footer > span:not(.footer-event) { display: none; }

  .footer-event img { width: 140px; }

  .footer-event .footer-event-location { width: 134px; }

  .score-panel { padding: 78px 10px 48px; }

  .score-panel-inner {
    max-height: calc(100svh - 126px);
    padding: 22px 18px 18px;
    border-radius: 18px;
  }

  .result-loader {
    width: min(calc(100% - 12px), 480px);
    min-height: 290px;
    padding: 28px 20px;
    border-radius: 18px;
  }

  .result-loader-mark {
    width: 68px;
    height: 68px;
    margin-bottom: 20px;
  }

  .result-loader-mark img {
    width: 62px;
  }

  .result-loader h2 {
    font-size: clamp(25px, 8vw, 29px);
  }

  .score-heading {
    padding-right: 37px;
  }

  .score-heading h2 { font-size: 31px; }
  .result-copy { font-size: 11px; }
  .close-result {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .result-actions { grid-template-columns: 1fr; }
}

@media (max-height: 730px) and (min-width: 561px) {
  .pub-scene {
    --hold-control-top: 226px;
    --hold-control-gap: 12px;
    --pint-stage-bottom: 56px;
  }

  .hero-wordmark-art { width: min(60vw, 330px); }
  .pint-photo { width: min(27vw, 270px); }
}

@media (max-height: 730px) and (max-width: 560px) {
  .pub-scene {
    --hold-control-top: 190px;
    --hold-control-gap: 12px;
    --hold-control-height: 48px;
    --pint-stage-bottom: 54px;
  }

  .hero-copy { top: 78px; }

  .hero-wordmark-art { width: min(80vw, 300px); }

  .pint-photo { width: min(62vw, 250px); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
