/* tatmos ruin theme — shared by index.html and link.html */
:root {
  --void: #0f0d0b;
  --stone: #1a1714;
  --stone-mid: #2a2620;
  --stone-light: #3a3530;
  --stone-panel: #2e2a24;
  --carved: #a89478;
  --carved-bright: #d4c4a8;
  --carved-dim: #6e6354;
  --dead: #4a443c;
  --accent-warm: rgba(180, 140, 80, 0.15);
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", Georgia, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 20%, rgba(55, 45, 35, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 75%, rgba(35, 28, 22, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(20, 16, 12, 0.8) 0%, transparent 60%),
    linear-gradient(168deg, #1f1b17 0%, #12100e 45%, #0a0908 100%);
  color: var(--carved-bright);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.65;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--stone);
}
::-webkit-scrollbar-thumb {
  background: var(--stone-light);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4a443c;
}

/* —— stone buttons (links) —— */
a.link,
.link-btn,
.youtube-search a,
a.back {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  margin: 0.35rem 0.5rem 0.35rem 0;
  text-decoration: none;
  color: var(--carved-bright);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  background: linear-gradient(155deg, #3d3830 0%, #2e2a24 40%, #252219 100%);
  border: 1px solid #14110e;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.08),
    inset 0 -3px 6px rgba(0, 0, 0, 0.45),
    0 3px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  cursor: pointer;
  vertical-align: middle;
}

a.link:hover,
.link-btn:hover,
.youtube-search a:hover,
a.back:hover {
  transform: translateY(-2px);
  color: #f2ead8;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(160, 130, 80, 0.1);
}

a.link:active,
.link-btn:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* image card links */
a.link:has(.link-image) {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  max-width: 100%;
}

.link-image {
  max-width: 72px;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  opacity: 0.92;
}

a.link:hover .link-image {
  opacity: 1;
}

.link-text {
  font-size: 0.9rem;
}

/* —— content panels (index fragments) —— */
#content .memo,
#content .date,
#content .sound-engineer,
#content .sound-creator,
#content .youtube-search {
  margin: 1rem 1.25rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(160deg, var(--stone-mid) 0%, var(--stone) 100%);
  border: 1px solid #0a0908;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    inset 0 -2px 6px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.25);
  color: var(--carved-bright);
}

#content .date {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  color: var(--carved-bright);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

#content .memo {
  color: var(--carved);
  border-left: 3px solid rgba(168, 148, 120, 0.45);
}

#content .game-youtube-playlist {
  margin: 0 1.25rem 1rem;
  padding: 0;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

#content .game-youtube-playlist a.link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(155deg, #3a3530 0%, #28241e 100%);
  border: 1px solid rgba(168, 148, 120, 0.22);
  text-decoration: none;
}

#content .game-youtube-playlist a.link::before {
  content: "▶";
  font-size: 0.72rem;
  opacity: 0.75;
}

#content .game-youtube-playlist a.link:hover {
  color: var(--carved-bright);
  border-color: rgba(168, 148, 120, 0.4);
}

#content .sound-engineer {
  background: linear-gradient(160deg, #2a3228 0%, var(--stone) 100%);
  border-left: 3px solid rgba(120, 160, 120, 0.35);
}

#content .sound-creator {
  background: linear-gradient(160deg, #322a2e 0%, var(--stone) 100%);
  border-left: 3px solid rgba(180, 130, 150, 0.3);
}

#content .youtube-search {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.5rem 1.25rem;
}

#content > div > div:not([class]),
#content .content-item > div:not([class]) {
  margin: 0.5rem 1.25rem;
  color: var(--carved);
  line-height: 1.7;
}

#content .content-item {
  display: block;
  width: 100%;
  padding: 0.25rem 0 1rem;
}

#content h2 {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--carved-bright);
  margin: 1.25rem 1.25rem 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

