@import url("https://fonts.googleapis.com/css2?family=Black+Han+Sans&family=Noto+Sans+KR:wght@400;500;700;900&family=Press+Start+2P&display=swap");

:root {
  --bg: #09090d;
  --bg-strong: #060608;
  --surface: rgba(24, 24, 28, 0.92);
  --surface-strong: rgba(14, 14, 18, 0.96);
  --surface-soft: rgba(34, 34, 42, 0.85);
  --border: #936445;
  --border-strong: #cb9a71;
  --ornament: #d8a06c;
  --text: #f6f2ec;
  --text-strong: #ffffff;
  --text-muted: #d5cdc3;
  --accent: #0ba7ff;
  --accent-strong: #ff2d2d;
  --accent-soft: #ff7b93;
  --glow: rgba(255, 143, 169, 0.36);
  --shadow-deep: 0 24px 50px rgba(0, 0, 0, 0.6);
  --shadow-panel: 0 12px 24px rgba(0, 0, 0, 0.42);
}

[data-theme="light"] {
  --bg: #efe7dd;
  --bg-strong: #d9ccb9;
  --surface: rgba(34, 31, 31, 0.9);
  --surface-strong: rgba(20, 18, 18, 0.95);
  --surface-soft: rgba(52, 47, 45, 0.82);
  --border: #8d6347;
  --border-strong: #d0a079;
  --ornament: #e2a46b;
  --text: #fff9f1;
  --text-strong: #ffffff;
  --text-muted: #efe5d9;
  --accent: #069eff;
  --accent-strong: #e12727;
  --accent-soft: #f48ca4;
  --glow: rgba(255, 126, 160, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--text);
  line-height: 1.75;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.16), transparent 0 22%),
    radial-gradient(circle at 82% 22%, rgba(255, 150, 186, 0.08), transparent 0 16%),
    linear-gradient(132deg, rgba(255, 255, 255, 0.06) 0 12%, transparent 12% 100%),
    linear-gradient(165deg, rgba(255, 255, 255, 0.03) 0 30%, transparent 30% 100%),
    linear-gradient(180deg, var(--bg), var(--bg-strong));
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      102deg,
      transparent 0 18px,
      rgba(255, 255, 255, 0.028) 18px 20px,
      transparent 20px 42px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 110, 150, 0.11) 0 1px,
      transparent 1px 98px
    );
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  position: relative;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.94), rgba(8, 8, 10, 0.78));
  border-bottom: 1px solid rgba(210, 160, 110, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.site-header-inner,
.page-wrap,
.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    linear-gradient(180deg, rgba(72, 72, 80, 0.55), rgba(22, 22, 24, 0.98)),
    var(--surface-strong);
  color: var(--text-strong);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-panel);
  font-family: "Black Han Sans", sans-serif;
  font-size: 28px;
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000,
    0 -2px 0 #000;
}

.brand-mark::before,
.brand-mark::after,
.hero-card::before,
.hero-card::after,
.panel::before,
.panel::after,
.card::before,
.card::after,
.article-shell::before,
.article-shell::after,
.tool-box::before,
.tool-box::after,
.game-box::before,
.game-box::after,
.question-box::before,
.question-box::after,
.result-box::before,
.result-box::after,
.score-box::before,
.score-box::after,
.stat-item::before,
.stat-item::after,
.callout::before,
.callout::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--ornament);
  opacity: 0.95;
  pointer-events: none;
}

.brand-mark::before,
.hero-card::before,
.panel::before,
.card::before,
.article-shell::before,
.tool-box::before,
.game-box::before,
.question-box::before,
.result-box::before,
.score-box::before,
.stat-item::before,
.callout::before {
  top: -2px;
  left: -2px;
  border-top: 4px solid var(--ornament);
  border-left: 4px solid var(--ornament);
  border-top-left-radius: 20px;
}

.brand-mark::after,
.hero-card::after,
.panel::after,
.card::after,
.article-shell::after,
.tool-box::after,
.game-box::after,
.question-box::after,
.result-box::after,
.score-box::after,
.stat-item::after,
.callout::after {
  right: -2px;
  bottom: -2px;
  border-right: 4px solid var(--ornament);
  border-bottom: 4px solid var(--ornament);
  border-bottom-right-radius: 20px;
}

.brand-copy strong,
.main-nav a,
.solid-button,
.ghost-button,
.chip-link,
.eyebrow,
.meta-pill,
.score-box strong,
.stat-item strong,
.theme-toggle {
  font-family: "Press Start 2P", cursive;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-strong);
  text-shadow:
    0 2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000,
    0 -2px 0 #000;
}

