:root {
  --paper: #fbf7f0;
  --card: #ffffff;
  --ink: #2a2230;
  --muted: #6b6270;
  --line: #e7dfd2;
  --accent: #a83f2b;
  --accent-ink: #ffffff;
  --accent-soft: #f6e6dc;
  --notice: #f2ece0;
  --serif: 'Gowun Batang', 'Noto Serif KR', serif;
  --sans: 'Noto Sans KR', system-ui, -apple-system, 'Malgun Gothic', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1820;
    --card: #26212b;
    --ink: #f2ece4;
    --muted: #b1a8b4;
    --line: #3b3440;
    --accent: #e8866d;
    --accent-ink: #231512;
    --accent-soft: #3d2a27;
    --notice: #2b2630;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.65 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.3; font-weight: 700; margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.disclosure { background: var(--notice); border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.5; padding: 8px 0; }
.disclosure strong { color: var(--accent); }

.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { font: 700 21px var(--serif); text-decoration: none; }
.top nav { display: flex; gap: 14px; font-size: 14px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }

.hero { padding: 26px 0 18px; }
.hero h1 { font-size: clamp(24px, 5vw, 34px); }
.hero p { color: var(--muted); margin: 8px 0 0; }

.page-head { padding: 30px 0 18px; }
.page-head h1 { font-size: clamp(26px, 6vw, 36px); }
.page-head p { color: var(--muted); margin: 8px 0 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumb a { color: inherit; }

.regions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.regions a { display: flex; gap: 6px; align-items: baseline; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-size: 14px; }
.regions a:hover { border-color: var(--accent); }
.regions a[aria-current='page'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.regions small { color: var(--muted); font-size: 12px; }
.regions a[aria-current='page'] small { color: inherit; }

.filters { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 20px 0 4px; }
.filters[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 13px; color: var(--muted); padding: 5px 11px; border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer; min-height: 32px; }
.chips button:hover { color: var(--ink); }
.chips button[aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); font-weight: 500; }

.section-title { font-size: 22px; margin: 36px 0 4px; }
.cards { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card[hidden] { display: none; }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-decoration: none; }
.card a:hover { border-color: var(--accent); }
.card a:hover .card-name { color: var(--accent); }
.card-img { display: block; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-name { padding: 10px 11px 0; font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-date { padding: 6px 11px 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.card-place { padding: 4px 11px 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-tag { align-self: flex-start; margin: 8px 11px 0; padding: 1px 7px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 4px; }
.card-tag[hidden] { display: none; }
.card a::after { content: ''; display: block; height: 11px; }
.empty { color: var(--muted); padding: 28px 0; }
.empty[hidden] { display: none; }
.more { display: inline-block; margin-top: 18px; font-weight: 500; color: var(--accent); }

.guide-list { list-style: none; padding: 0; margin: 10px 0 0; }
.guide-list a { display: block; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-list a:hover strong { color: var(--accent); }
.guide-list strong { font-weight: 500; display: block; }
.guide-list span { color: var(--muted); font-size: 14px; }

.detail { display: grid; gap: 24px; padding-bottom: 8px; }
.banner { border-radius: 10px; width: 100%; max-height: 420px; object-fit: contain; background: var(--notice); }
.facts { margin: 0; display: grid; grid-template-columns: 64px 1fr; gap: 8px 12px; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; }
.facts a { color: var(--accent); font-size: 14px; }
.ended { padding: 12px 14px; border-radius: 8px; background: var(--notice); font-weight: 500; }
.ended[hidden] { display: none; }
.apply { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 18px; }
.apply[hidden] { display: none; }
.apply h2 { font-size: 18px; margin-bottom: 8px; }
.apply ul { margin: 0 0 14px; padding-left: 18px; font-size: 14px; color: var(--muted); }
.btn { display: block; text-align: center; padding: 13px 16px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.apply .ad-note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.phrases { margin: 0; padding: 12px 14px 12px 32px; background: var(--notice); border-radius: 8px; font-size: 14px; }
.sub-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.fair-guide { display: grid; gap: 12px; min-width: 0; }
.guide-block { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.guide-block h2 { font-size: 19px; margin-bottom: 10px; }
.guide-block p { margin: 0 0 8px; }
.guide-block p:last-child { margin-bottom: 0; }
.guide-block p a { color: var(--accent); font-weight: 500; }
.guide-block ul { margin: 0; padding-left: 20px; }
.guide-block li + li { margin-top: 4px; }
.guide-block.summary { background: var(--accent-soft); border-color: transparent; }
.guide-block.caution { background: var(--notice); border-color: transparent; }
.guide-block ul.check { list-style: none; padding: 0; }
.guide-block ul.check li { position: relative; padding: 3px 0 3px 26px; }
.guide-block ul.check li::before { content: ''; position: absolute; left: 1px; top: 9px; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 3px; }
.ask { margin: 0; padding: 0; list-style: none; counter-reset: ask; }
.ask li { position: relative; padding: 0 0 0 34px; counter-increment: ask; }
.ask li + li { margin-top: 12px; }
.ask li::before { content: counter(ask); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; text-align: center; line-height: 24px; }
.ask strong { display: block; font-weight: 500; }
.ask span { display: block; color: var(--muted); font-size: 14px; }
.guide-block details { border-top: 1px solid var(--line); padding: 10px 0; }
.guide-block details:last-child { padding-bottom: 0; }
.guide-block summary { cursor: pointer; font-weight: 500; }
.guide-block details p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.guide-block .guide-list { padding: 0; margin: 0; }
.guide-block .guide-list li + li { margin-top: 0; }
.guide-block .guide-list li:last-child a { border-bottom: 0; padding-bottom: 0; }
.guide-block .guide-list li:first-child a { padding-top: 0; }

.prose { max-width: 40em; padding-bottom: 12px; }
.prose h2 { font-size: 20px; margin: 30px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--accent); }
.prose ul { padding-left: 20px; margin: 0 0 12px; }
.prose ul.check { list-style: none; padding: 0; }
.prose ul.check li { position: relative; padding: 5px 0 5px 28px; }
.prose ul.check li::before { content: ''; position: absolute; left: 2px; top: 11px; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 3px; }

.foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 24px 0 36px; color: var(--muted); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.foot p { margin: 4px 0; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (min-width: 720px) {
  .detail { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .detail .apply-col { position: sticky; top: 16px; display: grid; gap: 12px; grid-column: 2; grid-row: 1 / span 2; }
  .detail .fair-guide { grid-column: 1; grid-row: 2; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .detail .apply-col { display: grid; gap: 12px; }
  .banner { max-height: 300px; }
}