#content .date a.link {
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  margin: 0 0.2rem;
  vertical-align: baseline;
}

#content a:not(.link) {
  color: #c4b08a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#content a:not(.link):hover {
  color: #f0e6d0;
}

/* game section — chip navigation */
.game-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 1rem 1.5rem;
  padding: 0.85rem 0 1rem;
  --game-nav-panel-peek: 2.85rem;
  background: linear-gradient(
    180deg,
    rgba(15, 13, 11, 0.98) 0%,
    rgba(15, 13, 11, 0.92) 75%,
    rgba(15, 13, 11, 0) 100%
  );
}

.game-nav-years {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 5.5rem), 1fr));
  gap: 0.35rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.15rem;
}

.game-nav-year {
  width: 100%;
  min-width: 0;
  padding: 0.38rem 0.55rem;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  color: var(--carved-dim);
  cursor: pointer;
  background: linear-gradient(155deg, #322e29 0%, #221f1b 100%);
  border: 1px solid #14110e;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.05);
  transition: color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.game-nav-year:hover {
  color: var(--carved);
  border-color: rgba(168, 148, 120, 0.3);
}

.game-nav-year.is-active {
  color: var(--carved-bright);
  border-color: rgba(168, 148, 120, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.1),
    0 0 10px rgba(160, 130, 80, 0.1);
}

.game-nav-year:focus-visible {
  outline: 1px solid rgba(196, 180, 152, 0.5);
  outline-offset: 2px;
}

/* 年のみ（2025）と年月（2018/12）で見た目を少し分ける */
.game-nav-year--ym {
  padding: 0.32rem 0.4rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  border-radius: 5px;
  color: rgba(168, 158, 142, 0.88);
  background: linear-gradient(160deg, #262320 0%, #1a1816 100%);
  border-color: rgba(20, 17, 14, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.03);
}

.game-nav-year--ym:hover {
  color: var(--carved);
  border-color: rgba(140, 125, 100, 0.28);
  background: linear-gradient(160deg, #2c2925 0%, #1e1b18 100%);
}

.game-nav-year--ym.is-active {
  color: rgba(232, 220, 198, 0.95);
  font-weight: 600;
  border-color: rgba(140, 120, 90, 0.42);
  background: linear-gradient(160deg, #353028 0%, #242018 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.07),
    0 0 6px rgba(140, 110, 70, 0.12);
}

.game-nav-panels {
  position: relative;
  overflow: hidden;
}

.game-nav-panels-track {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.1rem;
}

.game-nav-panels-track::-webkit-scrollbar {
  display: none;
}

.game-nav-panel {
  flex: 0 0 calc(100% - var(--game-nav-panel-peek));
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  opacity: 0.68;
  transition: opacity 0.28s ease;
}

.game-nav-panel.is-active {
  opacity: 1;
}

.game-nav-panel:not(.is-active) .game-list--multi-row {
  flex-wrap: nowrap;
  overflow: hidden;
  max-height: 2.2rem;
}

.game-nav-months {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}

.game-nav-month {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  font-family: var(--font-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--carved-dim);
  cursor: pointer;
  background: linear-gradient(155deg, #2c2824 0%, #1d1a17 100%);
  border: 1px solid #14110e;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.04);
  transition: color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.game-nav-month:hover {
  color: var(--carved);
  border-color: rgba(168, 148, 120, 0.28);
}

.game-nav-month.is-active {
  color: var(--carved-bright);
  border-color: rgba(168, 148, 120, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.08),
    0 0 8px rgba(160, 130, 80, 0.08);
}

.game-nav-month:focus-visible {
  outline: 1px solid rgba(196, 180, 152, 0.5);
  outline-offset: 2px;
}

.game-nav-month-panel:not(.is-active) {
  display: none;
}

.game-nav-panel:not(.is-active) .game-nav-months {
  display: none;
}

.game-nav-panel:not(.is-active) .game-nav-month-panel:not(.is-active) {
  display: none;
}

.game-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.game-list::-webkit-scrollbar {
  display: none;
}

/* タイトル数の多い年代は折り返し（最大3行） */
.game-list--multi-row {
  flex-wrap: wrap;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 7.75rem;
  scroll-snap-type: none;
  align-content: flex-start;
  scrollbar-width: none;
}

.game-list--multi-row::-webkit-scrollbar {
  display: none;
}

.game-list--multi-row .game-nav-chip {
  scroll-snap-align: unset;
}

.game-nav-chip {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  scroll-snap-align: start;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: left;
  color: var(--carved);
  cursor: pointer;
  background: linear-gradient(155deg, #3a3530 0%, #28241e 100%);
  border: 1px solid #14110e;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.07),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.game-nav-chip::after {
  content: "\2193";
  font-size: 0.65rem;
  opacity: 0.45;
  flex-shrink: 0;
}

.game-nav-chip:hover {
  transform: translateY(-2px);
  color: var(--carved-bright);
  border-color: rgba(168, 148, 120, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.1),
    0 5px 14px rgba(0, 0, 0, 0.4),
    0 0 12px rgba(160, 130, 80, 0.08);
}

.game-nav-chip:active {
  transform: translateY(0);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
}

.game-nav-chip:focus-visible {
  outline: 1px solid rgba(196, 180, 152, 0.5);
  outline-offset: 2px;
}

@container content-panel (max-width: 520px) {
  .game-nav-chip {
    max-width: 11rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 900px) {
  .game-nav-panel.is-active .game-list {
    flex-wrap: wrap;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .game-nav-panel.is-active .game-list--multi-row {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .game-nav-years {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 4.75rem), 1fr));
  }
}

@media (max-width: 480px) {
  .game-nav-years {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .game-nav {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .game-nav-chip {
    max-width: 11rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* game detail cards */
#content .game-card {
  scroll-margin-top: var(--game-nav-offset, 7rem);
  margin: 0 1rem 2rem;
  background: linear-gradient(165deg, #2c2822 0%, #1a1714 55%, #151310 100%);
  border: 1px solid rgba(30, 26, 22, 0.95);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.05),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

#content .game-card > .date {
  margin: 0;
  padding: 1.1rem 1.25rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.45;
  color: var(--carved-bright);
  background: linear-gradient(180deg, rgba(58, 53, 48, 0.45) 0%, transparent 100%);
  border: none;
  border-bottom: 1px solid rgba(168, 148, 120, 0.12);
  border-radius: 0;
  box-shadow: none;
}

#content .game-card > .memo {
  margin: 0;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-left: 3px solid rgba(168, 148, 120, 0.35);
  border-radius: 0;
  box-shadow: none;
  color: var(--carved);
  font-size: 0.92rem;
  line-height: 1.75;
}

#content .game-card > .lego-body {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: var(--carved);
  font-size: 0.92rem;
  line-height: 1.75;
}

#content .game-card > .lego-body p {
  margin: 0 0 0.85rem;
}

#content .game-card > .lego-body p:last-child,
#content .game-card > .lego-body ul:last-child,
#content .game-card > .lego-body blockquote:last-child {
  margin-bottom: 0;
}

#content .game-card > .lego-body ul {
  margin: 0 0 0.85rem 1.1rem;
  padding: 0;
}

#content .game-card > .lego-body li {
  margin-bottom: 0.35rem;
}

#content .game-card > .lego-body blockquote {
  margin: 0 0 0.85rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid rgba(168, 148, 120, 0.35);
  color: var(--carved);
}

#content .game-card > .lego-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.5rem 0 0.85rem;
  border-radius: 6px;
}

#content .game-card > .sound-creator,
#content .game-card > .sound-engineer {
  margin: 0.65rem 1.25rem 0;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  line-height: 1.65;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.03);
}

#content .game-card > .sound-creator::before,
#content .game-card > .sound-engineer::before {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 999px;
}

