:root {
  --bg: #FAF4E8;
  --text: #2A1A10;
  --header-bg: #FF7B4A;
  --header-text: #FAF4E8;
  --border: #5A3A2A;
  --card: #FFFDF7;
  --button-bg: #FF7B4A;
  --button-bg-hover: #FF915F;
}

body.dark {
  --bg: #2A1A10;
  --text: #FAF4E8;
  --header-bg: #5A3A2A;
  --header-text: #FAF4E8;
  --border: #FF7B4A;
  --card: #38251B;
  --button-bg-hover: #FF9A6A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  text-align: center;
  transition: background .3s, color .3s;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px;
  color: var(--header-text);
  background: var(--header-bg);
  border-bottom: 3px solid var(--border);
}

.brand { color: inherit; text-decoration: none; text-align: left; }
.brand h1 { margin: 0; font-size: 2em; }
.brand p { margin: 0; font-style: italic; }

nav {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  color: var(--header-text);
  font-size: 1.05em;
  font-weight: bold;
  text-decoration: underline;
}

.toggle-row { display: flex; align-items: center; gap: 8px; }

.toggle {
  width: 60px;
  height: 30px;
  padding: 0;
  position: relative;
  cursor: pointer;
  border: 0;
  border-radius: 30px;
  background: var(--border);
}

.crab-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--button-bg);
  transition: left .25s ease;
}

body.dark .crab-dot { left: 33px; }

main { width: min(1100px, calc(100% - 28px)); margin: 34px auto 60px; }
.page-title { margin-bottom: 8px; font-size: clamp(2rem, 5vw, 3.6rem); }
.page-intro { margin: 0 auto 30px; max-width: 700px; font-style: italic; }

.gallery { display: flex; flex-direction: column; gap: 32px; }

.media-card {
  margin: 0;
  padding: 10px;
  overflow: hidden;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--border);
}

.media-card img,
.media-card video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 7px;
  background: #111;
}

.media-card img { cursor: zoom-in; background: #FFFDF7; }

.empty-state {
  padding: 35px 20px;
  background: var(--card);
  border: 3px dashed var(--border);
  border-radius: 12px;
}

.empty-state code { font-weight: bold; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  padding: 20px;
  overflow: auto;
  cursor: zoom-out;
  background: rgba(0,0,0,.94);
}

.lightbox.open { display: grid; place-items: start center; }
.lightbox img { max-width: 96vw; height: auto; }

footer {
  padding: 20px 10px;
  color: var(--border);
  background: rgba(0,0,0,.03);
  border-top: 2px dashed var(--border);
}

@media (max-width: 820px) {
  header { flex-direction: column; }
  .brand { text-align: center; }
  nav { gap: 12px 18px; }
}
