/* Arc City 3D — mega mall stroll · LightoryGames · city3d2 */
:root {
  --bg: #87b5e0;
  --ink: #0f172a;
  --panel: rgba(255,255,255,.88);
  --panel-b: rgba(15,23,42,.12);
  --accent: #2563eb;
  --warn: #b45309;
  --ok: #047857;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: Rubik, system-ui, -apple-system, Segoe UI, sans-serif;
  background: #6a9cc4; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
#site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: 48px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--panel-b);
}
#site-nav .sn-logo { font-weight: 800; letter-spacing: .02em; color: #0f172a; text-decoration: none; }
#site-nav .sn-logo b { color: #2563eb; }
#site-nav nav { display: flex; gap: 8px; flex-wrap: wrap; }
#site-nav nav a {
  color: #334155; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 4px 8px; border-radius: 8px;
}
#site-nav nav a.on { background: #dbeafe; color: #1d4ed8; }
#site-nav .sp { flex: 1; }
#site-nav .chip {
  font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
  background: #ecfdf5; color: #047857; text-decoration: none;
}
#site-nav .chip.dim { background: #f1f5f9; color: #64748b; }

#c3d {
  position: fixed; inset: 48px 0 0 0; width: 100%; height: calc(100% - 48px);
  display: block; outline: none; touch-action: none;
  background: linear-gradient(#87b5e0, #c5d9ea 55%, #9aaab8);
}

#hud {
  position: fixed; inset: 48px 0 0 0; pointer-events: none; z-index: 30;
}
#hud .panel {
  pointer-events: auto;
  background: var(--panel);
  border: 1px solid var(--panel-b);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15,23,42,.12);
  backdrop-filter: blur(12px);
}
#hint {
  position: absolute; left: 12px; top: 12px; max-width: min(460px, 92vw);
  padding: 12px 14px; font-size: 13px; line-height: 1.45;
}
#hint b { font-size: 14px; }
#hint .zh { display: block; margin-top: 6px; color: #475569; font-size: 12px; }
#status-bar {
  position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end;
}
.pill {
  pointer-events: none;
  font-size: 11px; font-weight: 700; padding: 5px 9px; border-radius: 999px;
  background: rgba(255,255,255,.9); border: 1px solid var(--panel-b); color: #334155;
}
.pill.warn { background: #fff7ed; color: var(--warn); border-color: #fdba74; }
.pill.ok { background: #ecfdf5; color: var(--ok); border-color: #6ee7b7; }

#toast {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: rgba(15,23,42,.88); color: #fff; opacity: 0; transition: opacity .25s;
  pointer-events: none; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }

#shop-panel {
  position: absolute; left: 12px; bottom: calc(88px + var(--safe-b));
  width: min(360px, 92vw); padding: 14px 14px 12px; display: none;
}
#shop-panel.show { display: block; }
#shop-panel h2 { margin: 0 0 6px; font-size: 16px; }
#shop-panel p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; color: #334155; }
#shop-panel .zh { color: #64748b; font-size: 12px; }
#shop-panel .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#shop-panel .row a, #shop-panel .row button {
  pointer-events: auto; cursor: pointer;
  border: 0; border-radius: 10px; padding: 8px 10px; font-weight: 700; font-size: 12px;
  background: #2563eb; color: #fff; text-decoration: none;
}
#shop-panel .row a.alt, #shop-panel .row button.alt { background: #e2e8f0; color: #0f172a; }
#door-prompt {
  position: absolute; left: 50%; bottom: calc(110px + var(--safe-b));
  transform: translateX(-50%); padding: 8px 14px; border-radius: 999px;
  background: rgba(15,23,42,.82); color: #fff; font-weight: 700; font-size: 13px;
  display: none; pointer-events: none;
}
#door-prompt.show { display: block; }

#actions {
  position: absolute; right: 12px; bottom: calc(18px + var(--safe-b));
  display: flex; flex-direction: column; gap: 8px; pointer-events: auto;
}
#actions .btn {
  border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 13px;
  background: #0f172a; color: #fff; cursor: pointer; min-width: 118px;
  box-shadow: 0 8px 20px rgba(15,23,42,.25);
}
#actions .btn.alt { background: #fff; color: #0f172a; border: 1px solid var(--panel-b); }
#actions .btn:disabled { opacity: .45; cursor: default; }

#joy {
  position: absolute; left: 18px; bottom: calc(18px + var(--safe-b));
  width: 118px; height: 118px; border-radius: 50%;
  background: rgba(255,255,255,.35); border: 2px solid rgba(15,23,42,.18);
  pointer-events: auto; touch-action: none;
}
#joy .knob {
  position: absolute; left: 50%; top: 50%; width: 48px; height: 48px;
  margin: -24px 0 0 -24px; border-radius: 50%;
  background: rgba(37,99,235,.85); box-shadow: 0 4px 12px rgba(37,99,235,.35);
}

#look-pad {
  position: absolute; right: 140px; bottom: calc(18px + var(--safe-b));
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,.28); border: 2px solid rgba(15,23,42,.14);
  pointer-events: auto; touch-action: none;
}
#look-pad .knob {
  position: absolute; left: 50%; top: 50%; width: 36px; height: 36px;
  margin: -18px 0 0 -18px; border-radius: 50%; background: rgba(15,23,42,.55);
}

.ft-note {
  position: fixed; right: 10px; bottom: 4px; z-index: 35;
  font-size: 10px; color: rgba(15,23,42,.45); pointer-events: none;
}

#boot {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  background: #87b5e0;
  transition: opacity .5s, visibility .5s;
}
#boot.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#boot .inner {
  width: min(560px, 92vw); text-align: center;
  background: rgba(255,255,255,.9); border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(15,23,42,.2);
}
#boot img { width: 100%; height: 220px; object-fit: cover; display: block; }
#boot .cap { padding: 14px 16px 18px; font-weight: 800; font-size: 15px; }
#boot .cap small { display: block; margin-top: 4px; font-weight: 600; color: #64748b; font-size: 12px; }

@media (max-width: 720px) {
  #look-pad { display: none; }
  #hint { font-size: 12px; max-width: 70vw; }
  #shop-panel { bottom: calc(140px + var(--safe-b)); }
}

#elevator-panel {
  position: absolute; left: 12px; bottom: calc(88px + var(--safe-b));
  width: min(360px, 92vw); padding: 14px 14px 12px; display: none;
}
#elevator-panel.show { display: block; }
#elevator-panel h2 { margin: 0 0 6px; font-size: 16px; }
#elevator-panel p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; color: #334155; }
#elevator-panel .floors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#elevator-panel .floors button {
  pointer-events: auto; cursor: pointer;
  border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; font-size: 13px;
  background: #1d4ed8; color: #fff;
}
#elevator-panel .floors button.on { background: #047857; }
#elevator-panel .floors button.alt { background: #e2e8f0; color: #0f172a; }
