:root {
  color-scheme: dark;
  --background: #14181c;
  --surface: #1b2229;
  --surface-2: #222b34;
  --foreground: #f4f7f9;
  --muted: #9aa7b3;
  --muted-2: #66727f;
  --border: #33414d;
  --orange: #ff8000;
  --green: #00e054;
  --blue: #40bcf4;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: "Fira Sans", "Avenir Next", "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 50% -9rem, rgba(64, 188, 244, 0.16), transparent 26rem),
    linear-gradient(180deg, #14181c 0%, #101418 58%, #14181c 100%);
}

button {
  font: inherit;
}

.app-shell {
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 28px;
  overflow: hidden;
}

.topbar {
  position: relative;
  width: min(100%, 672px);
  display: flex;
  justify-content: center;
  padding: 0 44px 12px;
}

.menu-wrap {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 60;
}

.menu-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 11px;
  background: rgba(16, 20, 24, 0.78);
  color: var(--foreground);
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--foreground);
}

.menu-button:hover,
.menu-button[aria-expanded="true"] {
  border-color: var(--green);
}

.app-menu {
  position: absolute;
  top: 52px;
  left: 0;
  width: 178px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(20, 24, 28, 0.98);
  box-shadow: var(--shadow);
}

.menu-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  font-weight: 850;
}

.menu-item:hover,
.menu-item[aria-expanded="true"] {
  background: var(--surface-2);
  color: var(--green);
}

.menu-item-muted {
  color: var(--muted);
}

.menu-account-menu {
  margin: -2px 0 4px;
  padding: 0 0 4px 12px;
  border-bottom: 1px solid rgba(61, 76, 91, 0.7);
}

.menu-account-menu .menu-item {
  min-height: 34px;
  font-size: 0.76rem;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.logo-mark {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 33% 50%, var(--orange) 0 16%, transparent 17%),
    radial-gradient(circle at 50% 50%, var(--green) 0 16%, transparent 17%),
    radial-gradient(circle at 67% 50%, var(--blue) 0 16%, transparent 17%),
    linear-gradient(180deg, #202830, #11171c);
  box-shadow: 0 14px 34px rgba(0, 224, 84, 0.12);
}

.logo-mark span {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f4f7f9;
  color: #14181c;
  border: 4px solid #14181c;
  font-weight: 1000;
  font-size: 1.35rem;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 100%;
  font-size: clamp(1.45rem, 6.2vw, 2.35rem);
  line-height: 1.1;
  font-weight: 900;
  white-space: nowrap;
}

.app-shell.pick-ready .brand-block h1 {
  display: none;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.header-actions {
  position: absolute;
  top: 6px;
  right: 0;
  z-index: 20;
  max-width: 152px;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.account-button {
  max-width: 152px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 20, 24, 0.78);
  color: var(--foreground);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.header-account-menu {
  position: absolute;
  top: 46px;
  right: 0;
  width: 132px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(20, 24, 28, 0.98);
  box-shadow: var(--shadow);
}

.game-layout {
  width: min(100%, 672px);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 174px;
}

.site-disclaimer {
  margin: 8px 0 0;
  color: rgba(154, 167, 179, 0.82);
  font-size: 0.66rem;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

.draft-panel {
  order: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.top4-panel {
  order: 2;
}

.draft-panel,
.top4-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.spin-stage {
  display: block;
}

.draft-panel.pool-ready .spin-stage {
  display: none;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 6px 0 14px;
  align-items: start;
}

.slot-unit {
  min-width: 0;
  text-align: center;
}

.slot-unit p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.slot-box {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 112px;
  flex: 0 0 auto;
  padding: 10px;
  border-radius: var(--radius);
  border: 4px solid;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

#genreSlot {
  background: linear-gradient(180deg, #ff9b28, var(--orange));
  border-color: #ffb766;
}

#yearSlot {
  background: linear-gradient(180deg, #40bcf4, #1689bd);
  border-color: #83d8fb;
}

.slot-box > span {
  max-width: 100%;
  color: #17202a;
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.slot-box strong {
  flex: 0 0 58px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 58px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #11171c;
  color: var(--foreground);
  text-align: center;
  font-size: var(--slot-value-size, 2.65rem);
  line-height: 0.95;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.control-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 10px;
}

.pool-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 2px 0 12px;
}

.pool-toolbar.hidden {
  display: none;
}

.pool-pills {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.pool-pill {
  display: inline-flex;
  align-items: center;
  max-width: 50%;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #14181c;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-pill {
  background: var(--orange);
}

.year-pill {
  background: var(--blue);
}

.skip-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.primary-button,
.share-button,
.secondary-button,
.skip-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 15px;
  color: var(--foreground);
  background: transparent;
  cursor: pointer;
  font-weight: 850;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 30px;
  border-color: var(--green);
  background: var(--green);
  color: #14181c;
  font-size: 1.04rem;
}

.share-button {
  min-height: 48px;
  padding: 0 22px;
  border-color: var(--blue);
  background: #0f1419;
  color: var(--foreground);
  font-size: 0.96rem;
}

.secondary-button {
  min-height: 48px;
  padding: 0 18px;
  border-color: var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.96rem;
}

.share-button::before {
  content: "X";
  margin-right: 8px;
  color: var(--blue);
  font-weight: 1000;
}

.skip-button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

#skipGenreButton::before,
#skipYearButton::before {
  content: "↻";
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

#skipGenreButton::before,
#skipGenreButton:hover {
  color: var(--orange);
}

#skipYearButton::before,
#skipYearButton:hover {
  color: var(--blue);
}

.ghost-button {
  min-height: 40px;
  padding: 0 11px;
  color: var(--muted);
  overflow: visible;
}

.ghost-button::before {
  content: "↻";
  color: var(--green);
  font-size: 1.2rem;
}

.restart-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(16, 20, 24, 0.78);
}

.primary-button:hover,
.share-button:hover,
.secondary-button:hover,
.skip-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  border-color: var(--green);
}

button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  transform: none;
}

.films {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0 18px;
}

.film-button {
  width: 100%;
  min-height: 78px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--foreground);
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  align-items: center;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.film-button:hover {
  transform: translateY(-1px);
  border-color: var(--green);
  background: var(--surface-2);
}

.film-poster,
.poster-fallback {
  width: 42px;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  object-fit: cover;
  background: linear-gradient(135deg, #2c3742, #121820);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.film-title {
  color: var(--foreground);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.15;
}

.film-director {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.15;
}

.empty-note {
  margin: 18px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.top4-panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(calc(100% - 28px), 672px);
  transform: translateX(-50%);
  border: 1px solid rgba(51, 65, 77, 0.95);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: rgba(20, 24, 28, 0.97);
  backdrop-filter: blur(14px);
  padding: 10px 12px 8px;
  box-shadow: 0 -20px 44px rgba(0, 0, 0, 0.36);
}

.progress-block {
  margin-bottom: 9px;
}

.meter-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meter {
  height: 7px;
  margin-top: 6px;
  border-radius: 999px;
  background: #101418;
  border: 1px solid var(--border);
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--green), var(--blue));
  transition: width 240ms ease;
}

