/* NovaArcade v2.0 — Craftpix-Enhanced Editorial & Tabletop Theme System */
:root {
  --na-bg: #F6F1E7;
  --na-paper: #FFFDF8;
  --na-ink: #1F2421;
  --na-primary: #D94E34;
  --na-secondary: #205295;
  --na-accent: #E3A82B;
  --na-muted: #6E6A63;
  --na-border: rgba(31, 36, 33, 0.16);
  --na-shadow: 0 10px 28px rgba(31, 36, 33, 0.09);
  --na-radius: 14px;
  --na-font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --na-mono: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
}

body[data-theme="bauhaus"] {
  --na-bg: #F6F1E7; --na-paper: #FFFDF8; --na-ink: #1F2421;
  --na-primary: #D94E34; --na-secondary: #205295; --na-accent: #E3A82B; --na-muted: #6C675E;
}
body[data-theme="washi"] {
  --na-bg: #F4EFE6; --na-paper: #FAF7F0; --na-ink: #222725;
  --na-primary: #C84B31; --na-secondary: #5F7A61; --na-accent: #344D67; --na-muted: #6E6A62;
}
body[data-theme="terracotta"] {
  --na-bg: #F7EDE2; --na-paper: #FFF9F2; --na-ink: #3D2C2E;
  --na-primary: #C86D51; --na-secondary: #7B9E87; --na-accent: #E0A458; --na-muted: #7C6966;
}
body[data-theme="botanical"] {
  --na-bg: #F2F5EC; --na-paper: #FAFDF6; --na-ink: #233329;
  --na-primary: #2D5A3D; --na-secondary: #7BA05B; --na-accent: #E69F00; --na-muted: #5F6F62;
}
body[data-theme="risograph"] {
  --na-bg: #FAF6F0; --na-paper: #FFFFFF; --na-ink: #1D3557;
  --na-primary: #FF6B6B; --na-secondary: #1A936F; --na-accent: #FFD166; --na-muted: #5C6B7E;
}
body[data-theme="nordic"] {
  --na-bg: #F1F4F8; --na-paper: #FFFFFF; --na-ink: #243447;
  --na-primary: #4A8FE7; --na-secondary: #3B4D61; --na-accent: #E8871E; --na-muted: #69788A;
}
body[data-theme="blueprint"] {
  --na-bg: #EBF2FA; --na-paper: #F7FBFF; --na-ink: #163A5F;
  --na-primary: #2E7BB4; --na-secondary: #D64545; --na-accent: #C59B27; --na-muted: #5B7896;
}
body[data-theme="walnut"] {
  --na-bg: #EFE7DC; --na-paper: #FAF5EE; --na-ink: #3A261B;
  --na-primary: #2E4F3E; --na-secondary: #A63A3A; --na-accent: #D4A349; --na-muted: #756154;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: var(--na-bg); color: var(--na-ink);
  font-family: var(--na-font); overflow: hidden; user-select: none;
}

.na-app {
  display: flex; flex-direction: column;
  width: 100%; height: 100dvh; max-width: 980px; margin: 0 auto;
  padding: 10px 12px 12px; gap: 10px;
}

.na-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--na-paper); border: 2px solid var(--na-ink);
  border-radius: var(--na-radius); padding: 7px 12px; box-shadow: 3px 3px 0 rgba(31,36,33,0.12);
  flex-shrink: 0;
}

