:root {
  --ink: #252525;
  --muted: #6d6a66;
  --line: #e9e3dc;
  --paper: #ffffff;
  --soft: #f7fbff;
  --coral: #ff6f61;
  --mint: #21b7a8;
  --yellow: #f4ba3b;
  --blue: #4b8de8;
  --violet: #8d6adf;
  --green: #69a84f;
  --shadow: 0 18px 45px rgba(47, 42, 36, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, #f7fbff 44%, #fff8f1 100%);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 24px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--yellow));
  text-transform: uppercase;
}

.logo-text,
.footer-logo {
  color: #222;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.main-nav a,
.header-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: #3b3733;
  font-weight: 700;
  font-size: 14px;
}

.main-nav a:hover,
.header-actions a:hover {
  background: #f3f7fb;
}

.header-actions {
  display: flex;
  gap: 4px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  background: #333;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.ad-slot {
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px dashed #cfc7bd;
  border-radius: 8px;
  color: #77716a;
  background: repeating-linear-gradient(135deg, #fff, #fff 12px, #f7f2ed 12px, #f7f2ed 24px);
  text-align: center;
}

.ad-slot span {
  font-size: 12px;
  font-weight: 700;
}

.ad-slot strong {
  font-size: 14px;
}

.ad-top,
.ad-bottom {
  min-height: 90px;
  margin: 18px 0;
}

.ad-wide {
  min-height: 118px;
  margin: 26px 0;
}

.ad-rectangle {
  min-height: 250px;
  margin: 18px 0;
}

.hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  background: url("assets/hero-unilol.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78) 48%, rgba(255, 255, 255, 0.18));
}

.hero-content {
  position: relative;
  width: min(620px, 100%);
  padding: 44px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 900;
}

.hero h1 {
  max-width: 560px;
  margin: 0;
  font-size: 42px;
  line-height: 1.16;
}

.hero-copy {
  max-width: 520px;
  margin: 16px 0 24px;
  color: #4c4945;
  font-size: 17px;
  line-height: 1.7;
}

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

.primary-btn,
.secondary-btn,
.test-card button,
.rank-list button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.primary-btn {
  padding: 0 20px;
  color: #fff;
  background: #ff6f61;
}

.secondary-btn {
  padding: 0 20px;
  color: #2f2b28;
  background: #fff;
  border: 1px solid var(--line);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 480px;
  margin: 26px 0 0;
}

.hero-stats div {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.hero-stats dt {
  font-weight: 900;
  font-size: 22px;
}

.hero-stats dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-menu {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 26px;
}

.quick-item {
  min-height: 94px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(34, 31, 27, 0.06);
}

.quick-item span,
.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
}

.quick-item strong {
  font-size: 14px;
}

.coral span,
.card-icon.coral {
  background: var(--coral);
}

.mint span,
.card-icon.mint {
  background: var(--mint);
}

.yellow span,
.card-icon.yellow {
  background: var(--yellow);
}

.blue span,
.card-icon.blue {
  background: var(--blue);
}

.violet span,
.card-icon.violet {
  background: var(--violet);
}

.green span,
.card-icon.green {
  background: var(--green);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.section-block,
.side-panel,
.daily-card,
.counsel-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(34, 31, 27, 0.05);
}

.section-block {
  padding: 24px;
}

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

.section-head h2,
.side-panel h2,
.daily-card h2,
.counsel-box h2,
.article-section h2 {
  margin: 0;
  font-size: 26px;
}

.search-box {
  width: min(320px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--coral);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.filter-tabs button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #514d48;
  background: #fff;
  font-weight: 800;
}

.filter-tabs .active {
  border-color: #ff6f61;
  color: #fff;
  background: #ff6f61;
}

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

.test-card {
  min-height: 278px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.test-card.hot {
  background: linear-gradient(180deg, #fff7f4, #fff);
}

.test-card[hidden] {
  display: none;
}

.card-tag {
  margin: 4px 0 0;
  color: var(--coral);
  font-weight: 900;
  font-size: 13px;
}

.test-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}

.test-card p:not(.card-tag) {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: 14px;
}

.card-meta {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  color: #57514b;
  background: #f5f3ef;
  font-size: 12px;
  font-weight: 800;
}

.test-card button {
  width: 100%;
  margin-top: 4px;
  color: #fff;
  background: #2d2a27;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.daily-card,
.counsel-box {
  padding: 24px;
}

.daily-card p,
.counsel-box p {
  color: var(--muted);
  line-height: 1.65;
}

.draw-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.draw-cards button {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf5;
  font-weight: 900;
}

.draw-cards button:hover {
  border-color: var(--coral);
}

.draw-result {
  min-height: 76px;
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  color: #403b35;
  background: #f5fbfa;
  line-height: 1.6;
}

.counsel-box ul,
.upcoming-list {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.counsel-box li + li,
.upcoming-list li + li {
  border-top: 1px solid var(--line);
}

.counsel-box a,
.upcoming-list li {
  display: block;
  padding: 13px 0;
  color: #3d3934;
  font-weight: 800;
}

.article-section {
  margin-top: 26px;
}

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

.article-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.article-grid h3 {
  margin: 0 0 8px;
}

.article-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.sidebar {
  position: sticky;
  top: 92px;
}

.side-panel {
  padding: 20px;
}

.rank-list {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
  counter-reset: rank;
}

.rank-list li {
  counter-increment: rank;
}

.rank-list li + li {
  margin-top: 8px;
}

.rank-list button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: #2e2a26;
  background: #fff;
  text-align: left;
}

.rank-list button::before {
  content: counter(rank);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--coral);
  font-size: 12px;
}

.site-footer {
  width: min(1160px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 44px auto 0;
  padding: 30px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-logo {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  line-height: 1.65;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  font-weight: 800;
}

.quiz-dialog {
  width: min(560px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(20, 20, 20, 0.28);
}

.quiz-dialog::backdrop {
  background: rgba(27, 24, 22, 0.56);
}

.dialog-shell {
  position: relative;
  padding: 26px;
  background: #fff;
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.quiz-progress {
  display: grid;
  gap: 8px;
  margin-right: 58px;
}

.quiz-progress span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.quiz-progress div {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #f1ece5;
}

#quizProgressBar {
  width: 0%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, var(--coral), var(--yellow));
}

.quiz-dialog h2 {
  margin: 8px 0 16px;
  padding-right: 60px;
  font-size: 26px;
}

.quiz-question {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.45;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-options button {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: #302c28;
  background: #fff;
  text-align: left;
  font-weight: 800;
  line-height: 1.5;
}

.quiz-options button:hover {
  border-color: var(--coral);
  background: #fff8f5;
}

.result-card {
  padding: 20px;
  border-radius: 8px;
  background: #f7fbff;
}

.result-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.result-card p {
  margin: 0;
  color: #4f4a45;
  line-height: 1.7;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.result-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 900;
}

.result-actions button:first-child {
  color: #fff;
  background: #2d2a27;
}

.result-actions button:last-child {
  border: 1px solid var(--line);
  background: #fff;
}

.simple-page {
  min-height: 100vh;
}

.page-hero {
  max-width: 860px;
  padding: 54px 0 28px;
}

.page-hero h1 {
  margin: 0;
  font-size: 36px;
}

.page-hero p {
  color: var(--muted);
  line-height: 1.7;
}

.policy-card {
  max-width: 860px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.policy-card + .policy-card {
  margin-top: 16px;
}

.policy-card h2 {
  margin: 0 0 10px;
}

.policy-card p,
.policy-card li {
  color: var(--muted);
  line-height: 1.75;
}

.policy-card ul {
  margin-bottom: 0;
}

.contact-list {
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav,
  .header-actions {
    width: 100%;
    display: none;
  }

  .main-nav.is-open,
  .header-actions.is-open {
    display: flex;
    flex-wrap: wrap;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

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

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

  .hero {
    min-height: 420px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
  }

  .hero-content {
    padding: 28px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-stats,
  .quick-menu,
  .test-grid,
  .split-section,
  .article-grid,
  .draw-cards {
    grid-template-columns: 1fr;
  }

  .section-block {
    padding: 18px;
  }

  .section-head,
  .site-footer {
    display: block;
  }

  .search-box {
    margin-top: 16px;
  }

  .site-footer nav {
    margin-top: 18px;
  }
}
