/* Shared shell for HBG simple games */
:root {
  --ink: #0d1117;
  --deep: #111827;
  --surface: #161d2b;
  --card: #1c2535;
  --border: #2a3649;
  --muted: #4b5e7a;
  --text: #c8d6e8;
  --light: #e8f0f8;
  --copper: #c97d3a;
  --copper2: #e8943f;
  --teal: #2dd4bf;
  --hot: #fbbf24;
  --danger: #fb7185;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: 'Barlow', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.sg-app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 1rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(45,212,191,.1), transparent 50%),
    radial-gradient(ellipse at 90% 5%, rgba(201,125,58,.08), transparent 40%),
    var(--ink);
}
.sg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.sg-link {
  color: var(--teal);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.sg-title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  color: var(--light);
  text-align: center;
}
.sg-score {
  font-weight: 700;
  color: var(--copper2);
  font-size: 1rem;
  text-align: right;
  min-width: 4.5rem;
}
.sg-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--light);
  border-radius: 0.85rem;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.sg-btn.primary {
  background: linear-gradient(135deg, var(--copper), var(--copper2));
  border-color: transparent;
  color: #1a1008;
}
.sg-btn:active { transform: scale(0.98); }
.sg-hint { text-align: center; color: var(--muted); font-size: 0.8rem; }
.sg-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.75rem;
}
.sg-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 40;
  backdrop-filter: blur(4px);
}
/* Author display:flex overrides the UA [hidden] rule — keep overlays dismissible */
.sg-overlay[hidden] {
  display: none !important;
}
.sg-modal {
  width: min(340px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  text-align: center;
}
.sg-modal h2 { color: var(--light); margin-bottom: 0.35rem; }
.sg-modal p { color: var(--muted); margin-bottom: 1rem; }
.sg-modal .actions { display: flex; flex-direction: column; gap: 0.5rem; }