#content .game-card > .sound-creator::before {
  content: "クリエイター";
  color: rgba(220, 180, 190, 0.95);
  background: rgba(180, 130, 150, 0.18);
  border: 1px solid rgba(180, 130, 150, 0.25);
}

#content .game-card > .sound-engineer::before {
  content: "エンジニア";
  color: rgba(180, 210, 180, 0.95);
  background: rgba(120, 160, 120, 0.18);
  border: 1px solid rgba(120, 160, 120, 0.25);
}

#content .game-card > .sound-creator {
  background: linear-gradient(160deg, rgba(50, 42, 46, 0.85) 0%, rgba(30, 26, 24, 0.9) 100%);
  border: 1px solid rgba(180, 130, 150, 0.12);
  border-left: none;
}

#content .game-card > .sound-engineer {
  background: linear-gradient(160deg, rgba(42, 50, 40, 0.85) 0%, rgba(30, 26, 24, 0.9) 100%);
  border: 1px solid rgba(120, 160, 120, 0.12);
  border-left: none;
}

#content .game-card > .youtube-search {
  margin: 0;
  padding: 0.85rem 1.25rem 0.25rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

#content .game-card > .youtube-search a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.8rem;
  color: var(--carved);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(168, 148, 120, 0.22);
  border-radius: 8px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

