/* ═══════════════════════════════════════════
   응모권 — 디자인 토큰
   ═══════════════════════════════════════════ */
:root {
  --paper: #F4F3FB;
  --surface: #FFFFFF;
  --ink: #14163A;
  --mute: #6C6F8F;
  --line: #E3E3F0;

  --cobalt: #3452FF;
  --mint: #0B8F70;
  --grape: #7C4DFF;
  --tang: #FF7A1A;
  --slate: #4B5071;
  --lemon: #FFE14D;
  --hot: #FF4B3A;

  --r-lg: 20px;
  --r: 14px;
  --shadow: 0 1px 2px rgba(20, 22, 58, .05), 0 10px 26px -14px rgba(20, 22, 58, .22);
  --shadow-up: 0 2px 4px rgba(20, 22, 58, .06), 0 22px 40px -16px rgba(20, 22, 58, .34);

  --f-body: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif;
  --f-display: "Black Han Sans", "Pretendard Variable", "Malgun Gothic", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E0F22;
    --surface: #181A36;
    --ink: #EDEEFF;
    --mute: #9A9CC0;
    --line: #2A2D52;
    --slate: #565B8C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(0, 0, 0, .7);
    --shadow-up: 0 2px 4px rgba(0, 0, 0, .4), 0 24px 44px -14px rgba(0, 0, 0, .8);
  }
}

