@import url("https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700&display=swap");
:root {
  color-scheme: light;
  --ink: #3a2a24;
  --muted: #6f564c;
  --line: #f0e0d2;
  --cream: #fff6ec;
  --paper: #ffffff;
  --pink: #e23e6b;
  --pink-soft: #ffe4ee;
  --yellow: #e7a82e;
  --yellow-soft: #fff1c9;
  --green: #1f7a45;
  --green-soft: #e5f8e4;
  --blue: #1d5f99;
  --blue-soft: #e3f4ff;
  --lilac: #6944b8;
  --lilac-soft: #f1e9ff;
  --orange: #c65a22;
  --orange-soft: #ffe8d8;
  --shadow: 0 12px 32px rgba(120, 70, 40, 0.08);
  --sidebar: 280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
}

body {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", "WenQuanYi Micro Hei", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 1.65;
  min-height: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 0%, #ffe1ee 0 160px, transparent 162px),
    radial-gradient(circle at 100% 8%, #d9f3ff 0 200px, transparent 202px),
    radial-gradient(circle at 90% 100%, #e7f8df 0 180px, transparent 182px);
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 3px solid #1d5f99;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: white;
  padding: 8px 12px;
  border-radius: 12px;
  z-index: 80;
}

.skip:focus { top: 12px; }

h1, h2, h3, p { margin: 0; }

h1, h2, h3, .demo-badge, .nav-btn, .segmented button, .detail-close, .file-btn, .arcade-btn {
  font-weight: 700;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar);
  height: 100vh;
  height: 100dvh;
  overflow: auto;
  background: #fffdf9;
  border-right: 1px solid var(--line);
  z-index: 40;
  padding: 18px 14px 28px;
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.sidebar-kicker {
  color: var(--pink);
  font-size: 14px;
  font-weight: 700;
}

.sidebar-title {
  font-size: 22px;
  font-weight: 700;
}

.sidebar-close {
  display: none;
  border: 0;
  background: var(--pink-soft);
  color: var(--pink);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 14px;
}

.nav-group { margin-top: 16px; }

.nav-label {
  margin: 0 8px 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 14px;
  min-height: 44px;
  padding: 8px 10px;
}

.nav-btn:hover { background: #fff1f5; }

.nav-btn[aria-current="true"] { background: var(--pink-soft); }

.nav-count {
  flex: none;
  min-width: 28px;
  text-align: center;
  background: var(--yellow-soft);
  border-radius: 999px;
  font-size: 14px;
  padding: 2px 8px;
}

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  border: 0;
  background: rgba(58, 42, 36, 0.35);
  color: transparent;
}

.main {
  margin-left: var(--sidebar);
  min-width: 0;
  padding: 20px 28px 56px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 0;
  background: white;
  border-radius: 999px;
  min-height: 48px;
  padding: 0 14px 0 12px;
  box-shadow: var(--shadow);
}

.burger {
  width: 18px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  flex: none;
}

.brand-mark i {
  display: block;
  border-radius: 6px;
}

.brand-mark i:nth-child(1) { background: #ff8ba7; }
.brand-mark i:nth-child(2) { background: #ffd15c; }
.brand-mark i:nth-child(3) { background: #7ed9a4; }
.brand-mark i:nth-child(4) { background: #7ec8ff; }

h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.25;
}

.brand p { color: var(--muted); font-size: 15px; }

.demo-badge {
  flex: none;
  margin: 0;
  background: var(--pink);
  color: white;
  border-radius: 999px;
  letter-spacing: 0.08em;
  font-size: 13px;
  padding: 6px 10px;
}

.search-slot { margin-top: 18px; }

.search-slot label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 2px solid #f3d7c4;
  border-radius: 18px;
  padding: 0 14px;
  min-height: 56px;
  box-shadow: var(--shadow);
}

.search-field svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--pink);
}

.search-field input {
  width: 100%;
  border: 0;
  background: transparent;
  min-height: 52px;
  padding: 0;
}

.search-field input:focus { outline: none; }

.search-field:focus-within {
  border-color: #1d5f99;
  box-shadow: 0 0 0 3px rgba(29, 95, 153, 0.18);
}

.search-note, .mode-note, .demo-banner, .section-head p, .byline, .site-footer {
  color: var(--muted);
}

.search-note { margin-top: 6px; font-size: 15px; }

.demo-banner {
  margin-top: 14px;
  background: white;
  border-radius: 18px;
  padding: 12px 16px;
  border: 2px dashed #f3c1d0;
}

.group-bar {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.group-label { font-weight: 700; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: white;
  padding: 6px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  flex: 1;
  min-width: min(100%, 360px);
  max-width: 520px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 14px;
  min-height: 48px;
  padding: 8px 12px;
}

.segmented button[aria-pressed="true"] {
  background: var(--pink);
  color: white;
}

.status {
  margin-top: 18px;
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
}

.status[hidden] { display: none; }

.status-error {
  background: #fff1f0;
  color: #9f1239;
}

.gallery-section { margin-top: 28px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 8px;
}

.section-head h2 {
  display: inline-block;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  background-image: linear-gradient(#ffe08a, #ffe08a);
  background-repeat: no-repeat;
  background-size: 100% 0.42em;
  background-position: 0 88%;
}

.section-head-contest h2 {
  background-image: linear-gradient(#ffd0de, #ffd0de);
}

.section-count {
  margin: 0;
  background: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mode-note { margin: 4px 0 12px; }

.shows {
  display: grid;
  gap: 22px;
}

.show-card {
  background: white;
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
  border-top: 8px solid var(--accent, #ffb088);
}

.show-card[data-accent="pink"] { --accent: #ff8ba7; }
.show-card[data-accent="yellow"] { --accent: #ffd15c; }
.show-card[data-accent="orange"] { --accent: #ffb088; }
.show-card[data-accent="blue"] { --accent: #7ec8ff; }
.show-card[data-accent="green"] { --accent: #7ed9a4; }
.show-card[data-accent="lilac"] { --accent: #c7b0ff; }

.show-card.is-target {
  box-shadow: 0 0 0 4px var(--accent, #ffb088), var(--shadow);
}

.show-kicker {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.show-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.show-head h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

.show-count { color: var(--muted); font-size: 15px; }

.media {
  position: relative;
  background: #fff3e4;
  border-radius: 22px;
}

.media img,
.media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
  background: #fff3e4;
}


.placeholder-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: linear-gradient(160deg, #ffe4ee, #fff4c8 50%, #d9f3ff);
  font-size: 64px;
}

.open-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  border: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%);
  border-radius: 22px;
  padding: 0;
  color: inherit;
  text-align: left;
}

.media.is-video .open-hit {
  bottom: 52px;
  background: none;
  align-items: flex-start;
}

.open-hit .more-pill { margin: 12px 0 0 14px; }

.below-caption { margin-top: 12px; }

.slide-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: calc(100% - 28px);
  margin: 0 14px 12px;
  padding: 10px 12px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 16px rgba(58, 42, 36, 0.08);
}

.video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  background: var(--pink);
  color: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 15px;
}

.more-pill {
  background: var(--pink-soft);
  color: var(--pink);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
}

.nav-arrow {
  position: absolute;
  top: 34%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: white;
  box-shadow: 0 6px 16px rgba(58, 42, 36, 0.18);
  font-size: 24px;
  line-height: 1;
}

.nav-prev { left: 10px; }
.nav-next { right: 10px; }

.nav-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.caption { margin-top: 12px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
}

.chip[data-tone="minecraft"] { background: var(--green-soft); color: var(--green); }
.chip[data-tone="arcade"] { background: var(--pink-soft); color: var(--pink); }
.chip[data-tone="contest"] { background: var(--yellow-soft); color: #8a5a00; }
.chip[data-tone="course"] { background: var(--orange-soft); color: var(--orange); }
.chip[data-tone="year"] { background: var(--lilac-soft); color: var(--lilac); }

.slide-title {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
}

.byline {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.id-pill {
  background: #fff4d8;
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 700;
}

.pager {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.dots { display: flex; flex-wrap: wrap; gap: 6px; }

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #f0d8c8;
}

.dot[aria-current="true"] {
  background: var(--pink);
  width: 26px;
}

.counter { color: var(--muted); font-size: 15px; font-weight: 700; }

.empty {
  background: white;
  border-radius: 20px;
  padding: 18px;
}

.site-footer {
  margin-top: 36px;
  font-size: 15px;
}

.site-footer code {
  background: white;
  padding: 2px 6px;
  border-radius: 8px;
}

.detail {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(980px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  margin: auto;
}

.detail::backdrop { background: rgba(58, 42, 36, 0.45); }

.detail-card {
  background: white;
  border-radius: 28px;
  padding: 14px 16px 22px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
}

.detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
  padding-bottom: 8px;
}

.detail-kicker { color: var(--pink); font-weight: 700; }

.detail-close {
  border: 0;
  background: var(--pink);
  color: white;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}

.detail-visual img,
.detail-visual video {
  width: 100%;
  border-radius: 20px;
  display: block;
  background: #fff3e4;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-copy h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.3;
  margin: 4px 0 8px;
}

.detail-id {
  font-size: 20px;
  margin-bottom: 8px;
}

.detail-id strong {
  background: #fff4d8;
  border-radius: 10px;
  padding: 2px 8px;
}

.detail-desc { white-space: pre-wrap; }

.detail-block { margin-top: 16px; }

.detail-block h3 { font-size: 18px; margin-bottom: 8px; }

.file-list, .arcade-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.file-btn, .arcade-btn, .text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
}

.file-btn {
  background: var(--green-soft);
  color: var(--green);
}

.arcade-btn {
  border: 0;
  background: var(--pink);
  color: white;
}

.arcade-btn:disabled {
  background: #f8d5e0;
  color: var(--pink);
}

.text-link { color: var(--blue); background: var(--blue-soft); }

.arcade-note { font-size: 15px; color: var(--muted); margin-bottom: 8px; }

.arcade-frame {
  width: 100%;
  height: min(520px, 70vh);
  border: 0;
  border-radius: 18px;
  background: #fff6ec;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 12px 0 30px rgba(58, 42, 36, 0.12);
  }

  body.nav-open .sidebar { transform: translateX(0); }

  .sidebar-close { display: inline-flex; }

  .backdrop:not([hidden]) { display: block; }

  .main { margin-left: 0; padding: 14px 14px 40px; }

  .menu-toggle { display: inline-flex; }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 246, 236, 0.96);
    padding-bottom: 8px;
  }

  body.nav-open { overflow: hidden; }

  .show-card, .gallery-section { scroll-margin-top: 76px; }

  .brand p { display: none; }

  .section-head { align-items: flex-start; flex-direction: column; }
}

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

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