.brand-copy span {
  display: block;
  color: #f1c79f;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.main-nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.main-nav a,
.ghost-button,
.solid-button,
.chip-link {
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.main-nav a,
.ghost-button,
.chip-link {
  padding: 10px 14px;
  position: relative;
  background: linear-gradient(180deg, rgba(58, 58, 66, 0.64), rgba(18, 18, 20, 0.96));
  border: 1px solid rgba(198, 151, 112, 0.72);
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.main-nav a:hover,
.main-nav a.active,
.ghost-button:hover,
.chip-link:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
  background:
    linear-gradient(180deg, rgba(75, 75, 82, 0.92), rgba(18, 18, 22, 0.96)),
    radial-gradient(circle at top, rgba(255, 130, 164, 0.18), transparent 55%);
  transform: translateY(-2px);
}

.theme-toggle {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(198, 151, 112, 0.8);
  background: linear-gradient(180deg, rgba(58, 58, 66, 0.72), rgba(18, 18, 20, 0.96));
  color: var(--text-strong);
  cursor: pointer;
  font-size: 14px;
  box-shadow: var(--shadow-panel);
}

.page-wrap {
  padding: 36px 0 88px;
  position: relative;
}

.page-wrap::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 340px;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.14), transparent 0 18%),
    radial-gradient(circle at 77% 12%, rgba(255, 133, 176, 0.12), transparent 0 16%),
    linear-gradient(116deg, rgba(255, 255, 255, 0.08) 0 18%, transparent 18% 100%),
    repeating-linear-gradient(103deg, transparent 0 22px, rgba(255, 255, 255, 0.028) 22px 24px, transparent 24px 48px);
  opacity: 0.8;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(310px, 0.78fr);
  gap: 26px;
  align-items: stretch;
}

.hero-card,
.panel,
.card,
.article-shell,
.tool-box,
.game-box,
.question-box,
.score-box,
.stat-item,
.result-box,
.callout {
  position: relative;
  background:
    linear-gradient(180deg, rgba(58, 58, 66, 0.22), rgba(12, 12, 16, 0.98)),
    var(--surface);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-deep);
}

.hero-card,
.panel,
.card,
.article-shell,
.tool-box,
.game-box {
  overflow: hidden;
}

.hero-card::selection,
.panel::selection,
.card::selection,
.article-shell::selection,
.tool-box::selection,
.game-box::selection {
  background: rgba(11, 167, 255, 0.24);
}

.hero-card {
  padding: 34px;
}

.hero-card:first-child {
  transform: rotate(-0.55deg);
}

.hero-side {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: rotate(0.5deg) translateY(22px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: rgba(255, 114, 154, 0.08);
  color: #ffd1dc;
  border: 1px solid rgba(255, 139, 174, 0.58);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000;
}

.hero h1,
.page-title,
.article-shell h1,
.question-box strong {
  margin: 18px 0 16px;
  color: var(--text-strong);
  font-family: "Black Han Sans", sans-serif;
  font-weight: 400;
  line-height: 1.36;
  letter-spacing: 0.03em;
  text-shadow:
    0 3px 0 #000,
    3px 0 0 #000,
    -3px 0 0 #000,
    0 -3px 0 #000,
    2px 2px 0 rgba(0, 0, 0, 0.72);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 66px);
}

.page-title {
  font-size: clamp(28px, 4vw, 46px);
}

.hero p,
.lede,
.card p,
.card li,
.article-shell p,
.article-shell li,
.panel p,
.tool-note,
.game-note,
.section-head p,
.brand-copy span,
.stat-item span,
.score-box span,
.field label,
.footer-links a,
.site-footer-inner {
  color: var(--text-muted);
}

.hero p,
.lede {
  font-size: 17px;
}

.hero-actions,
.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.solid-button {
  padding: 14px 18px;
  border: 1px solid #fff2;
  background:
    linear-gradient(180deg, rgba(93, 93, 100, 0.78), rgba(18, 18, 22, 0.98)),
    var(--surface-strong);
  color: var(--text-strong);
  font-size: 11px;
  box-shadow: var(--shadow-panel);
  text-shadow:
    0 1px 0 #000,
    1px 0 0 #000;
}

.solid-button:hover {
  transform: translateY(-2px);
  background:
    linear-gradient(180deg, rgba(102, 166, 255, 0.38), rgba(18, 18, 22, 0.98)),
    var(--surface-strong);
}

.ghost-button {
  border: 1px solid rgba(198, 151, 112, 0.78);
  background:
    linear-gradient(180deg, rgba(56, 56, 62, 0.72), rgba(16, 16, 20, 0.98)),
    var(--surface-strong);
  color: var(--text);
  box-shadow: var(--shadow-panel);
}

.ghost-button:hover {
  transform: translateY(-2px);
}

.stat-grid,
.card-grid,
.mini-grid {
  display: grid;
  gap: 16px;
}

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

.stat-item {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(66, 66, 70, 0.4), rgba(14, 14, 16, 0.96)),
    var(--surface-strong);
}

.stat-item strong {
  display: block;
  font-size: 18px;
  color: var(--text-strong);
  line-height: 1.4;
  text-shadow: 0 2px 0 #000;
}

.stat-item span {
  display: block;
  font-size: 11px;
  margin-top: 8px;
}

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head h2,
.panel h3,
.result-box strong,
.question-box span {
  font-family: "Press Start 2P", cursive;
  color: #ffd4b0;
  line-height: 1.5;
  text-shadow: 0 1px 0 #000;
}

