/* Base look shared by every screen. Module styles live in css/*.css. */
:root {
  --u: 3.6px;
  --font: serif;
  --ink: #f4efe4;
  --ink-dim: #b9c3d0;
  --silver: #cfd8e3;
  --navy: #142338;
  --blue: #22405f;
  --amber: #f0b65e;
  --accent: #9fc4e8;
  --outline: #0a1220;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #070c15; }
#app { position: fixed; inset: 0; overflow: hidden; font-family: var(--font); color: var(--ink); user-select: none; -webkit-user-select: none; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#ui > .passthru { pointer-events: none; }
#fade { position: absolute; inset: 0; background: #05080f; opacity: 0; pointer-events: none; z-index: 50; }

/* outlined display text */
.ol { text-shadow: -2px 0 var(--outline), 2px 0 var(--outline), 0 -2px var(--outline), 0 2px var(--outline),
  -1.5px -1.5px var(--outline), 1.5px 1.5px var(--outline), -1.5px 1.5px var(--outline), 1.5px -1.5px var(--outline), 0 3px 0 rgba(0,0,0,0.6); }

/* 9-slice panel from ui-panel */
.panel {
  border-style: solid;
  border-width: calc(var(--u) * 4.5);
  border-image: url("assets/ui-panel.webp") 22% fill / calc(var(--u) * 4.5) stretch;
  color: var(--ink);
}
/* 9-slice button from ui-button */
.btn {
  appearance: none; -webkit-appearance: none; background: none; cursor: pointer;
  font-family: var(--font); font-weight: 700; color: var(--ink);
  font-size: max(15px, calc(var(--u) * 4.4));
  min-height: max(48px, calc(var(--u) * 13)); min-width: 48px;
  padding: 0 calc(var(--u) * 4);
  border-style: solid; border-width: calc(var(--u) * 2.6);
  border-image: url("assets/ui-button.webp") 26% fill / calc(var(--u) * 2.6) stretch;
  display: inline-flex; align-items: center; justify-content: center; gap: calc(var(--u) * 2);
  text-shadow: -1.5px 0 var(--outline), 1.5px 0 var(--outline), 0 -1.5px var(--outline), 0 1.5px var(--outline), 0 2px 0 rgba(0,0,0,0.5);
  transition: transform 0.12s ease, filter 0.15s ease;
  line-height: 1.15; text-align: center;
}
.btn:hover, .btn.focus { filter: brightness(1.25) drop-shadow(0 0 6px rgba(159,196,232,0.65)); transform: scale(1.03); }
.btn:active { transform: scale(0.95); }
.btn.primary { filter: drop-shadow(0 0 7px rgba(240,182,94,0.55)); color: #fff6e3; }
.btn.primary:hover, .btn.primary.focus { filter: brightness(1.25) drop-shadow(0 0 10px rgba(240,182,94,0.8)); }
.btn[disabled], .btn.dim { filter: grayscale(0.7) brightness(0.7); }
.btn img.ico { width: calc(var(--u) * 6); height: calc(var(--u) * 6); object-fit: contain; }

/* small square icon button (same plate as the pause button) */
.icon-btn {
  position: absolute; width: 48px; height: 48px; padding: 0; cursor: pointer; background: none;
  border-style: solid; border-width: 7px;
  border-image: url("assets/ui-button.webp") 26% fill / 7px stretch;
  display: flex; align-items: center; justify-content: center; transition: transform 0.12s ease, filter 0.15s;
}
.icon-btn:hover { filter: brightness(1.25); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg, .icon-btn img { width: 26px; height: 26px; }

@keyframes pop { 0% { transform: scale(0.7); opacity: 0; } 70% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fadeUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
.pop { animation: pop 0.28s ease-out both; }
.fade-up { animation: fadeUp 0.25s ease-out both; }
