:root {
  --bg: #f2e4d2;
  --bg-muted: var(--bg);
  --bg-header: var(--bg);
  --text: #0e0b07;
  --muted: #4d3f32;
  --border: #d8c7b2;
  --border-strong: #c7b59c;
  --accent: #29407a;
  --accent-strong: #1f3260;
  --max-width: 110ch;
  --link: #111111;
  --link-hover: #111111;
  --pad: 28px;
  --pad-sm: 16px;
  --pad-lg: 40px;
  --gap-sm: 8px;
  --gap-md: 16px;
  --gap-lg: 28px;
  --panel-border: rgba(0, 0, 0, 0.08);
  --panel-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08), 0 8px 18px rgba(0, 0, 0, 0.12);
  --theme-transition: 0.3s ease;
}

:root.theme-dark {
  --bg: #0d0d10;
  --bg-muted: #111111;
  --bg-header: var(--bg);
  --text: #f1ede4;
  --muted: #b0abc2;
  --border: #2a2a32;
  --border-strong: #3a3a46;
  --accent: #9bb6ff;
  --accent-strong: #c6d4ff;
  --link: #f1ede4;
  --link-hover: #f1ede4;
  --panel-border: rgba(255, 255, 255, 0.1);
  --panel-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35), 0 8px 18px rgba(0, 0, 0, 0.32);
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/Instrument_Serif/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/Instrument_Serif/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Victor Mono";
  src: url("/fonts/Victor_Mono/static/VictorMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Victor Mono";
  src: url("/fonts/Victor_Mono/static/VictorMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Victor Mono";
  src: url("/fonts/Victor_Mono/static/VictorMono-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DotGothic16";
  src: url("/fonts/DotGothic16/DotGothic16-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "M PLUS 1 Code";
  src: url("/fonts/M_PLUS_1_Code/MPLUS1Code-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:lang(ja),
.jp {
  font-family: "DotGothic16", "Victor Mono", "Instrument Serif", "Times New Roman", sans-serif;
  letter-spacing: 0.02em;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Victor Mono", "DotGothic16", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  filter: blur(0.3px);
}

body.is-home {
  # background: url("/images/desktop-bg.png");
  # background-size: cover;
  # background-repeat: no-repeat;
}

body,
.page,
.shell,
.site-header,
.site-footer {
  transition: background-color var(--theme-transition), color var(--theme-transition), border-color var(--theme-transition);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  padding: 4px 1.6vw 4px;
  position: sticky;
  top: 0;
  background: var(--bg-header);
  backdrop-filter: blur(6px);
  z-index: 10;
  transition: border-color var(--theme-transition), box-shadow 0.25s ease, background-color var(--theme-transition);
  background: var(--bg-muted);
  box-shadow: 0 -9px 20px -20px inset cornsilk;
}

.site-header.is-scrolled {
  box-shadow:
    0 -9px 20px -20px inset cornsilk,
    0 10px 28px rgba(0, 0, 0, 0.08);
  background-color: var(--bg-header);
}

.theme-dark .site-header.is-scrolled {
  box-shadow:
    0 -9px 20px -20px inset cornsilk,
    0 16px 36px #090909;
  border: none;
}

/* menu overlay removed */

@media (max-width: 760px) {
  body {
    overscroll-behavior-y: auto;
    filter: none;
  }

  .page {
    min-height: auto;
  }

  .site-header {
    position: static;
    top: auto;
    backdrop-filter: none;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding-bottom: 14px;
  }

  .site-title {
    min-width: auto;
  }

  .site-header .theme-toggle {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .bottom-meta {
    display: none;
  }

.shell {
  padding: var(--pad) 5vw 96px;
}

  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}

.title-part {
  display: inline-block;
}

.title-part--goth {
  font-family: "Instrument Serif", "DotGothic16", "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.title-part--serif {
  font-family: "DotGothic16", "Victor Mono", "Times New Roman", serif;
  letter-spacing: 0.02em;
}

.title-part--bold {
  font-family: "Arial Black", "Instrument Serif", "Times New Roman", serif;
  font-style: italic;
  letter-spacing: 0.02em;
}

.title-part--tm {
  font-family: "Arial Black", "Instrument Serif", "Times New Roman", serif;
  font-style: italic;
  letter-spacing: 0.02em;
  vertical-align: super;
  font-size: 0.65em;
}

.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  font-size: 0.9rem;
  align-items: flex-end;
  font-family: "DotGothic16", "Victor Mono", "M PLUS 1 Code", monospace;
}

.site-nav.full-nav {
  display: flex;
}

.site-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  grid-column: 1;
  justify-content: flex-start;
}

.header-clock {
  grid-column: 2;
  justify-self: end;
  font-family: "Instrument Serif", "DotGothic16", monospace;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-title-label {
  font-family: "Instrument Serif", "DotGothic16", "Victor Mono", monospace;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--muted) !important;
}

.site-title-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: inline-block;
}

.site-title-label:hover,
.site-title-label:focus-visible {
  text-decoration: none;
}

.haiku-shell {
  text-align: center;
}

.article.haiku-article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  flex: 1 1 auto;
  margin: auto;
  padding: var(--pad-sm) 5vw;
  box-sizing: border-box;
}

body.haiku-shell .article.haiku-article {
  flex: 1 1 auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0 5vw;
}

body.haiku-shell .article.haiku-article .article-head {
  margin: 0;
}

body.haiku-shell .article.haiku-article .article-head h1 {
  margin: 0;
}

body.haiku-shell .article.haiku-article .article-controls {
  display: none;
}

.article.haiku-article .article-head,
.article.haiku-article .lang-switch,
.article.haiku-article .lang-actions,
.article.haiku-article .article-controls,
.article.haiku-article section {
  text-align: center;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.article.haiku-article section {
  width: min(620px, 92vw);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--gap-md);
  text-align: center;
  flex-direction: row-reverse;
}

.article.haiku-article section p {
  writing-mode: vertical-rl;
  font-size: 3rem;
  margin: 0;
  animation: ui-flicker 3s infinite;
}

/* Haiku full-screen centering */
body.haiku-shell {
  min-height: 100vh;
  overflow: hidden;
}

body.haiku-shell .site-header,
body.haiku-shell .site-footer {
  display: none;
}

body.haiku-shell .page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.haiku-shell .shell {
  max-width: none;
  width: 100%;
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
  line-height: initial;
  display: inline-block;
}

.hide-mobile {
  display: inline-flex;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: underline;
}

.theme-toggle {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, transform 0.18s cubic-bezier(0.2, 0.7, 0.4, 1), background-color 0.2s ease;
  line-height: initial;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  font-family: "DotGothic16", "Victor Mono", monospace;
  text-decoration: none;
}

@media (max-width: 720px) {
  .hide-mobile {
    display: none;
  }
  .header-clock {
    display: none;
  }
  .desktop-icons {
    display: none;
  }

  .mobile-home-list {
    display: block;
  }

  .site-header {
    padding: 10px 3vw 10px;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: flex-end;
  }

  .site-title a {
    font-size: 1.2rem;
  }

  .site-actions {
    justify-content: flex-end;
    gap: 10px;
    align-items: flex-end;
  }

  .shell {
    padding: var(--pad) 5vw 60px;
  }
}

img {
  border-radius: 5px;
  width: -webkit-fill-available;
}

.theme-toggle img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  filter: grayscale(1);
}
:root:not(.theme-dark) .theme-toggle img {
  transform: scaleX(-1);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: scale(1.02);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.shell.vod-wide,
.shell.book-shell,
.shell.article-shell,
.shell.about-shell {
  max-width: var(--max-width);
}

.shell.article-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.about-portrait-wrap {
  position: relative;
  margin: 3rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-portrait-banner {
  position: absolute;
  inset: -18px;
  background: url("/images/desert-banner.png");
  background-size: cover;
  border-radius: 5px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
  z-index: 0;
  animation: banner-shift 10s ease-in-out infinite;
  filter: saturate(.8) blur(.5px) !important;
}


.about-portrait-img {
  position: relative;
  z-index: 1;
  width: 400px;
  max-width: 100%;
  animation: floating 3s ease-in-out infinite;
  display: block;
  filter: blur(0.8px);
}

@keyframes banner-shift {
  0%, 100% { transform: translateY(4px); }
  50% { transform: translateY(-6px); }
}

@keyframes floating {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.about-portrait-img::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: 24px;
  filter: blur(0.8px);
  box-shadow:
    1px 1px 12px 2px lime,
    0 0 0 0 transparent;
  animation: drop-hue 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes drop-hue {
  0% { box-shadow: 1px 1px 12px 2px lime, 0 0 0 0 transparent; }
  50% { box-shadow: 1px 1px 14px 2px #5b1f8f, 0 0 0 0 transparent; }
  100% { box-shadow: 1px 1px 12px 2px lime, 0 0 0 0 transparent; }
}

.article img,
.article p img,
.article figure img {
  width: -webkit-fill-available;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(0.95) contrast(1.05) brightness(1.05) hue-rotate(80deg) saturate(0.8);
  position: relative;
  display: block;
  height: auto;
  margin-bottom: 10px;
}

:root:not(.theme-dark) .article img,
:root:not(.theme-dark) .article p img,
:root:not(.theme-dark) .article figure img {
  box-shadow: 3px 3px 3px var(--border);
}

.article figure {
  width: -webkit-fill-available;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.2em;
}

.float-figure {
  float: right;
  max-width: 320px;
  margin: 0 0 1em 1.4em;
}

.float-figure img {
  width: 100%;
  height: auto;
}

.float-figure figcaption {
  text-align: left;
}

.float-figure-left {
  float: left;
  max-width: 320px;
  margin: 0 1.4em 1em 0;
}

@media (max-width: 720px) {
  .float-figure,
  .float-figure-left {
    float: none;
    max-width: 100%;
    margin: 0 0 1em 0;
  }

  .float-figure figcaption,
  .float-figure-left figcaption {
    text-align: center;
  }
}

figcaption {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.article en,
.article jp,
.article es,
.article [data-lang] {
  display: block;
}

.article img::after,
.article figure img::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.08) 0.8px, transparent 0),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 2px 2px, 3px 3px;
  mix-blend-mode: soft-light;
  opacity: 0.5;
}

.about-intro {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: nowrap;
  margin-bottom: 26px;
}

.about-facts {
  border-collapse: collapse;
  min-width: 240px;
  margin-top: 10px;
  flex: 1;
  font-size: 0.92rem;
}

.about-facts th,
.about-facts td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.about-facts th {
  font-weight: 600;
  width: 110px;
  color: var(--muted);
}

.about-facts tr:last-child th,
.about-facts tr:last-child td {
  border-bottom: none;
}

.status-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 0 2px currentColor,
    0 0 14px 3px currentColor,
    0 0 22px 4px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  animation: status-pulse 2.4s ease-in-out infinite;
}

.status-hungry {
  color: #ff3b3b;
}

.status-sleepy {
  color: #c763ff;
}

.status-scheming {
  color: #00ffb3;
}

.status-short {
  color: #ffb600;
}

.status-lost {
  color: #00a2ff;
}

@keyframes status-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px currentColor,
      0 0 14px 3px currentColor,
      0 0 22px 4px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow:
      0 0 0 3px currentColor,
      0 0 20px 4px currentColor,
      0 0 28px 4px rgba(0, 0, 0, 0.25);
  }
}

