:root {
  color-scheme: dark;
  --bg: #080b14;
  --bg-2: #101729;
  --panel: rgba(16, 23, 41, 0.82);
  --panel-strong: rgba(18, 27, 50, 0.96);
  --ink: #f8fafc;
  --muted: #aab6cf;
  --faint: #667085;
  --line: rgba(203, 213, 225, 0.16);
  --hot: #fbbf24;
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --pink: #fb7185;
  --green: #34d399;
  --danger: #f87171;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(167,139,250,.24), transparent 32rem),
    radial-gradient(circle at 88% 4%, rgba(34,211,238,.18), transparent 28rem),
    radial-gradient(circle at 50% 115%, rgba(251,191,36,.14), transparent 36rem),
    var(--bg);
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 24px;
  align-items: stretch;
}

.card, .hero-card, .game-card, .result-card, .side-card {
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.032));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card { padding: clamp(24px, 6vw, 54px); position: relative; overflow: hidden; }
.hero-card::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -260px;
  top: -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.2), transparent 66%);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(34,211,238,.3);
  border-radius: 999px;
  color: #bff6ff;
  background: rgba(34,211,238,.08);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 700;
}

h1, h2, h3 { line-height: 1.02; margin: 0; }
h1 { font-size: clamp(44px, 9vw, 108px); letter-spacing: -.08em; max-width: 9ch; margin-top: 22px; }
h2 { font-size: clamp(28px, 5vw, 56px); letter-spacing: -.045em; }
h3 { font-size: 22px; letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.65; }
.lede { font-size: clamp(18px, 2.2vw, 22px); max-width: 62ch; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

button, .button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 18px;
  color: #06101b;
  background: linear-gradient(135deg, var(--hot), #f97316);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(251, 191, 36, .22);
  transition: transform .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover, .button:hover { transform: translateY(-1px); }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.secondary {
  color: var(--ink);
  background: rgba(255,255,255,.06);
  border-color: var(--line);
  box-shadow: none;
}
.ghost {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}
.creator-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.creator-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(34,211,238,.34);
  color: #d9fbff;
  background: rgba(34,211,238,.08);
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.creator-link:hover {
  transform: translateY(-1px);
  border-color: rgba(34,211,238,.6);
  background: rgba(34,211,238,.14);
}
.creator-link.coffee {
  color: #06101b;
  background: linear-gradient(135deg, var(--cyan), var(--hot));
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(34,211,238,.16);
}
.choice-button {
  min-height: 132px;
  padding: 20px;
  border-radius: 22px;
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  color: var(--ink);
  background: rgba(255,255,255,.055);
  border-color: var(--line);
  box-shadow: none;
}
.choice-button strong { font-size: 22px; color: white; }
.choice-button .sub { color: var(--muted); line-height: 1.5; }
.choice-button.gamble { background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(34,211,238,.08)); }
.choice-button.sure { background: linear-gradient(135deg, rgba(251,191,36,.15), rgba(52,211,153,.08)); }

.panel { padding: 22px; }
.side-card { padding: 24px; }
.game-card, .result-card { padding: clamp(20px, 4vw, 34px); }

.meter {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
  border: 1px solid var(--line);
}
.meter span {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--hot));
  border-radius: inherit;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.micro { color: var(--faint); font-size: 13px; line-height: 1.5; }
.warn { color: #fed7aa; }
.error { color: var(--danger); }
.success { color: var(--green); }

.curve-wrap {
  min-height: 360px;
  border-radius: 24px;
  background: rgba(3, 7, 18, .44);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
svg.curve { width: 100%; height: 100%; min-height: 360px; display: block; }
.axis-label { fill: #94a3b8; font-size: 12px; }
.tick { stroke: rgba(203,213,225,.18); stroke-width: 1; }
.diagonal { stroke: rgba(248,250,252,.32); stroke-dasharray: 6 8; stroke-width: 2; }
.user-curve { fill: none; stroke: url(#curveGradient); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 14px rgba(34,211,238,.28)); }
.commons-curve { fill: none; stroke: rgba(52,211,153,.68); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 9; }
.point { stroke: #0b1020; stroke-width: 3; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 28px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 16px;
}
.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  color: var(--muted);
  font-size: 13px;
}
.table th { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

label.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.45;
}
input[type="checkbox"] { margin-top: 4px; accent-color: var(--cyan); }

.footer-note {
  margin-top: 24px;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(48px, 18vw, 84px); }
  .choice-button { min-height: 112px; }
}

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