:root {
  color-scheme: dark;
  --bg: #02030d;
  --panel: #05050b;
  --panel-soft: #0a0e23;
  --shell-bg: rgba(0, 0, 0, 0.9);
  --body-bg: #000;
  --ink: #f8fbff;
  --muted: #aebfe3;
  --line: #dbe7ff;
  --blue: #1638ff;
  --blue-hot: #374cff;
  --green: #71d692;
  --pink: #ff8bd4;
  --shadow: rgba(67, 91, 145, 0.38);
  --sky-gradient: linear-gradient(90deg, #10182d 0%, #1b2948 48%, #0d1528 100%);
  --gradient-text: #f8fbff;
  --nav-hover: #aebfe3;
  --weather-bg: #0c1325;
  --weather-text: #f8fbff;
  --weather-title: linear-gradient(90deg, #26395f, #101a31);
  --masthead-left-bg: #050812;
  --brand-color: #ffffff;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", Tahoma, Geneva, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", Tahoma, Geneva, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f8ff;
  --panel: #f8fbff;
  --panel-soft: #eaf3ff;
  --shell-bg: rgba(244, 249, 255, 0.97);
  --body-bg: #ffffff;
  --ink: #18130f;
  --muted: #755f70;
  --line: #2b241f;
  --blue: #2442de;
  --blue-hot: #4960ff;
  --shadow: rgba(103, 83, 111, 0.22);
  --sky-gradient: linear-gradient(90deg, #ffffff 0%, #edf6ff 52%, #dcecff 100%);
  --gradient-text: #18130f;
  --nav-hover: #2442de;
  --weather-bg: #f8fbff;
  --weather-text: #18130f;
  --weather-title: linear-gradient(90deg, #ffffff, #e8f3ff);
  --masthead-left-bg: #ffffff;
  --brand-color: #18130f;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--body-bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  line-height: 1.5;
}

a {
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

.stars {
  display: none;
}

.moon {
  display: none;
}

.moon::after {
  content: "";
  position: absolute;
  top: -0.15rem;
  left: 1.3rem;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--bg);
}

.site-shell {
  width: min(1100px, calc(100% - 1rem));
  margin: 0 0 5rem;
  border: 0;
  background: var(--shell-bg);
  box-shadow: 0 0 18px rgba(126, 156, 214, 0.3);
}

html[data-theme="light"] .site-shell {
  box-shadow: 0 0 18px rgba(139, 179, 230, 0.34);
}

.masthead {
  position: relative;
  display: grid;
  min-height: 160px;
  aspect-ratio: 11000 / 1600;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
  background: var(--masthead-left-bg);
  text-align: center;
}

.masthead::before,
.masthead::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: contain;
  image-rendering: pixelated;
  opacity: 0.82;
  pointer-events: none;
}

.masthead .brand::before {
  content: none;
}

.masthead::before {
  right: auto;
  width: 52%;
  background-color: var(--masthead-left-bg);
  background-image: none;
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 1;
}

.masthead::after {
  left: auto;
  width: 58%;
  background-color: var(--masthead-left-bg);
  background-image: none;
  background-position: right center;
  -webkit-mask-image: none;
  mask-image: none;
}

html[data-theme="light"] .masthead {
  background-color: #fff;
  background-image: url("assets/images/decor/light-mode-animation.gif?v=light-masthead-final-fr");
  background-position: center bottom;
  background-size: 100% auto;
  background-repeat: no-repeat;
  opacity: 1;
}

html[data-theme="light"] .masthead::before,
html[data-theme="light"] .masthead::after {
  width: 100%;
  background: transparent;
  opacity: 0;
}

html[data-theme="dark"] .masthead {
  background-color: #000;
  background-image: url("assets/images/decor/dark-mode-cabin.gif?v=dark-masthead-20260623");
  background-position: center bottom;
  background-size: 100% auto;
  background-repeat: no-repeat;
  opacity: 1;
}

html[data-theme="dark"] .masthead::before,
html[data-theme="dark"] .masthead::after {
  background-image: none;
  opacity: 0;
}

.masthead.compact {
  min-height: 102px;
}

.stripe-panel {
  display: none;
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-color);
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 7vw, 4.4rem);
  font-weight: 500;
  line-height: 1.05;
  text-decoration: none;
  text-shadow: none;
}

.brand-logo {
  width: min(58vw, 540px);
  max-width: calc(100% - 2rem);
  transform: translateY(8px);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.compact .brand {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
}

.tagline {
  position: relative;
  z-index: 2;
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  padding: 0.55rem 1rem;
  border-bottom: 2px solid var(--line);
  background: var(--sky-gradient);
  color: #fff;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 1px 0 #11182d;
  -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] .main-nav {
  background: linear-gradient(180deg, #f4f9ff 0%, #dcecff 48%, #bed8f7 100%);
  color: #111;
  text-shadow: 0 1px 0 #fff;
}

html[data-theme="dark"] .main-nav {
  border-bottom-color: #7188be;
  background: linear-gradient(180deg, #52678f 0%, #34486f 45%, #202e50 100%);
  box-shadow:
    inset 0 1px 0 #9badd1,
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.main-nav a {
  color: inherit;
  text-decoration: none;
  text-shadow: inherit;
}

.main-nav a:hover,
.main-nav [aria-current="page"] {
  color: inherit;
  text-shadow: inherit;
}

.main-nav .theme-toggle {
  position: absolute;
  right: 0.75rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-shadow: inherit;
  -webkit-font-smoothing: antialiased;
  cursor: pointer;
  user-select: none;
}

.theme-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.theme-toggle-track {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-radius: 999px;
  background: var(--body-bg);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.16);
  transition:
    background 180ms ease,
    border-color 180ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.38);
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease;
}

.theme-toggle input:checked + .theme-toggle-track .theme-toggle-thumb {
  transform: translateX(18px);
}

.theme-toggle input:focus-visible + .theme-toggle-track {
  outline: 3px solid color-mix(in srgb, var(--blue) 70%, transparent);
  outline-offset: 3px;
}

.theme-toggle:hover .theme-toggle-thumb {
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.38),
    0 0 0 4px color-mix(in srgb, var(--ink) 10%, transparent);
}

.layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr) 220px;
  gap: 6px;
  padding: 9px;
}