#content .game-card > .youtube-search a::before {
  content: "▶";
  font-size: 0.6rem;
  opacity: 0.65;
}

#content .game-card > .youtube-search a:hover {
  color: var(--carved-bright);
  background: rgba(58, 53, 48, 0.5);
  border-color: rgba(168, 148, 120, 0.4);
}

#content .game-card > .video-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  max-width: none;
}

#content .game-card > .video-container iframe {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(20, 17, 14, 0.9);
  border-radius: 10px;
  background: var(--stone);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

#content .game-card > .video-container iframe[width="315"] {
  aspect-ratio: 9 / 16;
  max-width: 315px;
  justify-self: center;
}

#content .game-card > p:empty {
  display: none;
}

#content .game-card > .sound-creator:last-child,
#content .game-card > .sound-engineer:last-child,
#content .game-card > .video-container:last-child {
  margin-bottom: 0;
  padding-bottom: 1.25rem;
}

@media (max-width: 640px) {
  #content .game-card {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    border-radius: 12px;
  }
}

.video-container {
  padding: 0.75rem 1.25rem;
  margin: 0.5rem 0;
  max-width: 560px;
}

.video-container iframe {
  width: 100%;
  height: 280px;
  border: 1px solid #14110e;
  border-radius: 8px;
  background: var(--stone);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
  .video-container iframe {
    height: 200px;
  }
}

#content .link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 0 1.25rem 1.5rem;
}

#content .link-grid .link-btn {
  display: block;
  margin: 0;
  padding: 1rem 1.2rem 1.05rem;
  text-align: left;
}

#content .link-grid .link-btn .label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

#content .link-grid .link-btn .memo {
  display: block;
  margin: 0.4rem 0 0;
  padding: 0;
  background: none;
  border: none;
  border-left: none;
  box-shadow: none;
  font-size: 12px;
  font-weight: normal;
  color: var(--carved);
  line-height: 1.45;
  opacity: 0.9;
}

#content .game-card > p img {
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

#content .game-card > p video {
  display: block;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  #content .link-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #content .link-grid {
    grid-template-columns: 1fr;
  }
}

.image-link-container {
  padding: 0.5rem 1.25rem;
}

/* —— index shell layout —— */
body.site-shell {
  overflow: hidden;
}

