:root {
  --bg: #fff7f5;
  --surface: #ffffff;
  --surface-strong: #fff1ed;
  --text: #19181d;
  --muted: #6d6673;
  --line: #eadfdd;
  --accent: #ef4444;
  --accent-dark: #c52d2d;
  --accent-soft: #ffe2dc;
  --shadow: 0 22px 70px rgba(63, 34, 28, 0.12);
  --radius: 8px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #fffaf8 0%, var(--bg) 52%, #fff 100%);
  color: var(--text);
  font-family:
    "Pretendard",
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  left: 14px;
  top: 10px;
  z-index: 999;
  transform: translateY(-160%);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(234, 223, 221, 0.72);
  background: rgba(255, 250, 248, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.main-nav a {
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-dark);
  outline: none;
}

.sound-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.sound-toggle[aria-pressed="true"] {
  border-color: rgba(239, 68, 68, 0.34);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 38px;
  align-items: center;
  padding: 48px 0 14px;
}

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 720px;
  margin: 0;
  font-size: 4.35rem;
  line-height: 1.03;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.16rem;
  font-weight: 650;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled,
.tag-button:disabled,
.situation-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.24);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.btn-secondary,
.btn-soft {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.btn-secondary:hover,
.btn-soft:hover,
.btn-secondary:focus-visible,
.btn-soft:focus-visible {
  border-color: #f2b0a7;
  background: var(--surface-strong);
  outline: none;
}

.btn-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
}

.btn-search,
.btn-share {
  min-height: 44px;
  border: 1px solid;
  border-radius: 10px;
  padding: 0 13px;
  box-shadow: 0 5px 14px rgba(31, 35, 48, 0.06);
}

.btn-search {
  border-color: #d9dde7;
  background: #fff;
  color: #343741;
}

.btn-search:hover,
.btn-search:focus-visible {
  border-color: #9bbcf4;
  background: #f7faff;
  box-shadow: 0 7px 18px rgba(66, 133, 244, 0.12);
  outline: none;
}

.btn-share {
  border-color: #f1c7c0;
  background: #fff2ef;
  color: #a63831;
}

.btn-share:hover,
.btn-share:focus-visible {
  border-color: #ee8f83;
  background: #ffe8e3;
  box-shadow: 0 7px 18px rgba(239, 68, 68, 0.13);
  outline: none;
}

.action-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
}

.action-icon-google {
  border: 1px solid #d8e4fb;
  background: #f4f8ff;
  color: #3778dc;
}

.action-icon-share {
  background: #ef4444;
  color: #fff;
}

.preview-card,
.result-card,
.panel-block {
  border: 1px solid rgba(234, 223, 221, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.preview-card {
  width: min(100%, 360px);
  justify-self: center;
  padding: 16px;
}

.poster {
  position: relative;
  display: grid;
  min-height: 330px;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  isolation: isolate;
}

.poster::before,
.poster::after {
  position: absolute;
  content: "";
  inset: 0;
  z-index: -1;
}

.poster::after {
  opacity: 0.36;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.2) 0 1px, transparent 1px 18px),
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 0 2px, transparent 2px 22px);
}

