/* แผนผังเว็บไซต์ 3 มิติ (sitemap.js) — always the dark "game map" look. */
.sm { position: relative; height: max(560px, calc(100svh - 76px)); overflow: hidden; color: #e8f0ff;
  background: radial-gradient(120% 90% at 50% 10%, #1b2b5a 0%, #0b1330 55%, #050816 100%); font-family: Sarabun, sans-serif; }
.sm:fullscreen { height: 100vh; }
.sm-stage, .sm-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.sm-stage canvas { cursor: grab; } .sm-stage canvas.is-drag { cursor: grabbing; } .sm-stage canvas.is-hover { cursor: pointer; }

.sm-lobby { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px 16px; text-align: center;
  background: radial-gradient(60% 60% at 50% 45%, rgba(20,40,100,.55), rgba(5,8,22,.92)); transition: opacity .8s, visibility .8s; z-index: 3; }
.sm-lobby.is-gone { opacity: 0; visibility: hidden; }
.sm-lobby-in { max-width: 640px; }
.sm-kicker { margin: 0; font: 600 13px/1 Prompt, sans-serif; letter-spacing: .5em; color: #7fd8ff; text-shadow: 0 0 12px #2fa8ff; }
.sm-title { margin: 14px 0 8px; font: 800 clamp(34px, 7vw, 64px)/1.1 Prompt, sans-serif; color: #fff;
  background: linear-gradient(180deg, #fff 30%, #8fd3ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(80,170,255,.55)); }
.sm-lead { margin: 0 auto; max-width: 520px; color: #b9c8ea; }
.sm-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0; min-height: 66px; }
.sm-stat { min-width: 92px; padding: 10px 14px; border-radius: 14px; background: rgba(120,170,255,.08); border: 1px solid rgba(140,190,255,.25);
  box-shadow: inset 0 0 18px rgba(80,160,255,.12); animation: sm-pop .5s both; }
.sm-stat b { display: block; font: 700 24px/1.1 Prompt, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.sm-stat span { font-size: 12px; color: #9fb3dd; }
@keyframes sm-pop { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.sm-play { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 16px 38px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 20px/1 Prompt, sans-serif; color: #04122e; background: linear-gradient(180deg, #ffe27a, #ffb52e);
  box-shadow: 0 0 0 3px rgba(255,214,102,.25), 0 10px 40px rgba(255,170,40,.45); transition: transform .15s, filter .2s; }
.sm-play:not(:disabled) { animation: sm-glow 2s ease-in-out infinite; }
.sm-play:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); }
.sm-play:disabled { filter: grayscale(.8) brightness(.7); cursor: progress; }
.sm-play-ico { width: 0; height: 0; border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
@keyframes sm-glow { 50% { box-shadow: 0 0 0 8px rgba(255,214,102,.12), 0 10px 60px rgba(255,170,40,.7); } }
.sm-load { margin: 22px auto 0; max-width: 360px; }
.sm-load-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.sm-load-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #39c6ff, #a774ff); box-shadow: 0 0 12px #39c6ff; transition: width .25s; }
.sm-load p { margin: 10px 0 0; font-size: 14px; color: #b9c8ea; }
.sm-skip { margin: 18px 0 0; font-size: 14px; } .sm-skip a { color: #8fd3ff; }

.sm-hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sm-hud > * { pointer-events: auto; }
.sm-hud-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: flex-start; }
.sm-search { position: relative; flex: 1; max-width: 380px; }
.sm-search input { width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(140,190,255,.35);
  background: rgba(8,16,40,.78); color: #fff; font: inherit; backdrop-filter: blur(8px); }
.sm-search ul { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: 12px;
  background: rgba(8,16,40,.95); border: 1px solid rgba(140,190,255,.25); max-height: 50vh; overflow: auto; }
.sm-search li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.sm-search li:hover, .sm-search li[aria-selected="true"] { background: rgba(120,170,255,.18); }
.sm-tools { margin-left: auto; display: flex; gap: 6px; }
.sm-tools button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(140,190,255,.35); background: rgba(8,16,40,.78);
  color: #fff; font-size: 20px; cursor: pointer; backdrop-filter: blur(8px); }
.sm-tools button[aria-pressed="true"] { background: rgba(57,198,255,.3); }
.sm-legend { position: absolute; left: 12px; bottom: 34px; display: flex; flex-wrap: wrap; gap: 6px 12px; max-width: min(560px, calc(100% - 24px));
  padding: 8px 12px; border-radius: 12px; background: rgba(8,16,40,.7); font-size: 12px; backdrop-filter: blur(6px); }
.sm-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sm-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px currentColor; }
.sm-legend i.ln { width: 18px; height: 2px; border-radius: 2px; }
.sm-hint { position: absolute; left: 12px; right: 12px; bottom: 8px; margin: 0; font-size: 11px; color: rgba(200,215,245,.6); }

.sm-panel { position: absolute; z-index: 2; top: 68px; right: 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 130px); overflow: auto;
  box-sizing: border-box; padding: 16px; border-radius: 16px; background: rgba(8,16,40,.88); border: 1px solid rgba(140,190,255,.3);
  backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: sm-pop .3s both; }
.sm-panel h2 { margin: 6px 0 4px; font: 700 18px/1.35 Prompt, sans-serif; color: #fff; }
.sm-panel .sm-kind { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #04122e; }
.sm-panel .sm-info { margin: 0 0 10px; color: #b9c8ea; font-size: 14px; }
.sm-panel .sm-open { display: inline-block; margin: 4px 0 12px; padding: 9px 16px; border-radius: 10px; background: #39c6ff; color: #04122e; font-weight: 700; text-decoration: none; }
.sm-panel h3 { margin: 12px 0 6px; font-size: 13px; color: #8fb0e8; font-weight: 600; }
.sm-panel ul { margin: 0; padding: 0; list-style: none; }
.sm-panel li button { width: 100%; text-align: left; display: flex; gap: 8px; align-items: center; padding: 7px 8px; border: 0; border-radius: 8px;
  background: none; color: #e8f0ff; font: inherit; font-size: 14px; cursor: pointer; }
.sm-panel li button:hover { background: rgba(120,170,255,.15); }
.sm-panel li small { margin-left: auto; color: #8fa3cc; font-size: 11px; white-space: nowrap; }
.sm-panel .sm-x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: #fff; font-size: 20px; cursor: pointer; }
.sm-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sm-tip { position: absolute; z-index: 2; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); max-width: 260px; padding: 6px 10px;
  border-radius: 8px; background: rgba(4,10,30,.92); border: 1px solid rgba(140,190,255,.35); font-size: 13px; color: #fff; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.sm-nogl { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #b9c8ea; }

.sm-listbox h2 { margin-top: 0; }
.sm-cols { columns: 260px 3; column-gap: 28px; }
.sm-cols section { break-inside: avoid; margin-bottom: 18px; }
.sm-cols h3 { margin: 0 0 6px; font-size: 16px; }
.sm-cols ul { margin: 0; padding-left: 18px; } .sm-cols li { margin: 2px 0; } .sm-cols small { opacity: .65; }
@media (max-width: 640px) {
  .sm-legend { bottom: 44px; font-size: 11px; } .sm-hint { font-size: 10px; }
  .sm-panel { top: auto; bottom: 12px; max-height: 55%; }
}
@media (prefers-reduced-motion: reduce) { .sm-play, .sm-stat, .sm-panel { animation: none !important; } }
