@font-face {
  font-family: 'FC Orbit Rounded';
  src: url('/fonts/FC-Orbit_Rounded.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #0c0c10;
  --bg-2: #111116;
  --panel: #17171e;
  --panel-solid: #19191f;
  --line: rgba(226, 197, 144, 0.16);
  --line-strong: rgba(226, 197, 144, 0.38);
  --text: #f5f1e9;
  --muted: #bcb8b4;
  --dim: #a49b94;
  --red: #c8102e;
  --red-2: #ff3b4e;
  --gold: #dfbc7c;
  --gold-2: #f4d8a7;
  --ok: #43d17a;
  --bad: #ff5d5d;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --display: 'FC Orbit Rounded', 'Noto Sans Thai', 'Leelawadee UI', 'Tahoma', sans-serif;
  --body: 'Noto Sans Thai', 'Sarabun', 'Leelawadee UI', 'Thonburi', 'Tahoma', system-ui, sans-serif;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.75 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.4; margin: 0 0 .5em; letter-spacing: .01em; }
p { margin: 0 0 1em; }
small { color: var(--muted); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { width: min(1280px, 100% - 64px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 6px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .65em 1.4em; border-radius: 10px; border: 1px solid transparent;
  font: 400 1rem/1.2 var(--display); cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  color: #fff; background: #ac3045;
  border-color: #d54d65;
  box-shadow: 0 8px 28px rgba(172, 48, 69, .18);
}
.btn-primary:hover { color: #fff; box-shadow: 0 8px 32px rgba(255, 59, 78, .6), inset 0 1px 0 rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn-ghost { color: var(--gold-2); border-color: var(--line-strong); background: rgba(0, 0, 0, .35); }
.btn-ghost:hover { color: #fff; border-color: var(--gold); background: rgba(242, 195, 91, .12); }
.btn-lg { min-height: 52px; font-size: 1.1rem; padding-inline: 1.6em; }
.btn-sm { min-height: 38px; padding: .4em 1.1em; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(12, 12, 16, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-right: auto; }
.brand img { width: 40px; height: auto; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--display); }
.brand b { font-weight: 400; font-size: 1.05rem; }
.brand small { color: var(--gold); font-size: .72rem; letter-spacing: .2em; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--muted); padding: .45em .8em; border-radius: 999px; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--text); background: rgba(242, 195, 91, .1); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(12, 6, 7, .97); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    visibility: hidden; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .main-nav.open { visibility: visible; transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: .8em .6em; border-radius: 10px; font-size: 1.05rem; }
}

/* Real game imagery leads the landing page; guides share the same palette. */
.lab-hero { position: relative; isolation: isolate; padding: 88px 0 72px; }
.hero-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 82% 30%, #70233840, transparent 65%); pointer-events: none; }
.lab-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 48px; }
.lab-hero-copy { min-width: 0; }
.hero-kicker { margin: 28px 0 12px; color: var(--gold); font-size: .9rem; letter-spacing: .06em; }
.lab-hero h1 { font: 600 clamp(2rem, 3vw, 3rem)/1.15 var(--body); letter-spacing: -.04em; }
.lab-hero h1 em { font-style: normal; color: var(--gold); }
.lab-hero h1 span { display: block; margin: 20px 0 22px; font: 400 clamp(2.2rem, 3.8vw, 3.6rem)/1.3 var(--display); letter-spacing: 0; }
.hero-fine { font-size: .85rem; color: var(--muted); }
.game-preview { border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; box-shadow: 0 32px 80px #0008; transform: perspective(1400px) rotateY(-5deg); }
.game-preview > img { width: 100%; aspect-ratio: 1440/900; object-fit: cover; }
.game-preview figcaption { display: flex; align-items: center; gap: 10px; padding: 15px; background: #19171d; font-size: .75rem; color: var(--gold); }
.game-preview figcaption > span:last-child { margin-left: auto; color: var(--muted); font-size: .65rem; }
.tech-strip { border-block: 1px solid var(--line); background: #121217; }
.tech-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: 28px; }
.tech-grid > div { text-align: center; border-right: 1px solid var(--line); }
.tech-grid > div:last-child { border: 0; }
.tech-grid b { display: block; font: 500 1.7rem/1.4 var(--body); color: var(--gold-2); }
.tech-grid span { font-size: .85rem; color: var(--muted); }
.modern-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.modern-grid article { border-top: 1px solid var(--line-strong); padding-top: 24px; }
.feature-number { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .15em; color: var(--gold); margin-bottom: 12px; }
.modern-grid h3 { font-size: 1.4rem; }
.modern-grid p, .showcase-card p, .school-grid p { color: var(--muted); font-size: .95rem; margin: 0; }
.platform-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 100px; align-items: center; }
.platform-grid h2, .install-grid h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.phone-preview { width: min(100%, 284px); margin-inline: auto; border: 8px solid #2d2930; border-radius: 34px; background: #16141a; box-shadow: 0 24px 70px #0006; overflow: hidden; }
.phone-preview img { width: 100%; }
.phone-preview figcaption { text-align: center; padding: 12px 6px; color: var(--gold); font-size: .75rem; }
.platform-list { list-style: none; padding: 0; margin: 28px 0; }
.platform-list li { border-top: 1px solid var(--line); padding: 18px 0; }
.platform-list b, .platform-list span { display: block; }
.platform-list span { font-size: .92rem; color: var(--muted); margin-top: 4px; }
.wide-shot { max-width: 920px; margin: 0 auto 32px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.wide-shot img { width: 100%; }
.wide-shot figcaption { padding: 12px 20px; color: var(--muted); font-size: .85rem; }
.school-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.school-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 20px 14px; background: var(--panel); }
.school-index { display: block; color: var(--gold); font-size: .75rem; letter-spacing: .12em; margin-bottom: 16px; }
.school-grid h3 { font-size: 1.4rem; color: var(--gold-2); }
.school-grid p { font-size: .82rem; }
.school-grid small { display: block; margin-top: 12px; font-size: .72rem; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.showcase-card { border: 1px solid var(--line); background: var(--panel); border-radius: 16px; overflow: hidden; }
.showcase-card > img { width: 100%; aspect-ratio: 1440/900; object-fit: cover; }
.showcase-card > div { padding: 26px 28px 30px; }
.showcase-card h3 { font-size: 1.55rem; }
.showcase-card:last-child { grid-column: 1/-1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.install-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
.install-steps article { padding: 22px 0; border-top: 1px solid var(--line); }
.install-steps b { color: var(--gold-2); }
.install-steps p { margin: 8px 0 0; color: var(--muted); }
.hero-lead { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #eadcd6; max-width: 38em; }
.hero-lead b { color: var(--gold-2); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 1.2em; }
.hero-actions.center { justify-content: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .55em; color: var(--gold); font-size: .9rem; letter-spacing: .06em; margin: 0 0 .4em; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 0 transparent; flex: none; }
.live-dot.ok { background: var(--ok); animation: pulse 2s infinite; }
.live-dot.bad { background: var(--bad); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(67, 209, 122, .6); } 70% { box-shadow: 0 0 0 10px rgba(67, 209, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(67, 209, 122, 0); } }

/* start card (registration itself happens in the game: /play/#register) */
.start-card {
  background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 16px; padding: 26px 24px 22px;
  position: relative;
}
.start-card h2 { font-size: 1.45rem; margin-bottom: .8em; text-align: center; color: var(--gold-2); }
.start-steps { list-style: none; counter-reset: start; margin: 0 0 20px; padding: 0; display: grid; gap: 14px; }
.start-steps li { counter-increment: start; position: relative; padding-left: 50px; min-height: 38px; }
.start-steps li::before {
  content: counter(start); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font: 400 1.15rem var(--display); color: #1a0b0d;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.start-steps b { display: block; color: var(--text); }
.start-steps span { display: block; font-size: .92rem; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-head.left { text-align: left; margin-inline: 0; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.lead { color: var(--muted); font-size: 1.05rem; }


.icon { display: inline-block; flex: none; background-repeat: no-repeat; border-radius: 6px; box-shadow: 0 0 0 1px rgba(242, 195, 91, .35), 0 4px 10px rgba(0, 0, 0, .5); image-rendering: auto; }
.icon-empty { width: 40px; height: 40px; background: rgba(255, 255, 255, .05); }

/* Loading screens are stored in engine row order (bottom-up) with the 1024×768 picture in a 1024² texture:
   flip vertically and skip the "Now Loading" strip at the picture's top. */
.loading-shot img { width: 100%; height: auto; margin-top: -6%; transform: scaleY(-1); }
.loading-shot { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; margin-top: 12px; border: 1px solid var(--line); background: #1a0c0e; }

/* status */
.status-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.status-panel { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.status-main { display: flex; align-items: center; gap: 12px; font: 400 1.5rem var(--display); margin-bottom: 16px; }
.status-main .live-dot { width: 14px; height: 14px; }
.status-panel dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0; }
.status-panel dl div { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.status-panel dt { color: var(--muted); font-size: .85rem; }
.status-panel dd { margin: 0; font: 400 1.6rem/1.3 var(--display); color: var(--gold-2); overflow-wrap: anywhere; }
.status-panel dd[data-status-version] { font-size: 1.05rem; line-height: 1.9; }
.status-time { color: var(--dim); font-size: .85rem; margin: 14px 0 0; }
.text-link { font-family: var(--display); }

/* guide cards */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.guide-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); transition: border-color .2s, transform .2s; }
.guide-card:hover { color: var(--text); border-color: var(--gold); transform: translateY(-2px); }
.guide-card h2, .guide-card h3 { font-size: 1.2rem; color: var(--gold-2); margin-bottom: .3em; }
.guide-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* CTA */
.cta-band { position: relative; text-align: center; padding: clamp(64px, 9vw, 110px) 0; background: radial-gradient(ellipse at center, #57233255, transparent 70%), var(--bg); border-top: 1px solid var(--line); }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); text-shadow: 0 4px 20px rgba(0, 0, 0, .8); }
.cta-band p { color: #e5d5cf; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: #09090c; padding: 48px 0 28px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { width: 72px; }
.footer-brand p { color: var(--muted); }
.footer-brand b { color: var(--text); font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.site-footer nav { display: flex; flex-direction: column; gap: 4px; }
.site-footer nav h2 { font-size: 1rem; color: var(--gold); margin-bottom: .2em; }
.site-footer nav a { color: var(--muted); }
.site-footer nav a:hover { color: var(--text); }
.footer-note { border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 24px; padding-top: 16px; color: var(--dim); font-size: .84rem; }
.footer-note p { margin: 0 0 .3em; }

/* ---------- guide pages ---------- */
.page-hero { position: relative; isolation: isolate; padding: 48px 0 36px; border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--hero-img, none) center 40% / cover no-repeat; opacity: .55; }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 6, 7, .95), rgba(12, 6, 7, .6)), linear-gradient(0deg, var(--bg), transparent 70%); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: .2em; }
.crumbs { display: flex; gap: 8px; font-size: .88rem; color: var(--dim); margin-bottom: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.guide-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.guide-tabs::-webkit-scrollbar { display: none; }
.guide-tabs a { white-space: nowrap; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .35em 1em; font-size: .93rem; }
.guide-tabs a[aria-current] { color: #fff; background: rgba(200, 16, 46, .35); border-color: rgba(255, 59, 78, .6); }

.prose { padding-bottom: 64px; }
.prose section > p, .prose section > ul, .faq details { max-width: 78ch; }
.faq { padding-top: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { font: 400 1.08rem var(--display); color: var(--gold-2); }
.faq details p { margin: .6em 0 0; color: var(--muted); }
.prose section { margin: 36px 0; }
.prose h2 { font-size: 1.7rem; color: var(--gold-2); border-bottom: 1px solid var(--line); padding-bottom: .3em; }
.prose h3 { font-size: 1.2rem; }
.prose li { margin-bottom: .35em; }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 14px 68px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 400 1.2rem var(--display); background: linear-gradient(180deg, #e3223d, #9c0c22); border: 1px solid rgba(255, 210, 120, .5); }
.steps h3 { margin-bottom: .2em; color: var(--gold-2); }
.steps p { margin: 0; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.key-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.key-table th, .key-table td { padding: .55em .4em; border-bottom: 1px solid rgba(255, 255, 255, .06); text-align: left; vertical-align: top; }
.key-table th { width: 46%; font-weight: 400; }
.key-table td { color: var(--muted); }
kbd { display: inline-block; font: 500 .88rem var(--body); padding: .1em .6em; border-radius: 6px; background: #2a1a1d; border: 1px solid rgba(255, 255, 255, .15); border-bottom-width: 3px; color: var(--text); }
.note { color: var(--dim); font-size: .9rem; margin-top: .8em; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-card h3 { color: var(--gold-2); margin-bottom: .2em; }
.stat-card p { color: var(--muted); font-size: .93rem; margin: 0; }
.cta-inline { text-align: center; margin: 32px 0; }

/* filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 20px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); position: sticky; top: calc(var(--header-h) + 6px); z-index: 10; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.filter-bar input[type="search"], .filter-bar input[type="number"], .filter-bar select {
  min-height: 42px; padding: .4em .8em; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(0, 0, 0, .45); color: var(--text); font: 400 .95rem var(--body);
}
.filter-bar select option { background: #1d0f12; }
.filter-bar input[type="search"] { flex: 1 1 260px; }
.filter-bar input[type="number"] { width: 150px; }
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--gold); }
.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px; overflow: hidden; }
.seg label { cursor: pointer; padding: .45em .9em; font-size: .92rem; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: rgba(200, 16, 46, .4); color: #fff; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.filter-count { margin: 0 0 0 auto; color: var(--dim); font-size: .88rem; }

/* maps */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.map-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.map-card:target { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(242, 195, 91, .35); }
.map-card header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.map-card h2 { font-size: 1.35rem; margin: 0; color: var(--gold-2); }
.map-level { margin: 0; color: var(--muted); font-size: .9rem; }
.map-level b { color: var(--text); }
.badges { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.badges li { font-size: .76rem; padding: .1em .6em; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.badges .b-start { color: #000; background: var(--gold); border-color: var(--gold); }
.badges .b-town { color: #bfe8ff; border-color: rgba(120, 190, 255, .4); }
.badges .b-hunt { color: #ffd3d8; border-color: rgba(255, 59, 78, .45); }
.map-meta { color: var(--dim); font-size: .88rem; margin: 0 0 8px; }
details summary { cursor: pointer; color: var(--gold); font-size: .93rem; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: '▸ '; }
details[open] summary::before { content: '▾ '; }
.map-card details h3 { font-size: 1rem; margin: 14px 0 6px; color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .86rem; padding: .15em .65em; border-radius: 8px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .08); }
.chips small { font-size: .76rem; }
[data-filter-item][hidden] { display: none !important; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table th, .data-table td { padding: .6em .8em; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .06); vertical-align: top; }
.data-table thead th { position: sticky; top: 0; background: #241216; color: var(--gold); font-weight: 500; white-space: nowrap; }
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]::after { content: ' ↕'; color: var(--dim); font-size: .8em; }
.data-table th[aria-sort="ascending"]::after { content: ' ↑'; color: var(--gold); }
.data-table th[aria-sort="descending"]::after { content: ' ↓'; color: var(--gold); }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tbody tr:hover { background: rgba(242, 195, 91, .05); }
.data-table tbody tr:target { background: rgba(242, 195, 91, .14); }
.data-table.compact { max-width: 720px; background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.data-note { color: var(--dim); font-size: .86rem; margin: 18px 0 48px; }

/* items */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.item-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; align-items: start; }
.item-card h3 { font: 500 1rem/1.4 var(--body); margin: 0 0 2px; color: var(--text); }
.item-card .meta { font-size: .82rem; color: var(--muted); margin: 0; }
.item-card .meta b { color: var(--gold-2); font-weight: 500; }
.item-card .stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .82rem; color: #e3d2cc; margin: 4px 0 0; }
.item-card details { grid-column: 1 / -1; font-size: .85rem; }
.item-card details p { white-space: pre-line; color: var(--muted); margin: 6px 0 0; }
.item-card .shop { color: #bfe8ff; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--dim); padding: 40px 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .lab-hero-grid { gap: 30px; }
  .school-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform-grid { gap: 48px; }
}
@media (max-width: 900px) {
  .header-play { margin-left: auto; }
  .brand { margin-right: 0; }
  .lab-hero { padding: 48px 0; }
  .lab-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lab-hero-copy { max-width: 680px; }
  .lab-hero h1 span { font-size: clamp(2.3rem, 5vw, 3.2rem); }
  .game-preview { transform: none; }
  .modern-grid { gap: 22px; }
  .install-grid { gap: 32px; }
  .status-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .two-col, .stat-grid { grid-template-columns: 1fr; }
  .platform-grid, .install-grid, .modern-grid { grid-template-columns: minmax(0, 1fr); }
  .platform-grid { gap: 36px; }
  .phone-preview { order: 2; width: 240px; }
  .showcase-grid { gap: 18px; }
  .showcase-card > div { padding: 20px; }
  .showcase-card:last-child { display: block; }
  .status-panel dl { grid-template-columns: 1fr 1fr; }
  .status-panel dl div:last-child { grid-column: 1 / -1; }
  /* monster table → cards */
  .data-table.responsive thead { display: none; }
  .data-table.responsive, .data-table.responsive tbody, .data-table.responsive tr, .data-table.responsive td { display: block; width: 100%; }
  .data-table.responsive tr { padding: 10px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .data-table.responsive td { border: 0; padding: .15em 0; text-align: left !important; white-space: normal; }
  .data-table.responsive td::before { content: attr(data-label) ' '; color: var(--dim); font-size: .8rem; }
  .data-table.responsive td:first-child, .data-table.responsive td:last-child { grid-column: 1 / -1; }
  .data-table.responsive td:first-child::before { content: none; }
  .data-table.responsive td:first-child b { font-size: 1.05rem; color: var(--gold-2); }
  .table-wrap { overflow: visible; }
  .filter-bar { position: static; }
  .filter-bar input[type="number"] { flex: 1 1 130px; }
  .filter-bar select { flex: 1 1 140px; }
  .filter-count { width: 100%; margin: 0; }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 40px); }
  .brand span small { display: none; }
  .brand b { font-size: .95rem; }
  .showcase-grid { grid-template-columns: minmax(0, 1fr); }
  .school-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 0; }
  .tech-grid > div:nth-child(2) { border: 0; }
  .hero-kicker { margin-top: 20px; }
  .lab-hero h1 { font-size: 2.2rem; }
  .lab-hero h1 span { font-size: 2.5rem; }
  .game-preview figcaption > span:last-child { display: none; }
  .header-row { gap: 10px; }
  .brand img { width: 30px; }
  .filter-bar input, .filter-bar select { max-width: 100%; min-width: 0; }
  .filter-bar input[type="search"] { width: 100%; }
  .seg { flex-wrap: wrap; }
  .hero-actions .btn { flex: 1 1 100%; }
  .start-card { padding: 22px 16px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .item-grid, .map-grid { grid-template-columns: 1fr; }
  .steps li { padding-left: 62px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
