:root {
  color: #2f3765;
  font-family: "Trebuchet MS", "Malgun Gothic", sans-serif;
  --bg-top: #c9f3e7;
  --bg-bottom: #b7eadc;
  --ink: #2a4262;
  --muted: rgba(56, 82, 110, 0.72);
  --panel: rgba(255, 250, 242, 0.9);
  --panel-line: #ffffff;
  --panel-shadow: rgba(109, 165, 148, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 54px 52px, rgba(61, 191, 112, 0.86) 0 22px, transparent 23px),
    radial-gradient(circle at 182px 150px, rgba(61, 191, 112, 0.82) 0 22px, transparent 23px),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-size: 260px 260px, 260px 260px, 100% 100%;
  color: var(--ink);
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -40px;
  left: -30px;
  background: rgba(255, 255, 255, 0.42);
}

body::after {
  right: -40px;
  bottom: -30px;
  background: rgba(255, 255, 255, 0.26);
}

.transition-wash {
  position: fixed;
  inset: 0;
  background: rgba(197, 239, 226, 0);
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 72px;
  display: grid;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  gap: 12px;
}

.kicker {
  margin: 0 0 6px;
  color: rgba(58, 98, 109, 0.64);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.header-bar h1 {
  margin: 0;
  font-family: "Arial Black", "Trebuchet MS", sans-serif;
  color: var(--ink);
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.42);
}

.channel-stage {
  position: relative;
  padding: 26px;
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(245, 255, 251, 0.84));
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.42),
    0 22px 0 rgba(127, 196, 175, 0.34),
    0 34px 56px var(--panel-shadow);
}

.channel-stage::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed rgba(92, 173, 144, 0.4);
  border-radius: 24px;
  pointer-events: none;
}

.channel-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 20px;
}

.channel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.channel-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.channel-nav {
  width: 54px;
  height: 54px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8f80 0%, #ff6f60 100%);
  box-shadow:
    inset 0 -4px 0 rgba(210, 88, 77, 0.32),
    0 10px 0 rgba(199, 162, 140, 0.3);
  color: #fffef8;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  padding-bottom: 6px;
}

.channel-nav:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 -4px 0 rgba(210, 88, 77, 0.32),
    0 12px 0 rgba(199, 162, 140, 0.3);
}

.channel-viewport {
  overflow: hidden;
  padding: 18px 0 24px;
}

.channel-track {
  display: flex;
  align-items: stretch;
  gap: 28px;
  width: max-content;
  transform: translateX(calc(var(--track-shift, 0px)));
  transition: transform 320ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

.channel-card {
  position: relative;
  width: min(68vw, 340px);
  min-width: min(68vw, 340px);
  min-height: 248px;
  padding: 22px;
  border-radius: 30px;
  color: #fffef8;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 4px solid #ffffff;
  box-shadow:
    inset 0 -8px 0 rgba(0, 0, 0, 0.12),
    0 18px 0 rgba(150, 197, 179, 0.26);
  transform: scale(0.9);
  opacity: 0.54;
  filter: saturate(0.82);
  transition: transform 240ms ease, opacity 240ms ease, filter 240ms ease, box-shadow 240ms ease;
  overflow: hidden;
  cursor: pointer;
}

.channel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24px 24px, rgba(255, 255, 255, 0.16) 0 10px, transparent 11px),
    radial-gradient(circle at calc(100% - 26px) calc(100% - 22px), rgba(255, 255, 255, 0.12) 0 12px, transparent 13px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 34%);
  pointer-events: none;
}

.channel-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.08);
  transform: rotate(12deg);
}

.channel-card.is-active {
  transform: scale(1);
  opacity: 1;
  filter: none;
  box-shadow:
    inset 0 -8px 0 rgba(0, 0, 0, 0.12),
    0 22px 0 rgba(150, 197, 179, 0.34);
}

.channel-card.is-pressed {
  animation: card-press 220ms ease;
}

.channel-number,
.channel-name,
.channel-meta,
.channel-korean {
  display: block;
  position: relative;
  z-index: 1;
}

.channel-number {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.82;
}

.channel-name {
  margin-top: 12px;
  font-family: "Arial Black", "Trebuchet MS", sans-serif;
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.08);
}

.channel-meta {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.92;
}

.channel-korean {
  margin-top: auto;
  padding-top: 18px;
  font-size: 0.96rem;
  line-height: 1.45;
  opacity: 0.96;
}

.channel-play {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  align-self: start;
  padding: 11px 18px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #ffe25d;
  color: #394272;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 -4px 0 rgba(217, 183, 44, 0.52),
    0 8px 0 rgba(198, 175, 97, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.channel-play:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 -4px 0 rgba(217, 183, 44, 0.52),
    0 10px 0 rgba(198, 175, 97, 0.24);
}

.channel-play:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 -2px 0 rgba(217, 183, 44, 0.52),
    0 4px 0 rgba(198, 175, 97, 0.24);
}

.channel-halli {
  background: linear-gradient(180deg, #ff9db1 0%, #ff7d96 100%);
}

.channel-liar {
  background: linear-gradient(180deg, #96afff 0%, #7386f1 100%);
}

.channel-tetris {
  background: linear-gradient(180deg, #71dfb1 0%, #47ca92 100%);
}

.channel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.channel-dot {
  width: 14px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.channel-dot.is-active {
  background: #ff7a6a;
  transform: scale(1.18);
}

.channel-card:focus-visible,
.channel-nav:focus-visible,
.channel-dot:focus-visible,
.channel-play:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
}

.portal-transition .channel-card,
.portal-transition .channel-nav,
.portal-transition .channel-dot {
  pointer-events: none;
}

.portal-transition .channel-card:not(.is-selected) {
  opacity: 0.28;
  filter: saturate(0.7);
}

.portal-transition .channel-card.is-selected {
  animation: pick-channel 420ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.portal-transition .transition-wash {
  animation: transition-wash 640ms ease forwards;
}

@keyframes pick-channel {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.04) translateY(-8px);
  }
  100% {
    transform: scale(1.08) translateY(-10px);
  }
}

@keyframes card-press {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03) translateY(-4px);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes transition-wash {
  0% {
    opacity: 0;
  }
  45% {
    opacity: 0.14;
  }
  100% {
    opacity: 1;
    background: rgba(202, 242, 229, 0.92);
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 20px, 860px);
    padding-top: 28px;
  }

  .channel-stage {
    padding: 18px;
  }

  .channel-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .channel-nav {
    display: none;
  }

  .channel-card {
    width: min(78vw, 310px);
    min-width: min(78vw, 310px);
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 16px);
    gap: 20px;
    padding-bottom: 28px;
  }

  .header-bar h1 {
    font-size: 2.8rem;
  }

  .channel-viewport {
    padding-bottom: 16px;
  }

  .channel-card {
    min-height: 210px;
    padding: 18px;
  }

  .channel-name {
    font-size: 1.75rem;
  }

  .channel-play {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}