.filmstrip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.filmstrip li {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  color: var(--muted);
}

.slot-token {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(154, 167, 179, 0.5);
  border-radius: 999px;
  background: rgba(16, 20, 24, 0.84);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
}

.filled .slot-token {
  border-color: rgba(0, 224, 84, 0.9);
  background: var(--green);
  color: #14181c;
}

.mini-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #101418;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26);
}

.mini-poster-link {
  display: block;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.mini-poster-link:hover,
.mini-poster-link:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 10px 24px rgba(64, 188, 244, 0.18);
  outline: none;
}

.mini-poster img,
.mini-poster .poster-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.empty-poster {
  border-style: dashed;
  border-color: rgba(154, 167, 179, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 128, 0, 0.18), transparent 40%),
    linear-gradient(225deg, rgba(64, 188, 244, 0.18), transparent 42%),
    #101418;
}

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

.filmstrip strong {
  display: block;
  color: var(--foreground);
  font-size: 0.68rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filmstrip li:not(.filled) strong {
  color: var(--muted);
}

.slot-copy > span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.1;
}

.result-panel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(64, 188, 244, 0.18), transparent 24rem),
    rgba(20, 24, 28, 0.98);
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

.result-panel.hidden {
  display: none;
}

.result-card {
  width: min(100%, 720px);
  min-height: min(100%, 840px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.result-panel h2 {
  font-size: clamp(4.5rem, 22vw, 8rem);
  line-height: 0.9;
  font-weight: 1000;
  color: var(--green);
}

.result-panel p:not(.eyebrow) {
  max-width: 440px;
  margin: 12px auto 18px;
  color: var(--muted);
  line-height: 1.45;
}

.final-movies {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 20px;
}

.final-movie {
  position: relative;
  min-width: 0;
  text-align: left;
}

.final-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #14181c;
  font-size: 0.78rem;
  font-weight: 1000;
}

.final-poster {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: #101418;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.final-poster:hover,
.final-poster:focus-visible {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: 0 18px 36px rgba(64, 188, 244, 0.2);
  outline: none;
}

.final-poster img,
.final-poster .poster-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.final-movie strong {
  display: block;
  margin-top: 8px;
  color: var(--foreground);
  font-size: 0.86rem;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.final-movie > span:not(.final-rank) {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.1;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 12, 0.68);
  backdrop-filter: blur(10px);
}

.modal-backdrop.hidden {
  display: none;
}

.info-modal {
  width: min(100%, 420px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(20, 24, 28, 0.98);
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  font-size: 1.16rem;
  font-weight: 950;
}

.modal-close {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 850;
}

.modal-close:hover {
  border-color: var(--green);
  color: var(--foreground);
}

.how-to-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.45;
}

.how-to-list li + li {
  margin-top: 8px;
}

.leaderboard-modal {
  max-height: calc(100svh - 36px);
  overflow-y: auto;
}

.leaderboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.leaderboard-tab {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101418;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
}

.leaderboard-tab.active {
  border-color: var(--green);
  background: rgba(0, 224, 84, 0.14);
  color: var(--foreground);
}

.leaderboard-list {
  display: grid;
  gap: 8px;
}

.leaderboard-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px;
  background: rgba(16, 20, 24, 0.68);
}

.leaderboard-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
}

