@font-face {
  font-family: "KingHwaOldSong";
  src: url("fonts/京華老宋体.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3000-303F, U+FF00-FFEF, U+FE30-FE4F, U+20000-2A6DF;
}

:root {
  color-scheme: dark;
  --blue: #001AFF;
  --blue-deep: #000f9f;
  --white: #F5F5F5;
  --panel-blue: rgb(1, 1, 242);
  font-family: "KingHwaOldSong", "American Typewriter", serif;
}

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

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 115%, #1536ff 0, var(--blue) 43%, var(--blue-deep) 100%);
  color: var(--white);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

body.overlay-open { overflow: hidden; }

.page { position: relative; width: 100%; min-height: 100vh; z-index: 1; overflow: hidden; }

.illustration {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 2;
  display: flex;
  height: 72vh;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  transform: translateX(-50%);
}

.illustration-frame {
  position: relative;
  height: 100%;
  flex: 0 0 auto;
}

.illustration-frame::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgba(245, 245, 245, 0.28);
  box-shadow: inset 0 0 0 7px rgba(0, 26, 255, 0.12);
  content: "";
}

.illustration img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 100%;
  object-fit: contain;
  opacity: 0.92;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.25));
  -webkit-mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 95%, transparent 100%);
}

.content {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100vh;
  padding-bottom: 58vh;
  flex-direction: column;
  align-items: center;
}

.nav-tiers {
  position: relative;
  display: flex;
  padding-top: 6vh;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.nav-tiers::after {
  position: absolute;
  right: 13%;
  bottom: -10px;
  left: 13%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 245, 245, 0.45), transparent);
  content: "";
}

.nav-btn {
  position: relative;
  display: flex;
  padding: 4px 0;
  border: 0;
  align-items: center;
  justify-content: center;
  background: none;
  color: var(--white);
  cursor: pointer;
  font: bold 10px/1 "KingHwaOldSong", "American Typewriter", serif;
  letter-spacing: 8px;
  text-transform: uppercase;
  transition: color 0.25s;
}

.nav-btn::after {
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 70%;
  height: 1.5px;
  background: rgba(245, 245, 245, 0.8);
  content: "";
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.25s;
}

.nav-btn:hover::after,
.nav-btn[aria-expanded="true"]::after { transform: translateX(-50%) scaleX(1); }

.nav-sep {
  display: inline-flex;
  width: 14px;
  color: transparent;
  font-size: 0;
  line-height: 0;
  user-select: none;
  align-items: center;
  justify-content: center;
}

.nav-sep::before { display: block; width: 4px; height: 4px; background: rgba(245, 245, 245, 0.5); content: ""; }

.hero { position: relative; padding: 3vh 28px 0; flex-shrink: 0; text-align: center; }

.hero-title {
  color: #fff;
  font: 300 clamp(48px, 8vw, 60px)/0.6 "KingHwaOldSong", "American Typewriter", serif;
  letter-spacing: 0.1em;
  text-shadow: 0 0 28px rgba(245, 245, 245, 0.16);
}

.hero-title::after {
  display: block;
  width: min(220px, 52%);
  height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, rgba(245, 245, 245, 0.78), transparent);
  content: "";
}

.hero-desc {
  max-width: 500px;
  margin: 3vh auto 0;
  color: rgba(245, 245, 245, 0.9);
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 3px;
  line-height: 1.5;
  text-transform: none;
}

.footer {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 20;
  color: rgba(245, 245, 245, 0.75);
  font-size: 9px;
  letter-spacing: 4px;
  pointer-events: none;
}

.footer::before { margin-right: 8px; color: rgba(245, 245, 245, 0.35); content: "//"; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  opacity: 0;
  pointer-events: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.overlay.active { opacity: 1; pointer-events: auto; }

.overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(1, 1, 242, 0.08);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: backdrop-filter 0.7s ease-out, -webkit-backdrop-filter 0.7s ease-out;
}

