:root {
  --ink: #171716;
  --paper: #f6f0e6;
  --cream: #fffaf1;
  --orange: #ff5c35;
  --orange-dark: #e8421d;
  --blue: #3157d5;
  --acid: #d9f64f;
  --line: rgba(23, 23, 22, 0.18);
  --shadow: 6px 6px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.skip-link { position: fixed; left: 12px; top: -50px; z-index: 100; background: white; color: black; padding: 10px 16px; }
.skip-link:focus { top: 12px; }
.grain { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .035; 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='.8'/%3E%3C/svg%3E"); }

.site-header { height: 76px; padding: 0 max(24px, calc((100vw - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px solid var(--ink); background: rgba(246,240,230,.93); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; font-weight: 900; font-size: 19px; cursor: pointer; padding: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--orange); color: white; border: 1.5px solid var(--ink); border-radius: 50% 50% 50% 12%; transform: rotate(-7deg); font-size: 21px; }
.header-actions, .hero-actions, .result-actions { display: flex; align-items: center; gap: 12px; }
.text-button, .back-button { border: 0; background: transparent; padding: 10px 12px; cursor: pointer; font-weight: 700; }
.text-button:hover, .back-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.primary-button, .secondary-button, .white-button, .outline-light-button { border: 1.5px solid var(--ink); border-radius: 3px; padding: 12px 18px; font-weight: 800; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.primary-button { color: white; background: var(--orange); box-shadow: 3px 3px 0 var(--ink); }
.primary-button:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.primary-button:active, .secondary-button:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.primary-button.small { padding: 10px 16px; }
.primary-button.large, .secondary-button.large { padding: 16px 22px; font-size: 16px; }
.primary-button.large span { margin-left: 18px; }
.secondary-button { background: transparent; box-shadow: 3px 3px 0 var(--ink); }
.full { width: 100%; padding: 15px; }

.hero { min-height: 610px; display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; max-width: 1200px; margin: auto; padding: 72px 24px 80px; gap: 54px; }
.eyebrow { font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; display: flex; align-items: center; gap: 9px; margin: 0 0 18px; }
.eyebrow > span { width: 26px; height: 2px; background: var(--orange); }
.eyebrow.muted { color: #766f65; }
.hero h1 { margin: 0; font-size: clamp(52px, 6.2vw, 84px); line-height: 1.03; letter-spacing: -.065em; font-weight: 900; }
.hero h1 em { color: var(--orange); font-style: normal; position: relative; }
.hero h1 em::after { content: ""; position: absolute; height: 7px; border-radius: 50%; background: var(--orange); opacity: .65; left: 2%; right: 0; bottom: -8px; transform: rotate(-1deg); }
.hero-copy > p { max-width: 560px; margin: 34px 0 30px; color: #5d574f; line-height: 1.8; font-size: 17px; }
.hero-art { height: 430px; position: relative; }
.versus-card { position: absolute; width: 275px; height: 335px; border: 2px solid var(--ink); padding: 25px; display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow); }
.versus-card span { font-size: 13px; font-weight: 900; }
.versus-card strong { font-size: 39px; line-height: 1.05; }
.versus-card small { font-size: 13px; font-weight: 700; }
.card-left { left: 15px; top: 10px; background: var(--blue); color: white; transform: rotate(-5deg); }
.card-right { right: 8px; bottom: 7px; background: var(--acid); transform: rotate(5deg); }
.versus-burst { position: absolute; z-index: 2; left: 45%; top: 40%; transform: translate(-50%,-50%) rotate(-8deg); width: 92px; height: 92px; display: grid; place-items: center; color: white; font-size: 30px; font-weight: 900; background: var(--orange); border: 2px solid var(--ink); clip-path: polygon(50% 0,62% 25%,85% 15%,76% 39%,100% 50%,75% 62%,86% 85%,61% 76%,50% 100%,38% 76%,14% 86%,25% 62%,0 50%,25% 39%,15% 15%,39% 25%); }
.scribble { position: absolute; right: 4px; top: -28px; font-weight: 800; transform: rotate(7deg); font-size: 15px; }

.themes-section { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: var(--cream); padding: 70px max(24px, calc((100vw - 1200px) / 2)) 84px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-heading h2 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -.04em; margin: 0; }
.section-heading > p { color: #746d63; max-width: 410px; line-height: 1.6; }
.theme-search { display: flex; gap: 10px; margin: -6px 0 26px; max-width: 560px; }
.theme-search input { flex: 1; min-width: 0; background: white; border: 1.5px solid var(--ink); border-radius: 3px; padding: 12px 14px; outline: none; box-shadow: 3px 3px 0 var(--ink); }
.theme-search input:focus { box-shadow: 3px 3px 0 var(--orange); }
.theme-search input::placeholder { color: #9a938a; }
.theme-search .primary-button.small { flex: 0 0 auto; }
.empty-themes { grid-column: 1 / -1; margin: 0 0 4px; padding: 26px 4px; color: #746d63; font-weight: 700; line-height: 1.6; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.theme-card { min-height: 280px; border: 1.5px solid var(--ink); padding: 24px; text-align: left; cursor: pointer; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; transition: transform .2s, box-shadow .2s; }
.theme-card:hover { transform: translate(-4px,-4px); box-shadow: 7px 7px 0 var(--ink); }
.theme-card .emoji { width: 62px; height: 62px; display: grid; place-items: center; background: rgba(255,255,255,.72); border: 1.5px solid var(--ink); border-radius: 50%; font-size: 30px; }
.theme-card h3 { font-size: 29px; line-height: 1.15; margin: auto 0 10px; max-width: 85%; }
.theme-card p { margin: 0; font-size: 13px; font-weight: 700; opacity: .72; }
.theme-card .arrow { position: absolute; right: 22px; bottom: 18px; font-size: 28px; }
.theme-card .theme-stats { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; font-weight: 700; opacity: .72; }
.public-pill { position: absolute; right: 18px; top: 18px; padding: 5px 9px; border: 1px solid var(--ink); background: white; color: var(--ink); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.theme-card:nth-child(3n+1) { background: #ffb29f; }
.theme-card:nth-child(3n+2) { background: #b8c7ff; }
.theme-card:nth-child(3n+3) { background: var(--acid); }
.theme-card.create-card { background: var(--ink); color: white; }
.theme-card.create-card .emoji { color: var(--ink); }
.community-section { max-width: 1200px; padding: 76px 24px 86px; margin: auto; }
.community-board { display: grid; grid-template-columns: repeat(3,1fr); border: 1.5px solid var(--ink); background: var(--ink); gap: 1.5px; }
.community-rank { background: var(--paper); min-height: 210px; padding: 24px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.rank-number { font-size: 44px; font-weight: 900; line-height: 1; color: var(--orange); }
.community-rank h3 { margin: 0 0 5px; font-size: 20px; }.community-rank p { color: #777064; margin: 0 0 20px; font-size: 12px; }
.champion-line { border-top: 1px solid var(--line); padding-top: 14px; }.champion-line small { display: block; color: #81796e; margin-bottom: 5px; }.champion-line strong { font-size: 19px; }
.vote-bar { height: 5px; background: #ddd5c8; margin-top: 11px; }.vote-bar span { display: block; height: 100%; background: var(--orange); }
.how-it-works { max-width: 1200px; padding: 72px 24px 90px; margin: auto; }
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 38px; }
.steps article { border-top: 2px solid var(--ink); padding-top: 22px; display: flex; gap: 18px; }
.steps article > span { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 900; }
.steps h3 { margin: 2px 0 6px; font-size: 18px; }.steps p { margin: 0; color: #766f65; line-height: 1.55; font-size: 14px; }
.site-notice { max-width: 1152px; margin: -28px auto 60px; padding: 20px 22px; border-top: 1px solid var(--line); color: #746d63; display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; font-size: 12px; line-height: 1.7; }
.site-notice strong { color: var(--ink); white-space: nowrap; }
.site-notice p { margin: 0; }

.game-view { min-height: calc(100vh - 76px); padding-bottom: 40px; }
.game-topbar { max-width: 1200px; margin: auto; height: 78px; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.game-topbar > :last-child { justify-self: end; }
.game-title-wrap { display: flex; gap: 10px; align-items: center; }
.round-tabs { max-width: 1100px; margin: 4px auto 0; padding: 0 24px; display: flex; justify-content: center; }
.round-tab { min-width: 118px; padding: 13px 18px; color: #8b847a; text-align: center; font-size: 13px; font-weight: 800; border-bottom: 2px solid #cfc7bb; }
.round-tab.active { color: var(--orange); border-color: var(--orange); }
.round-tab.done { color: var(--ink); border-color: var(--ink); }
.battle-wrap { max-width: 920px; margin: 42px auto 0; padding: 0 24px; }
.battle-status { text-align: center; margin-bottom: 25px; }
.battle-status p { margin: 0 0 11px; font-weight: 900; font-size: 14px; }
.battle-status small { display: block; color: #797267; margin-top: 8px; }
.progress-track { height: 5px; background: #d9d1c5; max-width: 330px; margin: auto; overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .3s; }
.choice-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; position: relative; }
.choice-card { min-height: 390px; border: 2px solid var(--ink); padding: 28px; cursor: pointer; display: flex; flex-direction: column; text-align: left; transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.choice-card::before { content: ""; position: absolute; width: 190px; height: 190px; border: 1px solid rgba(23,23,22,.18); border-radius: 50%; right: -80px; top: -80px; }
.choice-a { background: #b9c8ff; }.choice-b { background: #ffb39f; }
.choice-card:hover, .choice-card:focus-visible { transform: translate(-5px,-5px); box-shadow: 8px 8px 0 var(--ink); outline: none; }
.choice-card:active { transform: translate(2px,2px); box-shadow: none; }
.choice-index { display: grid; place-items: center; width: 42px; height: 42px; background: var(--cream); border: 1.5px solid var(--ink); font-weight: 900; }
.choice-card strong { margin: auto 0; font-size: clamp(28px,5vw,47px); line-height: 1.16; overflow-wrap: anywhere; }
.choice-hint { border-top: 1.5px solid rgba(23,23,22,.55); padding-top: 18px; font-weight: 800; display: flex; justify-content: space-between; }
.vs-badge { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-6deg); display: grid; place-items: center; width: 66px; height: 66px; border: 2px solid var(--ink); border-radius: 50%; background: var(--orange); color: white; font-weight: 900; font-size: 20px; }
.game-footer-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; font-size: 12px; color: #7f776c; }
.game-footer-actions button:disabled { opacity: .35; cursor: not-allowed; text-decoration: none; }

.result-view { min-height: calc(100vh - 76px); background: var(--paper); color: var(--ink); text-align: center; }
.result-hero { min-height: calc(100vh - 76px); background: var(--orange); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 55px 24px; position: relative; overflow: hidden; }
.result-hero::before, .result-hero::after { content: ""; position: absolute; border: 2px solid rgba(255,255,255,.35); border-radius: 50%; width: 450px; height: 450px; }
.result-hero::before { left: -250px; top: -160px; }.result-hero::after { right: -230px; bottom: -260px; }
.eyebrow.light { opacity: .78; }.trophy { font-size: 68px; filter: drop-shadow(4px 5px 0 rgba(23,23,22,.5)); }
.result-kicker { margin: 18px 0 5px; font-weight: 700; opacity: .85; }
.result-hero h1 { font-size: clamp(52px,9vw,106px); line-height: 1; max-width: 960px; letter-spacing: -.065em; margin: 22px 0; text-shadow: 5px 5px 0 var(--ink); overflow-wrap: anywhere; }
.result-path { max-width: 620px; line-height: 1.65; opacity: .8; }
.filler-row { margin-top: 26px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.16); border: 1.5px solid white; border-radius: 3px; padding: 8px 12px; box-shadow: 4px 4px 0 var(--ink); }
.filler-row label { font-weight: 800; font-size: 14px; white-space: nowrap; letter-spacing: .01em; }
.filler-row input { background: white; color: var(--ink); border: 0; border-radius: 2px; padding: 8px 10px; font-size: 14px; font-weight: 700; width: min(200px, 46vw); outline: none; }
.filler-row input::placeholder { color: #9a938a; font-weight: 500; }
.result-actions { margin-top: 22px; }.white-button { background: white; color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }.outline-light-button { border-color: white; background: transparent; color: white; box-shadow: 4px 4px 0 var(--ink); }
.white-button:hover, .outline-light-button:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.play-again { margin-top: 24px; background: transparent; color: white; border: 0; border-bottom: 1px solid white; cursor: pointer; padding: 5px; }
.result-bracket-wrap { max-width: 1200px; margin: auto; padding: 75px 24px 90px; text-align: left; }
.result-bracket-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.result-bracket-heading h2 { margin: 0; font-size: clamp(32px,5vw,52px); letter-spacing: -.045em; }
.result-stamp { width: 122px; height: 122px; border: 2px solid var(--orange); color: var(--orange); border-radius: 50%; display: grid; place-content: center; text-align: center; transform: rotate(7deg); }.result-stamp small { font-size: 10px; font-weight: 900; }.result-stamp strong { font-size: 34px; line-height: 1; }.result-stamp span { font-size: 11px; font-weight: 900; }
.result-bracket-scroll { overflow-x: auto; border: 2px solid var(--ink); background: white; box-shadow: 7px 7px 0 var(--ink); }
.poster-bracket { --rounds: 5; min-width: 980px; display: grid; grid-template-columns: repeat(var(--rounds),minmax(165px,1fr)); position: relative; }
.poster-round { border-right: 1px solid #b8b8b8; min-height: 630px; display: grid; grid-template-rows: auto 1fr; }.poster-round:last-child { border-right: 0; }
.poster-round h3 { height: 48px; margin: 0; border-bottom: 1px solid var(--ink); display: grid; place-items: center; font-size: 13px; }
.poster-slots { display: flex; flex-direction: column; justify-content: space-around; padding: 9px; }
.poster-slot { min-height: 34px; padding: 8px 9px; border: 1px solid #c5c5c5; display: flex; align-items: center; background: white; font-size: 12px; position: relative; }
.poster-slot.advanced { border-color: var(--orange); background: #fff0eb; color: #b73318; font-weight: 800; }.poster-slot.champion { background: var(--acid); border: 2px solid var(--ink); color: var(--ink); font-weight: 900; font-size: 16px; min-height: 54px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 18px 34px; padding: 25px 4px 0; font-size: 12px; color: #746d63; }.permalink-status { color: #458036; font-weight: 800; margin-left: auto; }

.modal { width: min(610px, calc(100vw - 30px)); max-height: 90vh; border: 2px solid var(--ink); border-radius: 0; padding: 0; background: var(--cream); box-shadow: 9px 9px 0 var(--ink); }
.modal::backdrop { background: rgba(23,23,22,.65); backdrop-filter: blur(3px); }
.modal form { padding: 30px; }.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 25px; }
.modal-head h2 { font-size: 30px; margin: 0; letter-spacing: -.04em; }.modal-head .eyebrow { margin-bottom: 6px; }
.icon-button { width: 38px; height: 38px; border: 1.5px solid var(--ink); background: white; font-size: 26px; cursor: pointer; }
.modal label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 16px; }
.modal input, .modal textarea { display: block; width: 100%; background: white; border: 1.5px solid var(--ink); padding: 12px 14px; margin-top: 8px; outline: none; resize: vertical; }
.modal input:focus, .modal textarea:focus { box-shadow: 3px 3px 0 var(--orange); }
.item-counter { display: flex; justify-content: space-between; font-size: 12px; color: #797267; margin: -7px 0 16px; }.form-error { color: #bd2d11; font-size: 13px; min-height: 19px; }
.publish-toggle { display: flex !important; gap: 12px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); background: white; cursor: pointer; }.publish-toggle input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--orange); }.publish-toggle span { display: block; }.publish-toggle b { display: block; }.publish-toggle small { display: block; font-weight: 500; color: #786f64; margin-top: 3px; }
.bracket-modal { width: min(1000px, calc(100vw - 24px)); }.bracket-modal .modal-head { padding: 24px 26px 15px; border-bottom: 1.5px solid var(--ink); margin: 0; background: var(--cream); }
.bracket-scroll { padding: 25px; overflow-x: auto; }.bracket-grid { min-width: 760px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px,1fr); gap: 16px; }
.bracket-column h3 { font-size: 12px; color: #7a7267; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; }.bracket-entry { min-height: 38px; border: 1px solid #bcb4a8; background: white; margin-bottom: 7px; padding: 9px; font-size: 12px; display: flex; align-items: center; }.bracket-entry.winner { border-color: var(--orange); background: #fff0eb; font-weight: 800; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translate(-50%,20px); color: white; background: var(--ink); padding: 12px 20px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; font-size: 13px; font-weight: 700; }.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 800px) {
  .site-header { height: 66px; padding: 0 16px; }.brand { font-size: 17px; }.header-actions .text-button { display: none; }
  .hero { grid-template-columns: 1fr; padding: 54px 20px 45px; gap: 65px; }.hero h1 { font-size: clamp(47px,15vw,70px); }.hero-art { height: 345px; max-width: 500px; width: 100%; margin: auto; }.versus-card { width: 56%; height: 285px; padding: 19px; }.versus-card strong { font-size: 28px; }
  .themes-section { padding: 55px 20px 65px; }.section-heading { display: block; }.theme-grid { grid-template-columns: 1fr; }.theme-card { min-height: 220px; }.steps { grid-template-columns: 1fr; }
  .community-section { padding: 55px 20px 65px; }.community-board { grid-template-columns: 1fr; }
  .game-view { min-height: calc(100vh - 66px); }.game-topbar { grid-template-columns: 1fr auto; height: 70px; padding: 0 12px; }.game-title-wrap { display: none; }.round-tabs { overflow-x: auto; justify-content: flex-start; padding: 0 12px; }.round-tab { min-width: 86px; padding: 12px 7px; }.battle-wrap { margin-top: 24px; padding: 0 14px; }
  .choice-stage { gap: 11px; }.choice-card { min-height: 340px; padding: 17px 14px; }.choice-card strong { font-size: clamp(23px,7vw,34px); }.choice-index { width: 34px; height: 34px; }.vs-badge { width: 51px; height: 51px; font-size: 16px; }.choice-hint { font-size: 12px; }
  .game-footer-actions span { display: none; }.game-footer-actions { justify-content: center; }
  .result-actions { flex-direction: column; width: min(350px,100%); }.result-actions button { width: 100%; }
  .result-bracket-wrap { padding: 55px 16px 70px; }.result-bracket-heading { align-items: center; }.result-stamp { width: 88px; height: 88px; flex: 0 0 auto; }.result-stamp strong { font-size: 26px; }.result-meta { display: grid; gap: 8px; }.permalink-status { margin-left: 0; }
  .modal form { padding: 22px; }
  .site-notice { margin: -20px 20px 45px; grid-template-columns: 1fr; gap: 5px; padding-inline: 0; }
}

@media (max-width: 430px) {
  .hero-actions { align-items: stretch; flex-direction: column; }.hero-actions button { width: 100%; }
  .hero-art { height: 300px; }.versus-card { height: 245px; }.card-left { left: 3px; }.card-right { right: 3px; }
  .choice-card { min-height: 300px; }.game-topbar .text-button { padding-right: 4px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
