:root {
  --ink: #f6f1e7;
  --muted: #b9b2a5;
  --gold: #e2b857;
  --glass: rgba(18, 17, 15, 0.62);
  --glass-strong: rgba(14, 13, 12, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --font: "Outfit", "Noto Sans Myanmar", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d0c0b; color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; cursor: grab; }
#gl.dragging { cursor: grabbing; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.35) 100%); }

.glass { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 14px; }
.btn { border: 1px solid var(--line); background: rgba(255,255,255,0.06); border-radius: 999px; padding: 10px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, border-color .15s; }
.btn:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.22); }
.btn.primary { background: var(--gold); color: #17130a; border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: #efc86a; }
.btn:disabled { opacity: .6; cursor: default; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------ welcome */
#welcome { position: fixed; inset: 0; display: flex; align-items: center; padding: 0 clamp(20px, 7vw, 96px); background: linear-gradient(90deg, rgba(8,8,7,0.88) 0%, rgba(8,8,7,0.55) 45%, rgba(8,8,7,0.05) 100%); z-index: 20; }
.welcome-card { max-width: 520px; }
.eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
#welcome h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1; margin: 14px 0 18px; font-weight: 700; letter-spacing: -0.02em; }
#welcome h1 span { color: var(--gold); }
#welcome p { color: #d8d1c4; font-size: 18px; line-height: 1.5; margin: 0 0 28px; }
#welcome .btn.primary { padding: 15px 26px; font-size: 17px; }
.hint { margin-top: 16px; font-size: 13px; color: var(--muted); }
.brandmark { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; font-weight: 800; color: var(--gold); letter-spacing: -0.04em; background: #0b0b0b; flex: none; }

/* ------------------------------------------------ HUD */
header.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; z-index: 10; pointer-events: none; }
header.hud > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border-radius: 999px; }
.brand b { display: block; font-size: 14px; letter-spacing: .18em; }
.brand small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.brand .brandmark { width: 36px; height: 36px; font-size: 14px; }
.top-actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; padding: 0; justify-content: center; }

#zone { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; z-index: 5; text-shadow: 0 1px 12px rgba(0,0,0,0.55); }
#zone .eyebrow { font-size: 10px; }
#zone h2 { margin: 4px 0 0; font-size: 20px; font-weight: 600; }

#crosshair { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,0.8); box-shadow: 0 0 0 2px rgba(0,0,0,0.25); pointer-events: none; z-index: 4; }

#prompt { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9; padding: 8px 8px 8px 18px; border-radius: 999px; display: flex; align-items: center; gap: 14px; white-space: nowrap; max-width: calc(100vw - 32px); }
#prompt .label { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
#prompt .label b { color: var(--ink); font-weight: 600; }
kbd { font-family: inherit; font-size: 11px; border: 1px solid rgba(0,0,0,0.25); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; margin-left: 4px; }

