/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  --text: #0f172a;
  --card: rgba(0, 0, 0, 0.05);
  --highlight: #0ea5e9;
  --button-bg: #0ea5e9;
  --button-text: #ffffff;
  --muted: #475569;
  --dice-bg: #ffffff;
  --dot-color: #0f172a;
  --dice-border: #cbd5e1;
  --settings-border: rgba(0, 0, 0, 0.15);
  --settings-panel-bg: rgba(241, 245, 249, 0.97);
}

[data-theme="dark"] {
  --bg: linear-gradient(135deg, #0f172a, #1e293b);
  --text: #e2e8f0;
  --card: rgba(255, 255, 255, 0.05);
  --highlight: #38bdf8;
  --button-bg: #38bdf8;
  --button-text: #0f172a;
  --muted: #94a3b8;
  --dice-bg: #1e293b;
  --dot-color: #e2e8f0;
  --dice-border: #38bdf8;
  --settings-border: rgba(255, 255, 255, 0.12);
  --settings-panel-bg: rgba(15, 23, 42, 0.97);
}

[data-theme="light"] {
  --bg: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  --text: #0f172a;
  --card: rgba(0, 0, 0, 0.05);
  --highlight: #0ea5e9;
  --button-bg: #0ea5e9;
  --button-text: #ffffff;
  --muted: #475569;
  --dice-bg: #ffffff;
  --dot-color: #0f172a;
  --dice-border: #cbd5e1;
  --settings-border: rgba(0, 0, 0, 0.15);
  --settings-panel-bg: rgba(241, 245, 249, 0.97);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: linear-gradient(135deg, #0f172a, #1e293b);
    --text: #e2e8f0;
    --card: rgba(255, 255, 255, 0.05);
    --highlight: #38bdf8;
    --button-bg: #38bdf8;
    --button-text: #0f172a;
    --muted: #94a3b8;
    --dice-bg: #1e293b;
    --dot-color: #e2e8f0;
    --dice-border: #38bdf8;
    --settings-border: rgba(255, 255, 255, 0.12);
    --settings-panel-bg: rgba(15, 23, 42, 0.97);
  }
}
/* ── Page ──────────────────────────────────────────────── */
html {
  background: var(--bg);
}
/* ── Base ──────────────────────────────────────────────── */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 80px 24px 24px;
  box-sizing: border-box;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  text-align: center;
  padding: 40px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
  width: 90vw;
  max-width: 900px;
}

h1 { font-size: 2.5rem; margin-bottom: 20px; }

p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
}

.highlight { color: var(--highlight); font-weight: bold; }

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 28px;
  font-size: 1rem;
  color: var(--button-text);
  background: var(--button-bg);
  border: none;
  border-radius: 999px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  filter: brightness(1.1);
}

footer {
  margin-top: 30px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Topbar ────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 10px 20px;
  box-sizing: border-box;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.9rem;
  color: var(--muted);
  z-index: 1000;
}

.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  padding-right: 44px;
}

.topbar a {
  color: var(--highlight);
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
}

.topbar-logo { height: 30px; width: auto; display: block; }
.topbar-sep { margin: 0 4px; color: var(--muted); }

/* ── Settings gear button ──────────────────────────────── */
/* Lives inside .topbar but outside .topbar-inner so it
   never contributes to that element's scroll width         */
.settings-btn {
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  opacity: 0.65;
  transition: opacity 0.2s, transform 0.4s;
  z-index: 1001;
}
.settings-btn:hover { opacity: 1; }
.settings-btn:focus { outline: none; }
.settings-btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }
.settings-btn img {
  width: 26px; height: 26px; display: block;
}
.settings-btn.open {
  transform: translateY(-50%) rotate(60deg);
  opacity: 1;
}

/* ── Settings floating panel ───────────────────────────── */
.settings-panel {
  position: fixed;
  z-index: 9999;
  display: none;
  border: 1.5px solid var(--settings-border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  min-width: 160px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--settings-panel-bg);
}
.settings-panel.open { display: block; }

.settings-section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Theme pill ────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  background: var(--card);
  border: 1.5px solid var(--settings-border);
  border-radius: 999px;
  padding: 3px 4px;
}
.theme-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
  line-height: 1;
  white-space: nowrap;
}
.theme-toggle button.active {
  background: var(--button-bg);
  color: var(--button-text);
}
.theme-toggle button:hover:not(.active) { color: var(--highlight); }
.theme-toggle button:focus,
.theme-toggle button:active { outline: none; }
.theme-toggle button:focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

/* ── Dice ──────────────────────────────────────────────── */
.dice {
  width: 120px; height: 120px;
  margin: 30px auto;
  background: var(--dice-bg);
  border-radius: 16px;
  border: 3px solid var(--dice-border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px; padding: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
  transition: transform 3s cubic-bezier(0.25, 1, 0.5, 1);
}
.dot {
  width: 20px; height: 20px;
  background: var(--dot-color);
  border-radius: 50%;
  justify-self: center; align-self: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.dot.visible { opacity: 1; }

/* ── Logo ──────────────────────────────────────────────── */
.logo {
  --scale: 1;
  display: inline-block;
  height: calc(1em * var(--scale));
  aspect-ratio: 473 / 821;
  vertical-align: middle;
  background: url("/logo-mid-res.png") no-repeat center;
  background-size: contain;
}

/* ── Pictures grid ─────────────────────────────────────── */
.pictures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pictures-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: block;
}
/* ── Lighting Pages ───────────────────────────────────── */

 .section-title {
      font-size: 1.4rem; font-weight: 600; margin: 2rem 0 0.75rem 0;
      border-bottom: 2px solid var(--muted); padding-bottom: 0.3rem;
    }
    .info-table {
      width: 100%; border-collapse: separate; border-spacing: 0;
      border-radius: 10px; border: 2px solid var(--muted);
      margin-bottom: 1rem; overflow: hidden;
    }
    .info-table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--muted); vertical-align: top; }
    .info-table tr:last-child td { border-bottom: none; }
    .info-table td:first-child { font-weight: 600; width: 40%; white-space: nowrap; border-right: 1px solid var(--muted); }
    .info-table tr:first-child td:first-child { border-top-left-radius: 8px; }
    .info-table tr:first-child td:last-child  { border-top-right-radius: 8px; }
    .info-table tr:last-child  td:first-child { border-bottom-left-radius: 8px; }
    .info-table tr:last-child  td:last-child  { border-bottom-right-radius: 8px; }
    .bulb-link { color: #0066cc; text-decoration: underline; }
    .video-wrapper { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,0.35); margin-bottom: 1rem; }
    .video-wrapper iframe { width: 100%; height: 100%; border: none; display: block; }
