:root {
  color-scheme: dark;
  --bg: #14141a;
  --panel: #1d1d25;
  --line: #36353f;
  --ink: #f7f4ed;
  --muted: #b6b2c2;
  --gold: #ffbf78;
  --lilac: #c9b9ff;
  --radius: 18px;
  font: 100%/1.48 "Inter", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); }
button, input, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .58; cursor: default; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
button { border: 0; }
.brand, .nav-item, .player-count, .identity, .profile-chip, a.btn { color: inherit; text-decoration: none; }
.demo-tag { background: transparent; }
.demo-tag:hover { color: var(--ink); border-color: var(--muted); }
.identity:hover strong { text-decoration: underline; }
.skip { position: fixed; top: -80px; left: 10px; z-index: 20; padding: 10px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 10px; }
svg.ico { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.topbar { border-bottom: 1px solid var(--line); background: #19191f; }
.wrap, main { width: min(1192px, calc(100% - 88px)); margin-inline: auto; }
.topin { display: flex; align-items: center; gap: 30px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 11px; padding: 0; white-space: nowrap; background: transparent; }
.brand-emblem { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; color: #201921; background: var(--gold); transform: rotate(-6deg); }
.brand-name { font-family: "Bricolage Grotesque", "Segoe UI", Arial, sans-serif; font-size: 1.17rem; font-weight: 750; letter-spacing: -.055em; }
.desk-nav { display: flex; gap: 4px; }
.nav-item { display: inline-flex; gap: 8px; align-items: center; justify-content: center; border-radius: 9px; color: var(--muted); background: transparent; padding: 9px 13px; font-size: .925rem; font-weight: 600; }
.nav-item[aria-current="page"] { color: #e6deff; background: #353040; }
.nav-item:hover, .profile-chip:hover, .icon-btn:hover { background: #34333d; color: white; }
.top-right { display: flex; align-items: center; margin-left: auto; gap: 13px; }
.demo-tag { color: var(--muted); font-size: .77rem; border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }
.profile-chip { display: inline-flex; gap: .4rem; align-items: center; border-radius: 30px; background: transparent; padding: 4px; font-size: .88rem; font-weight: 600; }
.avatar { --a: #cbadea; --b: #382846; color: var(--a); background: var(--b); display: inline-grid; place-items: center; min-width: 37px; width: 37px; height: 37px; border-radius: 50%; font-size: .82rem; font-weight: 750; letter-spacing: -.035em; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.17rem; }
.avatar.sm { width: 29px; height: 29px; min-width: 29px; font-size: .68rem; }
main { padding-top: 37px; padding-bottom: 52px; }
main:focus { outline: none; }
.page-head { display: flex; gap: 18px; justify-content: space-between; align-items: center; margin-bottom: 24px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { text-wrap: pretty; }
h1 { font-size: clamp(2.15rem, 3.9vw, 3.2rem); letter-spacing: -.065em; line-height: 1.09; }
.intro { margin-top: 7px; color: var(--muted); }
.player-count { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; background: transparent; white-space: nowrap; }
.player-count:hover { color: var(--ink); }
.board { display: grid; grid-template-columns: minmax(0, 1fr) clamp(270px,26.5%,326px); gap: 22px; align-items: start; }
.board > * { min-width: 0; }
.side, .stack { display: grid; gap: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.aside-card { padding: 21px; }
.section-title, .aside-card h2 { font-size: 1.25rem; letter-spacing: -.035em; line-height: 1.25; }
.section-title { font-weight: 700; }
.kicker, .type-label { font-size: .78rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.kicker { color: var(--muted); }
.sub { color: var(--muted); }
.btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; border-radius: 10px; background: #302f39; color: var(--ink); }
.btn { min-height: 42px; padding: 9px 14px; font-size: .95rem; }
.btn.primary { color: #231925; background: var(--gold); }
.btn.primary:hover { background: #ffd5a1; }
.btn.ghost { border: 1px solid #474550; background: transparent; }
.btn.ghost:hover, .filter:hover { background: #302f39; }
.icon-btn { width: 40px; height: 40px; font-size: 1.4rem; }
.full { width: 100%; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(265px,20vw,298px); border-radius: var(--radius); background: #42317b; border: 1px solid #745f9c; }
.hero::before, .hero::after { content: ''; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url('art/grill.webp') right 54% / auto 131% no-repeat; }
.hero::after { background: linear-gradient(90deg, #423071 2%, rgba(68,46,119,.96) 24%, rgba(69,47,122,.77) 42%, rgba(58,38,98,.06) 76%); }
.hero-copy { padding: 26px 30px 25px; max-width: 65%; }
.stamp { display: inline-flex; gap: 7px; align-items: center; color: #ffe4a8; font-size: .8rem; font-weight: 700; }
.hero h2 { color: #fff7e6; line-height: 1.065; letter-spacing: -.055em; font-size: clamp(1.95rem, 3.1vw, 2.8rem); margin: 13px 0 11px; }
.hero-owners { display: flex; align-items: center; gap: 7px; color: #e4d8f6; background: transparent; padding: 0; font-size: .9rem; }
.hero-owners:hover { text-decoration: underline; }
.hero-open { color: #261b35; background: #f5e9d8; margin-top: 19px; min-height: 37px; padding: 7px 13px; font-size: .875rem; }
.hero-open:hover { background: white; }
.feed-head { margin: 25px 0 13px; display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.feed-head h2 { letter-spacing: -.045em; font-size: 1.43rem; }
.filters { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.filter { border-radius: 8px; padding: 6px 10px; background: transparent; color: var(--muted); font-size: .87rem; }
.filter[aria-pressed="true"] { background: #35313e; color: #ece1ff; }
.feed-list { padding: 0 18px; }
.event { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 15px 0; }
.event + .event, .line + .line { border-top: 1px solid var(--line); }
.medallion { display: inline-grid; place-items: center; color: var(--lilac); background: #383046; border-radius: 12px; width: 46px; height: 46px; flex-shrink: 0; }
.medallion.amber { color: #ffd19c; background: #45382f; }
.medallion.green { color: #a7dfca; background: #273e38; }
.event .meta, .tiny { color: var(--muted); font-size: .82rem; }
.text-btn { display: inline; background: transparent; color: inherit; padding: 0; text-align: left; }
.text-btn:hover, .text-link:hover { text-decoration: underline; }
.event-title { display: block; font-size: 1.02rem; font-weight: 650; letter-spacing: -.018em; line-height: 1.3; }
.event .meta { margin-top: 3px; }
.event time { white-space: nowrap; align-self: center; }
.identity { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
.identity strong { display: block; font-size: 1.14rem; letter-spacing: -.03em; }
.identity small { color: var(--muted); font-size: .85rem; }
.points { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0 14px; border-top: 1px solid var(--line); }
.points strong { color: var(--gold); display: inline-flex; align-items: center; gap: 6px; font-size: 1.16rem; }
.aside-card .btn + .btn { margin-top: 8px; }
.quick-links { display: grid; margin: 10px 0 -7px; }
.quick-links button, .line { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 0; background: transparent; text-align: left; }
.quick-links button + button { border-top: 1px solid var(--line); }
.quick-links button:hover, button.line:hover { color: var(--gold); }
.quick-links .ico:first-child { color: var(--lilac); }
.quick-links .ico:last-child { margin-left: auto; color: var(--muted); }
.section-pad { padding: 21px; }
.section-pad > h2 { margin-bottom: 12px; }
.tag { display: inline-flex; border-radius: 7px; padding: 3px 8px; background: #393244; color: #e0d0ff; font-size: .8rem; }
.tiles, .roster { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); }
.roster button { display: flex; align-items: center; text-align: left; gap: 11px; padding: 13px; font-weight: 600; }
.roster button:hover { border-color: #8c789c; }
.empty { padding: 22px; }
.feature-art { height: 150px; border-radius: 12px; display: grid; place-items: center; color: #ffd19c; background: repeating-linear-gradient(-30deg,transparent 0 9px,#ffffff05 10px 11px),radial-gradient(ellipse at 48% 58%,#5f475a,#32283d); }
.feature-art.grill { background: url('art/grill.webp') center 53% / cover; }
.feature-art .ico { width: 70px; height: 70px; }
.fact { padding: 13px 0; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact strong { display: block; margin-bottom: 3px; }
.fact .kicker { display: block; margin-bottom: 5px; }
.names { display: flex; gap: 6px; flex-wrap: wrap; }
.names button, .text-link { padding: 2px 0; background: transparent; color: var(--lilac); }
.names button:not(:last-child)::after { content: ' ·'; color: var(--muted); }
.qr-img { display: block; max-width: 100%; width: 235px; margin: 4px auto 13px; border-radius: 10px; image-rendering: pixelated; }
dialog { padding: 22px; width: min(470px,calc(100% - 24px)); max-height: 88dvh; border: 1px solid #53505e; border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: 0 18px 70px #08080ba8; }
dialog::backdrop { background: #090910b8; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.dialog-head h2 { font-size: 1.42rem; letter-spacing: -.04em; }
.dialog-head button { flex-shrink: 0; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #eee8ff; color: #221e2a; padding: 10px 18px; border-radius: 12px; z-index: 10; box-shadow: 0 6px 28px #0005; max-width: min(90%,560px); pointer-events: none; }
#toast:empty, #mobile-nav { display: none; }
@media(max-width: 1040px){
  .wrap,main { width: calc(100% - 48px); }
  .desk-nav { gap: 0; }
  .topin { gap: 15px; }
  .nav-item { padding: 9px; }
  .hero-copy { max-width: 71%; }
}
@media(max-width: 809px){
  .board { grid-template-columns: 1fr; }
  .desk-nav { display: none; }
  .wrap,main { width: calc(100% - 36px); }
  .topin { min-height: 59px; }
  main { padding: 24px 0 102px; }
  .page-head { margin-bottom: 19px; }
  .hero { min-height: 240px; }
  .side { grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); }
  #mobile-nav { display: flex; justify-content: space-evenly; align-items: stretch; position: fixed; z-index: 4; left: 0; bottom: 0; right: 0; background: #1b1a22; border-top: 1px solid var(--line); padding: 6px 5px max(6px,env(safe-area-inset-bottom)); }
  #mobile-nav .nav-item { flex: 1; flex-direction: column; gap: 3px; min-height: 51px; padding: 4px 2px; font-size: .78rem; }
  #mobile-nav .scan-tab .ico { background: var(--gold); color: #231b25; border-radius: 7px; padding: 2px; box-sizing: content-box; }
  #toast { bottom: 82px; width: max-content; }
}
@media(max-width: 520px){
  .top-right { gap: .35rem; }
  .profile-chip span:not(.avatar) { max-width: 6rem; line-height: 1.15; }
  .profile-chip .avatar { display: none; }
  .hero { min-height: 248px; }
  .hero-copy { padding: 20px; max-width: 83%; }
  .hero h2 { font-size: clamp(1.85rem,7.3vw,2.24rem); max-width: 9.3em; }
  .hero::before { background-size: auto 104%; background-position: calc(100% + 80px) bottom; }
  .hero::after { background: linear-gradient(90deg,#423071 0%,rgba(68,46,119,.93) 28%,rgba(68,46,119,.66) 61%,rgba(68,46,119,.05)); }
  .feed-head { gap: 8px; margin-top: 21px; }
  .feed-list { padding: 0 12px; }
  .filters { gap: 0; }
  .filter { padding: 6px 7px; }
  .event { gap: 9px; padding: 13px 0; }
  .event .medallion { width: 37px; height: 37px; border-radius: 9px; }
  .event time { font-size: .76rem; }
  .page-head .player-count { font-size: .8rem; padding: 0; }
  .intro { font-size: .93rem; }
  .side { gap: 12px; }
  .brand-name { font-size: 1.1rem; }
}
@media(prefers-reduced-motion:no-preference) { button { transition: color .12s,background-color .12s,border-color .12s; } }