/* ── 기본 ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 var(--f-body); }
a { color: inherit; }
button { font: inherit; color: inherit; }
b { font-weight: 800; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 99; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* ── 워드마크: 작은 응모권 모양 ── */
.wm-mark {
  display: inline-block; width: 22px; height: 16px; border-radius: 4px; background: var(--cobalt);
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 3.5px, #000 4px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 3.5px, #000 4px) right / 51% 100% no-repeat;
          mask: radial-gradient(circle at 0 50%, transparent 3.5px, #000 4px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 50%, transparent 3.5px, #000 4px) right / 51% 100% no-repeat;
}
.is-placeholder { text-decoration: underline dashed color-mix(in srgb, var(--mute) 70%, transparent); text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* ── 상단 ── */
.nav { background: var(--paper); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-display); font-size: 22px; text-decoration: none; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 22px; font-size: 14.5px; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--mute); }
.nav-links a:hover { color: var(--ink); }

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 13px 22px;
  font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-line { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.linkbtn { border: 0; background: none; padding: 4px 2px; font-size: 13.5px; font-weight: 700; color: var(--cobalt); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ═══ 분야 패턴 — 포스터 대신 쓰는 커버 ═══ */
.p-policy {
  --on: #FFFFFF;
  background: repeating-radial-gradient(circle at 108% -8%, rgba(255,255,255,.17) 0 2px, transparent 2px 19px), var(--cobalt);
}
.p-ai {
  --on: #FFFFFF;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.14) 0 1px, transparent 1px 15px),
              repeating-linear-gradient(90deg, rgba(255,255,255,.14) 0 1px, transparent 1px 15px), var(--mint);
}
.p-paper {
  --on: #FFFFFF;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.13) 0 7px, transparent 7px 17px), var(--grape);
}
.p-startup {
  --on: #1C1300;
  background: radial-gradient(rgba(20,22,58,.22) 1.6px, transparent 1.8px) 0 0 / 13px 13px, var(--tang);
}
.p-etc {
  --on: #FFFFFF;
  background: radial-gradient(rgba(255,255,255,.2) 1.6px, transparent 1.8px) 0 0 / 13px 13px, var(--slate);
}

/* ═══ 응모권 티켓 ═══ */
.ticket {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ticket:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: var(--shadow-up); }

.t-cover {
  position: relative; height: 140px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px 16px 15px; border-radius: var(--r-lg) var(--r-lg) 0 0; color: var(--on);
}
.t-cat {
  align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: .01em;
  padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.22); color: var(--on);
}
.p-startup .t-cat { background: rgba(20,22,58,.13); }
.t-host {
  font-family: var(--f-display); font-size: 24px; line-height: 1.12; letter-spacing: -.01em;
  padding-right: 8px; word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.t-sticker {
  position: absolute; top: 12px; right: 12px;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--surface); color: var(--ink);
  font-family: var(--f-display); font-size: 22px; line-height: 1;
  transform: rotate(9deg);
  box-shadow: 0 5px 12px -5px rgba(0,0,0,.45), inset 0 0 0 2px rgba(20,22,58,.06);
}
.t-sticker small { font-size: 13px; margin-right: 1px; }
.t-sticker .st-today { font-size: 15px; line-height: 1.05; }
.ticket.hot .t-sticker, .mini.hot .t-sticker { background: var(--lemon); color: #1C1300; }
.ticket.today .t-sticker, .mini.today .t-sticker { background: var(--hot); color: #FFFFFF; }

.t-body { flex: 1; display: flex; flex-direction: column; gap: 11px; padding: 15px 16px 14px; }
.t-title {
  margin: 0; font-size: 16px; line-height: 1.42; font-weight: 800; letter-spacing: -.01em;
  word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.t-title a { text-decoration: none; }
.t-title a:hover { color: var(--cobalt); }
.t-facts { margin: 0; display: grid; gap: 4px; font-size: 13.5px; }
.t-facts div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
.t-facts dt { color: var(--mute); }
.t-facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-facts .mono { font: 700 12.5px/1.65 var(--f-mono); }
.unk { color: var(--mute); }
.t-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--paper); color: var(--mute); }
.tag-warn { background: #FFEDE8; color: #B4321F; }
@media (prefers-color-scheme: dark) { .tag-warn { background: #3A1C16; color: #FF9E8C; } }

/* 절취선 + 반원 홈 */
.t-perf { position: relative; display: block; margin: 0 20px; border-top: 2px dashed var(--line); }
.t-perf::before, .t-perf::after {
  content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper);
}
.t-perf::before { left: -30px; }
.t-perf::after { right: -30px; }

.t-stub { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px 14px; }
.t-serial { font: 700 11px/1.45 var(--f-mono); color: var(--mute); }
.t-go { font-size: 13.5px; font-weight: 800; color: var(--cobalt); text-decoration: none; white-space: nowrap; }
.t-go:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ═══ 히어로 ═══ */
.hero { padding: 36px 0 18px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 36px; align-items: center; }
.hero-date {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px;
  padding: 7px 13px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font: 700 13px/1 var(--f-mono); color: var(--mute);
}
.hero-date::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hot) 22%, transparent); }
.hero-title {
  margin: 0; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(42px, 6.6vw, 86px); line-height: 1.04; letter-spacing: -.025em; word-break: keep-all;
}
.hero-title em {
  font-style: normal; color: var(--cobalt); padding: 0 .06em;
  background: linear-gradient(transparent 60%, var(--lemon) 60%, var(--lemon) 90%, transparent 90%);
}
.hero-sub { margin: 22px 0 0; max-width: 31em; font-size: 17px; line-height: 1.7; color: var(--mute); }
.hero-sub b { color: var(--ink); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* 히어로 티켓 더미 */
.hero-stack { position: relative; min-height: 540px; }
.mini {
  position: absolute; width: min(300px, 76%);
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-up);
  transform: rotate(var(--rot));
  animation: drop .7s cubic-bezier(.2, .9, .25, 1) both; animation-delay: var(--dl);
}
.mini .t-cover { height: 156px; }
.mini .m-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 14px 16px 12px; font-size: 15.5px; line-height: 1.42; font-weight: 800; word-break: keep-all;
}
.mini .t-stub { padding-top: 10px; }
/* 앞 티켓이 뒤 티켓의 커버(주최명·스티커)를 가리지 않도록 세로로 충분히 어긋나게 */
.mini:nth-child(1) { left: 0; top: 34px; --rot: -8deg; --dl: .05s; z-index: 1; }
.mini:nth-child(2) { left: 40%; top: 0; --rot: 6deg; --dl: .18s; z-index: 2; }
.mini:nth-child(3) { left: 18%; top: 236px; --rot: -2deg; --dl: .31s; z-index: 3; }
.mini:focus-visible { z-index: 5; }
@keyframes drop {
  from { opacity: 0; transform: translateY(-40px) rotate(calc(var(--rot) - 6deg)); }
  to { opacity: 1; transform: translateY(0) rotate(var(--rot)); }
}

/* ═══ 섹션 공통 ═══ */
.section { padding-top: 56px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 18px; }
.sec-head h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.sec-head p { margin: 0; font-size: 14px; color: var(--mute); }

/* ═══ 분야 타일 ═══ */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tile {
  position: relative; min-height: 172px; border: 0; border-radius: var(--r-lg);
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  padding: 18px 18px 16px; text-align: left; color: var(--on); cursor: pointer;
  box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease;
}
.tile:not(:disabled):hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: var(--shadow-up); }
.tile:disabled { opacity: .45; cursor: default; }
.tile[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--ink); }
.tile-label { font-size: 15.5px; font-weight: 900; }
.tile-count { font-family: var(--f-display); font-size: 54px; line-height: .95; letter-spacing: -.02em; }
.tile-count small { font-family: var(--f-body); font-size: 16px; font-weight: 900; margin-left: 3px; }
.tile-next { font-size: 12.5px; font-weight: 700; opacity: .92; }