.box {
  min-width: 0;
  border: 2px solid var(--line);
  background: var(--panel);
}

.box:not(.weather-box),
.comments-section {
  --ink: #17325d;
  --muted: #526b96;
  --line: #7f9edb;
  --panel: #eef3ff;
  --panel-soft: #dfe9fb;
  --gradient-text: #17325d;
  overflow: hidden;
  border: 2px solid #7f9edb;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(225, 234, 251, 0.96));
  color: #17325d;
  box-shadow:
    inset 1px 1px 0 #fff,
    inset -1px -1px 0 #b5c8ec,
    2px 3px 0 rgba(52, 83, 159, 0.2);
}

html[data-theme="dark"] .box:not(.weather-box),
html[data-theme="dark"] .comments-section {
  --ink: #eef4ff;
  --muted: #aebfe3;
  --line: #7188be;
  --panel: #11182d;
  --panel-soft: #18233f;
  --gradient-text: #eef4ff;
  border-color: #7188be;
  background:
    linear-gradient(135deg, rgba(27, 38, 69, 0.98), rgba(10, 15, 31, 0.98));
  color: #eef4ff;
  box-shadow:
    inset 1px 1px 0 #a9b9dc,
    inset -1px -1px 0 #26385f,
    2px 3px 0 rgba(0, 0, 0, 0.42);
}

