:root {
  --bg: #0f1621;
  --panel: rgba(16, 24, 36, 0.86);
  --border: rgba(242, 224, 186, 0.18);
  --text: #f3f6fa;
  --muted: #aeb9c9;
  --gold: #eab95c;
  --green: #38a169;
  --coral: #e4664a;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sg-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #121b28;
  border-bottom: 1px solid var(--border);
}

.sg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sg-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(234, 185, 92, 0.6);
  flex: none;
}

.sg-brand h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sg-brand p {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.sg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sg-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--border);
}

.sg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.sg-btn--accent {
  background: var(--gold);
  color: #161b22;
  border-color: var(--gold);
}

.sg-stage-wrap {
  position: relative;
  width: 100%;
  height: min(72vh, 680px);
  min-height: 460px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #273e5a 0%, #111926 70%, #0b1018 100%);
}

.sg-canvas-host {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
}

.sg-canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.sg-hud {
  position: absolute;
  z-index: 4;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  max-width: 310px;
}

.sg-hud--top-left {
  top: 14px;
  left: 14px;
}

.sg-hud--top-right {
  top: 14px;
  right: 14px;
  max-width: 340px;
}

.sg-hud-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 700;
}

.sg-hud-title {
  margin: 3px 0 2px;
  font-size: 1.05rem;
}

.sg-hud-credit {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.sg-hud-note {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #cfd8e5;
}

.sg-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sg-stat {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}

.sg-stat span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
}

.sg-stat strong {
  font-size: 1.05rem;
}

.sg-ctrl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.sg-chip {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.sg-chip:hover {
  background: rgba(234, 185, 92, 0.22);
  border-color: rgba(234, 185, 92, 0.5);
}

.sg-power-wrap {
  font-size: 0.76rem;
  color: var(--muted);
}

.sg-power-track {
  margin-top: 5px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.sg-power-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--coral));
  transition: width 40ms linear;
}

.sg-status {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #e5ecf4;
}

.sg-banner {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 14, 22, 0.56);
  backdrop-filter: blur(4px);
}

.sg-banner[hidden] { display: none; }

.sg-banner-card {
  background: #162131;
  border: 1px solid rgba(234, 185, 92, 0.45);
  border-radius: 16px;
  padding: 22px 26px;
  text-align: center;
  max-width: 340px;
  width: 90%;
}

.sg-banner-kicker {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.sg-banner-card h3 {
  margin: 6px 0 8px;
  font-size: 1.5rem;
}

.sg-banner-card p {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
}

.sg-banner-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.sg-drawer {
  padding: 18px 20px 26px;
  background: #0d141f;
  border-top: 1px solid var(--border);
}

.sg-drawer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.sg-drawer-head h2 {
  margin: 0;
  font-size: 1rem;
}

.sg-drawer-head p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.sg-holes-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 12px;
}

.sg-hole-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #141f2e;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.sg-hole-card[data-active="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.sg-hole-card[data-built="false"] {
  opacity: 0.72;
}

.sg-hole-card img {
  width: 100%;
  aspect-ratio: 400 / 260;
  object-fit: cover;
  display: block;
  background: #0d1520;
}

.sg-hole-meta {
  padding: 9px 10px;
}

.sg-hole-meta strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 3px;
}

.sg-hole-meta span {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
}

.sg-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

.sg-foot a {
  color: var(--gold);
  text-decoration: none;
}

@media (max-width: 780px) {
  .sg-hud--top-left, .sg-hud--top-right {
    position: static;
    max-width: none;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .sg-stage-wrap {
    height: auto;
    min-height: 0;
  }
  .sg-canvas-host {
    position: relative;
    height: 54vh;
    min-height: 320px;
  }
}
