@font-face {
  font-family: 'PressStart2P';
  src: url('../game/font/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'DungGeunMo';
  src: url('../game/font/DungGeunMo.woff') format('woff');
  font-display: swap;
}

:root {
  --bg: #101722;
  --bg-2: #172231;
  --panel: rgba(23, 32, 44, 0.96);
  --panel-strong: rgba(23, 32, 44, 0.98);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef3f8;
  --muted: #acb6c4;
  --accent: #d5c07a;
  --accent-2: #97b9b0;
  --danger: #cc907b;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  font-family: 'DungGeunMo', 'Pretendard', sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
}

body::before,
body::after {
  display: none;
}

.page-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

.topbar,
.page-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 4vw, 2rem);
}

.brandmark {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brandmark strong {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.brandmark-kicker,
.eyebrow,
.card-tag,
.status-pill {
  font-family: 'PressStart2P', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.brandmark-kicker,
.eyebrow {
  font-size: 0.58rem;
  color: var(--accent-2);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

.topnav a:hover,
.topnav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.narrow-shell {
  width: min(980px, calc(100% - 2rem));
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  border-radius: 16px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.4rem;
  padding: clamp(1.2rem, 4vw, 2.4rem);
  align-items: center;
  overflow: hidden;
}

.hero-copy h1,
.section-head h1,
.section-head h2,
.feature-card h2,
.timeline h3 {
  font-family: 'PressStart2P', monospace;
  line-height: 1.35;
}

.hero-copy h1 {
  margin: 0.55rem 0 1rem;
  font-size: clamp(1.4rem, 3.3vw, 2.6rem);
}

.lede,
.feature-card p,
.timeline p,
.checklist-card p,
.panel p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.cta-primary,
.cta-secondary {
  text-decoration: none;
  border-radius: 10px;
  padding: 0.8rem 1.05rem;
  font-size: 0.92rem;
  transition: border-color 180ms ease, background 180ms ease;
}

.cta-primary {
  color: #0f1620;
  background: var(--accent);
  border: 1px solid transparent;
}

.cta-secondary {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.cta-primary:hover,
.cta-primary:focus-visible,
.cta-secondary:hover,
.cta-secondary:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-shot {
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.hero-shot img {
  width: 100%;
  display: block;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-shot figcaption {
  font-size: 0.82rem;
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.card-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.checklist-card,
.timeline article,
.panel {
  padding: 1.2rem;
}

.card-tag {
  margin: 0 0 0.75rem;
  font-size: 0.58rem;
  color: var(--accent);
}

.feature-card h2,
.section-head h1,
.section-head h2 {
  margin: 0;
}

.feature-card h2 {
  font-size: 1rem;
}

.section-head {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.section-head h1 {
  font-size: clamp(1.2rem, 3vw, 2rem);
}

.section-head h2 {
  font-size: clamp(1rem, 2.4vw, 1.5rem);
}

.roadmap-panel {
  margin-top: 1rem;
  padding: clamp(1.2rem, 4vw, 2rem);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.timeline article {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline h3 {
  margin: 0.95rem 0 0.7rem;
  font-size: 0.86rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.62rem;
  border-radius: 999px;
  font-size: 0.5rem;
}

.status-live {
  color: #06131d;
  background: var(--accent-2);
}

.status-build {
  color: #09131b;
  background: var(--accent);
}

.checklist {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
}

.checklist li + li {
  margin-top: 0.22rem;
}

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0.3rem 0;
}

.site-footer a {
  color: var(--accent-2);
}

code {
  font-family: 'PressStart2P', monospace;
  font-size: 0.72em;
  color: #ffe6a8;
}

.ranking-hero,
.ranking-board-panel {
  margin-top: 1rem;
}

.feedback-hero {
  margin-top: 1rem;
}

.hint-copy,
.ranking-status,
.board-status {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.board-composer-panel,
.board-feed-panel {
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0.4rem 0 0;
  font-family: 'PressStart2P', monospace;
  font-size: 1rem;
}

.board-form {
  display: grid;
  gap: 0.7rem;
}

.textarea-field {
  min-height: 168px;
  resize: vertical;
}

.select-field {
  appearance: none;
}

.board-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 0.85rem;
}

.filter-chip,
.type-chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
}

.filter-chip {
  padding: 0.6rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.filter-chip.is-active {
  color: #07111e;
  background: var(--accent);
  border-color: transparent;
}

.board-list {
  display: grid;
  gap: 0.8rem;
}

.board-card {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.board-card-empty {
  color: var(--muted);
}

.board-card-head,
.board-card-foot,
.board-card-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.board-card-tags {
  justify-content: flex-start;
}

.board-card h3 {
  margin: 0.9rem 0 0.55rem;
  font-size: 1.05rem;
}

.board-card p {
  margin: 0;
  white-space: normal;
}

.board-date,
.board-author {
  color: var(--muted);
  font-size: 0.82rem;
}

.type-chip,
.meta-chip {
  padding: 0.34rem 0.58rem;
}

.type-chip {
  color: #07111e;
}

.type-bug {
  background: #c88d79;
}

.type-balance {
  background: #99aec4;
}

.type-idea {
  background: var(--accent);
}

.type-praise {
  background: var(--accent-2);
}

.meta-chip {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.ranking-board {
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.ranking-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ranking-board-head h2 {
  margin: 0.4rem 0 0;
  font-family: 'PressStart2P', monospace;
  font-size: 1rem;
}

.mini-action,
.button-reset {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.mini-action {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.ranking-row,
.ranking-empty {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.ranking-position {
  font-family: 'PressStart2P', monospace;
  font-size: 0.65rem;
  color: var(--accent);
}

.ranking-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-score {
  color: var(--accent-2);
}

.board-divider {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.ranking-form {
  display: grid;
  gap: 0.65rem;
}

.field-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.input-field {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  font: inherit;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.submit-row .cta-primary,
.submit-row .cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leaderboard-live-shell {
  width: min(430px, calc(100% - 1rem));
}

.leaderboard-live-hero {
  margin-top: 1rem;
}

.leaderboard-live-layout {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  justify-content: center;
  gap: 1rem;
  align-items: start;
}

.leaderboard-live-feed-panel,
.leaderboard-live-side {
  min-width: 0;
}

.leaderboard-live-mycard {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-live-mycard-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.leaderboard-live-mycard-value {
  margin-top: 0.45rem;
  font-family: 'PressStart2P', monospace;
  font-size: 1rem;
  color: var(--accent);
}

.leaderboard-live-mycard-meta {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.leaderboard-live-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}

.leaderboard-live-card,
.leaderboard-live-empty {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-live-card.is-top {
  border-color: rgba(213, 192, 122, 0.55);
  background: rgba(213, 192, 122, 0.1);
}

.leaderboard-live-card.is-mine {
  border-color: rgba(151, 185, 176, 0.7);
  box-shadow: inset 0 0 0 1px rgba(151, 185, 176, 0.32);
}

.leaderboard-live-empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.leaderboard-live-rankbox {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 68, 152, 0.95) 0%, rgba(12, 44, 104, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.leaderboard-live-card.is-top .leaderboard-live-rankbox {
  background: linear-gradient(180deg, rgba(163, 35, 35, 0.95) 0%, rgba(121, 20, 20, 0.95) 100%);
}

.leaderboard-live-rank {
  font-family: 'PressStart2P', monospace;
  font-size: 0.72rem;
  color: #fff;
}

.leaderboard-live-body {
  min-width: 0;
  display: grid;
  gap: 0.45rem;
}

.leaderboard-live-mainrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.leaderboard-live-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.leaderboard-live-score {
  color: var(--accent);
  white-space: nowrap;
  font-size: 0.95rem;
}

.leaderboard-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.leaderboard-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(151, 185, 176, 0.18);
  color: var(--text);
  border: 1px solid rgba(151, 185, 176, 0.28);
}

.leaderboard-live-side {
  position: static;
  top: auto;
  padding: 0;
  overflow: hidden;
}

.leaderboard-side-showcase {
  position: relative;
  min-height: 430px;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(164, 24, 24, 0.95) 0%, rgba(86, 15, 15, 0.98) 100%);
}

.leaderboard-side-showcase .eyebrow,
.leaderboard-side-showcase h2,
.leaderboard-side-showcase p,
.leaderboard-side-showcase strong,
.leaderboard-side-showcase span {
  position: relative;
  z-index: 1;
}

.leaderboard-side-showcase h2 {
  margin: 0.45rem 0 0;
  font-family: 'PressStart2P', monospace;
  line-height: 1.35;
}

.leaderboard-side-copy {
  max-width: 180px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
  line-height: 1.65;
}

.leaderboard-side-stat {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  max-width: 180px;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard-side-stat-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.76rem;
}

.leaderboard-side-stat-value {
  color: #fff8ba;
}

.leaderboard-side-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.65rem;
  max-width: 180px;
  margin-top: 1rem;
}

.leaderboard-side-character {
  position: absolute;
  right: -18px;
  bottom: -10px;
  width: 210px;
  image-rendering: pixelated;
  pointer-events: none;
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 960px) {
  .hero-panel,
  .board-grid,
  .card-grid-two,
  .card-grid-three,
  .timeline,
  .leaderboard-live-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1000px);
  }

  .panel,
  .feature-card,
  .checklist-card,
  .timeline article {
    padding: 1rem;
    border-radius: 14px;
  }

  .topbar {
    padding: 1rem;
  }

  .hero-copy h1,
  .section-head h1,
  .section-head h2 {
    word-break: keep-all;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-primary,
  .cta-secondary {
    text-align: center;
  }

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

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

  .submit-row {
    flex-direction: column;
  }

  .leaderboard-live-shell {
    width: min(calc(100% - 1rem), 430px);
  }

  .leaderboard-side-showcase {
    min-height: 340px;
  }

  .leaderboard-side-copy,
  .leaderboard-side-stat,
  .leaderboard-side-actions {
    max-width: none;
  }
}

@media (min-width: 1280px) {
  .leaderboard-live-shell {
    width: min(960px, calc(100% - 2rem));
  }

  .leaderboard-live-layout {
    grid-template-columns: minmax(0, 430px) 280px;
  }

  .leaderboard-live-side {
    position: sticky;
    top: 1rem;
  }
}