.box h1,
.box h2 {
  margin: 0;
  background: var(--sky-gradient);
  border-bottom: 1px solid var(--line);
  color: var(--gradient-text);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.box:not(.weather-box) > h1,
.box:not(.weather-box) > h2,
.comments-section > h2 {
  border-bottom: 1px solid #b7c9eb;
  background:
    linear-gradient(180deg, #fff 0%, #f8fbff 46%, #dce7fa 100%);
  color: #17325d;
  text-align: left;
  text-shadow: 0 1px 0 #fff;
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 rgba(77, 109, 177, 0.2);
}

html[data-theme="dark"] .box:not(.weather-box) > h1,
html[data-theme="dark"] .box:not(.weather-box) > h2,
html[data-theme="dark"] .comments-section > h2 {
  border-bottom-color: #536b9f;
  background:
    linear-gradient(180deg, #52678f 0%, #34486f 45%, #202e50 100%);
  color: #fff;
  text-shadow: 0 1px 0 #11182d;
  box-shadow:
    inset 0 1px 0 #9badd1,
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.box h1 {
  padding: 0.7rem 1.2rem;
  font-size: clamp(1.75rem, 5vw, 3rem);
}

.box:not(.weather-box) > h1 {
  padding: 0.55rem 0.85rem;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.box h2 {
  padding: 0.5rem 0.9rem;
  font-size: 1.05rem;
}

.box:not(.weather-box) > h2,
.comments-section > h2 {
  padding: 0.45rem 0.75rem;
  font-size: 0.98rem;
}

.box p,
.box ul,
.box form,
.box dl,
.entry {
  margin: 0;
  padding: 1rem 1.1rem;
}

.rail {
  display: grid;
  gap: 6px;
  align-content: start;
}

.profile-box img {
  display: block;
  width: 88px;
  margin: 0.85rem auto 0;
  border: 1px solid var(--line);
}

.weather-box {
  overflow: hidden;
  border-width: 2px;
  border-style: solid;
  border-color: var(--line) var(--muted) var(--muted) var(--line);
  background:
    linear-gradient(rgba(5, 5, 11, 0.16), rgba(5, 5, 11, 0.26)),
    url("assets/images/weather/widget-background.png") center / cover no-repeat;
  color: var(--weather-text);
  font-family: "Segoe UI", Tahoma, Geneva, sans-serif;
  text-align: left;
  box-shadow:
    inset 1px 1px 0 #dbe7ff,
    inset -1px -1px 0 #344a73,
    3px 3px 0 rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .weather-box {
  --weather-widget-ink: #fff;
}

html[data-theme="light"] .weather-box {
  --weather-widget-ink: #000;
  background:
    linear-gradient(rgba(255, 253, 248, 0.46), rgba(255, 253, 248, 0.58)),
    url("assets/images/weather/widget-background.png") center / cover no-repeat;
}

.weather-box,
.weather-titlebar,
.weather-place,
.weather-temp,
.weather-note,
.weather-details,
.weather-details dt,
.weather-details dd {
  color: var(--weather-widget-ink, var(--weather-text));
}

.weather-titlebar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 22px;
  padding: 0.15rem 0.18rem 0.15rem 0.35rem;
  border-bottom: 2px solid var(--line);
  background: var(--weather-title);
  color: var(--weather-text);
  font-size: 0.78rem;
  font-weight: 500;
}

.weather-titlebar img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.weather-titlebar .window-controls {
  display: block;
  width: 54px;
  height: 18px;
  margin-left: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

.weather-box .weather-alert {
  display: block;
  width: fit-content;
  max-width: calc(100% - 1.4rem);
  margin: 0.08rem auto 0.25rem;
  border: 1px solid rgba(255, 210, 210, 0.9);
  border-radius: 999px;
  padding: 0.1rem 0.35rem;
  background: linear-gradient(
    180deg,
    rgba(255, 116, 108, 0.72),
    rgba(211, 61, 54, 0.72)
  );
  color: #fff;
  font-family: Tahoma, "MS Sans Serif", "Arial Narrow", sans-serif;
  font-size: 0.55rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  text-transform: lowercase;
  text-shadow: 1px 1px 0 rgba(110, 20, 15, 0.72);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.35),
    inset -1px -1px 0 rgba(88, 0, 0, 0.35);
}

.weather-alert[hidden] {
  display: none;
}

html[data-theme="light"] .weather-alert,
html[data-theme="dark"] .weather-alert {
  color: #fff;
}

.weather-place {
  margin: 0;
  padding: 0.55rem 0.7rem 0.1rem;
  color: var(--weather-text);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: left;
}

.weather-icon {
  display: block;
  width: 78px;
  height: 78px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.28));
}

.weather-temp {
  margin: 0;
  padding: 0 0 0.55rem;
  color: var(--weather-text);
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 2px rgba(255, 255, 255, 0.45);
}

.weather-note {
  padding: 0.1rem 0.7rem;
  color: var(--weather-text);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  text-transform: lowercase;
}

.weather-details {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0.7rem 0.65rem;
  color: var(--weather-text);
  font-size: 0.78rem;
}

.weather-details div {
  display: flex;
  justify-content: space-between;
  gap: 0.65rem;
  border-bottom: 1px dotted var(--muted);
  padding: 0.3rem 0;
}

.weather-details dt {
  color: var(--muted);
}

.weather-details dd {
  margin: 0;
  color: var(--weather-text);
  font-weight: 800;
  text-align: right;
}

html[data-theme="dark"] .weather-box,
html[data-theme="dark"] .weather-box * {
  color: #fff;
}

html[data-theme="light"] .weather-box,
html[data-theme="light"] .weather-box * {
  color: #000;
}

html[data-theme="dark"] .weather-box .weather-alert,
html[data-theme="light"] .weather-box .weather-alert {
  color: #fff;
}

.button-link,
button,
.link-grid a {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--blue);
  color: #fff;
  padding: 0.25rem 0.6rem;
  text-decoration: none;
}

.button-badge {
  width: 150px;
  margin: 0.85rem auto;
  padding: 0.25rem;
  border: 2px ridge var(--line);
  background: var(--blue);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.instagram-button {
  display: block;
  border: 1px solid #7f9edb;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #eaf3ff 48%, #d6e8ff 100%);
  color: #17325d;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 rgba(52, 83, 159, 0.2);
  text-decoration: none;
}

html[data-theme="dark"] .instagram-button {
  border-color: #7188be;
  background: linear-gradient(180deg, #52678f 0%, #34486f 48%, #202e50 100%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 #9badd1,
    0 2px 0 rgba(0, 0, 0, 0.38);
}

.side-picture-frame {
  margin: 0 0.85rem 0.85rem;
  padding: 0.35rem;
  border: 2px solid var(--line);
  background: var(--panel-soft);
}

.side-picture-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--masthead-left-bg);
  image-rendering: pixelated;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: #05050b;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

.feature {
  grid-column: 2 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 500px;
  overflow: hidden;
  text-align: left;
}

.feature h1 {
  border-bottom: 0;
  background: transparent;
  padding: 0 0 0.55rem;
  color: var(--ink);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  line-height: 1.15;
  text-align: left;
  text-shadow: none;
}

.feature h1::after {
  content: "";
  display: block;
  margin-top: 0.55rem;
  border-bottom: 1px dotted var(--muted);
}

.feature .kicker {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 650;
}

.feature-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
  gap: 1.1rem;
  align-items: start;
  padding: 1.15rem 1.15rem 2.6rem;
}

.feature-text {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.feature-copy {
  max-width: 610px;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.55;
  text-align: left;
}

.feature-widgets {
  display: grid;
  gap: 0.65rem;
}

.feature-widgets .box {
  box-shadow: 5px 5px 0 var(--shadow);
}

.feature-widgets .box h2 {
  padding: 0.35rem 0.65rem;
  font-size: 0.95rem;
  text-align: left;
}

.feature-widgets .box p,
.feature-widgets .box dl {
  padding: 0.75rem;
  font-size: 0.86rem;
}

.chat-messages {
  min-height: 64px;
  border-bottom: 1px dotted var(--muted);
}

.chat-messages p {
  padding: 0.65rem 0.75rem;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  padding: 0.65rem;
}

.chat-form input,
.chat-form button {
  min-height: 30px;
}

.chat-form button {
  padding-inline: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.postcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: auto;
  padding: 0 1.15rem 1.15rem;
}

.postcards a {
  display: grid;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.empty-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--blue);
}

.image-preview {
  background-position: center;
  background-size: cover;
  image-rendering: auto;
}

.game-preview {
  background-color: #05050b;
  background-position: center bottom;
  background-size: cover;
  image-rendering: pixelated;
}

.status-box dl {
  display: grid;
  gap: 0.5rem;
}

.status-box div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px dotted var(--muted);
}

.status-box dt {
  color: var(--muted);
}

.status-box dd {
  margin: 0;
}

.ticker {
  grid-column: 1 / -1;
  border: 2px solid var(--line);
  background: var(--sky-gradient);
  color: var(--gradient-text);
  padding: 0.45rem 1rem;
  font-weight: 600;
  font-size: 0.86rem;
  text-align: center;
}

.moon-photo-box {
  padding: 0.75rem;
}

.moon-photo-box img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  border: 2px solid var(--line);
}