.site-shell .container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.site-shell .sidebar {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
  width: min(300px, 34vw);
  flex-shrink: 0;
  padding: 1rem 0.65rem 1.5rem;
  background: linear-gradient(180deg, #1c1915 0%, #100e0c 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
}

.site-shell .sidebar-header {
  margin: 0 0.5rem 0.85rem;
  padding: 0.5rem 0.65rem 0.85rem;
  border-bottom: 1px solid rgba(168, 148, 120, 0.12);
  box-shadow: 0 1px 0 rgba(255, 248, 230, 0.03);
}

.site-shell .menu-title {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--carved-bright);
  border: none;
  box-shadow: none;
}

.site-shell .sidebar-tagline {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--carved-dim);
  line-height: 1.5;
}

.site-shell .sidebar-nav {
  flex: 0 0 auto;
}

.site-shell .nav-section-label {
  margin: 0.85rem 0.75rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--carved-dim);
  opacity: 0.85;
}

.site-shell .nav-section-label:first-of-type {
  margin-top: 0.25rem;
}

.site-shell .menu-item,
.site-shell a.menu-item {
  display: block;
  cursor: pointer;
  color: var(--carved-dim);
  padding: 0.6rem 0.85rem;
  margin: 0.2rem 0.4rem;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.site-shell .menu-item-profile {
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.35rem;
  background: rgba(58, 53, 48, 0.35);
  border-color: rgba(168, 148, 120, 0.1);
}

.site-shell .menu-item-label {
  display: block;
  font-size: 0.9rem;
  color: var(--carved-bright);
}

.site-shell .menu-item-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--carved-dim);
}

.site-shell .menu-item:hover,
.site-shell a.menu-item:hover {
  color: var(--carved-bright);
  background: rgba(58, 53, 48, 0.65);
  border-color: rgba(168, 148, 120, 0.22);
  transform: translateX(2px);
}

.site-shell .menu-item.active {
  color: var(--carved-bright);
  background: linear-gradient(155deg, #3a3530 0%, #2a261f 100%);
  border-color: #14110e;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.06),
    0 2px 10px rgba(0, 0, 0, 0.35);
  text-shadow: 0 0 12px rgba(180, 150, 100, 0.12);
}

.site-shell .menu-item.active .menu-item-label {
  color: var(--carved-bright);
}

.site-shell .menu-item-external::after {
  content: "\2197";
  float: right;
  font-size: 0.7rem;
  opacity: 0.45;
}

/* sidebar memory slideshow */
.memory-slideshow {
  display: none;
  flex-shrink: 0;
  margin: 0.65rem 0.4rem 0;
}

.memory-slideshow.is-ready {
  display: block;
}

.memory-slideshow-label {
  margin: 0 0 0.4rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--carved-dim);
}

.memory-slideshow-frame {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  max-height: min(28vh, 200px);
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(168, 148, 120, 0.18);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.2) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.04),
    0 6px 18px rgba(0, 0, 0, 0.35);
}

.memory-slideshow-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.memory-slideshow-layer {
  position: absolute;
  left: var(--mem-x, 50%);
  bottom: -8%;
  width: var(--mem-w, 62%);
  aspect-ratio: 4 / 3;
  opacity: 0;
  transform: translateX(-50%) translateY(22%);
  animation: memory-rise var(--mem-duration, 5.5s) linear var(--mem-delay, 0s) forwards;
  pointer-events: none;
  will-change: transform, opacity;
}

.memory-slideshow-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transform-origin: center center;
}

