:root{--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px);--header-height-base: 112px;--header-height: calc(var(--header-height-base) + var(--safe-top));--z-header: 10;--z-canvas: 1;--z-hud: 20;--z-backdrop: 25;--z-modal: 30}@media (max-width: 360px){:root{--header-height-base: 72px}}@media (min-width: 361px) and (max-width: 480px){:root{--header-height-base: 88px}}@media (min-width: 481px) and (max-width: 768px){:root{--header-height-base: 112px}}@media (min-width: 769px) and (max-width: 1200px){:root{--header-height-base: 140px}}@media (min-width: 1201px){:root{--header-height-base: 160px}}html,body,#root{height:100%}html,body{overflow-x:hidden}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Inter,Noto Sans,Helvetica,Arial,sans-serif;background:#0e1016;color:#f8fafc}.appRoot{min-height:100dvh;display:grid;grid-template-rows:auto 1fr;grid-template-columns:1fr}.brandingSafeArea{position:sticky;top:0;z-index:var(--z-header);min-height:var(--header-height);display:flex;align-items:center;background:linear-gradient(180deg,#0d1117f2,#0d1117d9);border-bottom:1px solid rgba(148,163,184,.15);padding:8px 12px}.brandingInner{width:100%;max-width:1440px;margin:0 auto;padding:0 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brandTitle{display:inline-flex;align-items:center;gap:10px;font-weight:800;letter-spacing:-.02em}.brandLogo{width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,#60a5fa,#34d399)}.brandName{font-size:clamp(18px,2.4vw,22px);background:linear-gradient(135deg,#60a5fa,#34d399);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.brandRight{display:inline-flex;align-items:center;gap:8px}.brandControls{display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;color:#cbd5e1;font-size:12px}.brandHelpLabel{font-weight:700;color:#e2e8f0}.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:#0f172a80;border:1px solid rgba(148,163,184,.2)}.chipKey{display:inline-block;padding:2px 6px;background:#1f2937b3;border:1px solid rgba(148,163,184,.3);border-radius:6px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:11px}.chipSwatch{display:inline-block;width:12px;height:12px;border-radius:3px;border:1px solid rgba(148,163,184,.3);box-shadow:inset 0 0 0 1px #0003;vertical-align:-1px}.themeSelect{margin-left:6px;height:28px;border-radius:8px;border:1px solid rgba(148,163,184,.3);background:#1f293799;color:#e2e8f0}.brandButton{min-height:44px;min-width:44px;padding:8px 12px;border-radius:10px;border:1px solid rgba(148,163,184,.2);background:#0f172a99;color:#e2e8f0;cursor:pointer}.viewportArea{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:8px 12px;overflow-x:hidden}.headerStatus{width:100%;max-width:1440px;display:flex;flex-direction:column;align-items:center;gap:6px;color:#e2e8f0;margin-bottom:8px}.statusLabel{font-weight:700;text-align:center}.statusBarWrap{width:100%;max-width:640px;margin:0 auto;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}.statusBar{height:8px;background:#0f172a99;border-radius:12px;overflow:hidden;border:1px solid rgba(148,163,184,.2)}.statusFill{height:100%;transition:width .2s ease}.statusPercent{min-width:40px;text-align:right;font-variant-numeric:tabular-nums;opacity:.9}.gameViewport{position:relative;width:100%;max-width:1600px;flex:1 1 auto;display:grid;place-items:center;overflow:hidden;overscroll-behavior:contain;touch-action:none}.canvasSquare{position:relative;width:calc(min(100%,var(--max-square, 100%)) - 1px);aspect-ratio:1 / 1;z-index:var(--z-canvas)}.pixiMount{position:absolute;top:0;right:0;bottom:0;left:0}.canvasSquare canvas{width:100%!important;height:100%!important;display:block}.characterSprite canvas{width:16px!important;height:16px!important;display:inline-block}.hudLayer{position:absolute;top:0;right:0;bottom:0;left:0;z-index:var(--z-hud);pointer-events:none}.modalBackdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;z-index:9998}.modalLayer{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:grid;place-items:center}@media (max-height: 520px){.brandingSafeArea{padding-top:2px;padding-bottom:2px}.gameViewport{overflow:auto}}.characterGlow{filter:drop-shadow(0 0 8px rgba(255,255,255,.8)) drop-shadow(0 0 16px rgba(255,255,255,.4))}.characterSprite{filter:drop-shadow(0 1px 2px rgba(0,0,0,.6));border-radius:2px;margin:0 2px;vertical-align:middle}