.na-brand-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.na-hud-icon {
  width: 34px; height: 34px; border-radius: 9px; object-fit: contain;
  background: var(--na-bg); border: 1.5px solid var(--na-border); padding: 3px; flex-shrink: 0;
}
.na-brand { display: flex; flex-direction: column; min-width: 0; }
.na-title { font-size: 15px; font-weight: 900; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.na-subtitle { font-size: 11px; color: var(--na-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.na-hud { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.na-pill {
  background: var(--na-bg); border: 1.5px solid var(--na-border);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800;
  font-family: var(--na-mono); color: var(--na-ink); display: inline-flex; align-items: center; gap: 4px;
  transition: transform 0.14s ease;
}
.na-pill.pop { transform: scale(1.14); background: var(--na-accent); }
.na-pill span.lbl { font-family: var(--na-font); font-weight: 600; color: var(--na-muted); font-size: 11px; }

.na-btn {
  appearance: none; border: 1.5px solid var(--na-ink); background: var(--na-paper);
  color: var(--na-ink); border-radius: 10px; padding: 6px 11px; font-size: 12px;
  font-weight: 800; cursor: pointer; touch-action: manipulation; transition: transform .1s ease, box-shadow .12s ease, background .15s ease;
  font-family: var(--na-font); box-shadow: 0 2px 0 rgba(31,36,33,0.16);
}
.na-btn:hover { background: var(--na-bg); transform: translateY(-1px); }
.na-btn:active { transform: translateY(1px) scale(0.97); box-shadow: none; }
.na-btn:focus-visible { outline: 2.5px solid var(--na-primary); outline-offset: 2px; }
.na-btn.primary {
  background: var(--na-primary); color: #fff; border-color: var(--na-ink);
  padding: 10px 24px; font-size: 14px; border-radius: 12px;
  box-shadow: 0 3px 0 var(--na-ink);
}
.na-btn.primary:hover { filter: brightness(1.06); }

.na-stage-wrap {
  position: relative; flex: 1; min-height: 0;
  background: var(--na-paper); border: 2px solid var(--na-ink);
  border-radius: var(--na-radius); box-shadow: 4px 4px 0 rgba(31,36,33,0.12);
  overflow: hidden; display: flex; flex-direction: column;
}
.na-stage-wrap.shake { animation: naShake 0.26s ease; }
@keyframes naShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  65% { transform: translateX(5px); }
}

.na-canvas {
  width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer;
}

.na-controls {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 10px; background: var(--na-bg); border-top: 1.5px solid var(--na-border);
  flex-shrink: 0;
}
.na-controls .na-btn { min-height: 36px; padding: 7px 13px; }
.na-controls:empty { display: none; }

.na-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(246, 241, 231, 0.86); backdrop-filter: blur(5px);
  z-index: 20; padding: 18px;
}
.na-overlay.hidden { display: none; }

.na-card {
  background: var(--na-paper); border: 2.5px solid var(--na-ink);
  border-radius: 18px; padding: 22px 24px; max-width: 430px; width: 100%;
  box-shadow: 7px 7px 0 var(--na-ink); text-align: center;
  animation: naPopIn 0.22s cubic-bezier(.22,1,.36,1);
}
@keyframes naPopIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.na-card-emblem {
  width: 68px; height: 68px; object-fit: contain; margin: 0 auto 10px; display: block;
  background: var(--na-bg); border: 2px solid var(--na-ink); border-radius: 16px; padding: 6px;
}
.na-card h2 { margin: 0 0 8px; font-size: 22px; font-weight: 900; }
.na-card p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--na-muted); }
.na-badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  background: var(--na-accent); color: var(--na-ink); font-size: 11px;
  font-weight: 800; letter-spacing: 0.04em; margin-bottom: 8px; border: 1.5px solid var(--na-ink);
}
.na-stars { font-size: 28px; letter-spacing: 6px; margin: 4px 0; color: var(--na-accent); text-shadow: 1.5px 1.5px 0 var(--na-ink); animation: naPopIn 0.35s ease; }
.na-score-big {
  font-size: 36px; font-weight: 900; font-family: var(--na-mono);
  color: var(--na-primary); margin: 4px 0 12px;
}
.na-card-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 560px) {
  .na-app { padding: 6px; gap: 6px; }
  .na-topbar { padding: 6px 8px; }
  .na-hud-icon { width: 28px; height: 28px; }
  .na-title { font-size: 13.5px; }
  .na-subtitle { display: none; }
  .na-pill { padding: 3px 7px; font-size: 11px; }
  .na-hud { gap: 4px; }
  .na-btn { padding: 4px 6px; font-size: 11px; }
  .na-card { padding: 16px 18px; }
}
