:root {
  --ink: #17231e;
  --muted: #657069;
  --paper: #f8f5ee;
  --paper-deep: #eee9de;
  --line: #ded9ce;
  --pine: #315e4e;
  --pine-dark: #24483c;
  --mint: #d9eadb;
  --coral: #d9684b;
  --sun: #e6b653;
  --card: #fffdf8;
  --radius: 20px;
  --shadow: 0 18px 45px rgba(23, 35, 30, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  line-height: 1.6;
  word-break: keep-all;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  color: #fff;
  background: var(--ink);
  border-radius: 0.5rem;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--paper);
  background: var(--pine);
  border-radius: 50%;
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 0.9rem;
}

.header-link {
  color: var(--muted);
  font-size: 0.9rem;
  text-underline-offset: 0.25rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: end;
  padding: clamp(3.5rem, 8vw, 5.8rem) 0 clamp(3.5rem, 7vw, 5rem);
}

.eyebrow,
.card-kicker {
  margin: 0 0 0.7rem;
  color: var(--pine);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.18;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.35rem;
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: clamp(2.8rem, 6.1vw, 5.55rem);
  font-weight: 600;
  letter-spacing: -0.075em;
}

.status-updated {
  display: block;
  margin-top: 0.32rem;
  color: var(--pine);
  font-size: 0.68rem;
  font-weight: 700;
}

.primary-button {
  display: inline-flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem 0.85rem 1.25rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--pine);
  transform: translateY(-2px);
}

.secondary-button {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.78rem 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-2px);
}