.leaderboard-row:nth-child(1) .leaderboard-rank {
  background: var(--green);
  color: #14181c;
}

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

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

.leaderboard-copy strong {
  color: var(--foreground);
  font-size: 0.9rem;
  font-weight: 950;
}

.leaderboard-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.leaderboard-score {
  color: var(--green);
  font-size: 1.08rem;
  font-weight: 1000;
  line-height: 1;
}

.leaderboard-empty {
  margin: 10px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.privacy-modal {
  max-height: calc(100svh - 36px);
  overflow-y: auto;
}

.privacy-copy {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.privacy-copy p {
  margin: 0;
}

.privacy-copy p + h3 {
  margin-top: 14px;
}

.privacy-copy h3 {
  margin: 0 0 5px;
  color: var(--foreground);
  font-size: 0.86rem;
  font-weight: 950;
}

.privacy-copy strong {
  color: var(--foreground);
}

.auth-modal {
  max-height: calc(100svh - 36px);
  overflow-y: auto;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form h3 {
  margin: 0;
  color: var(--foreground);
  font-size: 0.92rem;
  font-weight: 950;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  background: #101418;
  color: var(--foreground);
  font: inherit;
  font-size: 0.92rem;
}

.auth-form input:focus {
  border-color: var(--green);
  outline: none;
}

.auth-submit {
  width: 100%;
  margin-top: 2px;
}

.google-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f4f7f9;
  color: #14181c;
  cursor: pointer;
  font-weight: 950;
}

.google-button:hover:not(:disabled) {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(64, 188, 244, 0.18);
}

.google-button:disabled,
.auth-form input:disabled,
.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--border);
}

.auth-note {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.auth-note.error {
  color: #fca5a5;
}

.auth-note.success {
  color: var(--green);
}

.hidden {
  display: none;
}

.pulse {
  animation: pulse 480ms ease;
}

@keyframes pulse {
  0% { transform: scale(0.99); }
  58% { transform: scale(1.008); }
  100% { transform: scale(1); }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 14px 14px 0;
  }

  .topbar {
    padding-inline: 38px;
  }

  .header-actions {
    max-width: 132px;
  }

  .account-button {
    max-width: 132px;
    min-height: 38px;
    padding: 0 9px;
    font-size: 0.62rem;
  }

  .logo-mark {
    width: 104px;
    height: 104px;
    border-radius: 24px;
  }

  .game-layout {
    padding-bottom: 168px;
  }

  .slot-row {
    gap: 10px;
  }

  .slot-box {
    height: 94px;
    border-width: 3px;
  }

  .slot-box strong {
    flex-basis: 50px;
    height: 50px;
    font-size: var(--slot-value-size, 2.1rem);
  }

  .filmstrip {
    gap: 7px;
  }

  .filmstrip strong {
    font-size: 0.58rem;
  }

  .slot-copy > span {
    font-size: 0.52rem;
  }

  .result-panel {
    padding: 14px;
    align-items: start;
  }

  .result-card {
    min-height: 100%;
    padding: 14px 0 18px;
  }

  .final-movies {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 14px 0 18px;
  }

  .final-movie strong {
    font-size: 0.56rem;
  }

  .final-movie > span:not(.final-rank) {
    font-size: 0.5rem;
  }

  .final-rank {
    top: 5px;
    left: 5px;
    width: 22px;
    height: 22px;
    font-size: 0.64rem;
  }

  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-panel .primary-button,
  .result-panel .share-button,
  .result-panel .secondary-button {
    width: 100%;
    margin: 0 0 8px;
  }
}