fieldset {
  display: grid;
  gap: 0.2rem;
  border: 0;
  padding: 0;
}

label {
  display: block;
}

input[type="radio"] {
  width: auto;
}

.update-log,
.playlist {
  min-height: 160px;
}

.update-log li {
  margin-bottom: 0.35rem;
}

.playlist {
  padding: 0.75rem;
}

.playlist img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 136px;
  object-fit: contain;
  object-position: center bottom;
  border: 2px solid var(--line);
  background: #05050b;
  image-rendering: pixelated;
}

.lower-chat {
  min-height: 160px;
}

.lower-chat .chat-messages {
  min-height: 68px;
}

.site-footer {
  border-top: 2px solid var(--line);
  padding: 0.7rem 1rem;
  background: #05050b;
  color: var(--muted);
  text-align: center;
}

html[data-theme="light"] .site-footer {
  background: #eaf3ff;
  color: #17325d;
}

.site-footer p {
  margin: 0;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 6px;
  padding: 9px;
}

.page-panel {
  padding-bottom: 1rem;
}

.page-subheading {
  margin: -0.35rem 1.15rem 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

.video-page {
  padding-bottom: 1.15rem;
}

.youtube-player {
  position: relative;
  width: calc(100% - 2.3rem);
  margin: 1.15rem;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--line);
  background: #000;
  overflow: hidden;
}

