:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101316;
  color: #f5f0e8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 24% 18%, rgba(246, 184, 66, 0.18), transparent 27rem),
    linear-gradient(135deg, #101316 0%, #17232d 48%, #231f28 100%);
}

button {
  border: 0;
  border-radius: 8px;
  background: #f6b842;
  color: #17120a;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 44px;
  padding: 0 18px;
}

button:disabled {
  background: #58606a;
  color: #b8c0c8;
  cursor: default;
}

/* PassivePin Header */
.pp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(16, 19, 22, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 1000;
}
.pp-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.pp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: #f5f0e8;
  text-decoration: none;
}
.pp-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #10b981, #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.pp-nav {
  display: flex;
  gap: 8px;
}
.pp-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.2s;
}
.pp-nav a:hover, .pp-nav a.active {
  color: #f5f0e8;
  background: rgba(255,255,255,0.06);
}

.shell {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(300px, 430px) minmax(280px, 360px);
  justify-content: center;
  min-height: 100vh;
  padding: 84px 24px 24px;
}

.game-panel {
  align-self: center;
  aspect-ratio: 43 / 72;
  background: #0b1118;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  max-height: calc(100vh - 108px);
  overflow: hidden;
  position: relative;
  width: min(430px, calc(100vw - 48px));
}

canvas {
  display: block;
  height: 100%;
  width: 100%;
}

.hud {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
  left: 12px;
  position: absolute;
  right: 12px;
  top: 12px;
}

.hud div,
.side-panel section {
  background: rgba(11, 17, 24, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.hud div { padding: 8px 10px; }

.label,
.eyebrow {
  color: #96b6bd;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hud strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.1;
  margin-top: 2px;
}

.overlay {
  align-items: center;
  background: linear-gradient(180deg, rgba(11, 17, 24, 0.38), rgba(11, 17, 24, 0.9));
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  padding: 28px;
  position: absolute;
  text-align: center;
}

.overlay.hidden { display: none; }

h1, h2, p { margin: 0; }

h1 {
  font-size: clamp(2.6rem, 10vw, 4.8rem);
  line-height: 0.9;
  margin: 8px 0 14px;
}

h2 {
  font-size: 1.05rem;
  line-height: 1.2;
  margin-top: 4px;
}

.daily-copy,
.hint {
  color: #dbe4e6;
  line-height: 1.45;
  max-width: 28rem;
}

.hint {
  color: #aeb8bc;
  font-size: 0.9rem;
  margin-top: 14px;
}

.overlay button { margin-top: 22px; min-width: 150px; }

.side-panel {
  align-self: center;
  display: grid;
  gap: 14px;
}

.side-panel section { padding: 16px; }

.side-panel p {
  color: #d6dedf;
  line-height: 1.45;
  margin-top: 8px;
}

.skin-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.skin {
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 36px 1fr auto;
  padding: 10px;
}

.swatch {
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  height: 28px;
  width: 28px;
}

.skin strong { display: block; font-size: 0.92rem; }
.skin span {
  color: #aeb8bc;
  display: block;
  font-size: 0.78rem;
  margin-top: 1px;
}

.meter {
  background: rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
}

.meter span {
  background: linear-gradient(90deg, #5fd0c7, #f6b842);
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0%;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 76px 16px 16px;
  }
  .game-panel, .side-panel {
    justify-self: center;
    width: min(430px, calc(100vw - 32px));
  }
  .side-panel { align-self: start; }
  .pp-nav { display: none; }
}
