/* ==========================================================================
   PINFALL — UI styles
   Colors come from CSS variables (overridable in config/game.config.js).
   ========================================================================== */
:root {
  --bg: #160f0d;
  --panel: rgba(30, 20, 17, 0.86);
  --panel-solid: #241815;
  --line: rgba(255, 236, 200, 0.12);
  --text: #fbf1dc;
  --muted: rgba(251, 241, 220, 0.62);
  --primary: #f2b53a;
  --secondary: #e0473f;
  --accent: #2bb3a8;
  --ok: #4fd18b;
  --radius: 18px;
  --f-display: 'PF Display', 'Arial Black', Impact, sans-serif;
  --f-ui: 'PF UI', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-ui);
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}
.hidden {
  display: none !important;
}

#pf-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#pf-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#pf-ui > * {
  pointer-events: none;
}
.ic {
  display: inline-flex;
  width: 1.25em;
  height: 1.25em;
  flex: none;
}
.ic svg {
  width: 100%;
  height: 100%;
}

/* ------------------------------ Loading ------------------------------ */
#pf-loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: radial-gradient(ellipse at 50% 35%, #3a231b 0%, var(--bg) 70%);
  transition: opacity 0.6s ease;
}
#pf-loading.done {
  opacity: 0;
  pointer-events: none;
}
#pf-loading .ld-logo {
  width: min(70vw, 420px);
}
#pf-loading .ld-logo img {
  width: 100%;
}
#pf-loading .bar {
  width: min(60vw, 280px);
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
#pf-loading .bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
#pf-loading .ld-text {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 80vw;
}
#pf-loading.error .bar {
  display: none;
}
#pf-loading.error .ld-text {
  color: var(--text);
  font-size: 16px;
}

/* ------------------------------ Shared controls ------------------------------ */
.btn {
  pointer-events: auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  background: #3a2822;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    filter 0.15s;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.primary {
  background: linear-gradient(180deg, #ffd06a, var(--primary));
  color: #2a1606;
  box-shadow:
    0 4px 0 #a86f12,
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.primary:active {
  box-shadow: 0 1px 0 #a86f12;
}
.btn.danger {
  background: #5a1f1a;
  color: #ffd3cc;
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn.wide {
  width: 100%;
}
.btn.sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 12px;
}
.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.icon-btn {
  pointer-events: auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 20px;
}
.icon-btn.sm {
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 11px;
}
.icon-btn.ghost {
  background: none;
  box-shadow: none;
  opacity: 0.7;
}
.pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 44px;
  border-radius: 22px;
  background: rgba(20, 12, 10, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700;
  font-size: 14px;
}
.tickets {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 20px;
  background: rgba(20, 12, 10, 0.65);
  box-shadow: inset 0 0 0 1.5px rgba(242, 181, 58, 0.35);
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
}
.tickets b {
  color: var(--text);
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(15, 9, 8, 0.62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.chip small {
  opacity: 0.7;
  font-weight: 500;
}
.chip.warn {
  color: var(--primary);
}
.note {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.note.warn {
  color: var(--primary);
}
.card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: inset 0 0 0 1.5px var(--line);
  margin-bottom: 14px;
}
.card h3 {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}
.stars {
  display: inline-flex;
  gap: 2px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 15px;
}
.stars .on {
  color: var(--primary);
}
.stars.big {
  font-size: 46px;
  gap: 8px;
  margin: 12px 0;
}
.stars .pop {
  animation: starpop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
@keyframes starpop {
  from {
    transform: scale(0) rotate(-40deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
/* End of css/base.css (complete file). */