nav.dock { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; border-radius: 999px; z-index: 9; }
nav.dock button { background: transparent; border: 0; border-radius: 999px; padding: 9px 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #e9e2d4; }
nav.dock button:hover { background: rgba(255,255,255,0.08); }
nav.dock button.on { background: rgba(255,255,255,0.14); color: #fff; }
nav.dock svg { width: 18px; height: 18px; }

#map { position: fixed; right: 16px; bottom: 18px; padding: 10px 10px 8px; z-index: 8; width: 92px; }
#map .map-title { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .2em; color: var(--muted); margin-bottom: 6px; }
#map svg { display: block; width: 66px; height: auto; margin: 0 auto; }
#map svg .shop { cursor: pointer; }
#map svg .shop:hover { opacity: .75; }

#joystick { position: fixed; left: 22px; bottom: 90px; width: 112px; height: 112px; border-radius: 50%; z-index: 9; touch-action: none; display: grid; place-items: center; }
#knob { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.85); box-shadow: 0 4px 16px rgba(0,0,0,0.3); pointer-events: none; }

#toast { position: fixed; left: 50%; top: 74px; max-width: calc(100vw - 32px); text-align: center; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; z-index: 40; font-size: 14px; }
#fps { position: fixed; left: 12px; bottom: 12px; font: 12px ui-monospace, monospace; z-index: 40; padding: 4px 8px; border-radius: 6px; }

/* ------------------------------------------------ shop panel */
#panel { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(400px, calc(100vw - 24px)); z-index: 30; display: flex; flex-direction: column; overflow: hidden; background: var(--glass-strong); border-radius: 18px; animation: slideIn .28s ease; }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
.panel-head { position: relative; padding: 22px 22px 18px; }
.panel-head .stripe { position: absolute; inset: 0 0 auto 0; height: 5px; }
.panel-head .badge { display: inline-block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.panel-head h3 { font-size: 28px; line-height: 1.1; margin: 12px 0 4px; font-weight: 700; }
.panel-head .sub { color: var(--muted); font-size: 14px; }
.panel-close { position: absolute; top: 16px; right: 16px; }
.panel-body { overflow-y: auto; padding: 0 22px 22px; flex: 1; }
.panel-body .tagline { font-size: 18px; margin: 4px 0 10px; font-weight: 500; }
.panel-body p { color: #d6cfc2; line-height: 1.55; margin: 0 0 16px; }
.panel-body ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.panel-body li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: #e7e0d2; }
.panel-body li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, var(--gold)); margin-top: 8px; flex: none; }
.promo { border: 1px dashed rgba(255,255,255,0.3); border-radius: 14px; padding: 14px; margin: 0 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.promo .code { font-size: 22px; font-weight: 800; letter-spacing: .06em; }
.promo small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.links { display: grid; gap: 8px; margin-top: 4px; }
.links a, .links span.disabled { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); font-weight: 500; }
.links a:hover { background: rgba(255,255,255,0.12); }
.links a.primary { background: var(--accent, var(--gold)); color: var(--on-accent, #111); border-color: transparent; font-weight: 600; }
.links span.disabled { color: var(--muted); }
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 18px; }
.product { background: #fff; color: #1d1d1d; border-radius: 12px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f3e4ea; display: block; }
.product div { padding: 8px 10px 10px; }
.product b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product span { font-size: 13px; color: #c2185b; font-weight: 700; }
.product s { color: #999; font-weight: 400; margin-left: 4px; font-size: 11px; }
.section-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }

/* ------------------------------------------------ dialogs */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: min(760px, calc(100vw - 24px)); width: 100%; }
dialog::backdrop { background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); }
.dialog-card { background: var(--glass-strong); border: 1px solid var(--line); border-radius: 20px; padding: 22px; max-height: calc(100vh - 40px); overflow-y: auto; }
.dialog-card h3 { margin: 0 0 4px; font-size: 24px; }
.dialog-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dir-card { text-align: left; cursor: pointer; border: 1px solid var(--line); background: rgba(255,255,255,0.04); border-radius: 14px; padding: 12px; display: flex; gap: 12px; align-items: center; }
.dir-card:hover { background: rgba(255,255,255,0.1); }
.dir-card .swatch { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.dir-card b { display: block; font-size: 15px; font-weight: 600; }
.dir-card small { color: var(--muted); font-size: 12px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.help-grid h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.help-grid p { margin: 0 0 6px; color: #d6cfc2; font-size: 14px; }

#error { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 50; background: #0d0c0b; }

@media (max-height: 560px) { #map { display: none; } }
@media (min-width: 721px) { body.panel-open nav.dock { left: calc((100vw - 424px) / 2); } body.panel-open #map { display: none; } }
@media (max-width: 720px) {
  #map { display: none; }
  nav.dock button span { display: none; }
  nav.dock button { padding: 11px 13px; }
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 78vh; border-radius: 20px 20px 0 0; animation-name: slideUp; }
  @keyframes slideUp { from { transform: translateY(30px); opacity: 0; } }
  .brand small { display: none; }
  #zone { top: 74px; }
  #zone h2 { font-size: 17px; }
  #prompt { bottom: auto; top: 128px; }
  .help-grid { grid-template-columns: 1fr; }
  #welcome { align-items: flex-end; padding-bottom: 40px; background: linear-gradient(0deg, rgba(8,8,7,0.92) 0%, rgba(8,8,7,0.6) 55%, rgba(8,8,7,0.1) 100%); }
}

/* ------------------------------------------------ in-mall game window */
#game { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #000; }
#game[hidden] { display: none; }
.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: #0b0612; border-bottom: 1px solid var(--line); }
.game-bar .btn { padding: 8px 14px; font-size: 14px; text-decoration: none; color: var(--ink); white-space: nowrap; }
#game-title { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#game-frame { flex: 1; width: 100%; border: 0; background: #000; }
@media (max-width: 520px) { #game-title { display: none; } }

/* ================================================ NC Mall multiplayer additions */
#welcome .welcome-card { max-width: 440px; width: 100%; }
.field-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; display: block; }
#join-name { width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: rgba(255,255,255,0.07); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin-bottom: 18px; outline: none; }
#join-name:focus { border-color: var(--gold); background: rgba(255,255,255,0.1); }
.looks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.look { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); cursor: pointer; font-size: 16px; font-weight: 600; }
.look svg { width: 30px; height: 42px; fill: #8d8577; flex: none; }
.look.on { border-color: var(--gold); background: rgba(226,184,87,0.14); }
.look.on svg { fill: var(--gold); }
.host-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid rgba(226,184,87,0.5); background: rgba(226,184,87,0.12); border-radius: 14px; margin-bottom: 8px; }
.host-card b { display: block; } .host-card small { color: var(--muted); }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 4px 0 16px; font-size: 13px; }
.join-error { color: #ffb4a8; background: rgba(255,80,60,0.12); border: 1px solid rgba(255,80,60,0.35); border-radius: 10px; padding: 9px 12px; margin: -6px 0 14px; font-size: 14px; }
#welcome .btn.primary { width: 100%; justify-content: center; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #888; margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: #46d97a; box-shadow: 0 0 8px #46d97a; } .dot.bad { background: #ff6a55; }
.top-actions { align-items: center; }
#btn-people { font-weight: 700; }
.live { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #17130a; background: var(--gold); border-color: transparent; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #d4122a; box-shadow: 0 0 0 0 rgba(212,18,42,.7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(212,18,42,0); } 100% { box-shadow: 0 0 0 0 rgba(212,18,42,0); } }
#people { position: fixed; top: 70px; right: 16px; z-index: 12; width: 230px; max-height: 50vh; overflow: auto; padding: 12px 12px 8px; }
#people ul { list-style: none; margin: 8px 0 0; padding: 0; }
#people li { display: flex; align-items: center; gap: 9px; padding: 6px 4px; font-size: 14px; border-top: 1px solid rgba(255,255,255,0.06); }
#people li .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.12); font-size: 12px; font-weight: 700; flex: none; }
#people li.host .av { background: var(--gold); color: #17130a; }
#people li b { margin-left: auto; font-size: 10px; letter-spacing: .12em; color: var(--gold); }
#people li.me { color: var(--muted); }

#chat { position: fixed; left: 16px; bottom: 18px; z-index: 9; width: min(360px, calc(100vw - 32px)); padding: 10px; border-radius: 16px; background: rgba(18,17,15,0.35); border-color: transparent; transition: background .2s; pointer-events: none; }
#chat.open, #chat.fresh { background: var(--glass); border-color: var(--line); }
#chat-log { list-style: none; margin: 0; padding: 0 4px; max-height: 180px; overflow-y: auto; font-size: 14px; line-height: 1.4; scrollbar-width: thin; }
#chat-log li { padding: 2px 0; text-shadow: 0 1px 4px rgba(0,0,0,0.6); word-wrap: break-word; }
#chat-log li b { color: #9fd6ff; font-weight: 600; margin-right: 4px; }
#chat-log li.host b { color: var(--gold); }
#chat-log li.sys { color: var(--muted); font-size: 12px; font-style: italic; }
#chat-log li.sys.host { color: var(--gold); font-style: normal; font-weight: 600; }
#chat:not(.open):not(.fresh) #chat-log li:not(:nth-last-child(-n+3)) { display: none; }
#chat-form { display: none; gap: 6px; margin-top: 8px; pointer-events: auto; }
#chat.open #chat-form { display: flex; }
#chat.open, #chat.open #chat-log { pointer-events: auto; }
#chat-input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--ink); background: rgba(255,255,255,0.08); border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; outline: none; }
#chat-input:focus { border-color: var(--gold); }
#chat-form .btn { padding: 8px 14px; }
.chat-hint { font-size: 11px; color: var(--muted); margin: 6px 4px 0; }
#chat.open .chat-hint { display: none; }
body.panel-open #chat { opacity: .35; }

#touch-actions { position: fixed; right: 16px; bottom: 150px; z-index: 9; display: grid; grid-template-columns: auto auto; gap: 10px; align-items: end; }
.round { width: 58px; height: 58px; border-radius: 50%; font-weight: 700; font-size: 13px; color: #fff; display: grid; place-items: center; cursor: pointer; touch-action: none; }
.round.big { width: 76px; height: 76px; font-size: 15px; grid-column: 2; grid-row: 1 / span 2; }
.round.on { background: var(--gold); color: #17130a; }

@media (pointer: coarse) {
  .chat-hint { display: none; }
  #chat { bottom: auto; top: 70px; width: min(300px, calc(100vw - 32px)); }
  #chat-log { max-height: 120px; }
  #zone { display: none; }
}
@media (max-width: 640px) {
  nav.dock button span { display: none; }
  #live { font-size: 0; padding: 9px; } #live .pulse { margin: 0; }
  #people { top: 64px; }
  #welcome { align-items: flex-end; padding-bottom: 24px; }
}

/* v9: join screen scrolls on short screens, host login, mouse steering */
#welcome { overflow-y: auto; align-items: flex-start; }
#welcome .welcome-card { margin: auto 0; padding: 28px 0; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #d8d1c4; margin: -6px 0 6px; cursor: pointer; }
#join-pass { width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: rgba(255,255,255,0.07); border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin-bottom: 18px; outline: none; }
#join-pass:focus { border-color: var(--gold); }
.admin-link { display: block; margin-top: 10px; padding-bottom: 0; }
#mouse-hint { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; font-size: 13px; color: #e9e2d4; z-index: 8; pointer-events: none; white-space: nowrap; }
body.mouse-locked #gl { cursor: none; }
body.mouse-locked::after { content: ''; position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,0.85); box-shadow: 0 0 0 2px rgba(0,0,0,0.3); pointer-events: none; z-index: 4; }

/* v10: emoji / apple / hug bar */
#fun { position: fixed; right: 16px; bottom: 150px; z-index: 9; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 18px; }
#fun button { width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; font-size: 22px; cursor: pointer; position: relative; line-height: 1; }
#fun button:hover { background: rgba(255,255,255,0.12); transform: scale(1.08); }
#fun button small { position: absolute; right: 3px; bottom: 2px; font-size: 9px; color: var(--muted); font-weight: 700; }
#fun .sep { height: 1px; background: var(--line); margin: 2px 4px; }
body.panel-open #fun { display: none; }
@media (max-height: 640px) { #fun { flex-direction: row; bottom: 76px; right: 50%; transform: translateX(50%); } #fun .sep { width: 1px; height: auto; margin: 4px 2px; } }
@media (pointer: coarse) { #fun { right: 12px; bottom: auto; top: 118px; } #fun button { width: 38px; height: 38px; font-size: 20px; } }

/* v11: wardrobe on the join screen */
.wardrobe { margin: -6px 0 18px; }
.wardrobe .field-label { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--ink); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip:hover { background: rgba(255,255,255,0.12); }
.chip.on { border-color: var(--gold); background: rgba(226,184,87,0.18); color: #fff; }
.swatches { display: flex; gap: 8px; margin-top: 8px; }
.swatches[hidden] { display: none !important; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); cursor: pointer; }
.sw.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226,184,87,0.35); }
@media (min-width: 721px) { #welcome { background: linear-gradient(90deg, rgba(8,8,7,0.9) 0%, rgba(8,8,7,0.7) 38%, rgba(8,8,7,0) 60%); } }
@media (max-width: 720px) { #welcome { background: linear-gradient(0deg, rgba(8,8,7,0.95) 0%, rgba(8,8,7,0.85) 60%, rgba(8,8,7,0) 85%); } }

nav.dock a { background: transparent; border: 0; border-radius: 999px; padding: 9px 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #e9e2d4; text-decoration: none; }
nav.dock a:hover { background: rgba(255,255,255,0.08); }
nav.dock a svg { width: 18px; height: 18px; }
@media (max-width: 640px) { nav.dock a span { display: none; } }

/* ---- v12: controls guide (keyboard on the left, joystick hint on phones) */
#keys-guide { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 8; width: 212px; padding: 12px 14px 12px; border-radius: 18px; color: #efe8da; font-size: 12.5px; }
#keys-guide .kg-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: .22em; color: var(--gold, #e2b857); font-weight: 700; margin-bottom: 10px; }
#keys-guide .kg-head button { background: rgba(255,255,255,.1); border: 0; color: #fff; width: 22px; height: 22px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1; }
.kg-pads { display: flex; align-items: center; gap: 8px; }
.kg-pad { display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(2, 26px); gap: 4px; }
.kg-or { font-size: 11px; color: var(--muted, #aaa); }
#keys-guide kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; font: 700 12px/1 inherit; font-family: inherit; color: #fff;
  background: linear-gradient(#3b3a37, #262522); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 3px 0 #111, inset 0 1px 0 rgba(255,255,255,.15); transition: transform .06s, background .1s, box-shadow .06s; box-sizing: border-box; }
#keys-guide kbd.w { min-width: 54px; }
#keys-guide kbd.on { transform: translateY(2px); background: linear-gradient(#f2cf74, #d8a93c); color: #1a1408; box-shadow: 0 1px 0 #6d521a; }
.kg-cap { font-size: 11px; color: var(--muted, #aaa); margin: 6px 0 8px; }
.kg-list { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 7px; }
.kg-list li { display: flex; align-items: center; gap: 8px; color: #d8d1c3; }
.kg-list b { color: #fff; font-weight: 600; }
.kg-mouse { width: 16px; height: 24px; border: 2px solid #fff; border-radius: 9px; position: relative; flex: none; margin: 0 5px; }
.kg-mouse::after { content: ''; position: absolute; left: 50%; top: 4px; width: 2px; height: 6px; margin-left: -1px; background: var(--gold, #e2b857); border-radius: 2px; animation: kgm 1.4s infinite; }
@keyframes kgm { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(5px); opacity: .3; } }
#kg-open { position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 8; padding: 9px 14px; border-radius: 999px; border: 0; color: #fff; font: 600 12.5px inherit; font-family: inherit; cursor: pointer; }
@media (max-height: 620px) { #keys-guide { transform: translateY(-50%) scale(.82); transform-origin: left center; } }
/* joystick arrows + first-time hint */
#joystick .joy-ar { position: absolute; font-size: 11px; color: rgba(255,255,255,.55); pointer-events: none; }
#joystick .joy-ar.u { top: 6px; } #joystick .joy-ar.d { bottom: 6px; } #joystick .joy-ar.l { left: 8px; } #joystick .joy-ar.r { right: 8px; }
#joystick { box-shadow: 0 0 0 0 rgba(226,184,87,.6); }
#joystick.joy-new { animation: joyp 1.6s infinite; }
@keyframes joyp { 0% { box-shadow: 0 0 0 0 rgba(226,184,87,.55); } 100% { box-shadow: 0 0 0 22px rgba(226,184,87,0); } }
#joy-hint { position: fixed; left: 22px; bottom: 208px; width: 112px; text-align: center; z-index: 9; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px #000; pointer-events: none; }
#joy-hint .jh-hand { display: block; font-size: 26px; animation: jh 1.6s ease-in-out infinite; }
@keyframes jh { 0%,100% { transform: translate(0, 0); } 30% { transform: translate(0, -10px); } 60% { transform: translate(10px, 0); } }