.next-deadline {
  position: relative;
  padding: 2rem;
  overflow: hidden;
  color: var(--paper);
  background: var(--pine);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.next-deadline::after {
  position: absolute;
  right: -2.1rem;
  bottom: -4.5rem;
  width: 11rem;
  height: 11rem;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
}

.next-deadline > * {
  position: relative;
  z-index: 1;
}

.next-deadline .card-kicker {
  color: #c5e0ca;
}

.month-number {
  margin-bottom: 0.2rem;
  color: #cfe8d5;
  font-family: Georgia, serif;
  font-size: 4.4rem;
  line-height: 1;
  letter-spacing: -0.08em;
}

.next-deadline h2 {
  margin-bottom: 0.45rem;
  font-size: 1.6rem;
}

.deadline-date {
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.deadline-note {
  margin-bottom: 1.5rem;
  color: #d9e9dc;
  font-size: 0.9rem;
}

.text-link {
  color: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}

.summary {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(240px, 2fr);
  margin-bottom: clamp(5rem, 10vw, 9rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 138px;
  padding: 1.5rem 1.8rem;
  border-right: 1px solid var(--line);
}

.summary-item:last-child {
  border-right: 0;
}

.summary-item strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.15rem;
  font-weight: 500;
  letter-spacing: -0.055em;
}

.summary-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.summary-wide {
  background: rgba(217, 234, 219, 0.55);
}

.summary-wide .summary-label {
  margin-bottom: 0.2rem;
  color: var(--pine);
  font-size: 0.75rem;
  font-weight: 800;
}

.summary-wide strong {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.timeline-section,
.contest-section,
.comparison-section,
.spring-section,
.guide-section {
  margin-bottom: clamp(5rem, 10vw, 9rem);
}

.section-heading {
  display: flex;
  gap: 1.5rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.8rem;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.065em;
}

.section-heading > p {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: right;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(9, minmax(92px, 1fr));
  gap: 0.6rem;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-color: var(--pine) transparent;
}

.timeline-item {
  min-width: 92px;
}

.timeline-link {
  display: flex;
  flex-direction: column;
  min-height: 135px;
  padding: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.timeline-link:hover,
.timeline-link:focus-visible {
  border-color: var(--pine);
  box-shadow: 0 8px 20px rgba(23, 35, 30, 0.09);
  transform: translateY(-3px);
}

.timeline-month {
  color: var(--pine);
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.timeline-name {
  display: -webkit-box;
  margin-top: auto;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.7rem;
  border-radius: 50%;
}

.timeline-dot.open {
  background: var(--pine);
}

.timeline-dot.closing {
  background: var(--coral);
}

.timeline-dot.closed {
  background: #aeb5b0;
}

.timeline-dot.awaiting {
  background: var(--sun);
}

.contest-heading {
  align-items: flex-end;
}

.filter-panel {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem;
  margin-bottom: 1.8rem;
  background: var(--paper-deep);
  border-radius: 14px;
}

.filter-buttons {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.filter-button {
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-button:hover,
.filter-button:focus-visible {
  color: var(--ink);
  outline: 2px solid rgba(49, 94, 78, 0.35);
  outline-offset: 1px;
}

.filter-button.is-active {
  color: var(--paper);
  background: var(--ink);
}

.search-field {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  width: min(100%, 260px);
  padding: 0 0.8rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 8px;
}

.search-field:focus-within {
  border-color: var(--pine);
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: 0.65rem 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 0.85rem;
}

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

.contest-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 1.45rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 0 rgba(23, 35, 30, 0.02);
}

.contest-card[data-status="open"] {
  border-color: rgba(49, 94, 78, 0.48);
  box-shadow: 0 14px 35px rgba(49, 94, 78, 0.1);
}

.contest-card[data-status="closing"] {
  border-color: rgba(217, 104, 75, 0.58);
  box-shadow: 0 14px 35px rgba(217, 104, 75, 0.1);
}

.contest-card-top {
  display: flex;
  gap: 1rem;
  align-items: start;
  justify-content: space-between;
}

.contest-month {
  margin: 0 0 0.6rem;
  color: var(--pine);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.contest-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.3rem;
  letter-spacing: -0.045em;
}

.status-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.open {
  color: #175139;
  background: #dbeedc;
}

.status-badge.closing {
  color: #8a3827;
  background: #f9ded6;
}

.status-badge.closed {
  color: #626b65;
  background: #eceeea;
}

.status-badge.awaiting {
  color: #7a5914;
  background: #faebc4;
}

.contest-deadline {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.contest-prize {
  margin-bottom: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contest-prize span {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.contest-prize strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.contest-condition {
  margin-bottom: 1.5rem;
  color: #4a554e;
  font-size: 0.87rem;
}

.contest-footer {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.contest-type {
  color: var(--pine);
  font-size: 0.72rem;
  font-weight: 800;
}

.source-link,
.source-unavailable {
  font-size: 0.8rem;
  font-weight: 800;
}

.source-link {
  color: var(--pine-dark);
  text-underline-offset: 0.2rem;
}

.source-unavailable {
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 3.5rem 1rem;
  color: var(--muted);
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-wrap:focus-visible {
  outline: 3px solid rgba(49, 94, 78, 0.45);
  outline-offset: 3px;
}

table {
  width: 100%;
  min-width: 770px;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #faf8f3;
  font-size: 0.73rem;
  letter-spacing: 0.02em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td:first-child {
  width: 120px;
  color: var(--pine);
  font-weight: 800;
  white-space: nowrap;
}

td:nth-child(2) {
  min-width: 150px;
  font-weight: 800;
}

td:nth-child(3) {
  width: 130px;
  font-weight: 800;
}

.table-status {
  display: inline-flex;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.table-status.open {
  color: #175139;
  background: #dbeedc;
}

.table-status.closing {
  color: #8a3827;
  background: #f9ded6;
}

.table-status.closed {
  color: #626b65;
  background: #eceeea;
}

.table-status.awaiting {
  color: #7a5914;
  background: #faebc4;
}

.spring-intro {
  max-width: 680px;
  margin: -0.7rem 0 1.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.spring-card {
  display: flex;
  flex-direction: column;
  min-height: 255px;
  padding: 1.45rem;
  background: #f0f5ef;
  border: 1px solid #cfddcf;
  border-radius: var(--radius);
}

.spring-card-top {
  display: flex;
  gap: 0.8rem;
  align-items: start;
  justify-content: space-between;
}

.spring-card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.045em;
}

.spring-card-status {
  flex: none;
  padding: 0.25rem 0.5rem;
  color: #7a5914;
  background: #faebc4;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.spring-label {
  margin: 1.1rem 0 0.3rem;
  color: var(--pine);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.spring-fields {
  margin: 0 0 1.5rem;
  color: #405348;
  font-size: 0.88rem;
}

.spring-card .source-link {
  margin-top: auto;
}

.guide-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 8vw, 7rem);
  padding: clamp(2rem, 6vw, 4rem);
  background: var(--ink);
  border-radius: var(--radius);
}

.guide-section .eyebrow {
  color: #a8d1ad;
}

.guide-section h2 {
  margin: 0;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.065em;
}

.guide-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.guide-list li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.8rem;
  padding: 0.95rem 0;
  color: #dae0db;
  border-bottom: 1px solid rgba(238, 233, 222, 0.22);
  font-size: 0.9rem;
}

.guide-list li:first-child {
  padding-top: 0;
}

.guide-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-list span {
  color: #9dceaa;
  font-family: Georgia, serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.site-footer {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .next-deadline {
    max-width: 460px;
  }

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

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

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

  .site-header {
    min-height: 66px;
  }

  .intro {
    padding-top: 3.5rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a {
    justify-content: center;
  }

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

  .summary-item {
    min-height: 112px;
    padding: 1.1rem;
  }

  .summary-wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    max-width: none;
    margin-top: 0.7rem;
    text-align: left;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

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

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

  .contest-card {
    min-height: 0;
  }

  .guide-section {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
  }

  .site-footer p + p {
    margin-top: 0.35rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
