/* Layout concept: a studio front door. Sticky bar, a hero with a live "pulse" panel of studio-wide player counts, then a game wall, about, team, news, join. Editing happens in a drawer over the live page. */
  :root {
    --bg: #0f0d0b;
    --surface: #181512;
    --surface-2: #211d19;
    --line: #2e2822;
    --fg: #f4efe9;
    --muted: #a99f94;
    --accent: #ff6a13;
    --accent-ink: #140b04;
    --good: #4ade80;
    --warn: #fbbf24;
    --bad: #f87171;
    --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
    color-scheme: dark;
  }

  @media (prefers-color-scheme:light) {
    :root:not([data-theme="dark"]) {
      --bg: #fbfaf9;
      --surface: #ffffff;
      --surface-2: #f2efec;
      --line: #e2dcd6;
      --fg: #1c1612;
      --muted: #6c6259;
      --good: #15803d;
      --warn: #b45309;
      --bad: #b91c1c;
      color-scheme: light
    }
  }

  :root[data-theme="light"] {
    --bg: #fbfaf9;
    --surface: #ffffff;
    --surface-2: #f2efec;
    --line: #e2dcd6;
    --fg: #1c1612;
    --muted: #6c6259;
    --good: #15803d;
    --warn: #b45309;
    --bad: #b91c1c;
    color-scheme: light
  }

  * {
    box-sizing: border-box
  }

  html {
    scroll-behavior: smooth
  }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: env(safe-area-inset-top, 0px);
    z-index: 60;
    background: var(--bg)
  }

  a {
    color: inherit
  }

  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    line-height: 1.05;
    margin: 0;
    text-wrap: balance;
    letter-spacing: -.02em
  }

  p {
    margin: 0
  }

  .wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px))
  }

  .mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums
  }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted)
  }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px
  }

  /* header */
  .bar {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line)
  }

  .bar .wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 60px
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 19px;
    text-decoration: none;
    letter-spacing: -.02em
  }

  .mark {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    position: relative;
    flex: none
  }

  .mark::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -3px;
    width: 9px;
    height: 9px;
    border-radius: 9px 0;
    background: var(--fg);
    transform: translateX(-10%) rotate(20deg);
    opacity: .9
  }

  .nav {
    display: flex;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none
  }

  .nav a {
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap
  }

  .nav a:hover {
    color: var(--fg);
    background: var(--surface-2)
  }

  /* hero */
  .hero {
    padding-block: 72px 56px;
    background: radial-gradient(900px 380px at 85% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%)
  }

  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end
  }

  .hero h1 {
    font-size: clamp(42px, 7.2vw, 92px);
    font-weight: 800
  }

  .hero h1 em {
    font-style: normal;
    color: var(--accent)
  }

  .hero .lede {
    margin-top: 20px;
    font-size: 18px;
    color: var(--muted);
    max-width: 52ch
  }

  .cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit
  }

  .btn:hover {
    filter: brightness(1.08)
  }

  .btn.ghost {
    background: transparent;
    color: var(--fg);
    border-color: var(--line)
  }

  .btn.ghost:hover {
    background: var(--surface-2)
  }

  .btn.sm {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px
  }

  .pulse {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px
  }

  .pulse .head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
  }

  .status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted)
  }

  .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--muted)
  }

  .status.live .dot {
    background: var(--good);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 60%, transparent);
    animation: ping 2s infinite
  }

  .status.snapshot .dot {
    background: var(--warn)
  }

  @keyframes ping {
    70% {
      box-shadow: 0 0 0 8px transparent
    }

    100% {
      box-shadow: 0 0 0 0 transparent
    }
  }

  .big {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: clamp(44px, 6vw, 68px);
    line-height: 1;
    margin-top: 14px;
    letter-spacing: -.03em
  }

  .big small {
    display: block;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 8px;
    font-weight: 400
  }

  .trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line)
  }

  .trio div {
    min-width: 0
  }

  .trio b {
    display: block;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 20px
  }

  .trio span {
    font-size: 12px;
    color: var(--muted)
  }

  /* sections */
  section {
    padding-block: 72px
  }

  .sec-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px
  }

  .sec-head h2 {
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 700
  }

  .sec-head p {
    color: var(--muted);
    max-width: 46ch
  }

  .games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 20px
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0
  }

  .thumb {
    aspect-ratio: 16/9;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(var(--h) 80% 46%), hsl(calc(var(--h) + 40) 85% 30%))
  }

  .thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
  }

  .thumb .initial {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 84px;
    color: rgba(255, 255, 255, .9);
    letter-spacing: -.05em
  }

  .chip {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(10, 8, 6, .72);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    backdrop-filter: blur(6px)
  }

  .chip.r {
    left: auto;
    right: 12px
  }

  .cbody {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1
  }

  .cbody h3 {
    font-size: 24px;
    font-weight: 700
  }

  .cbody p {
    color: var(--muted);
    font-size: 15px
  }

  .stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 6px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line)
  }

  .stats dt {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em
  }

  .stats dd {
    margin: 2px 0 0;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500
  }

  .actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px
  }

  .updated {
    font-size: 12px;
    color: var(--muted);
    font-family: var(--font-mono)
  }

  .empty {
    padding: 40px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    text-align: center
  }

  .two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px
  }

  .about p {
    font-size: 18px;
    color: var(--muted);
    max-width: 60ch
  }

  .facts {
    display: grid;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    align-self: start
  }

  .facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line)
  }

  .facts div:last-child {
    border: 0
  }

  .facts span {
    color: var(--muted)
  }

  .team {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 20px
  }

  .person {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    min-width: 0
  }

  .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    background: hsl(var(--h) 70% 42%);
    margin-bottom: 14px
  }

  .person h3 {
    font-size: 19px
  }

  .person .role {
    color: var(--accent);
    font-size: 13px;
    font-family: var(--font-mono);
    margin: 4px 0 8px
  }

  .person p {
    color: var(--muted);
    font-size: 14px
  }

  .news {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line)
  }

  .post {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line)
  }

  .post time {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted)
  }

  .post h3 {
    font-size: 22px;
    margin-bottom: 6px
  }

  .post p {
    color: var(--muted);
    max-width: 68ch
  }

  .join {
    background: var(--surface);
    border-block: 1px solid var(--line)
  }

  .links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px
  }

  .copy {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--muted)
  }

  footer {
    padding-block: 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px
  }

  footer .wrap {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap
  }

  /* admin */
  .fab {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .35)
  }

  .drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(460px, 100%);
    z-index: 80;
    background: var(--surface);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .35)
  }

  .drawer header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line)
  }

  .drawer header b {
    font-family: var(--font-display);
    font-size: 18px
  }

  .tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto
  }

  .tabs button {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 7px 12px;
    border-radius: 8px;
    font: 500 14px var(--font-body);
    cursor: pointer
  }

  .tabs button[aria-selected="true"] {
    background: var(--surface-2);
    color: var(--fg)
  }

  .dbody {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    gap: 14px;
    align-content: start
  }

  .fld {
    display: grid;
    gap: 5px;
    min-width: 0
  }

  .fld>span {
    font-size: 12px;
    color: var(--muted)
  }

  .fld input,
  .fld textarea,
  .fld select {
    width: 100%;
    min-width: 0;
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 10px;
    font: 14px var(--font-body)
  }

  .fld textarea {
    min-height: 76px;
    resize: vertical
  }

  .fld input[type=color] {
    padding: 2px;
    height: 38px
  }

  .row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
  }

  .item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    gap: 10px;
    background: var(--surface-2)
  }

  .item .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px
  }

  .item .top b {
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
  }

  .mini {
    display: flex;
    gap: 4px
  }

  .mini button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--fg);
    border-radius: 6px;
    padding: 4px 8px;
    font: 12px var(--font-body);
    cursor: pointer
  }

  .hint {
    font-size: 12px;
    color: var(--muted)
  }

  .check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px
  }

  .dfoot {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--line)
  }

  .toast {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    background: var(--fg);
    color: var(--bg);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 90%
  }

  @media (max-width:820px) {
    .hero {
      padding-block: 48px 40px
    }

    .hero .wrap,
    .two {
      grid-template-columns: minmax(0, 1fr);
      gap: 32px
    }

    .post {
      grid-template-columns: minmax(0, 1fr);
      gap: 6px
    }

    section {
      padding-block: 52px
    }
  }

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

    .row2 {
      grid-template-columns: 1fr
    }
  }

  @media (prefers-reduced-motion:reduce) {
    html {
      scroll-behavior: auto
    }

    .status.live .dot {
      animation: none
    }
  }