.poster-symbol {
  font-size: 6.5rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.poster-orbit {
  position: absolute;
  width: 64%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
  transform: rotate(-18deg) scaleY(0.72);
}

.poster-label {
  position: absolute;
  right: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.roll-flash {
  position: absolute;
  left: 50%;
  bottom: 54px;
  display: inline-flex;
  max-width: calc(100% - 32px);
  transform: translateX(-50%) translateY(8px) scale(0.96);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 950;
  opacity: 0;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.poster-action::before,
.theme-action {
  background: linear-gradient(145deg, #ff3f3f, #67161f);
}

.poster-fantasy::before {
  background: linear-gradient(145deg, #965cff, #2c195f);
}

.theme-fantasy {
  background: linear-gradient(145deg, #965cff, #2c195f);
}

.poster-romance::before,
.theme-romance {
  background: linear-gradient(145deg, #ff8f8f, #ffbe76);
}

.poster-healing::before,
.theme-healing {
  background: linear-gradient(145deg, #74c6ff, #b8f0de);
}

.poster-sf::before,
.theme-sf {
  background: linear-gradient(145deg, #19d3c5, #253e94);
}

.poster-thriller::before,
.theme-thriller {
  background: linear-gradient(145deg, #3d4354, #0f1117);
}

.poster-sports::before,
.theme-sports {
  background: linear-gradient(145deg, #ffb347, #2fa36b);
}

.poster-comedy::before {
  background: linear-gradient(145deg, #ffd65a, #ff7b54);
}

.poster-daily::before {
  background: linear-gradient(145deg, #8fd3f4, #f7c7d9);
}

.poster-dark::before {
  background: linear-gradient(145deg, #6b1f7a, #12121f);
}

.preview-body {
  padding: 15px 4px 2px;
}

.preview-body strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.18rem;
  font-weight: 950;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.tag-button {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border: 1px solid #f0d7d2;
  border-radius: 999px;
  background: #fff8f6;
  color: #9b3c35;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.1;
}

.tag-row span {
  padding: 7px 10px;
}

.result-section {
  padding: 18px 0 18px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.result-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 315px) minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  padding: 16px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.result-card:focus-visible {
  outline: 3px solid rgba(239, 68, 68, 0.42);
  outline-offset: 4px;
}

.result-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, #ef4444, #ffb347, #19d3c5);
  content: "";
}

.result-card::after {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(25, 24, 29, 0.58);
  color: #fff;
  content: "ANI PICK";
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.result-card.is-rolling {
  border-color: rgba(239, 68, 68, 0.62);
  box-shadow:
    0 26px 88px rgba(239, 68, 68, 0.22),
    0 0 0 1px rgba(239, 68, 68, 0.12);
  animation: cardShake 0.13s linear infinite;
}

.result-card.is-revealed {
  animation: revealPop 0.62s cubic-bezier(0.18, 1.2, 0.2, 1) both;
}

.result-card.is-golden-rush {
  border-color: #e6ad14;
  box-shadow:
    0 30px 100px rgba(218, 154, 0, 0.4),
    0 0 0 3px rgba(255, 210, 66, 0.82),
    0 0 42px rgba(255, 190, 0, 0.34),
    inset 0 0 64px rgba(255, 225, 105, 0.2);
  animation: goldenRushPulse 0.38s ease-in-out infinite alternate;
}

.result-card.is-golden-rush::before {
  height: 7px;
  background: linear-gradient(90deg, #9b6200, #ffd84d, #fff7b2, #ffb300, #9b6200);
  background-size: 220% 100%;
  animation: goldenSweep 0.72s linear infinite;
}

.result-card.is-golden-rush.is-special-hit {
  box-shadow:
    0 34px 110px rgba(218, 154, 0, 0.5),
    0 0 0 5px rgba(255, 216, 77, 0.92),
    0 0 70px rgba(255, 192, 0, 0.52),
    inset 0 0 76px rgba(255, 231, 131, 0.28);
}

.result-card.is-legend-pick {
  border-color: #d8a72d;
  box-shadow:
    0 30px 100px rgba(151, 18, 38, 0.38),
    0 0 0 3px rgba(232, 185, 55, 0.82),
    0 0 46px rgba(189, 25, 49, 0.32),
    inset 0 0 68px rgba(125, 16, 32, 0.16);
  animation: legendPickPulse 0.42s ease-in-out infinite alternate;
}

.result-card.is-legend-pick::before {
  height: 7px;
  background: linear-gradient(90deg, #5c0b18, #d72f3f, #f4ba27, #fff4c7, #7d1020);
  background-size: 220% 100%;
  animation: goldenSweep 0.68s linear infinite;
}

.result-card.is-legend-pick.is-special-hit {
  box-shadow:
    0 34px 112px rgba(151, 18, 38, 0.54),
    0 0 0 5px rgba(244, 186, 39, 0.94),
    0 0 74px rgba(215, 47, 63, 0.52),
    inset 0 0 80px rgba(255, 238, 176, 0.25);
}

.result-card.is-hidden-gem {
  border-color: #45dfbd;
  box-shadow:
    0 30px 100px rgba(32, 196, 165, 0.3),
    0 0 0 3px rgba(115, 251, 211, 0.76),
    0 0 48px rgba(255, 79, 163, 0.32),
    inset 0 0 68px rgba(30, 26, 38, 0.16);
  animation: hiddenGemPulse 0.34s steps(2, end) infinite alternate;
}

.result-card.is-hidden-gem::before {
  height: 7px;
  background: linear-gradient(90deg, #171217, #73fbd3, #ff4fa3, #fff45c, #171217);
  background-size: 240% 100%;
  animation: goldenSweep 0.5s linear infinite;
}

.result-card.is-hidden-gem.is-special-hit {
  box-shadow:
    0 34px 112px rgba(32, 196, 165, 0.46),
    0 0 0 5px rgba(115, 251, 211, 0.92),
    0 0 78px rgba(255, 79, 163, 0.58),
    inset 0 0 80px rgba(115, 251, 211, 0.18);
}

.result-card.is-empty {
  grid-template-columns: 1fr;
  min-height: 350px;
  place-items: center;
  overflow: hidden;
}

.result-card.is-empty .result-poster {
  position: absolute;
  inset: 0;
  min-height: 0;
  opacity: 1;
}

.result-card.is-empty .result-poster::before {
  background:
    linear-gradient(180deg, rgba(4, 11, 48, 0.08), rgba(4, 11, 48, 0.42)),
    url("draw-stage-cover.png") center / cover;
}

.result-card.is-empty .result-content {
  z-index: 2;
  align-items: center;
  padding: 24px;
}

.result-card.is-empty .result-content > :not(.draw-stage-button) {
  display: none;
}

.result-card.is-empty .poster-label,
.result-card.is-empty .poster-symbol {
  display: none;
}

.draw-stage-button {
  display: none;
  min-height: 92px;
  min-width: min(100%, 400px);
  border: 0;
  border-radius: 8px;
  padding: 0 38px;
  background: #ffcf28;
  box-shadow: 0 16px 0 #c86111, 0 28px 48px rgba(2, 8, 36, 0.5);
  color: #48160a;
  cursor: pointer;
  font: inherit;
  font-size: clamp(1.65rem, 4vw, 2.55rem);
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.result-card.is-empty .draw-stage-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.draw-stage-button:hover,
.draw-stage-button:focus-visible {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 20px 0 #c86111, 0 34px 54px rgba(2, 8, 36, 0.56);
  outline: none;
}

.draw-stage-button:active {
  transform: translateY(10px);
  box-shadow: 0 6px 0 #c86111, 0 12px 26px rgba(2, 8, 36, 0.45);
}

.result-card.is-rolling .result-poster {
  animation: posterPulse 0.34s ease-in-out infinite alternate;
}

.result-card.is-rolling .poster-symbol {
  animation: symbolSpin 0.36s linear infinite;
}

.result-card.is-rolling .poster-orbit {
  animation: orbitSpin 0.8s linear infinite;
}

.result-card.is-rolling .roll-flash {
  animation: rollFlash 0.34s ease-in-out infinite alternate;
}

.result-card.is-rolling .result-content h2 {
  animation: titleTick 0.12s linear infinite;
}

.result-poster {
  min-height: 350px;
}

.result-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 4px 6px 4px 0;
}

.result-kicker {
  display: inline-flex;
  max-width: 100%;
  width: fit-content;
  margin: 0 0 8px;
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-year {
  max-width: 100%;
  width: fit-content;
  margin: 0 0 6px;
  color: #756a73;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.special-event-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(25, 24, 29, 0.2);
  color: #19181d;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.special-event-badge[aria-hidden="true"] {
  display: none;
}

.special-event-badge.is-golden {
  background: #ffd84d;
  color: #5c3500;
}

.special-event-badge.is-legend {
  background: #7d1020;
  color: #fff4c7;
}

.special-event-badge.is-hidden {
  background: #171217;
  color: #73fbd3;
  box-shadow: 4px 4px 0 #ff4fa3;
}

.result-card.is-golden-rush .special-event-badge,
.result-card.is-legend-pick .special-event-badge,
.result-card.is-hidden-gem .special-event-badge {
  animation: goldenBadgeBeat 0.42s ease-in-out infinite alternate;
}

.result-content h2 {
  display: -webkit-box;
  block-size: 2.2em;
  min-block-size: 2.2em;
  max-block-size: 2.2em;
  margin: 0;
  overflow: hidden;
  font-size: 2.45rem;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-tags {
  min-height: 39px;
  max-height: 39px;
  margin-top: 12px;
  overflow: hidden;
  align-content: flex-start;
}

.result-tags .relationship-tag {
  font-weight: 950;
}

.result-tags .relationship-tag-bl {
  border-color: #8bb9ec;
  background: #e9f3ff;
  color: #1554a0;
}

.result-tags .relationship-tag-gl {
  border-color: #efa2c2;
  background: #fff0f6;
  color: #ad3565;
}

.roll-meter {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.roll-meter span {
  display: block;
  height: 7px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: #ffe3dd;
}

.roll-meter span::before {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0.18);
  transform-origin: left;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444, #ffb347);
  content: "";
  opacity: 0.35;
}

.result-card.is-rolling .roll-meter span::before {
  animation: meterRace 0.46s ease-in-out infinite;
}

.result-card.is-golden-rush .roll-meter span {
  background: #fff0a3;
  box-shadow: 0 0 10px rgba(255, 188, 0, 0.42);
}

.result-card.is-golden-rush .roll-meter span::before {
  background: #f5ad00;
  animation-duration: 0.22s;
  opacity: 1;
}

.result-card.is-legend-pick .roll-meter span {
  background: #f8dca1;
  box-shadow: 0 0 10px rgba(176, 25, 45, 0.4);
}

.result-card.is-legend-pick .roll-meter span::before {
  background: #b71931;
  animation-duration: 0.24s;
  opacity: 1;
}

.result-card.is-hidden-gem .roll-meter span {
  background: #c9fff0;
  box-shadow: 0 0 10px rgba(255, 79, 163, 0.42);
}

.result-card.is-hidden-gem .roll-meter span::before {
  background: #ff4fa3;
  animation-duration: 0.2s;
  opacity: 1;
}

.result-card.is-rolling .roll-meter span:nth-child(2)::before {
  animation-delay: 0.05s;
}

.result-card.is-rolling .roll-meter span:nth-child(3)::before {
  animation-delay: 0.1s;
}

.result-card.is-rolling .roll-meter span:nth-child(4)::before {
  animation-delay: 0.15s;
}

.result-card.is-rolling .roll-meter span:nth-child(5)::before {
  animation-delay: 0.2s;
}

.result-card.is-rolling .roll-meter span:nth-child(6)::before {
  animation-delay: 0.25s;
}

.result-card.is-rolling .roll-meter span:nth-child(7)::before {
  animation-delay: 0.3s;
}

.result-reason {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  border-left: 3px solid var(--accent);
  padding: 8px 10px;
  border-radius: 0 12px 12px 0;
  background: #fff7f5;
  color: #7a413d;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-reason {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-actions {
  margin: 0;
}

.result-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.toast {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 24px 0;
}

.seo-landing {
  padding: 24px 0 8px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seo-grid a {
  display: grid;
  min-height: 96px;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: #5f555f;
  text-align: center;
  box-shadow: 0 10px 28px rgba(63, 34, 28, 0.06);
  transition:
    transform 0.15s ease,
    border 0.15s ease,
    background 0.15s ease;
}

.seo-grid strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.25;
}

.seo-grid span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 750;
  line-height: 1.35;
}

.seo-grid a:hover,
.seo-grid a:focus-visible {
  border-color: rgba(239, 68, 68, 0.38);
  background: #fff1ed;
  color: var(--accent-dark);
  outline: none;
  transform: translateY(-2px);
}

.panel-block {
  padding: 20px;
  box-shadow: 0 12px 44px rgba(63, 34, 28, 0.08);
}

.tag-groups {
  display: grid;
  gap: 16px;
}

.tag-group-title {
  margin: 0 0 8px;
  color: #5f555f;
  font-size: 0.92rem;
  font-weight: 950;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  margin-top: 10px;
}

.tag-selection-notice {
  flex: 1 1 auto;
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.tag-selection-notice.is-warning {
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 9px 11px;
  background: #fff0ed;
  color: var(--accent-dark);
}

.tag-reset-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  border: 1px solid #e5d4d0;
  border-radius: 6px;
  padding: 0 11px;
  background: #fff;
  color: #5f555f;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.tag-reset-button > span:first-child {
  font-size: 1.1rem;
  line-height: 1;
}

.tag-reset-button:hover:not(:disabled),
.tag-reset-button:focus-visible:not(:disabled) {
  border-color: var(--primary);
  background: #fff7f5;
  color: var(--accent-dark);
}

.tag-reset-button:disabled {
  opacity: 0.42;
  cursor: default;
}

.catalog-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  max-width: 720px;
}

.catalog-search-form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #ead8d4;
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.catalog-search-form input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(244, 67, 68, 0.14);
}

.catalog-search-button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 20px;
  background: #1f1d22;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.catalog-search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.catalog-search-result {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #ead8d4;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.catalog-search-result:hover,
.catalog-search-result:focus-visible {
  border-color: var(--primary);
  background: #fff8f6;
}

.catalog-search-result strong,
.catalog-search-result span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-search-result span,
.catalog-search-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.classic-badge {
  width: max-content;
  border: 1px solid #ae7b22;
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff6d8;
  color: #704711;
  font-size: 0.74rem;
  font-weight: 900;
}

.result-card.is-classic-pick {
  border-color: #b38a46;
  box-shadow: 0 18px 44px rgba(92, 62, 22, 0.16);
}

.result-card.is-classic-pick .result-poster {
  filter: sepia(0.2) saturate(0.86) contrast(0.98);
  box-shadow: inset 0 0 0 2px rgba(255, 236, 184, 0.48);
}

.result-card.is-classic-pick .result-poster::after {
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, rgba(51,31,8,0.03) 1px 2px);
  opacity: 0.45;
}

@media (max-width: 640px) {
  .catalog-search-results { grid-template-columns: 1fr; }
  .catalog-search-form { grid-template-columns: minmax(0, 1fr) 64px; }
  .catalog-search-button { padding: 0 10px; }
  .tag-selection-bar { align-items: flex-start; }
  .tag-reset-button > span:last-child { display: none; }
  .tag-reset-button { width: 36px; justify-content: center; padding: 0; }
}

.tag-button {
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  transition:
    background 0.15s ease,
    border 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.tag-button:hover,
.tag-button:focus-visible {
  border-color: #f1aaa1;
  outline: none;
  transform: translateY(-1px);
}

.tag-button.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 9px 22px rgba(239, 68, 68, 0.2);
  animation: chipPop 0.2s ease-out;
}

.situation-grid {
  display: grid;
  gap: 10px;
}

.situation-button {
  display: grid;
  width: 100%;
  min-height: 76px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf9;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition:
    border 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.situation-button:hover,
.situation-button:focus-visible {
  border-color: #f1aaa1;
  background: var(--surface-strong);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.situation-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.18rem;
  font-weight: 900;
}

.situation-button strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.98rem;
}

.situation-button span:last-child {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.38;
}

.genre-strip {
  padding: 24px 0 52px;
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.mini-theme {
  display: grid;
  min-height: 118px;
  place-items: center;
  border-radius: 8px;
  padding: 12px;
  color: #fff;
  text-align: center;
  box-shadow: 0 14px 34px rgba(44, 25, 95, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.mini-theme:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 38px rgba(44, 25, 95, 0.18);
}

@keyframes cardShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(1px);
  }
  75% {
    transform: translateX(-1px);
  }
}

@keyframes revealPop {
  0% {
    transform: scale(0.98);
  }
  48% {
    transform: scale(1.018);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes goldenRushPulse {
  from {
    filter: saturate(1) brightness(1);
  }
  to {
    filter: saturate(1.12) brightness(1.025);
  }
}

@keyframes legendPickPulse {
  from {
    filter: saturate(1.05) brightness(1);
    transform: translateY(0);
  }
  to {
    filter: saturate(1.28) brightness(1.04);
    transform: translateY(-2px);
  }
}

@keyframes hiddenGemPulse {
  from {
    filter: saturate(1.04) contrast(1);
    transform: translateX(-1px);
  }
  to {
    filter: saturate(1.34) contrast(1.04);
    transform: translateX(1px);
  }
}

@keyframes goldenSweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@keyframes goldenBadgeBeat {
  from {
    transform: scale(1) rotate(-1deg);
    box-shadow: 0 5px 14px rgba(190, 119, 0, 0.22);
  }
  to {
    transform: scale(1.09) rotate(1deg);
    box-shadow: 0 7px 24px rgba(255, 177, 0, 0.52);
  }
}

@keyframes posterPulse {
  from {
    filter: saturate(1) brightness(1);
  }
  to {
    filter: saturate(1.28) brightness(1.08);
  }
}

@keyframes symbolSpin {
  from {
    transform: rotate(-8deg) scale(0.92);
  }
  to {
    transform: rotate(352deg) scale(1.08);
  }
}

@keyframes orbitSpin {
  from {
    transform: rotate(-18deg) scaleY(0.72);
  }
  to {
    transform: rotate(342deg) scaleY(0.72);
  }
}

@keyframes rollFlash {
  from {
    opacity: 0.58;
    transform: translateX(-50%) translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes titleTick {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(2px);
  }
}

@keyframes meterRace {
  0% {
    opacity: 0.28;
    transform: scaleX(0.18);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
  100% {
    opacity: 0.38;
    transform: scaleX(0.35);
  }
}

@keyframes chipPop {
  0% {
    transform: scale(0.96);
  }
  70% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

.mini-theme span {
  font-size: 2rem;
}

.mini-theme strong {
  margin-top: 4px;
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 34px;
  background: #fff;
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 12px;
}

.footer-links a {
  color: #5f555f;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links .footer-contact-link {
  display: inline-flex;
  min-height: 32px;
  padding: 0;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #9b3c35;
  text-decoration: underline;
  text-decoration-color: #e7b9b2;
  text-underline-offset: 3px;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  outline: none;
  color: #c92f2f;
  text-decoration-color: currentColor;
}

.footer-external-icon {
  font-size: 0.84rem;
  font-weight: 950;
  line-height: 1;
}

.legal-header-inner {
  min-height: 68px;
}

.legal-page {
  max-width: 820px;
  padding: 52px 0 72px;
}

.legal-page h1 {
  font-size: 3rem;
}

.legal-updated {
  margin: 14px 0 28px;
  color: var(--muted);
  font-weight: 850;
}

.legal-page section {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.legal-page h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.35;
}

.legal-page p {
  margin: 0;
  color: #4d4650;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.8;
}

.genre-page {
  padding: 52px 0 72px;
}

.genre-hero {
  max-width: 860px;
  padding-bottom: 28px;
}

.genre-hero h1 {
  font-size: 3.5rem;
}

.genre-hero p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.75;
}

.genre-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.genre-detail-grid {
  display: grid;
  gap: 14px;
}

.genre-detail-card {
  display: grid;
  grid-template-columns: minmax(130px, 170px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(234, 223, 221, 0.9);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 44px rgba(63, 34, 28, 0.08);
}

.genre-detail-card .mini-theme {
  min-height: 100%;
}

.genre-detail-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.genre-detail-card p {
  margin: 8px 0 12px;
  color: #4d4650;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.68;
}

.genre-detail-card .btn {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .hero,
  .result-card,
  .control-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 24px;
    padding-top: 32px;
  }

  .preview-card {
    display: none;
  }

  h1 {
    font-size: 3.35rem;
  }

  .genre-hero h1 {
    font-size: 3rem;
  }

  .legal-page h1 {
    font-size: 2.65rem;
  }

  .result-content h2 {
    font-size: 2.1rem;
  }

  .result-content {
    padding: 0;
  }

  .result-poster {
    min-height: 300px;
  }

  .genre-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, var(--max));
  }

  .header-inner {
    display: grid;
    min-height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 10px 0;
    gap: 9px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    justify-content: flex-start;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }

  .main-nav a {
    flex: 1 1 auto;
    min-width: 84px;
    text-align: center;
  }

  .sound-toggle {
    grid-column: 2;
    grid-row: 1;
    min-width: 88px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-actions,
  .panel-actions {
    flex-direction: column;
  }

  h1 {
    font-size: 2.55rem;
  }

  .genre-hero h1,
  .legal-page h1 {
    font-size: 2.35rem;
  }

  .hero-subtitle,
  .genre-hero p {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
  }

  .poster {
    min-height: 270px;
  }

  .poster-symbol {
    font-size: 4.8rem;
  }

  .result-card,
  .preview-card,
  .panel-block {
    border-radius: 8px;
  }

  .result-card {
    padding: 12px;
    gap: 12px;
  }

  .result-poster {
    min-height: clamp(150px, 38vw, 205px);
  }

  .result-kicker {
    margin-bottom: 7px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .result-content h2 {
    font-size: 1.65rem;
  }

  .result-tags {
    min-height: 66px;
    max-height: 66px;
    margin-top: 9px;
  }

  .roll-meter {
    margin-top: 9px;
  }

  .result-reason {
    margin-top: 8px;
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .result-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
  }

  .result-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .result-section .section-heading {
    margin-bottom: 10px;
  }

  .result-section .section-heading .eyebrow {
    display: none;
  }

  .genre-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-grid {
    grid-template-columns: 1fr;
  }

  .mini-theme {
    min-height: 96px;
  }

  .genre-page {
    padding-top: 34px;
  }

  .genre-hero-actions {
    flex-direction: column;
  }

  .genre-detail-card {
    grid-template-columns: 1fr;
  }

  .genre-detail-card .mini-theme {
    min-height: 118px;
  }
}

@media (max-width: 360px) {
  .shell {
    width: min(100% - 20px, var(--max));
  }

  h1 {
    font-size: 2.12rem;
  }

  .panel-block {
    padding: 16px;
  }

  .tag-button {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }
}

/* The home screen is a single-purpose picker; preferences live below the result. */
.site-header {
  position: relative;
}

.header-inner {
  min-height: 58px;
}

.sound-toggle {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  font-size: 1rem;
}

.hero {
  display: block;
  padding: 26px 0 6px;
  text-align: center;
}

.hero-copy {
  display: grid;
  justify-items: center;
}

.hero .eyebrow {
  margin-bottom: 8px;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.65rem, 6vw, 4.5rem);
}

.hero-subtitle {
  max-width: 460px;
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions {
  justify-content: center;
  margin-top: 20px;
}

.hero-actions .btn-primary {
  min-height: 62px;
  min-width: min(100%, 300px);
  padding: 0 34px;
  font-size: 1.2rem;
}

.result-section {
  padding: 0 0 28px;
}

.result-card {
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1fr);
  gap: 24px;
  padding: 16px;
}

.result-poster {
  min-height: 270px;
}

.result-content {
  padding: 4px 4px 4px 0;
}

.result-reason {
  margin-top: 12px;
  -webkit-line-clamp: 1;
}

.result-actions {
  align-items: center;
}

.result-actions .btn-primary {
  min-height: 52px;
}

.btn-icon {
  display: inline-grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  border-color: #f2b0a7;
  background: var(--surface-strong);
  color: var(--accent-dark);
  outline: none;
}

.control-panel {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 10px 0 30px;
}

.panel-block {
  box-shadow: none;
}

.tag-group {
  border-top: 0;
  padding: 14px 16px 12px;
  border-radius: 8px;
  background: #fff9f7;
}

.tag-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tag-group-title {
  display: block;
  cursor: pointer;
  padding: 0 0 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  margin: 0;
}

.tag-group .tag-list {
  padding: 0;
  gap: 7px;
}

.tag-group .tag-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.situation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.situation-button {
  display: block;
  min-height: 44px;
  padding: 0 10px;
  text-align: center;
}

.situation-button .situation-icon,
.situation-button span {
  display: none;
}

.site-footer {
  padding: 22px 0 28px;
}

.site-footer > .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer > .shell > .footer-links {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer strong {
  font-size: 0.9rem;
}

.celebration-layer {
  position: fixed;
  z-index: 50;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint style;
}

.special-cut-in {
  position: absolute;
  top: 38%;
  left: 50%;
  z-index: 5;
  max-width: calc(100% - 32px);
  border-top: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
  padding: 14px 24px;
  background: rgba(23, 18, 23, 0.9);
  color: #fff;
  font-size: 3rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  animation: specialCutInSlam 1.35s cubic-bezier(0.16, 0.82, 0.24, 1) forwards;
}

.special-cut-in.is-golden {
  color: #ffd84d;
  box-shadow: 0 0 46px rgba(255, 190, 0, 0.72);
}

.special-cut-in.is-legend {
  color: #fff4c7;
  box-shadow: 0 0 52px rgba(215, 47, 63, 0.78);
}

.special-cut-in.is-hidden {
  color: #73fbd3;
  box-shadow:
    8px 8px 0 rgba(255, 79, 163, 0.72),
    0 0 48px rgba(115, 251, 211, 0.68);
}

.confetti-piece {
  position: absolute;
  left: var(--x);
  top: -24px;
  width: 12px;
  height: 20px;
  border-radius: 2px;
  background: var(--color);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--color) 60%, transparent);
  animation: confettiFall 1.9s cubic-bezier(0.16, 0.7, 0.35, 1) var(--delay) forwards;
}

.confetti-piece.is-golden {
  box-shadow: 0 0 8px rgba(255, 210, 56, 0.72);
}

.confetti-piece.is-legend {
  box-shadow: 0 0 9px rgba(215, 47, 63, 0.68);
}

.confetti-piece.is-hidden {
  box-shadow: 0 0 9px rgba(115, 251, 211, 0.72);
}

.firework-burst {
  position: absolute;
  left: var(--left);
  top: calc(100% - 66px);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: hsl(var(--hue) 100% 62%);
  box-shadow:
    0 -70px 0 -4px hsl(var(--hue) 100% 62%),
    50px -50px 0 -4px hsl(var(--hue) 100% 62%),
    70px 0 0 -4px hsl(var(--hue) 100% 62%),
    50px 50px 0 -4px hsl(var(--hue) 100% 62%),
    0 70px 0 -4px hsl(var(--hue) 100% 62%),
    -50px 50px 0 -4px hsl(var(--hue) 100% 62%),
    -70px 0 0 -4px hsl(var(--hue) 100% 62%),
    -50px -50px 0 -4px hsl(var(--hue) 100% 62%);
  opacity: 0;
  animation: fireworkBurst 1.15s cubic-bezier(0.16, 0.7, 0.3, 1) var(--burst-delay, 0ms) forwards;
}

.gold-coin {
  position: absolute;
  left: var(--x);
  top: -52px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 3px solid #fff0a0;
  border-radius: 50%;
  background: #f5ad00;
  box-shadow:
    inset 0 0 0 3px #c87900,
    inset 5px 0 7px rgba(255, 255, 255, 0.52),
    0 0 16px rgba(255, 191, 0, 0.72);
  color: #fff7b2;
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1;
  animation: goldCoinFall var(--duration) cubic-bezier(0.16, 0.65, 0.28, 1) var(--delay) forwards;
}

.gold-coin.is-rush {
  width: 24px;
  height: 24px;
  border-width: 2px;
  opacity: 0.84;
}

.gold-coin.is-result {
  z-index: 2;
}

.legend-emblem,
.hidden-ticket {
  position: absolute;
  left: var(--x);
  top: -52px;
  display: grid;
  place-items: center;
  font-weight: 950;
  line-height: 1;
  animation: specialTokenFall var(--duration) cubic-bezier(0.16, 0.65, 0.28, 1) var(--delay) forwards;
}

.legend-emblem {
  width: 32px;
  height: 32px;
  border: 3px double #f4ba27;
  border-radius: 50%;
  background: #7d1020;
  box-shadow:
    inset 0 0 0 3px #3e0710,
    0 0 18px rgba(215, 47, 63, 0.72);
  color: #fff4c7;
  font-size: 0.78rem;
}

.hidden-ticket {
  width: 44px;
  height: 25px;
  border: 2px solid #73fbd3;
  border-radius: 3px;
  background: #171217;
  box-shadow:
    4px 4px 0 rgba(255, 79, 163, 0.78),
    0 0 16px rgba(115, 251, 211, 0.58);
  color: #fff45c;
  font-size: 0.58rem;
}

.legend-emblem.is-rush,
.hidden-ticket.is-rush {
  transform: scale(0.78);
  opacity: 0.86;
}

.legend-emblem.is-result,
.hidden-ticket.is-result {
  z-index: 2;
}

.special-screen-flash {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0;
  animation: specialScreenFlash 0.82s ease-out forwards;
}

.golden-screen-flash {
  background: rgba(255, 215, 72, 0.48);
}

.legend-screen-flash {
  background: rgba(174, 24, 45, 0.48);
}

.hidden-screen-flash {
  background: rgba(72, 245, 205, 0.42);
}

@keyframes confettiFall {
  0% { transform: translate3d(0, -30px, 0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(var(--drift), 112vh, 0) rotate(var(--turn)); opacity: 0.95; }
}

@keyframes specialCutInSlam {
  0% { transform: translate(-160%, -50%) scaleX(1.7); opacity: 0; }
  24% { transform: translate(-48%, -50%) scaleX(0.92); opacity: 1; }
  42% { transform: translate(-50%, -50%) scaleX(1); opacity: 1; }
  72% { transform: translate(-50%, -50%) scaleX(1); opacity: 1; }
  100% { transform: translate(72%, -50%) scaleX(1.4); opacity: 0; }
}

@keyframes fireworkBurst {
  0% { transform: translateY(55px) scale(0.1); opacity: 0; }
  22% { transform: translateY(-18px) scale(0.42); opacity: 1; }
  100% { transform: translateY(-190px) scale(1.7); opacity: 0; }
}

@keyframes goldCoinFall {
  0% { transform: translate3d(0, -60px, 0) rotateY(0deg) rotateZ(0deg) scale(0.35); opacity: 0; }
  9% { opacity: 1; }
  74% { opacity: 1; }
  100% { transform: translate3d(var(--drift), 116vh, 0) rotateY(var(--turn)) rotateZ(720deg) scale(1.08); opacity: 0; }
}

@keyframes specialTokenFall {
  0% { transform: translate3d(0, -60px, 0) rotate(0deg) scale(0.4); opacity: 0; }
  9% { opacity: 1; }
  74% { opacity: 1; }
  100% { transform: translate3d(var(--drift), 116vh, 0) rotate(var(--turn)) scale(1.08); opacity: 0; }
}

@keyframes specialScreenFlash {
  0% { opacity: 0; }
  18% { opacity: 0.78; }
  42% { opacity: 0.18; }
  68% { opacity: 0.5; }
  100% { opacity: 0; }
}

.footer-links {
  gap: 12px;
  font-size: 0.78rem;
}

@media (max-width: 760px), (pointer: coarse) {
  .site-header {
    background: rgba(255, 250, 248, 0.97);
    backdrop-filter: none;
  }

  .result-card.is-golden-rush,
  .result-card.is-legend-pick,
  .result-card.is-hidden-gem {
    animation: none;
    filter: none;
  }

  .result-card.is-golden-rush,
  .result-card.is-golden-rush.is-special-hit {
    box-shadow:
      0 18px 42px rgba(218, 154, 0, 0.28),
      0 0 0 3px rgba(255, 210, 66, 0.78);
  }

  .result-card.is-legend-pick,
  .result-card.is-legend-pick.is-special-hit {
    box-shadow:
      0 18px 42px rgba(151, 18, 38, 0.26),
      0 0 0 3px rgba(232, 185, 55, 0.78);
  }

  .result-card.is-hidden-gem,
  .result-card.is-hidden-gem.is-special-hit {
    box-shadow:
      0 18px 42px rgba(32, 196, 165, 0.24),
      0 0 0 3px rgba(115, 251, 211, 0.74);
  }

  .result-card.is-rolling .result-poster {
    animation: none;
    filter: none;
  }

  .result-card.is-revealed {
    will-change: transform;
  }

  .confetti-piece,
  .confetti-piece.is-golden,
  .confetti-piece.is-legend,
  .confetti-piece.is-hidden,
  .gold-coin,
  .legend-emblem,
  .hidden-ticket {
    box-shadow: none;
  }

  .confetti-piece {
    width: 9px;
    height: 15px;
  }
}

@media (max-width: 620px) {
  .special-cut-in {
    padding: 12px 16px;
    font-size: 2rem;
  }

  .header-inner {
    display: flex;
    min-height: 56px;
    padding: 0;
  }

  .hero {
    padding-top: 20px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.1rem);
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn-primary {
    width: min(100%, 340px);
  }

  .result-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tag-groups {
    grid-template-columns: 1fr;
  }

  .result-card.is-empty {
    min-height: 290px;
  }

  .draw-stage-button {
    min-height: 82px;
    width: min(100%, 340px);
    padding: 0 22px;
    font-size: 1.75rem;
  }

  .result-poster {
    min-height: 168px;
  }

  .result-content {
    padding: 0;
  }

  .result-reason {
    font-size: 0.84rem;
  }

  .result-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .result-actions .btn-primary {
    grid-column: 1 / -1;
  }

  .result-actions .btn-ghost,
  .result-actions .btn-search,
  .result-actions .btn-share {
    min-height: 42px;
    padding: 0 5px;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  .result-actions .action-icon {
    display: none;
  }

  .site-footer > .shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer > .shell > .footer-links {
    justify-content: flex-start;
    margin-top: 6px;
  }
}