.tool-box h2,
.game-box h2,
.card strong {
  font-family: "Black Han Sans", sans-serif;
  color: #ffd4b0;
  line-height: 1.5;
  text-shadow: 0 1px 0 #000;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
}

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

.card,
.panel,
.article-shell,
.tool-box,
.game-box {
  padding: 24px;
}

.card:nth-child(2n) {
  transform: rotate(-0.6deg) translateY(10px);
}

.card:nth-child(2n + 1) {
  transform: rotate(0.55deg);
}

.card strong {
  display: block;
  font-size: 13px;
  margin: 12px 0 10px;
}

.card ul,
.article-shell ul,
.article-shell ol {
  margin: 0;
  padding-left: 20px;
}

.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel h3,
.tool-box h2,
.game-box h2 {
  margin-top: 0;
  font-size: 14px;
}

.article-shell h2 {
  margin-top: 0;
  font-size: 24px;
  font-family: "Black Han Sans", sans-serif;
  font-weight: 400;
  color: var(--text-strong);
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-shadow:
    0 2px 0 #000,
    2px 0 0 #000,
    -2px 0 0 #000,
    0 -2px 0 #000;
}

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

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

.page-intro {
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.meta-pill {
  padding: 10px 12px;
  border: 1px solid rgba(255, 139, 174, 0.52);
  color: #ffd1dc;
  background: rgba(255, 114, 154, 0.08);
  font-size: 10px;
}

.callout {
  margin: 24px 0;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(69, 117, 190, 0.24), rgba(15, 15, 20, 0.96)),
    var(--surface-strong);
  color: var(--text);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.field label {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(206, 162, 119, 0.72);
  background:
    linear-gradient(180deg, rgba(55, 55, 62, 0.45), rgba(11, 11, 14, 0.98)),
    var(--surface-strong);
  color: var(--text-strong);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(11, 167, 255, 0.65);
  outline-offset: 1px;
}

.result-box {
  margin-top: 18px;
  padding: 18px 20px;
  background:
    linear-gradient(180deg, rgba(56, 56, 62, 0.36), rgba(11, 11, 15, 0.98)),
    var(--surface-strong);
}

.result-box strong {
  display: block;
  font-size: 11px;
  margin-bottom: 10px;
}

.site-footer {
  border-top: 1px solid rgba(198, 151, 112, 0.5);
  padding: 28px 0 44px;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.76), rgba(6, 6, 8, 0.94));
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
}

.score-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.score-box {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(58, 58, 66, 0.28), rgba(10, 10, 12, 0.98)),
    var(--surface-strong);
}

.score-box span {
  display: block;
  font-size: 10px;
  margin-bottom: 8px;
}

.score-box strong {
  display: block;
  font-size: clamp(16px, 3vw, 22px);
  color: var(--text-strong);
  line-height: 1.4;
}

.question-box {
  padding: 26px 24px;
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(58, 58, 66, 0.24), rgba(8, 8, 12, 0.98)),
    var(--surface-strong);
}

.question-box::before {
  top: -2px;
  left: -2px;
}

.question-box::after {
  right: -2px;
  bottom: -2px;
}

.question-box span {
  display: block;
  font-size: 10px;
  color: #ffc6d8;
  margin-top: 4px;
  margin-bottom: 14px;
  letter-spacing: 0.14em;
}

.question-box strong {
  display: block;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.45;
}

.split-list {
  display: grid;
  gap: 12px;
}

.split-list li {
  background:
    linear-gradient(180deg, rgba(56, 56, 62, 0.24), rgba(11, 11, 14, 0.98)),
    var(--surface-strong);
  border: 1px solid rgba(198, 151, 112, 0.4);
  padding: 12px 14px;
  list-style: none;
}

.is-good,
.good,
[data-state="good"] {
  color: var(--accent);
}

.is-danger,
.danger,
[data-state="danger"] {
  color: var(--accent-strong);
}

@keyframes warningPulse {
  0%,
  100% {
    box-shadow: var(--shadow-deep);
  }

  50% {
    box-shadow:
      var(--shadow-deep),
      0 0 24px var(--glow);
  }
}

.hero-card,
.question-box,
.result-box,
.callout {
  animation: warningPulse 3.2s ease-in-out infinite;
}

@media (max-width: 940px) {
  .hero,
  .two-col,
  .three-col,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    flex-wrap: wrap;
  }

  .main-nav {
    margin-left: 0;
  }

  .hero-card:first-child,
  .hero-side,
  .card:nth-child(2n),
  .card:nth-child(2n + 1) {
    transform: none;
  }
}

@media (max-width: 680px) {
  .site-header-inner,
  .page-wrap,
  .site-footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-card,
  .hero-side,
  .panel,
  .card,
  .article-shell,
  .tool-box,
  .game-box,
  .question-box,
  .result-box {
    padding: 20px;
  }

  .stat-grid,
  .score-board {
    grid-template-columns: 1fr;
  }

  .main-nav a,
  .ghost-button,
  .solid-button,
  .chip-link,
  .theme-toggle {
    font-size: 10px;
  }

  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1,
  .page-title {
    line-height: 1.4;
  }
}
