:root {
      color-scheme: dark;
      --bg: #09090b;
      --panel: #111114;
      --panel-soft: #17171b;
      --ink: #f4f4f5;
      --muted: #96969e;
      --line: rgba(255,255,255,.13);
      --glass: rgba(17,17,20,.68);
      --page: 1120px;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    *, *::before, *::after { box-sizing: border-box; }
    [hidden] { display: none !important; }
    html { scroll-behavior: smooth; scroll-padding-top: 74px; background: var(--bg); }
    body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
    body, button, input, select { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
    button, input, select { font-size: inherit; }
    button, a { -webkit-tap-highlight-color: transparent; }
    button { touch-action: manipulation; }
    a { color: inherit; }
    img { display: block; max-width: 100%; }
    .page-wrap { width: min(var(--page), calc(100% - 40px)); margin-inline: auto; }
    .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: white; color: black; text-decoration: none; }
    .skip-link:focus { top: 12px; }

    /* Small translucent navigation floats over the page instead of taking a header band. */
    .site-header { position: fixed; z-index: 30; top: max(10px, env(safe-area-inset-top)); left: 0; right: 0; pointer-events: none; }
    .page-nav { width: max-content; max-width: calc(100% - 24px); min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto; padding: 4px 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(12,12,14,.58); backdrop-filter: blur(18px) saturate(1.18); -webkit-backdrop-filter: blur(18px) saturate(1.18); pointer-events: auto; }
    .page-nav { overflow-x: auto; scrollbar-width: none; }
    .page-nav::-webkit-scrollbar { display: none; }
    .page-nav a { color: #cacad0; font-size: 12px; font-weight: 600; text-decoration: none; transition: color .16s ease; }
    .page-nav a:hover, .page-nav a:focus-visible { color: white; }
    .join-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px 999px 999px 5px; background: rgba(255,255,255,.94); font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: background .16s ease, transform .16s ease; }
    .page-nav a.join-button, .page-nav a.join-button:hover, .page-nav a.join-button:focus-visible { color: #000; }
    .join-button:hover { background: white; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.24); }
    .join-button:active { transform: translateY(0) scale(.98); }
    .join-button svg { width: 13px; height: 13px; }
    :focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

    .hero { padding: clamp(90px, 13vh, 132px) 0 28px; }
    h1 { margin: 0; font-size: clamp(46px, 7.5vw, 82px); line-height: .98; letter-spacing: -.075em; font-weight: 780; }
    .hero-copy { margin: 10px 0 0; color: var(--muted); font-size: clamp(13px, 1.5vw, 15px); line-height: 1.5; }
    .map-section { padding: 0; }
    .map-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 11px; }
    .map-title { color: #a1a1aa; font-size: 10px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
    .tier-control { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(18,18,21,.8); color: #aaaab2; font-size: 11px; }
    .tier-filter { max-width: 112px; border: 0; outline: 0; background: transparent; color: #f1f1f3; font-size: 11px; font-weight: 650; }
    .tier-filter option { background: #17171b; color: white; }
    .map-frame { position: relative; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .map-stage { position: relative; width: min(100%, 860px); aspect-ratio: 1 / 1; margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; background: #050506; isolation: isolate; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
    .map-stage.is-panning { cursor: grabbing; }
    .map-poster, .map-tile-layer { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transform-origin: top left; }
    .map-tile-layer { pointer-events: none; }
    .map-tile { position: absolute; }
    .map-stage.has-map-data .map-poster { visibility: hidden; }
    .map-poster { object-fit: fill; pointer-events: none; }
    .stage-top-right, .stage-bottom-right { position: absolute; z-index: 3; display: flex; align-items: center; gap: 6px; }
    .stage-top-right { top: 11px; right: 11px; }
    .stage-bottom-right { right: 11px; bottom: 11px; }
    .stage-icon-button { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.17); border-radius: 11px; background: rgba(13,13,16,.69); color: #f4f4f5; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .12s ease; }
    .stage-icon-button:hover { border-color: rgba(255,255,255,.35); background: rgba(35,35,39,.84); }
    .stage-icon-button:active { transform: scale(.94); background: rgba(48,48,53,.92); }
    .stage-icon-button svg { width: 15px; height: 15px; }
    .pause-button { font-size: 0; }
    .pause-button::before { content: "Ⅱ"; color: #eeeef0; font-size: 12px; font-weight: 750; letter-spacing: -2px; }
    .pause-button[data-paused="true"]::before { content: "▶"; font-size: 10px; letter-spacing: 0; }
    .zoom-value { min-width: 48px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; background: rgba(13,13,16,.72); color: #e6e6e9; backdrop-filter: blur(14px); font-size: 10px; font-variant-numeric: tabular-nums; }
    .map-focus { position: absolute; z-index: 2; width: 24px; height: 24px; margin: -12px 0 0 -12px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,.7); pointer-events: none; transition: left .2s ease, top .2s ease; }
    .hover-card { position: absolute; z-index: 4; width: max-content; max-width: min(280px, calc(100% - 24px)); display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 9px; padding: 8px 10px 8px 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(18,18,21,.93); color: var(--ink); box-shadow: 0 10px 28px rgba(0,0,0,.38); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); pointer-events: none; }
    .hover-swatch { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; }
    .hover-card strong { display: block; font-size: 12px; line-height: 1.2; }
    .hover-card small { display: block; margin-top: 3px; color: #c4c4cc; font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
    .map-loading { position: absolute; z-index: 2; top: 50%; left: 50%; padding: 9px 13px; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(14,14,17,.72); color: #c9c9ce; font-size: 11px; pointer-events: none; backdrop-filter: blur(12px); }
    .map-tools { width: min(100%, 860px); display: grid; grid-template-columns: minmax(140px,1fr) auto auto auto auto; align-items: center; gap: 7px; margin: 10px auto 0; }
    .hex-search { position: relative; min-width: 0; }
    .hex-search input { width: 100%; min-height: 39px; padding: 0 12px 0 35px; border: 1px solid var(--line); border-radius: 10px; background: #111114; color: white; font-size: 12px; font-weight: 600; letter-spacing: .025em; outline: none; }
    .hex-search input::placeholder { color: #a1a1aa; font-weight: 450; letter-spacing: 0; }
    .hex-search svg { position: absolute; top: 12px; left: 12px; width: 15px; height: 15px; color: #93939c; pointer-events: none; }
    .tool-button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #111114; color: #eeeef0; font-size: 10px; font-weight: 680; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .12s ease, box-shadow .16s ease; white-space: nowrap; }
    .tool-button:hover { border-color: rgba(255,255,255,.32); background: #1b1b20; }
    .tool-button:active { transform: scale(.97); }
    .tool-button.is-success { border-color: rgba(130,210,170,.55); background: rgba(41,96,68,.85); color: #effff5; }
    .tool-button.primary { border-color: rgba(255,255,255,.23); background: #eeeef0; color: #111; }
    .tool-button.primary:hover { background: #fff; }
    .tool-button.primary:active { background: #dedeE2; }
    .tool-button svg { width: 14px; height: 14px; }
    .color-tool { width: 39px; height: 39px; display: inline-grid; place-items: center; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #111114; cursor: pointer; transition: border-color .16s ease, transform .12s ease; }
    .color-tool:hover { border-color: rgba(255,255,255,.32); }
    .color-tool:active { transform: scale(.96); }
    .color-tool input { width: 51px; height: 51px; padding: 0; border: 0; background: transparent; cursor: pointer; }
    .map-help { width: min(100%, 860px); display: flex; justify-content: space-between; gap: 12px; margin: 8px auto 0; color: #a1a1aa; font-size: 10px; line-height: 1.4; }
    .map-help span:last-child { text-align: right; }
    .map-message { width: min(100%, 860px); margin: 10px auto 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; color: #b8b8bf; font-size: 11px; line-height: 1.45; }
    .map-message.error { border-color: rgba(218,108,108,.3); background: rgba(67,24,24,.32); color: #f1b7b7; }

    .map-ctas { width: min(100%, 860px); display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); margin: 24px auto 0; }
    .map-cta { position: relative; z-index: 0; min-width: 0; min-height: 148px; display: flex; align-items: center; padding: clamp(18px, 4vw, 36px); overflow: hidden; border: 1px solid var(--cta-border); border-radius: 16px; background: var(--cta-background); color: inherit; text-decoration: none; isolation: isolate; box-shadow: 0 14px 38px rgba(0,0,0,.16); transition: transform .16s ease, filter .16s ease, border-color .16s ease; }
    .map-cta::after { position: absolute; z-index: 1; right: -48px; bottom: -72px; width: 150px; height: 150px; border: 1px solid currentColor; border-radius: 50%; content: ""; opacity: .08; pointer-events: none; }
    .map-cta-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; pointer-events: none; }
    .map-cta strong { font-size: clamp(20px, 3vw, 30px); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
    .map-cta-content > span { font-size: 11px; line-height: 1.4; opacity: .7; }
    .map-cta-discord { --cta-background: #fff; --cta-border: #09090b; color: #09090b; }
    .map-cta-bot { --cta-background: #09090b; --cta-border: #fff; color: #fff; }
    .map-cta:hover, .map-cta:focus-visible { z-index: 1; transform: translateY(-3px); filter: brightness(1.04); }
    .map-cta:active { transform: translateY(-1px) scale(.992); }
    .map-cta:focus-visible { outline-offset: 3px; }


    /* Search and public inventories */
    .feature-grid { width: min(100%, 860px); display: grid; grid-template-columns: minmax(0,1fr); align-items: stretch; gap: 14px; margin: clamp(54px, 8vw, 88px) auto clamp(42px, 7vw, 68px); }
    .feature-card { min-width: 0; height: 100%; padding: clamp(15px, 2.2vw, 22px); border: 1px solid rgba(255,255,255,.11); border-radius: 17px; background: linear-gradient(145deg, rgba(20,20,24,.97), rgba(13,13,16,.96)); box-shadow: 0 18px 55px rgba(0,0,0,.18); }
    .feature-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
    .feature-kicker { display: block; margin-bottom: 7px; color: #a5a5af; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
    .feature-heading h2 { margin: 0; font-size: clamp(21px, 2.8vw, 27px); line-height: 1.05; letter-spacing: -.055em; }
    .feature-heading p { max-width: 42em; margin: 7px 0 0; color: #a5a5ae; font-size: 11px; line-height: 1.5; }
    .search-card { display: flex; flex-direction: column; }
    .search-heading { min-height: 0; }
    .archive-search-form, .profile-search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
    .archive-search-form { width: 100%; }
    .archive-search-form input, .profile-search-form input { width: 100%; min-width: 0; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #0d0d10; color: #f3f3f5; font-size: 11px; }
    .archive-search-form input::placeholder, .profile-search-form input::placeholder { color: #777780; }
    .archive-search-form input:focus, .profile-search-form input:focus { border-color: rgba(255,255,255,.34); }
    .archive-search-form .tool-button, .profile-search-form .tool-button { min-height: 40px; }
    .search-status { min-height: 28px; display: flex; align-items: center; color: #9d9da6; font-size: 9px; line-height: 1.45; }
    .search-status.error { color: #f0abab; }
    .search-results { flex: 0 1 auto; min-height: 120px; max-height: 240px; display: grid; align-content: start; gap: 6px; overflow-y: auto; margin-top: 2px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #414149 transparent; }
    .search-empty { padding: 14px 10px; border: 1px dashed rgba(255,255,255,.12); border-radius: 10px; color: #797982; font-size: 9px; line-height: 1.45; text-align: center; }
    .search-result { min-width: 0; display: grid; grid-template-columns: 35px minmax(0,1fr); align-items: center; gap: 9px; padding: 7px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.025); }
    .search-result-swatch { width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.19); border-radius: 8px; background: var(--result-color); }
    .search-result-copy { min-width: 0; display: grid; gap: 3px; }
    .search-result-copy strong { overflow: hidden; color: #ededf0; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
    .search-result-copy span { overflow: hidden; color: #92929b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
    .search-result-tier { justify-self: end; color: #bdbdc4; font-size: 7px; font-weight: 700; }
    .search-result-tier.is-prime { color: #ffe58b; }
    .search-load-note { margin: 3px 0 0; color: #8d8d96; font-size: 8px; line-height: 1.45; }

    .user-page { min-height: calc(100vh - 102px); padding: clamp(100px, 13vh, 132px) 0 42px; }
    .user-page-active .hero, .user-page-active #map, .user-page-active .feature-grid, .user-page-active #gallery { display: none !important; }
    .user-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 20px; }
    .user-page-title-group { min-width: 0; }
    .user-page-title-group .feature-kicker { margin-bottom: 8px; }
    .user-page-title-group h1 { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(34px, 6vw, 58px); line-height: .98; letter-spacing: -.065em; }
    .user-page-subtitle { margin: 9px 0 0; color: #a5a5ae; font-size: 11px; }
    .profile-search-form { width: min(360px, 44%); flex: 0 0 auto; }
    .user-page-status { min-height: 42px; margin: 8px 0 14px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.025); color: #b7b7bf; font-size: 11px; line-height: 1.5; }
    .user-page-content { display: grid; gap: 22px; }
    .user-overview { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; }
    .user-best-card, .user-stat { min-width: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: linear-gradient(145deg, rgba(20,20,24,.97), rgba(13,13,16,.96)); }
    .user-best-card { display: grid; grid-template-columns: 86px minmax(0,1fr); align-items: center; gap: 8px 14px; padding: 14px; }
    .user-best-label { grid-column: 1 / -1; color: #85858f; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
    .user-best-swatch { width: 86px; height: 86px; border: 1px solid rgba(255,255,255,.23); border-radius: 12px; background: var(--best-color, #111114); box-shadow: 0 12px 26px rgba(0,0,0,.24); }
    .user-best-copy { min-width: 0; display: grid; gap: 6px; }
    .user-best-copy strong { color: #f4f4f5; font-size: clamp(20px, 3vw, 30px); letter-spacing: -.04em; }
    .user-best-copy span { color: #b3b3bb; font-size: 10px; line-height: 1.45; }
    .user-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
    .user-stat { display: grid; align-content: center; gap: 8px; padding: 12px; }
    .user-stat span { color: #898992; font-size: 9px; }
    .user-stat strong { overflow-wrap: anywhere; color: #f0f0f2; font-size: clamp(16px, 2vw, 23px); font-variant-numeric: tabular-nums; }
    .user-inventory-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
    .user-inventory-heading .feature-kicker { margin-bottom: 5px; }
    .user-inventory-heading h2 { margin: 0; font-size: clamp(21px, 3vw, 27px); letter-spacing: -.05em; }
    .user-inventory-heading > span { color: #95959e; font-size: 9px; }
    .user-inventory-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr)); gap: 8px; max-height: min(72vh, 720px); overflow-y: auto; padding: 2px; scrollbar-width: thin; scrollbar-color: #414149 transparent; }
    .inventory-item { min-width: 0; display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: rgba(255,255,255,.025); }
    .inventory-item.is-best { border-color: rgba(255,215,0,.3); background: linear-gradient(135deg, rgba(255,215,0,.055), rgba(255,255,255,.02)); }
    .inventory-swatch { width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.2); border-radius: 9px; background: var(--inventory-color); }
    .inventory-copy { min-width: 0; display: grid; gap: 3px; }
    .inventory-copy strong { overflow: hidden; color: #ededf0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .inventory-copy span, .inventory-copy small { overflow: hidden; color: #9898a1; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
    .inventory-xp { color: #d8d8de; font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .profile-home-link { display: none; }
    .user-page-active .page-nav .nav-section-link { display: none; }
    .user-page-active .page-nav .profile-home-link { display: inline-flex; align-items: center; color: #e5e5e8; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }

    @media (max-width: 850px) {
      .search-results { max-height: 220px; }
    }
    @media (max-width: 700px) {
      .feature-grid { gap: 10px; margin-top: 44px; margin-bottom: 44px; }
      .map-ctas { grid-template-columns: minmax(0,1fr); gap: 8px; margin-top: 18px; }
      .map-cta { min-height: 104px; padding: 18px 20px; border-radius: 14px; }
      .map-cta-content { gap: 7px; }
      .map-cta strong { font-size: clamp(17px, 5vw, 23px); }
      .map-cta-content > span { font-size: 9px; }
      .feature-card { padding: 14px; border-radius: 14px; }
      .feature-heading { margin-bottom: 11px; }
      .feature-heading h2 { font-size: 23px; }
      .feature-heading p { font-size: 10px; }
      .archive-search-form .tool-button, .profile-search-form .tool-button { padding-inline: 10px; }
      .search-results { min-height: 100px; max-height: 200px; }
      .user-page { padding: 84px 0 34px; }
      .user-page-heading { align-items: stretch; flex-direction: column; gap: 15px; }
      .profile-search-form { width: 100%; }
      .user-overview { grid-template-columns: minmax(0,1fr); }
      .user-stat-grid { gap: 6px; }
      .user-stat { padding: 10px 8px; }
      .user-inventory-list { grid-template-columns: minmax(0,1fr); }
      .gallery-section { padding-top: 52px; }
      .gallery-heading h2 { font-size: 24px; }
      .gallery-track { grid-auto-columns: 91%; gap: 9px; }
      .gallery-visual { height: clamp(225px, 67vw, 330px); padding: 12px; }
      .gallery-caption { padding: 10px 12px 11px; }
      .site-footer { margin-top: 48px; }
      .footer-inner { align-items: flex-start; flex-direction: column; gap: 9px; }
    }
    @media (max-width: 380px) {
      .page-nav { gap: 7px; }
      .map-tools { grid-template-columns: minmax(0,1fr) auto 38px 38px 38px; }
      .map-help span:first-child { max-width: 45%; }
      .feature-card { padding: 12px; }
      .feature-heading { gap: 7px; }
      .inventory-item { grid-template-columns: 44px minmax(0,1fr) auto; gap: 7px; }
      .inventory-swatch { width: 44px; height: 44px; }
      .inventory-xp { font-size: 8px; }
    }
    .gallery-section { padding: clamp(54px, 9vw, 92px) 0 0; }
    .gallery-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
    .gallery-heading h2 { margin: 0; font-size: clamp(23px, 3.5vw, 32px); letter-spacing: -.055em; }
    .gallery-controls { display: flex; align-items: center; gap: 7px; }
    .gallery-arrow { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #111114; color: white; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .12s ease; }
    .gallery-arrow:hover { background: #202025; }
    .gallery-arrow:active { transform: scale(.94); }
    .gallery-arrow svg { width: 15px; height: 15px; }
    .gallery-count { min-width: 44px; color: #a1a1aa; font-size: 10px; font-variant-numeric: tabular-nums; text-align: center; }
    .gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 700px); gap: 12px; overflow-x: auto; padding: 2px 1px 10px; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-inline: contain; }
    .gallery-track::-webkit-scrollbar { display: none; }
    .gallery-card { min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 15px; background: #111114; scroll-snap-align: start; }
    .gallery-visual { height: clamp(245px, 40vw, 390px); display: grid; place-items: center; overflow: hidden; padding: 16px; background: #0e0e11; }
    .gallery-visual img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 7px; box-shadow: 0 10px 30px rgba(0,0,0,.3); cursor: zoom-in; }
    .gallery-caption { padding: 11px 14px 13px; }
    .gallery-caption strong { color: #e8e8eb; font-size: 11px; font-weight: 650; }
    .gallery-dots { display: flex; justify-content: center; align-items: center; gap: 0; margin-top: 5px; }
    .gallery-dot { position: relative; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 99px; background: transparent; cursor: pointer; }
    .gallery-dot::after { position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; border-radius: 99px; background: #4c4c53; content: ""; transform: translate(-50%, -50%); transition: width .16s ease, background .16s ease; }
    .gallery-dot.active::after { width: 17px; background: #dddde1; }
    .gallery-lightbox { position: fixed; inset: 0; z-index: 100; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); place-items: center; border: 0; background: rgba(0,0,0,.96); color: white; }
    .gallery-lightbox[open] { display: grid; }
    .gallery-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-out; }
    .gallery-lightbox-close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(25,25,28,.8); color: white; font-size: 24px; line-height: 1; cursor: pointer; }
    .gallery-lightbox-close:hover { background: #303035; }
    .guide-section { width: min(100%, 860px); margin: clamp(52px, 8vw, 82px) auto 0; }
    .guide-heading { margin-bottom: 16px; }
    .guide-heading h2 { margin: 0; font-size: clamp(25px, 4vw, 36px); letter-spacing: -.055em; }
    .guide-heading p { max-width: 52em; margin: 8px 0 0; color: #a5a5ae; font-size: 12px; line-height: 1.55; }
    .guide-lead { margin: 0 0 18px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.035); color: #d3d3d9; font-size: 12px; line-height: 1.65; }
    .guide-list { display: grid; gap: 8px; }
    .guide-item { overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: linear-gradient(145deg, rgba(20,20,24,.94), rgba(13,13,16,.94)); }
    .guide-item > summary, .guide-question > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; list-style: none; cursor: pointer; }
    .guide-item > summary { min-height: 52px; padding: 13px 16px; color: #f0f0f2; font-size: 12px; font-weight: 720; }
    .guide-item > summary::-webkit-details-marker, .guide-question > summary::-webkit-details-marker { display: none; }
    .guide-item > summary::after, .guide-question > summary::after { flex: 0 0 auto; color: #a8a8b1; font-size: 17px; font-weight: 450; line-height: 1; content: "+"; }
    .guide-item[open] > summary { border-bottom: 1px solid rgba(255,255,255,.09); }
    .guide-item[open] > summary::after, .guide-question[open] > summary::after { content: "-"; }
    .guide-content { padding: 15px 16px 17px; color: #b7b7c0; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
    .guide-content p { margin: 0 0 11px; }
    .guide-content p:last-child { margin-bottom: 0; }
    .guide-content ul { display: grid; gap: 7px; margin: 0 0 11px; padding-left: 19px; }
    .guide-content li { padding-left: 2px; }
    .guide-content h3 { margin: 15px 0 7px; color: #ededf0; font-size: 12px; }
    .guide-content h3:first-child { margin-top: 0; }
    .guide-content code { padding: 1px 4px; border: 1px solid rgba(255,255,255,.09); border-radius: 4px; background: rgba(255,255,255,.045); color: #e8e8ec; font-size: .94em; }
    .guide-table-wrap { overflow-x: auto; margin: 11px 0; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; }
    .guide-table { width: 100%; min-width: 390px; border-collapse: collapse; text-align: left; }
    .guide-table caption { padding: 9px 10px; color: #d7d7dc; font-size: 10px; font-weight: 700; text-align: left; }
    .guide-table th, .guide-table td { padding: 7px 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 10px; }
    .guide-table thead th { color: #e7e7eb; font-weight: 700; }
    .guide-table tbody th { color: #d5d5db; font-weight: 650; }
    .guide-prime-list { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 5px 12px !important; padding: 0 !important; list-style: none; }
    .guide-prime-list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.07); border-radius: 6px; background: rgba(255,255,255,.02); }
    .guide-commands h3:not(:first-child) { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
    .guide-faq { padding-top: 0; padding-bottom: 0; }
    .guide-question { padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .guide-question:last-child { border-bottom: 0; }
    .guide-question > summary { min-height: 46px; color: #ededf0; font-size: 11px; font-weight: 650; }
    .guide-question p { margin: -1px 0 13px; color: #b7b7c0; font-size: 10px; line-height: 1.65; }
    .site-footer { margin-top: clamp(48px, 8vw, 82px); padding: 15px 0 calc(17px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.1); color: #a1a1aa; font-size: 10px; }
    .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .footer-links { display: flex; align-items: center; gap: 15px; }
    .footer-links a { color: #b6b6bd; font-weight: 600; text-decoration: none; }
    .footer-links a:hover { color: white; }
    .map-stage:fullscreen { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; border: 0; border-radius: 0; }
    .map-stage:fullscreen .map-poster, .map-stage:fullscreen .map-tile-layer { width: 100%; height: 100%; }

    @media (max-width: 700px) {
      .page-wrap { width: calc(100% - 28px); }
      .site-header { top: max(8px, env(safe-area-inset-top)); }
      .page-nav { min-height: 40px; gap: 9px; padding: 4px 5px; border-radius: 12px; }
      .page-nav a { font-size: 11px; }
      .join-button { min-height: 32px; padding-inline: 11px; font-size: 10px; }
      .hero { padding: 83px 0 22px; }
      h1 { font-size: clamp(47px, 13vw, 66px); }
      .hero-copy { margin-top: 7px; font-size: 12px; }
      .map-topbar { margin-bottom: 8px; }
      .map-stage { width: 100%; border-radius: 13px; }
      .stage-top-right { top: 8px; right: 8px; }
      .stage-bottom-right { right: 8px; bottom: 8px; }
      .stage-icon-button { width: 32px; height: 32px; border-radius: 9px; }
      .zoom-value { min-width: 42px; height: 29px; font-size: 9px; }
      .map-tools { grid-template-columns: minmax(0,1fr) auto 38px 38px 38px; gap: 6px; margin-top: 8px; }
      .hex-search { grid-column: auto; }
      .hex-search input { min-height: 38px; }
      .tool-button { min-height: 38px; padding: 0 9px; font-size: 9px; }
      .tool-button#random-drop, .tool-button#copy-hex { width: 38px; min-width: 38px; padding: 0; }
      .tool-button#random-drop span, .tool-button#copy-hex span { display: none; }
      .color-tool { width: 38px; height: 38px; }
      .map-help { margin-top: 7px; font-size: 9px; }
      .gallery-section { padding-top: 52px; }
      .guide-section { margin-top: 52px; }
      .guide-item > summary { min-height: 48px; padding: 12px 13px; }
      .guide-content { padding: 13px; }
      .guide-prime-list { grid-template-columns: minmax(0,1fr); }
      .guide-question { padding-inline: 13px; }
      .gallery-heading h2 { font-size: 24px; }
      .gallery-track { grid-auto-columns: 91%; gap: 9px; }
      .gallery-visual { height: clamp(225px, 67vw, 330px); padding: 12px; }
      .gallery-caption { padding: 10px 12px 11px; }
      .site-footer { margin-top: 48px; }
      .footer-inner { align-items: flex-start; flex-direction: column; gap: 9px; }
    }
    @media (max-width: 380px) {
      .page-nav { gap: 7px; }
      .map-tools { grid-template-columns: minmax(0,1fr) auto auto auto; }
      .map-help span:first-child { max-width: 45%; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    }
