:root {
  color-scheme: dark;
  --ink: #0c1014;
  --white: #f6f5f0;
  --muted: #b9bcb5;
  --line: #343f45;
  --lime: #dfff79;
  --display: "Barlow Condensed", "Bahnschrift Condensed", Impact, sans-serif;
  font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: var(--ink);
  color: var(--white);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: grid; grid-template-rows: auto 1fr; }
main { display: grid; grid-template-rows: 1fr; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd { margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
.shell { width: min(100% - 104px, 1376px); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 12px; background: var(--ink); transform: translateY(-150%); }
.skip:focus { transform: none; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #0a0b09;
  animation: intro-out 1.65s both;
}
.intro img { width: clamp(180px, 24vw, 320px); height: auto; animation: intro-logo 1.35s both; }
@keyframes intro-out { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes intro-logo {
  0% { opacity: 0; transform: scale(.96); }
  26%, 68% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.035); }
}

.header { position: relative; z-index: 3; background: #0d1116; border-bottom: 1px solid var(--line); }
.header-inner { height: clamp(48px, 8svh, 68px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { justify-self: start; }
.lockup { display: inline-flex; align-items: center; gap: .52em; white-space: nowrap; }
.rz-mark { width: 2.92em; height: auto; }
.g-mark { width: 3.85em; height: auto; transform: translateY(-.095em); }
.times { color: var(--muted); font: 600 .74em Pretendard, sans-serif; }
.header nav { display: flex; gap: clamp(20px, 3vw, 44px); }
.header nav button, .header-link { border: 0; background: none; padding: 8px 0; font-size: 16px; font-weight: 700; }
.header nav button:hover, .header-link:hover { color: var(--lime); }
.header-link { justify-self: end; color: var(--muted); }

.hero { position: relative; isolation: isolate; overflow: hidden; background: #0c1014; }
.hero-inner { height: 100%; min-height: 360px; display: flex; align-items: center; padding-block: clamp(22px, 7svh, 78px); }
.game-cards {
  --banner-height: clamp(82px, 13svh, 122px);
  position: absolute;
  inset: 0 0 0 34%;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.game-card {
  --image: url("assets/nexus-anima.webp");
  --banner-position: 76% 47%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--banner-height);
  min-width: 0;
  padding: 0;
  border: 0;
  background: #121a20;
  text-align: left;
  overflow: hidden;
}
.game-card.century { --image: url("assets/whiteout-survival.jpg"); --banner-position: 42% 50%; }
.game-card.krafton { --image: url("assets/tarae-kunoichi.jpg"); --banner-position: 46% 9%; }
.hero-frame { position: relative; display: block; overflow: hidden; }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; transition: filter .24s ease; }
.hoyoverse .hero-frame img { object-position: 83% center; }
.century .hero-frame > img:first-child { object-position: 46% center; }
.krafton .hero-frame { background: linear-gradient(180deg, #3d3e40 30%, #181b21 74%, #121a20); }
.krafton .hero-frame img {
  object-position: center 49%;
  mask-image: linear-gradient(#000 88%, transparent);
}
.hero-frame .whiteout-character { position: absolute; inset: 7% 0 0; height: 93%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 18px #050a17a0); }
.game-banner {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 10px clamp(12px, 1.7vw, 28px);
  background: linear-gradient(90deg, #080d13f5 6%, #080d13bd 57%, #080d1338), var(--image) var(--banner-position) / cover;
  border-top: 1px solid #e0ebff58;
  color: #fff;
  font-size: clamp(16px, 1.65vw, 25px);
  line-height: 1.15;
  font-weight: 800;
  word-break: keep-all;
}
.game-banner small { display: block; margin-bottom: 4px; color: #d1dce2; font: 800 .65em/1 var(--display); letter-spacing: .09em; text-transform: uppercase; }
.century .game-banner {
  background:
    linear-gradient(90deg, #080d13f5 6%, #080d13bd 54%, #080d1326),
    url("assets/molly.webp") right 10% top 17% / auto 220% no-repeat,
    var(--image) var(--banner-position) / cover;
}
.game-arrow { color: var(--lime); font-size: .85em; }
.game-card:is(:hover, :focus-visible) .hero-frame img { filter: brightness(1.16); }
.game-card:is(:hover, :focus-visible) .game-banner { box-shadow: inset 0 -3px var(--lime); }
.game-card:focus-visible { outline-offset: -3px; z-index: 1; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  bottom: clamp(82px, 13svh, 122px);
  background: linear-gradient(90deg, #0c1014 30%, #0c101470 39%, transparent 53%);
}
.hero-inner { position: relative; z-index: 2; pointer-events: none; padding-bottom: clamp(82px, 13svh, 122px); }
.hero-copy { position: relative; }
.hero-copy button { pointer-events: auto; }
.hero-lockup { font-size: clamp(24px, 2.75vw, 44px); margin-bottom: clamp(14px, 3svh, 27px); animation: lockup-in .65s 1.05s both; }
@keyframes lockup-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.hero h1 { font: 800 clamp(76px, min(11vw, 20svh), 170px)/.79 var(--display); letter-spacing: -.025em; }
.hero h1 span { color: var(--lime); }
.hero-caption { margin-top: clamp(14px, 3svh, 28px); font-size: clamp(17px, 1.8vw, 24px); font-weight: 800; }
.hero-date { display: flex; align-items: center; margin-top: 10px; font-size: 16px; font-weight: 700; color: #e2e9ed; }
.hero-date i { width: 5px; height: 5px; margin-inline: 12px; background: var(--lime); transform: rotate(45deg); }
.action { border: 1px solid transparent; min-height: 48px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; font-size: 17px; font-weight: 800; }
.action-primary { margin-top: clamp(14px, 3.6svh, 30px); background: var(--lime); color: #171c0d; }
.action-primary:hover { background: #edffb4; }
.action-outline { border: 1px solid #62695b; }
.action-outline:hover { border-color: var(--lime); color: var(--lime); }

.details { position: fixed; width: min(94vw, 1100px); max-height: 92dvh; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); padding: clamp(16px, 4vw, 40px); background: #131a20; color: var(--white); }
.details::backdrop { background: #05090cbb; backdrop-filter: blur(7px); }
.lineup { width: min(97vw, 1560px); max-height: 96dvh; padding: clamp(16px, 2.8vw, 40px); }
.details form { position: absolute; top: 8px; right: 8px; }
.details .section-heading, .details .visit-inner { padding-right: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { color: var(--lime); font: 700 12px Pretendard, sans-serif; letter-spacing: .15em; margin-bottom: 12px; }
.section-heading h2, .visit h2 { font-size: clamp(30px, 4.2vw, 60px); line-height: 1.12; letter-spacing: -.075em; }
.section-heading > p { color: var(--muted); font-size: 16px; }
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px clamp(8px, 2vw, 24px); color: var(--muted); font-size: 18px; font-weight: 700; }
.tabs button:hover, .tabs button[aria-selected="true"] { color: var(--lime); }
.tabs button[aria-selected="true"] { border-color: var(--lime); }
.gallery-panel + .gallery-panel { margin-top: 28px; }
.gallery-panel[role="tabpanel"] { margin-top: 0; }
.gallery-panel h3 { margin-bottom: 13px; font-size: 21px; }
.gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; }
.gallery-wide { grid-template-columns: minmax(0, 1120px); justify-content: center; }
.gallery-panel.krafton .gallery { max-width: 1180px; margin-inline: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.poster { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); background: #10161b; overflow: hidden; }
.poster:hover { border-color: var(--lime); }
.poster img { width: 100%; height: auto; max-height: 65dvh; object-fit: contain; }
.poster-caption { display: flex; flex: 1; justify-content: space-between; align-items: center; gap: 6px; padding: 11px 12px; font-size: 16px; overflow-wrap: anywhere; }
.poster-caption span { color: var(--lime); }

.visit { width: min(94vw, 570px); }
.visit-inner { display: grid; grid-template-columns: 1fr; justify-items: start; align-items: center; gap: 25px; }
.visit dl { display: flex; flex-wrap: wrap; gap: 18px 32px; }
.visit dt { font-size: 15px; color: var(--muted); margin-bottom: 6px; }
.visit dd { font-size: 18px; font-weight: 800; }
.timetable { width: 100%; padding: 16px; border: 1px solid var(--line); background: #0d1217; }
.timetable h3 { margin-bottom: 7px; font-size: 19px; }
.timetable p { color: var(--muted); font-size: 16px; }

.lightbox { width: min(94vw, 1000px); max-height: 94dvh; border: 1px solid var(--line); padding: 0; background: #151714; color: var(--white); }
.lightbox::backdrop { background: #000d; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-left: 16px; font-size: 14px; font-weight: 750; }
.lightbox-bar .close { margin-inline-start: auto; }
.close { border: 0; background: transparent; width: 44px; height: 44px; font-size: 28px; }
.close:hover { color: var(--lime); }
.close:focus-visible { outline-offset: -5px; }
#large-poster { width: 100%; max-height: calc(92dvh - 44px); object-fit: contain; }
html:has(dialog[open]) { overflow: hidden; }

@media (max-width: 1020px) {
  .shell { width: calc(100% - 56px); }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-wide { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 70px; }
  .shell { width: calc(100% - 36px); }
  .header-inner { height: 50px; grid-template-columns: 1fr auto; }
  .header nav { gap: 16px; }
  .header-link { display: none; }
  .hero { display: grid; grid-template-rows: auto minmax(180px, 1fr); }
  .hero-inner { min-height: 0; height: auto; padding-block: 14px 18px; }
  .game-cards { position: relative; inset: auto; --banner-height: 80px; gap: 2px; }
  .game-banner { padding: 8px 7px; font-size: clamp(13px, 3.7vw, 19px); }
  .game-arrow { display: none; }
  .hero::after { display: none; }
  .hero h1 { font-size: clamp(53px, 14vw, 88px); }
  .hero-lockup { margin-bottom: 13px; }
  .hero-caption { margin-top: 12px; }
  .hero-date { margin-top: 6px; font-size: 15px; }
  .action-primary { margin-top: 12px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 11px; margin-bottom: 16px; }
  .lineup .section-heading > p { font-size: 15px; }
  .lineup .tabs button { font-size: 16px; }
  .gallery, .gallery-panel.krafton .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-wide { grid-template-columns: 1fr; }
  .visit-inner { grid-template-columns: 1fr; justify-items: start; gap: 20px; }
}
@media (max-height: 570px) and (min-width: 701px) {
  .hero-inner { min-height: 290px; padding-block: 14px; }
  .hero-lockup { font-size: 24px; }
  .hero h1 { font-size: clamp(56px, 17svh, 88px); }
}
@media (max-height: 530px) and (max-width: 700px) {
  .hero { grid-template-rows: auto minmax(153px, 1fr); }
  .hero-inner { padding-block: 7px 10px; }
  .hero-lockup { font-size: 21px; }
  .hero h1 { font-size: clamp(49px, 13vw, 63px); }
  .hero-caption { margin-top: 9px; }
  .action-primary { margin-top: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro { display: none; }
  .hero-lockup { animation: none; }
  .hero-frame img { transition: none; }
}
