:root {
  color-scheme: dark;
  --bg: #111315;
  --surface: #181b1f;
  --surface-2: #20242a;
  --line: #343a42;
  --text: #f4f1e8;
  --muted: #a9b0b7;
  --soft: #d9d2bd;
  --red: #d2483f;
  --gold: #d8a93a;
  --green: #40a36f;
  --blue: #4e7fd1;
  --focus: #f0c75e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  font-family: Inter, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 25% 12%, rgba(210, 72, 63, 0.14), transparent 30rem),
    radial-gradient(circle at 88% 18%, rgba(64, 163, 111, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(17, 19, 21, 0.88);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(216, 169, 58, 0.55);
  border-radius: 8px;
  background: #241f16;
  color: var(--gold);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.18rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-section {
  margin-top: 32px;
}

.nav-label,
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-link,
.year-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-link:hover,
.year-button:hover,
.nav-link.active,
.year-button.active {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.year-list {
  display: grid;
  gap: 4px;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.16;
}

h1 {
  font-size: clamp(1.8rem, 3.2vw, 3.15rem);
  max-width: 840px;
}

h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

h3 {
  font-size: 1.04rem;
}

.search-box {
  display: flex;
  width: min(390px, 100%);
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-box span {
  color: var(--muted);
  font-size: 1.3rem;
}

.search-box input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.hero-panel,
.panel,
.detail-panel,
.metric-card,
.game-card,
.seo-card,
.award-card,
.ranking-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 27, 31, 0.94);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(210, 72, 63, 0.16), transparent 42%),
    linear-gradient(315deg, rgba(216, 169, 58, 0.15), transparent 44%),
    var(--surface);
}

.hero-panel p {
  max-width: 760px;
  color: var(--soft);
  font-size: 1.03rem;
  line-height: 1.7;
}

.hero-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action,
.secondary-action,
.text-button,
.chip {
  min-height: 44px;
  border-radius: 8px;
}

.primary-action,
.secondary-action {
  padding: 0 16px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-action {
  background: var(--gold);
  color: #18130a;
}

.secondary-action {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 136px;
  padding: 18px;
}

.metric-card strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  line-height: 1;
}

.metric-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.content-grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
}

.panel {
  padding: 20px;
}

.panel-heading,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.text-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  padding: 0 14px;
}

.timeline {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  padding-left: 14px;
  border-left: 3px solid var(--green);
}

.timeline time {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
}

.timeline strong {
  display: block;
  margin-top: 4px;
}

.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.section-head {
  margin-top: 4px;
}

select {
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

.chip {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.chip.active {
  border-color: rgba(216, 169, 58, 0.6);
  background: #2a2416;
  color: var(--gold);
}

.games-layout {
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
}

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

.game-card {
  padding: 12px;
  text-align: left;
  color: var(--text);
}

.game-card.active {
  border-color: var(--gold);
}

.cover-art {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, var(--cover-a), transparent 48%),
    linear-gradient(315deg, var(--cover-b), rgba(0, 0, 0, 0.2) 62%),
    #20242a;
  overflow: hidden;
}

.cover-art .platform {
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.cover-art strong {
  max-width: 12ch;
  font-size: 1.4rem;
  line-height: 1.08;
}

.game-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.game-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.score-pill {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.detail-panel {
  position: sticky;
  top: 28px;
  padding: 20px;
}

.detail-cover {
  min-height: 210px;
  margin-bottom: 18px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-item strong {
  display: block;
  margin-top: 4px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.award-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.award-card {
  padding: 18px;
}

.award-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.award-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.ranking-list.compact .ranking-row:nth-child(n + 6) {
  display: none;
}

.ranking-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #282317;
  color: var(--gold);
  font-weight: 900;
}

.ranking-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ranking-score {
  min-width: 74px;
  text-align: right;
  color: var(--green);
  font-weight: 900;
}

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

.seo-card {
  padding: 18px;
}

.seo-card p {
  color: var(--muted);
  line-height: 1.55;
}

.seo-card .keyword {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(78, 127, 209, 0.14);
  color: #a9c6ff;
  font-size: 0.78rem;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .hero-grid,
  .content-grid.two,
  .games-layout {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .section-head,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .game-grid,
  .seo-grid,
  .award-board {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-score {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Mobile-only fallback build for /home/goty.kr/www. */
body {
  min-width: 320px;
}

.app-shell {
  display: block;
  width: min(100%, 600px);
  min-height: 100vh;
  margin: 0 auto;
}

.sidebar {
  position: static;
  height: auto;
  padding: 14px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.main {
  padding: 16px 14px 42px;
}

.topbar,
.section-head,
.panel-heading {
  align-items: stretch;
  flex-direction: column;
}

.nav-section {
  margin-top: 18px;
}

.year-list,
.nav-section:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nav-link,
.year-button {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 9vw, 2.65rem);
}

h2 {
  font-size: clamp(1.24rem, 6vw, 1.8rem);
}

.hero-grid,
.content-grid.two,
.games-layout,
.game-grid,
.seo-grid,
.award-board,
.detail-list {
  grid-template-columns: 1fr;
}

.hero-panel,
.panel,
.detail-panel {
  padding: 16px;
}

.hero-panel {
  min-height: auto;
}

.hero-actions,
.filter-row {
  display: grid;
  grid-template-columns: 1fr;
}

.primary-action,
.secondary-action,
.text-button,
.chip {
  width: 100%;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 112px;
  padding: 14px;
}

.cover-art {
  min-height: 210px;
}

.detail-panel {
  position: static;
}

.ranking-row {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.ranking-score {
  grid-column: 2;
  min-width: 0;
  text-align: left;
}

@media (max-width: 420px) {
  .sidebar,
  .main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .metric-grid,
  .year-list,
  .nav-section:first-of-type {
    grid-template-columns: 1fr;
  }
}
