/* Fancrd preview — brand: charcoal + fire red, cream "paper" for cards and stubs */
:root {
  --bg: #1d1d1d;
  --bg-2: #262626;
  --surface: #303030;
  --surface-2: #3a3a3a;
  --line: #474747;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --red: #e30a0a;
  --red-2: #ff3b3b;
  --green: #22a55b;
  --paper: #f4ecd8;
  --paper-ink: #2a2118;
  --paper-line: #d9cdb0;
  --gold: #f2b705;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --display: 'Oswald', 'Inter', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
body.no-scroll { overflow: hidden; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 .8em; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 60px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.red { color: var(--red); }
.pad { padding: 16px; }
.eyebrow { font: 600 12px/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid var(--red-2); outline-offset: 2px; }

/* Preview bar + header */
.preview-bar { background: var(--red); color: #fff; text-align: center; font-size: 12px; font-weight: 600; padding: 6px 12px; letter-spacing: .03em; }
.site-header { background: rgba(29, 29, 29, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 500; }
.header-row { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 8px; }
.brand span { font: 700 24px var(--display); letter-spacing: -.01em; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a, .main-nav .link { white-space: nowrap; text-decoration: none; font: 600 13px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
.main-nav a:hover, .main-nav a.active, .main-nav .link:hover { color: var(--text); }
.main-nav a.active { box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.main-nav .btn { color: #fff; margin-left: 6px; }
.nav-auth { display: contents; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 24px; margin-left: auto; cursor: pointer; }
.search { position: relative; width: 240px; }
.search input { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; }
.search__results { position: absolute; top: calc(100% + 6px); right: 0; width: 340px; max-width: 90vw; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.search__results a { display: block; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--line); font-size: 14px; }
.search__results a:hover { background: var(--surface-2); }
.search__results small { color: var(--muted); }
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); border-radius: 4px; padding: 2px 6px; margin-right: 8px; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; gap: 12px; flex-wrap: wrap; }

/* Buttons + links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px var(--body); padding: 11px 20px; border-radius: 999px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .1s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-2); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); }
.btn--danger { color: #ff8a8a; }
.btn--sm { padding: 7px 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

/* Home */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 30px 0 50px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); text-transform: uppercase; letter-spacing: -.01em; }
.lead { font-size: 18px; color: #d6d6d6; max-width: 560px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.hero__art { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.hero__field { position: absolute; inset: 0; border-radius: 50%; background:
  radial-gradient(circle at 50% 60%, rgba(227, 10, 10, .25), transparent 60%),
  repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, .06) 38px 40px); }
.hero__art img { position: relative; width: 78%; margin: 11%; border-radius: 28px; box-shadow: var(--shadow); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero__art img { animation: none; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: var(--red); transform: translateY(-2px); }
.feature svg { width: 40px; height: 40px; color: var(--red); margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0; }

.section { margin-bottom: 40px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head a { color: var(--muted); font-size: 13px; text-decoration: none; }
.section__head a:hover { color: var(--text); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.page-head { margin-bottom: 18px; }
.empty { text-align: center; padding: 80px 0; }

/* Feed / people */
.feed, .people-list { list-style: none; margin: 0; padding: 0; }
.feed li, .people-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.people-list li { align-items: center; }
.people-list li > a:nth-child(2) { flex: 1; text-decoration: none; }
.feed a { text-decoration: none; }
.feed a:hover { text-decoration: underline; }
.feed p { margin: 2px 0 0; font-size: 14px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--c1, var(--red)); display: grid; place-items: center; color: #fff; border: 2px solid rgba(255, 255, 255, .8); }
.avatar svg { width: 24px; height: 24px; }
.avatar--sm { width: 28px; height: 28px; }
.avatar--sm svg { width: 16px; height: 16px; }

/* Team chips (initials in team colors) */
.team-chip { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 10px; background: var(--c1); color: #fff; box-shadow: inset 0 -4px 0 var(--c2); font: 700 12px var(--display); letter-spacing: .04em; text-shadow: 0 1px 1px rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .15); }
.team-chip.sm { min-width: 30px; height: 30px; font-size: 10px; border-radius: 7px; box-shadow: inset 0 -3px 0 var(--c2); }
.team-chip.lg { min-width: 56px; height: 56px; font-size: 15px; border-radius: 14px; box-shadow: inset 0 -6px 0 var(--c2); }

/* Stars */
.stars { display: inline-flex; gap: 1px; color: #5a5a5a; font-size: 15px; line-height: 1; }
.stars .on { color: var(--gold); }
.stars--edit .star { background: none; border: 0; padding: 2px; font-size: 22px; color: #5a5a5a; cursor: pointer; }
.stars--edit .star.on { color: var(--gold); }
.stars--edit .star:hover { transform: scale(1.15); }

/* Venue cards */
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.venue-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.venue-card:hover { border-color: var(--red); transform: translateY(-2px); }
.venue-card h3 { margin: 8px 0 0; }
.venue-card--visited { border-color: #5b2a2a; }
.venue-card__teams { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.venue-card__rating { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.visited-tag { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--red-2); text-transform: uppercase; letter-spacing: .08em; }

/* Ticket stubs */
.stub-list { display: flex; flex-direction: column; gap: 12px; }
.stub { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 1fr 96px; background: var(--paper); color: var(--paper-ink); border-radius: 10px; position: relative; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); transition: transform .15s; width: 100%; }
.stub:hover { transform: translateY(-2px) rotate(-.3deg); }
.stub:focus-visible { outline: 2px solid var(--red-2); outline-offset: 3px; }
.stub::before, .stub::after { content: ''; position: absolute; right: 88px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); }
.stub::before { top: -8px; }
.stub::after { bottom: -8px; }
.stub__main { padding: 14px 16px; border-right: 2px dashed var(--paper-line); min-width: 0; }
.stub__top { display: flex; gap: 6px; margin-bottom: 6px; }
.stub__league, .stub__tag { font: 700 10px var(--body); letter-spacing: .12em; background: var(--paper-ink); color: var(--paper); padding: 2px 6px; border-radius: 3px; }
.stub__tag { background: var(--red); color: #fff; }
.stub__matchup { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stub__vs { font: 600 12px var(--body); opacity: .6; }
.stub__names { font: 700 18px var(--display); margin-left: 4px; }
.stub__score { font: 700 18px var(--display); margin-left: auto; color: var(--red); }
.stub__score small { font-size: 11px; color: var(--paper-ink); opacity: .7; }
.stub__visit { font: 700 18px var(--display); }
.stub__venue { font-weight: 700; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stub__meta { font-size: 12px; opacity: .7; }
.stub__tear { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px; }
.stub__mon { font: 700 12px var(--body); letter-spacing: .14em; color: var(--red); }
.stub__day { font: 700 34px/1 var(--display); }
.stub__yr { font-size: 12px; opacity: .7; margin-bottom: 4px; }
.stub__tear .stars { font-size: 11px; color: #c9bc9c; }
.stub__tear .stars .on { color: #c58b00; }

/* Fancrd (baseball card) */
.fc { --w: 260px; width: var(--w); aspect-ratio: 2.5 / 3.5; perspective: 1200px; position: relative; }
.fc--lg { --w: 300px; }
.fc--sm { --w: 100%; }
.fc__inner { position: absolute; inset: 0; transition: transform .7s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.fc.flipped .fc__inner { transform: rotateY(180deg); }
.fc__face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: var(--shadow); }
.fc__front { background: var(--paper); padding: 6%; }
.fc__frame { position: relative; height: 100%; border-radius: 6px; overflow: hidden; background: linear-gradient(160deg, var(--c1), color-mix(in srgb, var(--c1) 55%, #000)); border: 4px solid var(--c2); }
.fc__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fc__icon { position: absolute; inset: 8% 12% 24%; display: grid; place-items: center; color: rgba(255, 255, 255, .92); }
.fc__icon svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.fc__logo { position: absolute; top: 6px; right: 6px; width: 18%; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.fc__team { position: absolute; top: 8px; left: 8px; font: 700 clamp(10px, calc(var(--w) * .05), 15px) var(--display); color: #fff; background: rgba(0, 0, 0, .35); padding: 2px 7px; border-radius: 4px; letter-spacing: .06em; }
.fc__banner { position: absolute; left: -2px; right: -2px; bottom: 7%; background: var(--paper); color: var(--paper-ink); padding: 6px 8px; text-align: center; transform: skewY(-4deg); border-top: 3px solid var(--c2); border-bottom: 3px solid var(--c2); }
.fc__banner span { display: block; transform: skewY(4deg); font-size: clamp(12px, calc(var(--w) * .075), 24px); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc__back { transform: rotateY(180deg); background: var(--paper); color: var(--paper-ink); padding: 7%; display: flex; flex-direction: column; font-size: 13px;
  background-image: repeating-linear-gradient(0deg, transparent 0 22px, rgba(0, 0, 0, .04) 22px 23px); }
.fc__back-head { border-bottom: 3px solid var(--c1); padding-bottom: 6px; margin-bottom: 8px; }
.fc__back-name { font-size: 20px; text-transform: uppercase; line-height: 1.1; }
.fc__handle { font-size: 12px; opacity: .7; }
.fc__back-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1; }
.fc__back-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 2px solid var(--c1); float: right; }
.fc__back-teams { display: flex; gap: 4px; flex-wrap: wrap; }
.fc__table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fc__table th { text-align: left; background: var(--c1); color: #fff; padding: 3px 6px; font-weight: 600; }
.fc__table td { padding: 2px 6px; border-bottom: 1px solid var(--paper-line); }
.fc__totals { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: auto; border-top: 2px solid var(--c1); padding-top: 6px; }
.fc__totals b { display: block; font: 700 20px var(--display); }
.fc__totals span { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.fc__flip { position: absolute; bottom: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--bg); background: var(--red); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; box-shadow: var(--shadow); }
.fc__flip:hover { background: var(--red-2); }
.fc--sm .fc__back { padding: 6%; font-size: 10px; }
.fc--sm .fc__back-name { font-size: 13px; }
.fc--sm .fc__table { display: none; }
.fc--sm .fc__totals b { font-size: 14px; }

/* Profile */
.profile-top { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; margin-bottom: 44px; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.profile-summary h1 { margin-bottom: 10px; }
.fav-teams { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.team-name { margin-right: 10px; font-weight: 600; }
.statline { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; }
.statline b { display: block; font: 700 32px/1 var(--display); }
.statline b small { font-size: 16px; color: var(--muted); }
.statline span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.most-visited { margin-bottom: 18px; }
.most-visited .eyebrow { display: block; }
.fav-venues { margin: 0; padding-left: 22px; }
.fav-venues li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fav-venues li a { font-weight: 600; text-decoration: none; }
.fav-venues li > span { display: flex; align-items: center; gap: 8px; }

/* Badges */
.badge-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.badge { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px; }
.badge__medal { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); color: var(--muted); border: 3px solid var(--line); }
.badge--earned .badge__medal { color: #fff; border-color: #fff; background: var(--medal, var(--red)); box-shadow: 0 0 0 3px var(--medal, var(--red)); }
.badge--easy { --medal: #2e7d4f; } .badge--medium { --medal: #2f5fa8; } .badge--hard { --medal: #8a3fb8; }
.badge--extreme { --medal: var(--red); } .badge--impossible { --medal: #b8860b; }
.badge--locked { opacity: .65; }
.badge__name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.badge__meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.badge__prog { height: 4px; background: var(--surface-2); border-radius: 2px; margin: 8px 6px 2px; overflow: hidden; }
.badge__prog i { display: block; height: 100%; background: var(--red); }
.badge small { color: var(--muted); font-size: 11px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.badge-card { display: flex; flex-direction: column; gap: 6px; }
.badge-card .badge { flex: none; }
.badge-card p { font-size: 13px; color: #d0d0d0; margin: 0; padding: 0 4px; }
.badge-card small { padding: 0 4px; }

/* Passport */
.passport-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.next-up { display: block; background: linear-gradient(90deg, rgba(227, 10, 10, .18), transparent); border: 1px solid #5b2a2a; border-radius: var(--radius); padding: 14px 18px; text-decoration: none; margin-bottom: 22px; }
.next-up .eyebrow { display: block; color: var(--red-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 14px var(--body); padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--red); }
.team-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.team-wall__item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; filter: grayscale(1); opacity: .35; }
.team-wall__item.seen { filter: none; opacity: 1; }
.team-wall__item small { font-size: 11px; line-height: 1.2; }
.venue-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 16px; }
.venue-checklist a { display: flex; align-items: center; gap: 10px; padding: 8px 4px; text-decoration: none; border-bottom: 1px solid var(--line); color: var(--muted); }
.venue-checklist a.seen { color: var(--text); }
.venue-checklist small { margin-left: auto; white-space: nowrap; }
.check { width: 20px; height: 20px; flex: none; border-radius: 5px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.seen .check { background: var(--red); border-color: var(--red); color: #fff; }

/* Filters, segmented controls */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters input, .filters select, .form input, .form select, .form textarea {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; }
.filters input { flex: 1; min-width: 180px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--muted); font: 600 13px var(--body); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--red); color: #fff; }
.seg--wide { display: flex; margin-bottom: 8px; }
.seg--wide button { flex: 1; padding: 10px; }

/* Map */
.map { height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); isolation: isolate; }
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.8) contrast(.85) saturate(.4); }
.leaflet-tooltip { font-family: var(--body); }

/* Binder of following */
.binder { background: #2a2a2a; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.binder__page { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 600px; margin: 0 auto; }
.sleeve { display: block; padding: 6px; border-radius: 10px; background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 255, 255, .12); transition: transform .15s; }
.sleeve:hover { transform: translateY(-3px); }
.sleeve--empty { aspect-ratio: 2.5 / 3.5; }
.binder__nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; color: var(--muted); font-size: 13px; }

/* Venue page */
.venue-hero { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; margin-bottom: 36px; }
.score-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.score-box__big { font: 700 56px/1 var(--display); }
.score-box .ratings { text-align: left; margin-top: 14px; }

/* Rankings */
.rank-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank-list li.me { background: rgba(227, 10, 10, .1); margin: 0 -8px; padding: 10px 8px; border-radius: 8px; }
.rank-list a { text-decoration: none; font-weight: 600; }
.rank-list a:hover { text-decoration: underline; }
.rank { width: 26px; font: 700 18px var(--display); color: var(--muted); text-align: right; }
.rank-score { margin-left: auto; font: 700 18px var(--display); color: var(--gold); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: 13px; font-weight: 600; color: #d0d0d0; padding: 0; margin-bottom: 6px; }
.form textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.form-grid--match { grid-template-columns: 1fr 90px 1fr 90px; align-items: end; }
.err { color: #ff8a8a; font-size: 12px; min-height: 0; margin: 0; }
.err:empty { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; transition: background .15s, border-color .15s; }
.chip input:checked + span { background: var(--red); border-color: var(--red); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--red-2); outline-offset: 2px; }
.card-form { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 760px; }
.actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.upload { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #d0d0d0; }
.upload input { font-size: 13px; color: var(--muted); }
.icon-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.icon-opt { width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--text); padding: 8px; cursor: pointer; }
.icon-opt.on { border-color: var(--red); background: rgba(227, 10, 10, .15); }
.icon-opt svg { width: 100%; height: 100%; }
.ratings { display: flex; flex-direction: column; gap: 6px; }
.ratings--inline { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px 24px; }
.rating-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.rating-row--main { font-weight: 700; }
.with { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Auth */
.auth { max-width: 440px; margin: 20px auto; }
.auth--wide { max-width: 560px; }
.social-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ref-list { list-style: none; margin: -4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ref-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.ref-list li.ok { color: var(--text); }
.ref { width: 46px; height: 46px; flex: none; }
.ref__ring { fill: #3a1515; stroke: var(--red); stroke-width: 3; }
.ref--good .ref__ring { fill: #12351f; stroke: var(--green); }
.ref--good { animation: pop .3s ease; }
@keyframes pop { 50% { transform: scale(1.15); } }
.toggle-row { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.toggle-row p { margin: 2px 0 0; }
.switch { position: relative; flex: none; width: 46px; height: 26px; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--red); border-color: var(--red); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--red-2); outline-offset: 2px; }

/* Modal + toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); z-index: 1000; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 28px; width: 100%; max-width: 520px; box-shadow: var(--shadow); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal--wide { max-width: 820px; }
.modal__close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 28px; cursor: pointer; line-height: 1; }
.stub-detail__head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; padding-right: 30px; }
.stub-detail__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.photo-drop { position: relative; aspect-ratio: 4 / 3; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: 14px; overflow: hidden; margin-bottom: 14px; background: var(--surface); }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop.has-photo { border-style: solid; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--red); color: var(--text); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); z-index: 2000; transition: opacity .3s, transform .3s; max-width: calc(100vw - 32px); font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Responsive */
@media (max-width: 1000px) {
  .search { width: 180px; }
  .main-nav a, .main-nav .link { padding: 8px 6px; font-size: 12px; }
}
@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .nav-toggle { display: block; }
  .main-nav { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; margin: 0; }
  body.nav-open .main-nav { display: flex; }
  .main-nav a, .main-nav .link { padding: 12px 4px; font-size: 14px; border-bottom: 1px solid var(--line); text-align: left; }
  .main-nav a.active { box-shadow: inset 3px 0 0 var(--red); padding-left: 10px; }
  .main-nav .btn { margin: 10px 0 0; }
  .search { order: 4; width: 100%; }
  .search__results { left: 0; right: 0; width: auto; }
  .hero, .two-col, .venue-hero, .rank-grid, .stub-detail__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 260px; order: -1; }
  .features { grid-template-columns: 1fr; }
  .profile-top { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 28px; }
  .fav-teams, .statline { justify-content: center; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .form-grid, .form-grid--3, .ref-list, .social-auth { grid-template-columns: 1fr; }
  .form-grid--match { grid-template-columns: 1fr 70px; }
  .stub { grid-template-columns: 1fr 78px; }
  .stub::before, .stub::after { right: 70px; }
  .stub__day { font-size: 28px; }
  .binder { padding: 10px; }
  .binder__page { gap: 8px; }
  .sleeve { padding: 3px; }
  .fc--lg { --w: min(280px, 80vw); }
  .card-form, .modal { padding: 18px; }
  .statline { gap: 18px; }
  .statline b { font-size: 26px; }
  .map { height: 320px; }
}

/* Waitlist + social links */
.waitlist { margin: 22px 0 6px; max-width: 520px; }
.waitlist h2 { margin-bottom: 10px; }
.waitlist__row { display: flex; gap: 10px; }
.waitlist__row input[type="email"] { flex: 1; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; font: inherit; }
.waitlist__hp { position: absolute; left: -9999px; }
.waitlist__status { margin: 10px 0 4px; font-weight: 600; }
.waitlist__status:empty { display: none; }
.waitlist__status.error { color: #ff8a8a; }
.waitlist__status.success { color: #6fe09b; font-size: 18px; }
.waitlist .small { margin-top: 10px; }
.social-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.social-links a { color: var(--muted); text-decoration: none; }
.social-links a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 560px) {
  .waitlist__row { flex-direction: column; }
}