/* ═══ 마감 캘린더 ═══ */
.cal-scroll { overflow-x: auto; margin: 0 -20px; padding: 6px 20px 14px; scrollbar-width: thin; }
.cal { display: flex; align-items: stretch; gap: 8px; width: max-content; }
.cmonth {
  align-self: center; writing-mode: vertical-rl; font: 700 12px/1 var(--f-mono);
  color: var(--mute); padding: 0 2px; letter-spacing: .1em;
}
.cday {
  flex: 0 0 auto; width: 70px; border: 0; border-radius: 14px; cursor: pointer;
  padding: 10px 6px 10px; text-align: center; color: var(--ink);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .14s ease;
}
.cday .w { display: block; font-size: 11.5px; font-weight: 800; color: var(--mute); }
.cday .dnum { display: block; margin: 3px 0 2px; font-family: var(--f-display); font-size: 28px; line-height: 1.1; }
.cday .c { display: block; font: 700 11.5px/1 var(--f-mono); }
.cday:not(:disabled):hover { transform: translateY(-3px); }
.cday:disabled { cursor: default; background: transparent; color: var(--mute); }
.cday:disabled .dnum { opacity: .55; }
.cday.hot:not(:disabled) { background: var(--lemon); color: #1C1300; box-shadow: none; }
.cday.hot:not(:disabled) .w { color: #6A5800; }
.cday.today .w { color: var(--hot); }
.cday.sel:not(:disabled) { background: var(--ink); color: var(--paper); box-shadow: none; }
.cday.sel:not(:disabled) .w { color: var(--paper); }
.cal-after { margin: 4px 0 0; font-size: 13px; color: var(--mute); }

/* ═══ 필터 바 ═══ */
.list-sec { margin-top: 52px; }
.filterbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.3) blur(12px); backdrop-filter: saturate(1.3) blur(12px);
  border-bottom: 1px solid var(--line);
}
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: transparent; padding: 8px 15px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--mute); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.search { flex: 1 1 260px; }
.search input {
  width: 100%; padding: 12px 16px 12px 42px; border: 0; border-radius: 999px;
  background: var(--surface) no-repeat 16px 50% / 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C6F8F' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 14.5px;
}
.search input::placeholder { color: var(--mute); }
.fb-state { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; padding-bottom: 12px; min-height: 52px; }
.active { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer;
  padding: 6px 12px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 700;
}
.result { margin: 0; font-size: 13.5px; color: var(--mute); }
.result b { color: var(--ink); }

/* ═══ 목록 ═══ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 20px 18px; padding-top: 22px; }
.more-wrap { display: flex; justify-content: center; margin-top: 30px; }
.empty { margin-top: 22px; padding: 64px 20px; text-align: center; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 2px dashed var(--line); }
.empty-title { margin: 0; font-size: 18px; font-weight: 900; }
.empty-sub { margin: 6px 0 18px; color: var(--mute); }

/* ═══ 푸터 ═══ */
.foot { margin-top: 90px; background: var(--ink); color: var(--paper); }
.foot-in { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding-top: 40px; padding-bottom: 46px; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; align-self: start; font-family: var(--f-display); font-size: 22px; }
.foot .wm-mark { background: var(--lemon); }
.foot-text p { margin: 0 0 8px; font-size: 14px; color: color-mix(in srgb, var(--paper) 78%, transparent); }
.foot-text b { color: var(--paper); }
.foot-text a { color: var(--paper); }
.foot-links { display: flex; gap: 18px; margin-top: 14px !important; font-weight: 700; }
.foot-mute { font: 700 12px/1 var(--f-mono); margin-top: 18px !important; }

/* ═══ 반응형 ═══ */
@media (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 10px; }
  .hero-stack { min-height: 400px; margin-top: 8px; }
  .mini { width: min(250px, 62%); }
  .mini .t-cover { height: 130px; }
  .mini:nth-child(1) { left: 0; top: 40px; }
  .mini:nth-child(2) { left: auto; right: 0; top: 0; }
  .mini:nth-child(3) { left: 18%; top: 150px; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links a:not(:last-child) { display: none; }
  .hero { padding-top: 20px; }
  .hero-sub { font-size: 15.5px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile:first-child { grid-column: span 2; }
  .tile { min-height: 140px; }
  .tile-count { font-size: 44px; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .filterbar { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