.overlay.active .overlay-bg { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.overlay-panel {
  position: relative;
  width: min(720px, 88vw);
  max-height: 80vh;
  padding: 36px 40px;
  overflow-y: auto;
  border: 1px solid rgba(1, 1, 242, 0.12);
  background: linear-gradient(135deg, #fff 0%, #fafaff 100%);
  color: var(--panel-blue);
  box-shadow: 0 24px 70px rgba(0, 0, 60, 0.28);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.overlay-panel::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: linear-gradient(transparent, rgba(1, 1, 242, 0.1) 9%, rgba(1, 1, 242, 0.1) 91%, transparent);
  content: "";
}

.overlay.active .overlay-panel { transform: translateY(0); }

.overlay-close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: 0;
  background: none;
  color: rgba(1, 1, 242, 0.3);
  cursor: pointer;
  font: 22px/1 "American Typewriter", monospace;
  transition: color 0.2s;
}

.overlay-close:hover { color: var(--panel-blue); }

.overlay-title {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(1, 1, 242, 0.08);
  color: rgba(1, 1, 242, 0.4);
  font-size: 12px;
  letter-spacing: 6px;
}

.ol-text { color: rgba(1, 1, 242, 0.8); font-size: 13px; line-height: 1.9; text-transform: none; }
.ol-text p { margin-bottom: 14px; }

.ol-work { margin: 0; border-top: 1px solid rgba(1, 1, 242, 0.09); }
.ol-work:last-child { border-bottom: 1px solid rgba(1, 1, 242, 0.09); }
.ol-work-summary { position: relative; display: block; padding: 18px 38px 17px 0; cursor: pointer; list-style: none; }
.ol-work-summary::-webkit-details-marker { display: none; }
.ol-work-summary::after { position: absolute; top: 50%; right: 4px; color: rgba(1, 1, 242, 0.42); content: "+"; font: 20px/1 "American Typewriter", monospace; transform: translateY(-50%); transition: transform 0.2s; }
.ol-work[open] .ol-work-summary::after { transform: translateY(-50%) rotate(45deg); }
.ol-work[open] .ol-work-summary { border-bottom: 1px solid rgba(1, 1, 242, 0.06); }
.ol-work-name { margin-bottom: 8px; color: var(--panel-blue); font-size: 18px; font-weight: 700; letter-spacing: 2px; }
.ol-work-meta { color: rgba(1, 1, 242, 0.4); font-size: 10px; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.ol-work-body { padding: 17px 0 21px; }

.ol-work[open] .ol-work-body { animation: fadeInUp 0.25s ease; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ol-work-quote { margin-bottom: 12px; padding-left: 14px; border-left: 2px solid rgba(1, 1, 242, 0.18); color: rgba(1, 1, 242, 0.56); font-size: 14px; font-style: italic; }
.ol-work-excerpt { color: rgba(1, 1, 242, 0.7); font-size: 13px; line-height: 1.8; text-indent: 2em; hanging-punctuation: first; font-variant-numeric: tabular-nums; }
.ol-text { color: rgba(1, 1, 242, 0.8); font-size: 13px; line-height: 1.9; text-transform: none; hanging-punctuation: first; font-variant-numeric: tabular-nums; }
.ol-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ol-grid-item { display: block; padding: 14px 18px; border: 1px solid rgba(1, 1, 242, 0.08); color: inherit; text-decoration: none; transition: border-color 0.2s; }
.ol-grid-item { position: relative; overflow: hidden; }
.ol-grid-item[href]::after { position: absolute; right: 14px; bottom: 10px; color: rgba(1, 1, 242, 0.28); content: "↗"; font: 17px/1 "American Typewriter", monospace; transition: transform 0.2s, color 0.2s; }
.ol-grid-item:hover { border-color: rgba(1, 1, 242, 0.28); }
.ol-grid-item[href]:hover::after { color: var(--panel-blue); transform: translate(2px, -2px); }
.ol-grid-name { margin-bottom: 3px; color: var(--panel-blue); font-size: 15px; letter-spacing: 1px; }
.ol-grid-meta { color: rgba(1, 1, 242, 0.35); font-size: 9px; letter-spacing: 2px; }

.ol-news-item { position: relative; padding: 16px 0 16px 18px; border-top: 1px solid rgba(1, 1, 242, 0.06); }
.ol-news-item::before { position: absolute; top: 21px; left: 0; width: 5px; height: 5px; background: rgba(1, 1, 242, 0.34); content: ""; }
.ol-news-item:last-child { border-bottom: 1px solid rgba(1, 1, 242, 0.06); }
.ol-news-date { margin-bottom: 3px; color: rgba(1, 1, 242, 0.3); font-size: 9px; letter-spacing: 2px; }
.ol-news-text { color: rgba(1, 1, 242, 0.7); font-size: 13px; line-height: 1.6; text-transform: none; }

.ol-ongoing { position: relative; min-height: 320px; }
.ol-ongoing-board { position: relative; min-height: 300px; padding: 24px; overflow: hidden; user-select: none; -webkit-user-select: none; }
.ol-ongoing-folder { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: default; touch-action: none; }
.ol-ongoing-icon { cursor: grab; transition: transform 0.12s; outline: none; border-radius: 6px; touch-action: none; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.ol-ongoing-icon:hover { transform: scale(1.06); }
.ol-ongoing-icon:active { cursor: grabbing; }
.ol-ongoing-icon:focus-visible { box-shadow: 0 0 0 3px rgba(1, 1, 242, 0.25); }
.ol-ongoing-icon svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.ol-ongoing-icon .ol-emoji-icon { display: block; font-size: 52px; line-height: 1; text-align: center; pointer-events: none; }
.ol-ongoing-icon .ol-ongoing-custom-icon { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; border-radius: 4px; }
.ol-ongoing-label { color: rgba(1, 1, 242, 0.7); font-size: 12px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; margin: 0; pointer-events: none; }

.ol-ongoing-detail {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: detailFadeIn 0.2s ease;
}
@keyframes detailFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ol-ongoing-card {
  position: relative; width: min(420px, 80vw);
  padding: 28px 32px 32px;
  background: #fff;
  border: 1px solid rgba(1, 1, 242, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 60, 0.15);
  animation: cardSlideIn 0.2s ease;
}
@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ol-ongoing-close {
  position: absolute; top: 12px; right: 16px;
  border: 0; background: none;
  color: rgba(1, 1, 242, 0.3);
  cursor: pointer;
  font: 18px/1 "American Typewriter", monospace;
  transition: color 0.2s;
}
.ol-ongoing-close:hover { color: var(--panel-blue); }
.ol-ongoing-card-name { margin: 0 0 10px; color: var(--panel-blue); font-size: 18px; letter-spacing: 2px; }
.ol-ongoing-card-status { margin: 0 0 10px; color: rgba(1, 1, 242, 0.4); font-size: 10px; letter-spacing: 3px; }
.ol-ongoing-card-desc { margin: 0; color: rgba(1, 1, 242, 0.7); font-size: 13px; line-height: 1.8; text-transform: none; }

.ol-links { margin-top: 16px; color: rgba(1, 1, 242, 0.35); font-size: 11px; letter-spacing: 2px; }
.ol-links > * { display: inline-block; margin-right: 18px; color: inherit; }
.ol-links a:hover { color: var(--panel-blue); }

.overlay-panel::-webkit-scrollbar { width: 3px; }
.overlay-panel::-webkit-scrollbar-track { background: transparent; }
.overlay-panel::-webkit-scrollbar-thumb { background: rgba(1, 1, 242, 0.12); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.overlay-panel :focus-visible { outline-color: var(--panel-blue); }
.noscript { padding: 20px; text-align: center; }

@media (min-width: 681px) {
  .illustration { height: 72vh; bottom: 0; }
  .hero { width: var(--img-w, auto); padding-right: 0; padding-left: 0; }
  .hero-title { font-size: clamp(44px, 6vw, 48px); }
  .hero-desc { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 680px) {
  body { position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }
  .page { min-height: 100%; height: 100%; overflow: hidden; background: radial-gradient(circle at 50% 115%, #1536ff 0, var(--blue) 43%, var(--blue-deep) 100%); }
  .nav-tiers { padding-top: 5vh; gap: 8px; }
  .nav-btn { font-size: 11px; letter-spacing: 4px; }
  .hero-title { font-size: clamp(28px, 9vw, 42px); letter-spacing: 0.05em; }
  .hero { width: auto; padding-right: 20px; padding-left: 20px; }
  .hero-desc { margin-top: 3vh; padding: 0 20px; font-size: 11px; letter-spacing: 2px; }
  .footer { right: 16px; bottom: 16px; font-size: 9px; }
  .illustration { bottom: 36px; height: 55vh; }
  .content { padding: 0 20px 65vh; }
  .overlay-panel { padding: 24px 20px; }
  .ol-grid { grid-template-columns: 1fr; }
  .ol-ongoing-icon { width: 64px; height: 64px; }
  .ol-ongoing-icon .ol-emoji-icon { font-size: 40px; }
  .ol-ongoing-label { font-size: 11px; letter-spacing: 2px; }
}