.youtube-player iframe {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.youtube-player iframe[hidden] {
  display: none;
}

.youtube-player.is-ready iframe {
  opacity: 1;
}

.youtube-player-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  place-items: center;
  background:
    linear-gradient(rgba(5, 5, 11, 0.42), rgba(5, 5, 11, 0.7)),
    url("assets/images/chiptune-thumbnail.jpg") center / cover no-repeat;
  color: #fff;
  text-align: center;
}

.youtube-player-fallback p {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 2rem);
  font-weight: 800;
  text-shadow: 0 2px 8px #000;
}

.youtube-player-fallback a {
  border: 1px solid #fff;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  background: #fff;
  color: #05050b;
  font-weight: 800;
  text-decoration: none;
}

.youtube-player-fallback a:hover,
.youtube-player-fallback a:focus-visible {
  background: #e8eaff;
}

.youtube-channel-link {
  display: block;
  width: fit-content;
  margin: 0 auto;
  color: var(--ink);
  font-weight: 700;
  text-align: center;
}

.plain-list {
  list-style: square;
}

.gallery-grid,
.note-board,
.painting-grid,
.link-grid {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.animation-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 0.75rem;
}

.painting-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-grid article,
.note-board article {
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.painting-grid article {
  aspect-ratio: 4 / 3;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(113, 136, 190, 0.18), rgba(64, 88, 139, 0.16)),
    var(--panel);
}

.painting-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.painting-stage {
  margin: 1rem 1.15rem 1.15rem;
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: zoom-out;
}

.painting-stage[hidden],
.painting-grid[hidden] {
  display: none;
}

.painting-stage img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.painting-stage:focus-visible,
.hover-painting:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.hover-painting {
  cursor: zoom-in;
}

.comments-section {
  margin: 0 1.15rem 1.15rem;
  border: 2px solid var(--line);
  background: var(--panel);
}