.age-counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, #111 25%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, #111 25%, rgba(0, 0, 0, 0) 100%);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

@media (max-width: 780px) {
  .shell.about-shell {
    max-width: 100%;
  }

  .about-intro {
    flex-direction: column;
    flex-wrap: wrap;
  }

  .about-portrait {
    margin: 0 auto 18px;
  }

  .about-facts {
    width: 100%;
  }
}

.shell {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 36px 6vw 72px;
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Instrument Serif", "DotGothic16", "Times New Roman", serif;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.3em 0;
  animation: ui-flicker 6s ease-in-out infinite;
}

h1 {
  font-size: 3.7rem;
  line-height: 1.1;
}

h2 {
  font-size: 2.8rem;
}

h3 {
  font-size: 2.2rem;
}

:lang(ja) h1,
:lang(ja) h2,
.jp h1,
.jp h2 {
  font-size: 2rem;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1.1em;
}

blockquote {
  font-size: 1.5rem;
  margin: 0 0 1.1em;
  padding: 0.6em 0;
  font-family: "Instrument Serif", "DotGothic16", "Times New Roman", serif;
  font-style: italic;
  animation: ui-flicker 6s ease-in-out infinite;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

b,
strong {
  font-family: "Victor Mono", "DotGothic16", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  animation: ui-flicker 6s ease-in-out infinite;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

:root.theme-dark a,
:root.theme-dark a:hover {
  color: var(--link-hover);
}

ul,
ol {
  padding-left: 1.4em;
  margin: 0 0 1.2em;
}

li + li {
  margin-top: 0.35em;
}

hr {
  display: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4em;
}

.subtitle {
  font-style: italic;
  color: var(--muted);
  margin: -0.3em 0 0.8em;
  animation: ui-flicker 6s ease-in-out infinite;
}

.date,
.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.article {
  display: grid;
  gap: 1.2em;
}

.article-head {
  margin-bottom: 0.4em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  justify-content: space-between;
  flex-direction: row;
}

.article-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin-top: -30px;
  margin-right: auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lang-btn,
.tts-toggle,
.tts-stop {
  font-family: "DotGothic16";
  padding: 8px 12px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.2));
  background: rgba(235, 226, 214, 0.94);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.theme-dark .lang-btn,
.theme-dark .tts-toggle,
.theme-dark .tts-stop {
  background: rgba(255, 255, 255, 0.06);
}

.lang-btn:active,
.tts-toggle:active,
.tts-stop:active {
  background: rgba(255, 255, 255, 0.2);
}

.theme-dark .lang-btn:active,
.theme-dark .tts-toggle:active,
.theme-dark .tts-stop:active {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 480px) {
  .lang-actions {
    gap: 4px;
  }
  .lang-btn,
  .tts-toggle,
  .tts-stop {
    min-width: 35px;
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .article-controls {
    gap: 8px;
    padding: 0;
  }
  .title-part {
    font-size: .9rem;
  }
}

.tts-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.tts-stop {
  padding: 8px 10px;
  opacity: 0;
  pointer-events: none;
}

.tts-stop.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.tts-stop.is-unavailable {
  opacity: 1;
  pointer-events: none;
  animation: stop-unavailable 3.18s ease-out forwards;
}

.tts-stop:hover,
.tts-stop:focus-visible {
  border-color: #111111;
  background: var(--bg-header);
}

.theme-dark .tts-stop:hover,
.theme-dark .tts-stop:focus-visible {
  border-color: #f3f1e8;
}

.tts-toggle.is-loading { cursor: progress; }
.tts-toggle.is-error { opacity: 0; pointer-events: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toast-error {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translate(-50%, 0);
  background: #b00020;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 9999;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  font-family: "Victor Mono", "M PLUS 1 Code", monospace;
  opacity: 0;
  animation: toast-in 0.18s ease-out forwards, toast-out 0.2s ease-in forwards 3s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
}

@keyframes stop-unavailable {
  0% { opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.article-footer {
  margin-top: 2em;
  padding-top: 1em;
  border-top: none;
}

.chapter-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  margin: 1.6em 0 0.8em;
  border-top: none;
  border-bottom: none;
}

.chapter-nav a {
  color: #0f0f0f;
  text-decoration: underline;
}

.align-right {
  text-align: right;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
}

.meta-label {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 1em 0 0;
}

.post-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.post-list a {
  color: var(--text);
  text-decoration: none;
}

.post-list a:hover {
  color: #0f0f0f;
  text-decoration: underline;
}

.post-title {
  font-family: "Instrument Serif", "DotGothic16", serif;
  font-size: 1.6rem;
  margin: 0 0 0.2em;
}

.post-meta {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.tag {
  display: inline-block;
  font-size: 0.85rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.hero {
  margin-bottom: 2.4em;
}

.hero h1 {
  margin-bottom: 0.25em;
}

.hero p {
  max-width: 60ch;
}

.desktop-area {
  padding: 24px clamp(14px, 5vw, 60px) 60px;
  min-height: 65vh;
  background:
    radial-gradient(circle at 8px 8px, rgba(77, 63, 50, 0.14) 1px, transparent 0) repeat;
  background-size: 24px 24px;
}

.desktop-icons {
  position: relative;
  min-height: 65vh;
  padding: 6px;
}

.desktop-icon {
  position: absolute;
  width: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-family: "DotGothic16", "Instrument Serif", serif;
}

.desktop-icon--about {
  z-index: 2;
}

.desktop-icon__thumb {
  width: 50px;
  height: 72px;
  display: grid;
  place-items: center;
}

.desktop-icon__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 3px;
}

.desktop-icon__label {
  font-family: "DotGothic16", "Instrument Serif", "Victor Mono", sans-serif;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.3;
  max-width: 140px;
  color: var(--text);
  padding: 3px 3px;
  line-height: 0.95rem;
}

.desktop-icon:hover .desktop-icon__thumb,
.desktop-icon:focus-visible .desktop-icon__thumb {
  transform: translateY(-2px);
  box-shadow: none;
}

.desktop-icon:hover .desktop-icon__label,
.desktop-icon:focus-visible .desktop-icon__label {
  text-decoration: underline;
}

.desktop-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  pointer-events: none;
  text-align: center;
}

.desktop-modal.is-open {
  display: flex;
}

.desktop-modal__frame {
  position: relative;
  display: inline-block;
  pointer-events: auto;
  margin: 0 auto;
}

.desktop-modal img {
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  animation: ui-flicker 4s ease-in-out infinite;
}

.desktop-modal__caption {
  color: var(--text);
  font-family: "DotGothic16", "Victor Mono", monospace;
  font-size: 0.95rem;
  margin-top: 8px;
  text-align: center;
  pointer-events: auto;
}

.mobile-home-list {
  display: none;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.mobile-home-list li + li {
  margin-top: 10px;
}

.mobile-home-list a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
  text-decoration: none;
  font-family: "DotGothic16", "Instrument Serif", serif;
}

.mobile-home-list a:hover,
.mobile-home-list a:focus-visible {
  text-decoration: underline;
}

[data-requires-end="true"] {
  display: none !important;
}

.has-end .desktop-icon[data-requires-end="true"] {
  display: flex !important;
}

.has-end .mobile-home-list [data-requires-end="true"] {
  display: block !important;
}

.desktop-icons.desktop-grid {
  display: grid;
  position: static;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 24px;
  min-height: auto;
}

.desktop-icons.desktop-grid .desktop-icon {
  position: relative;
  width: auto;
  transform: none !important;
}

.desktop-icons.desktop-grid .desktop-icon--about {
  position: relative;
}

.desktop-icons.desktop-grid .desktop-icon__thumb {
  margin: 0 auto;
}

.hero-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Instrument Serif", "DotGothic16", "Times New Roman", serif;
}

.hero-title-logo {
  width: 80px;
  height: auto;
  display: inline-block;
  mix-blend-mode: multiply;
}

.grid {
  display: grid;
  gap: 1.4em;
}

.card {
  padding: 1.2em 1.4em;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.card h3 {
  margin: 0 0 0.4em;
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 1em 0 2em;
}

.search-box input {
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.site-footer {
  border-top: 2px ridge rgba(0, 0, 0, 0.12);
  padding: 4px 1.6vw 4px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.95rem;
  font-family: "Instrument Serif", "DotGothic16", "Times New Roman", serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.footer-brand {
  font-family: "Instrument Serif", "DotGothic16", "Times New Roman", serif;
}

.footer-logo-img {
  width: 46px;
  height: auto;
}

@keyframes ui-flicker {
  0%, 90%, 100% { opacity: 1; }
  91% { opacity: 0.94; }
  93% { opacity: 1; }
  95% { opacity: 0.86; }
  97% { opacity: 1; }
}

.home-shell {
   max-width: 100vw;
   margin: 0px 0px;
}

@media (max-width: 760px) {
  .shell.home-shell {
    padding-bottom: 120px;
  }

  :root {
    --pad: 20px;
  }

  .site-header {
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .site-title {
    min-width: auto;
  }

  .site-header .theme-toggle {
    flex: 0 0 auto;
  }

  .theme-toggle__label, {
    color: var(--muted);
  }

  .site-footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
  }

  .bottom-meta {
    display: none;
  }

  .shell {
    padding: 28px 5vw 96px;
  }

  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 1.8rem;
  }
}
@media (max-width: 900px) {
  .hide-mobile {
    display: none !important;
  }
}