.memory-slideshow-layer.is-active img {
  animation: memory-wind var(--mem-wind-duration, 11s) ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes memory-rise {
  0% {
    transform: translateX(-50%) translateY(22%);
    opacity: 0;
  }
  6% {
    transform: translateX(-50%) translateY(18.04%);
    opacity: var(--mem-opacity, 0.38);
  }
  20% {
    transform: translateX(-50%) translateY(8.8%);
    opacity: var(--mem-opacity, 0.38);
  }
  40% {
    transform: translateX(-50%) translateY(-4.4%);
    opacity: var(--mem-opacity, 0.38);
  }
  60% {
    transform: translateX(-50%) translateY(-17.6%);
    opacity: calc(var(--mem-opacity, 0.38) * 0.85);
  }
  80% {
    transform: translateX(-50%) translateY(-30.8%);
    opacity: calc(var(--mem-opacity, 0.38) * 0.45);
  }
  94% {
    transform: translateX(-50%) translateY(-41.24%);
    opacity: calc(var(--mem-opacity, 0.38) * 0.12);
  }
  100% {
    transform: translateX(-50%) translateY(-44%);
    opacity: 0;
  }
}

@keyframes memory-wind {
  0% {
    transform: translateX(calc(var(--mem-sway, 1px) * -1))
      skewX(calc(var(--mem-skew, 0.5deg) * -1))
      skewY(0.12deg)
      rotate(-0.2deg);
  }
  35% {
    transform: translateX(calc(var(--mem-sway, 1px) * 0.25))
      skewX(calc(var(--mem-skew, 0.5deg) * 0.35))
      skewY(-0.1deg)
      rotate(0.12deg);
  }
  70% {
    transform: translateX(calc(var(--mem-sway, 1px) * -0.55))
      skewX(calc(var(--mem-skew, 0.5deg) * -0.15))
      skewY(0.08deg)
      rotate(-0.08deg);
  }
  100% {
    transform: translateX(var(--mem-sway, 1px))
      skewX(var(--mem-skew, 0.5deg))
      skewY(-0.06deg)
      rotate(0.15deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-slideshow-layer {
    animation: none;
    bottom: 10%;
    left: 50%;
    width: 70%;
    opacity: 0.55;
    transform: translateX(-50%);
  }

  .memory-slideshow-layer img {
    animation: none;
  }
}

.site-shell .sidebar-widgets {
  margin-top: auto;
  padding-top: 1rem;
}

.site-shell .main-panel {
  overflow-y: auto;
  height: 100vh;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 1.25rem 1.5rem 2.5rem;
  background: linear-gradient(180deg, rgba(26, 23, 20, 0.45) 0%, transparent 14%);
}

.site-shell .content-loader {
  margin: 2rem auto;
  max-width: 900px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--carved-dim);
}

.site-shell .content-loader[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .boot-screen.is-dismissed {
    transition: none;
  }
}

.site-shell .content:has(.game-nav) {
  scroll-padding-top: var(--game-nav-offset, 7rem);
}

.site-shell #content {
  max-width: 900px;
  margin: 0 auto;
  container-type: inline-size;
  container-name: content-panel;
}

.site-shell .sidebar-social {
  margin: 0 0.4rem;
  padding-top: 0.25rem;
  text-align: center;
}

.site-shell .sidebar-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  body.site-shell {
    overflow: auto;
  }

  .memory-slideshow {
    display: none !important;
  }

  .site-shell .container {
    flex-direction: column;
  }

  .site-shell .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    padding-bottom: 1rem;
  }

  .site-shell .sidebar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.35rem;
  }

  .site-shell .nav-section-label {
    flex: 0 0 100%;
    margin: 0.5rem 0.35rem 0.15rem;
  }

  .site-shell .menu-item,
  .site-shell a.menu-item {
    flex: 0 1 auto;
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 999px;
    background: rgba(58, 53, 48, 0.45);
    border-color: rgba(20, 17, 14, 0.8);
  }

  .site-shell .menu-item-profile {
    flex: 1 1 100%;
    border-radius: 10px;
  }

  .site-shell .menu-item:hover {
    transform: none;
  }

  .site-shell .sidebar-widgets {
    display: none;
  }

  .site-shell .main-panel {
    height: auto;
    min-height: 50vh;
    width: 100%;
    flex: 1 1 auto;
    padding: 1rem 0.75rem 2rem;
  }

  .site-shell #content {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .site-shell .main-panel {
    min-height: 55vh;
  }
}