.comments-section h2 {
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid #b7c9eb;
  background:
    linear-gradient(180deg, #fff 0%, #f8fbff 46%, #dce7fa 100%);
  color: #17325d;
  font-size: 0.98rem;
  text-align: left;
  text-shadow: 0 1px 0 #fff;
  text-transform: lowercase;
  box-shadow:
    inset 0 1px 0 #fff,
    0 1px 0 rgba(77, 109, 177, 0.2);
}

html[data-theme="dark"] .comments-section h2,
html[data-theme="dark"] .comment-entry header {
  border-bottom-color: #536b9f;
  background:
    linear-gradient(180deg, #52678f 0%, #34486f 45%, #202e50 100%);
  color: #fff;
  text-shadow: 0 1px 0 #11182d;
  box-shadow:
    inset 0 1px 0 #9badd1,
    0 1px 0 rgba(0, 0, 0, 0.4);
}

.comment-form {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.comment-form label {
  color: var(--ink);
  font-weight: 700;
}

.comment-form input,
.comment-form textarea {
  display: block;
  margin-top: 0.35rem;
}

.comment-form textarea {
  min-height: 110px;
}

.comment-form button {
  justify-self: start;
}

.comment-list {
  display: grid;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}

.comment-empty {
  margin: 0;
  border: 1px dashed var(--muted);
  padding: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.comment-entry {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.comment-entry header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #b7c9eb;
  background:
    linear-gradient(180deg, #fff 0%, #f8fbff 46%, #dce7fa 100%);
  color: #17325d;
  font-weight: 800;
}

.comment-entry time {
  font-size: 0.82rem;
  font-weight: 700;
}

.comment-entry p {
  margin: 0;
  padding: 0.75rem;
  color: var(--ink);
  white-space: pre-wrap;
}

.gallery-grid article:empty {
  min-height: 180px;
  border: 0;
  background: var(--blue);
}

.gallery-grid img {
  display: block;
  width: 100%;
}

.animation-stage {
  margin: 1rem 1.15rem 1.15rem;
  border: 2px solid var(--line);
  background: var(--panel);
  cursor: zoom-out;
}

/* the big animation only shows while somebody is looking at one */
.animation-stage[hidden],
.animation-grid[hidden] {
  display: none;
}

.animation-stage img,
.animation-stage video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  image-rendering: pixelated;
}

.animation-stage img[hidden],
.animation-stage video[hidden] {
  display: none;
}

.animation-stage video {
  background: #000;
}

.animation-stage img.animation-stage-contained {
  object-fit: contain;
}

.animation-stage:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.animation-grid article {
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(113, 136, 190, 0.18), rgba(64, 88, 139, 0.16)),
    var(--panel);
}

.animation-grid img,
.animation-grid video {
  aspect-ratio: 16 / 9;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.hover-gif,
.hover-video {
  cursor: pointer;
}

.hover-gif:focus-visible,
.hover-video:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.gallery-grid article h2,
.note-board article h2 {
  font-size: 0.98rem;
}

.entry + .entry {
  margin-top: 1rem;
  border-top: 1px dotted var(--muted);
}

.guestbook-form {
  display: grid;
  gap: 0.75rem;
}

.link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-grid a {
  border: 1px solid #7f9edb;
  border-radius: 3px;
  background: linear-gradient(180deg, #f4f9ff 0%, #dcecff 48%, #bed8f7 100%);
  color: #17325d;
  font-family: var(--font-ui);
  font-weight: 600;
  text-shadow: 0 1px 0 #fff;
  box-shadow:
    inset 0 1px 0 #fff,
    0 2px 0 rgba(52, 83, 159, 0.2);
}

.link-grid a:hover,
.link-grid a:focus-visible {
  background: linear-gradient(180deg, #fff 0%, #e7f2ff 48%, #c9dffc 100%);
}

html[data-theme="dark"] .link-grid a {
  border-color: #7188be;
  background: linear-gradient(180deg, #52678f 0%, #34486f 45%, #202e50 100%);
  color: #fff;
  text-shadow: 0 1px 0 #11182d;
  box-shadow:
    inset 0 1px 0 #9badd1,
    0 2px 0 rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .link-grid a:hover,
html[data-theme="dark"] .link-grid a:focus-visible {
  background: linear-gradient(180deg, #60769f 0%, #3d527b 45%, #27375b 100%);
}

@media (max-width: 860px) {
  .site-shell {
    width: calc(100% - 1rem);
    margin-top: 0;
  }

  .masthead {
    min-height: 160px;
    aspect-ratio: 3900 / 1600;
  }

  html[data-theme="light"] .masthead {
    background-image: url("assets/images/decor/light-mode-animation-mobile.gif?v=mobile-masthead-20260624");
  }

  html[data-theme="dark"] .masthead {
    background-image: url("assets/images/decor/dark-mode-cabin-mobile.gif?v=mobile-masthead-20260624");
  }

  .layout,
  .page-grid,
  .moon-photo-box {
    grid-template-columns: 1fr;
  }

  .main-nav .theme-toggle {
    position: static;
    justify-content: center;
    width: 100%;
    margin-top: 0.25rem;
  }

  .layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layout > * {
    order: 6;
  }

  .left-rail {
    display: contents;
  }

  .feature {
    grid-column: 1 / -1;
    order: 1;
  }

  .weather-box {
    grid-column: span 1;
    order: 2;
  }

  .left-rail .box:not(.weather-box) {
    grid-column: span 1;
    order: 3;
  }

  .ticker,
  .moon-photo-box,
  .update-log,
  .playlist {
    grid-column: 1 / -1;
  }

  .postcards,
  .gallery-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .animation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .moon {
    width: 3rem;
    height: 3rem;
  }

  .moon::after {
    width: 3rem;
    height: 3rem;
    left: 1rem;
  }
}

@media (max-width: 560px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .animation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-intro {
    grid-template-columns: 1fr;
    padding-right: 1.15rem;
  }

  .weather-box,
  .left-rail .box:not(.weather-box) {
    grid-column: 1;
  }
}
