/* base.css – Reset + Tokens. Mobile-First, Slate/Gold Fantasy */

:root {
  --bg: #0f1419;
  --bg-elevated: #161b22;
  --panel: #1c2333;
  --panel-2: #252d3d;
  --line: #3d4a5c;
  --text: #e8eaed;
  --text-dim: #9aa5b4;
  --accent: #d4a84b;
  --accent-gold: #d4a84b;
  --accent-amber: #e8b86d;
  --accent-copper: #b87333;
  --accent-2: #6fcf6f;
  --danger: #c94c4c;
  --hp: #c94c4c;
  --energy: #4a9ece;
  --xp: #d4a84b;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 8px 24px rgba(0, 0, 0, 0.45);
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
  --hud-chrome-bottom: 76px;

  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size: clamp(14px, 2.5vw, 18px);
  font: 400 var(--font-size) / 1.4 var(--font-ui);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}

button:active { background: var(--panel-2); transform: translateY(1px); }
button:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

input, select, textarea {
  font: inherit;
  color: inherit;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
  min-height: 44px;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-gold);
  border-color: var(--accent-gold);
}

h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-amber), var(--accent-gold));
  border-color: var(--accent-copper);
  color: #1a1408;
  font-weight: 700;
}

.btn-small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.88em;
}

.btn-link {
  background: transparent;
  border-color: transparent;
  color: var(--accent-gold);
  min-height: auto;
}

.muted { color: var(--text-dim); }

.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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