@import url("https://cdn.jsdelivr.net/gh/sun-typeface/SUIT@2/fonts/variable/woff2/SUIT-Variable.css");

/* 딸깍!공모주 — 차콜 + 오렌지 (로고 기준) */
:root {
  --bg: #1b1b1d;
  --surface: #252527;
  --surface-2: #2f2f32;
  --line: #3a3a3e;
  --ink: #f4f4f5;
  --ink-2: #b9b9bf;
  --ink-3: #85858c;

  --orange: #ff5a1f;        /* 브랜드 · 청약 · 오늘 */
  --orange-hi: #ff7a45;
  --orange-bg: rgba(255, 90, 31, .14);
  --on-orange: #1b1b1d;
  --refund: #34d399;        /* 환불 */
  --refund-bg: rgba(52, 211, 153, .13);
  --list: #60a5fa;          /* 상장 */
  --list-bg: rgba(96, 165, 250, .14);
  --fc: #fbbf24;            /* 수요예측 (상세 타임라인에만) */
  --fc-bg: rgba(251, 191, 36, .12);
  --sat: #7aa7ff;
  --sun: #ff6b6b;

  --r-s: 8px;
  --r-m: 16px;
  --r-pill: 999px;
  --wrap: 1120px;
  --font: "SUIT Variable", "SUIT", "Pretendard", -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.6; font-feature-settings: "tnum" 1; word-break: keep-all;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); font-size: 14px; }

/* ── 헤더 · 로고 ──────────────────────────────────── */
.site-head { border-bottom: 1px solid var(--line); background: rgba(27, 27, 29, .92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-weight: 900; font-size: 24px; letter-spacing: -0.04em; line-height: 1; }
.wm-a { color: var(--orange); display: inline-block; transform: skewX(-8deg); }
.wm-b { color: var(--ink); }
.wm-bang { width: .66em; height: 1.12em; margin: 0 .16em 0 .04em; display: inline-block; vertical-align: -0.12em; }
.brand:hover .wm-cursor { transform: translate(-1px, -1px); }
.wm-cursor { transition: transform .12s; }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  text-decoration: none; font-size: 15px; font-weight: 700; color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--r-s);
}
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--orange); }

/* ── 이번 주 ───────────────────────────────────────── */
.week { padding-top: 40px; padding-bottom: 8px; }
.week-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.week-head h1 { font-size: 42px; font-weight: 900; letter-spacing: -0.05em; line-height: 1.15; margin: 0; }
.week-sub { color: var(--ink-2); font-size: 16px; margin: 8px 0 0; }
.week-range { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; padding: 6px 12px; background: var(--surface); border-radius: var(--r-pill); }
.week-strip { display: grid; grid-template-columns: minmax(0, .6fr) repeat(5, minmax(0, 1fr)) minmax(0, .6fr); gap: 10px; }
.day.is-sat, .day.is-sun { background: rgba(255, 255, 255, .025); }
.day.is-sat .day-num, .day.is-sun .day-num { font-size: 36px; }
.day { position: relative; background: var(--surface); border-radius: var(--r-m); padding: 14px 10px 14px; min-height: 184px; }
.day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.day-dow { font-size: 14px; font-weight: 800; color: var(--ink-2); }
.day-num { display: block; font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -0.06em; margin: 6px 0 14px; }
.day.is-sat .day-dow, .day.is-sat .day-num { color: var(--sat); }
.day.is-sun .day-dow, .day.is-sun .day-num { color: var(--sun); }
.day.is-past { opacity: .4; }
.day.is-today { background: var(--orange); color: var(--on-orange); }
.day.is-today .day-dow, .day.is-today .day-num { color: var(--on-orange); }
.day-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; color: var(--on-orange); }
.day-tag svg { width: 14px; height: 14px; }
.day-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.day-empty { display: block; color: var(--ink-3); font-size: 13px; }
.day.is-today .day-empty { color: var(--on-orange); opacity: .65; }

/* 일정 칩: 왼쪽 색 막대 */
.ev {
  display: block; text-decoration: none; font-size: 12px; line-height: 1.35;
  padding: 6px 8px 7px 9px; border-radius: var(--r-s); border-left: 3px solid currentColor;
  transition: background .12s;
}
.ev b { display: block; font-size: 13px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 2px; }

/* 주간사: 대표는 약칭, 나머지는 원형 아이콘 */
.bk { display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; vertical-align: middle; }
.bk-main { font-weight: 800; color: var(--ink); }
.ev .bk-main { color: inherit; }
.bk-ic {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 999px;
  font-size: 10px; font-weight: 900; line-height: 1; color: #111; letter-spacing: -0.03em;
}
.bk-c0 { background: #f4a259; } .bk-c1 { background: #8ecae6; } .bk-c2 { background: #b8e0a8; } .bk-c3 { background: #e4b5f2; }
.bk-c4 { background: #ffd166; } .bk-c5 { background: #a0c4ff; } .bk-c6 { background: #f7a8b8; } .bk-c7 { background: #c9c9cf; }
.ipo .bk-ic { min-width: 20px; height: 20px; font-size: 11px; }
.meta-bk { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); }
.ev-sub { color: var(--orange-hi); background: var(--orange-bg); }
.ev-refund { color: var(--refund); background: var(--refund-bg); }
.ev-list { color: var(--list); background: var(--list-bg); }
.ev:hover { background: var(--surface-2); }
.day.is-today .ev { background: var(--bg); }
.day.is-today .ev-sub { color: var(--orange-hi); }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.legend li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .k-sub::before { background: var(--orange); }
.legend .k-refund::before { background: var(--refund); }
.legend .k-list::before { background: var(--list); }

/* ── 섹션 ─────────────────────────────────────────── */
.section { padding-top: 44px; padding-bottom: 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section h2 { font-size: 26px; font-weight: 900; letter-spacing: -0.04em; margin: 0; }
.section h2 .count { color: var(--orange); margin-left: 8px; }

.chip, .month-nav button {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer;
  height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 0; background: var(--surface);
  transition: background .12s, color .12s;
}
.chip:hover, .month-nav button:hover { background: var(--surface-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--orange); color: var(--on-orange); font-weight: 900; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-label { font-weight: 900; font-size: 18px; min-width: 116px; text-align: center; letter-spacing: -0.03em; }

/* ── 월간 달력 ─────────────────────────────────────── */
.cal { background: var(--surface); border-radius: var(--r-m); overflow: hidden; }
/* 일월화수목금토: 주말 칸은 좁게 (공모 일정이 없음) */
.cal-dows, .cal-grid { display: grid; grid-template-columns: minmax(0, .45fr) repeat(5, minmax(0, 1fr)) minmax(0, .45fr); }
.cal-cell.is-sat, .cal-cell.is-sun { background: rgba(0, 0, 0, .16); }
.cal-dows div { font-size: 13px; font-weight: 800; color: var(--ink-2); padding: 12px 10px; border-bottom: 1px solid var(--line); }
.cal-dows .is-sat, .cal-cell.is-sat .cal-d { color: var(--sat); }
.cal-dows .is-sun, .cal-cell.is-sun .cal-d { color: var(--sun); }
.cal-cell { min-height: 112px; padding: 8px 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-grid .cal-cell:nth-child(7n+1) { border-left: 0; }
.cal-grid .cal-cell:nth-child(-n+7) { border-top: 0; }
.cal-cell.is-out { background: rgba(0, 0, 0, .18); }
.cal-cell.is-out .cal-d { opacity: .35; }
.cal-d { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 4px; font-size: 14px; font-weight: 800; margin-bottom: 4px; border-radius: var(--r-pill); }
.cal-cell.is-today .cal-d { background: var(--orange); color: var(--on-orange); }
.cal-cell .ev { padding: 3px 6px 4px 7px; margin-top: 4px; }
.cal-cell .ev b { font-size: 12px; }
.cal-cell .ev small { font-size: 11px; }
.cal-cell .bk-ic { min-width: 16px; height: 16px; font-size: 9px; }
.cal-agenda { display: none; }

/* ── 종목 표 ───────────────────────────────────────── */
.table-wrap { background: var(--surface); border-radius: var(--r-m); overflow-x: auto; }
table.ipo { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.ipo th { text-align: left; font-size: 13px; font-weight: 800; color: var(--ink-3); padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ipo td { padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ipo tbody tr:last-child td { border-bottom: 0; }
.ipo tbody tr[data-ss]:hover td { background: var(--surface-2); }
.ipo td.num, .ipo th.num { text-align: right; white-space: nowrap; }
.ipo td.num small { display: block; }
.ipo .name a { font-weight: 900; font-size: 16px; text-decoration: none; letter-spacing: -0.02em; }
.ipo .name a:hover { color: var(--orange); }
.ipo .name small { display: block; color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.ipo .date { white-space: nowrap; font-weight: 700; }
.ipo .date .d-sub { color: var(--orange-hi); font-weight: 900; }
.ipo .date .d-list { color: var(--list); font-weight: 900; }
.ipo td.limits { min-width: 230px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.ipo .al { display: block; }
.ipo .al b { font-weight: 800; color: var(--ink); }
.ipo .al .nw { white-space: nowrap; }
.ipo tr.ad-row td { padding: 12px; background: rgba(0, 0, 0, .15); }
.ipo tr.ad-row .ad { margin: 0; }
.empty { padding: 32px 16px; text-align: center; color: var(--ink-2); }

.phase { display: inline-block; font-size: 12px; font-weight: 900; white-space: nowrap; padding: 3px 10px; border-radius: var(--r-pill); color: var(--on-orange); }
.ph-sub { background: var(--orange); }
.ph-refund { background: var(--refund); }
.ph-list { background: var(--list); }

/* ── 광고 ─────────────────────────────────────────── */
.ad { margin: 28px 0 8px; padding: 10px; border: 1px dashed var(--line); border-radius: var(--r-m); text-align: center; }
.ad-label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; text-align: left; }
.ad ins { display: block; min-height: 90px; }

/* ── 상세 ─────────────────────────────────────────── */
.crumbs { font-size: 14px; color: var(--ink-3); padding-top: 24px; }
.crumbs a { color: var(--ink-2); }
.detail-head { padding: 12px 0 8px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.detail-head h1 { font-size: 44px; font-weight: 900; letter-spacing: -0.05em; margin: 0 0 10px; line-height: 1.15; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; font-weight: 700; }
.detail-meta > span:not(.phase):not(.sep) { padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); }
.detail-meta .sep { display: none; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--orange); color: var(--on-orange); text-decoration: none; font-size: 15px; font-weight: 900;
  transition: background .12s;
}
.btn:hover { background: var(--orange-hi); }

.timeline { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: step; }
.timeline li { background: var(--surface); border-radius: var(--r-m); padding: 16px; position: relative; border-top: 3px solid var(--line); }
.timeline li::before { counter-increment: step; content: counter(step); font-size: 13px; font-weight: 900; color: var(--ink-3); }
.timeline .t-name { display: block; font-size: 15px; font-weight: 800; margin-top: 4px; }
.timeline .t-date { display: block; font-size: 26px; font-weight: 900; letter-spacing: -0.04em; margin-top: 2px; line-height: 1.2; }
.timeline .t-tbd { color: var(--ink-3); font-size: 18px; }
.timeline li.k-fc { border-top-color: var(--fc); } .timeline li.k-fc .t-name { color: var(--fc); }
.timeline li.k-sub { border-top-color: var(--orange); } .timeline li.k-sub .t-name { color: var(--orange-hi); }
.timeline li.k-refund { border-top-color: var(--refund); } .timeline li.k-refund .t-name { color: var(--refund); }
.timeline li.k-list { border-top-color: var(--list); } .timeline li.k-list .t-name { color: var(--list); }
.timeline li.is-done { opacity: .45; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 6px 20px; background: var(--surface); border-radius: var(--r-m); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 900; text-align: right; }
.alloc-wrap { background: var(--surface); border-radius: var(--r-m); overflow-x: auto; padding: 4px 20px; }
.limits-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.limits-table th, .limits-table td { padding: 13px 0; border-bottom: 1px solid var(--line); text-align: left; }
.limits-table th { font-weight: 800; color: var(--ink-3); font-size: 13px; }
.limits-table td:first-child { font-weight: 800; }
.limits-table.alloc th:not(:first-child), .limits-table.alloc td:not(:first-child) { text-align: right; white-space: nowrap; padding-left: 16px; }
.limits-table.alloc td:nth-child(4) { font-weight: 900; }
.eq { color: var(--orange-hi); }
.limits-table.alloc tr.sum td { color: var(--ink-2); font-weight: 800; border-bottom: 0; }
.note { font-size: 13px; color: var(--ink-3); margin-top: 12px; max-width: 72ch; }

/* ── 문서 ─────────────────────────────────────────── */
.doc { max-width: 720px; padding: 32px 16px 8px; margin: 0 auto; }
.doc h1 { font-size: 34px; font-weight: 900; letter-spacing: -0.04em; }
.doc h2 { font-size: 19px; font-weight: 900; margin-top: 30px; }
.doc p, .doc li { color: var(--ink-2); }
.doc a { color: var(--orange-hi); }

/* ── 푸터 ─────────────────────────────────────────── */
.site-foot { margin-top: 64px; background: #141416; color: var(--ink-3); padding: 32px 0 40px; font-size: 13px; border-top: 1px solid var(--line); }
.site-foot p { margin: 0 0 6px; max-width: 72ch; }
.site-foot nav { display: flex; gap: 16px; margin-top: 14px; }
.site-foot a { color: var(--ink-2); }
.site-foot .foot-brand { margin-bottom: 12px; font-size: 18px; }

/* ── 모바일 ───────────────────────────────────────── */
@media (max-width: 760px) {
  .site-head .wrap { height: 56px; }
  .brand { font-size: 21px; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 6px 8px; font-size: 14px; }
  .week { padding-top: 28px; }
  .week-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .week-head h1 { font-size: 32px; }
  .week-strip { grid-template-columns: 1fr; gap: 8px; }
  .day { min-height: 0; display: grid; grid-template-columns: 70px 1fr; gap: 0 12px; padding: 12px; align-items: start; }
  .day-top { grid-column: 1; flex-direction: column; align-items: flex-start; gap: 2px; }
  .day-num { grid-column: 1; font-size: 32px; margin: 2px 0 0; }
  .day-events, .day-empty { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .section h2 { font-size: 22px; }
  .cal { display: none; }
  .cal-agenda { display: block; background: var(--surface); border-radius: var(--r-m); }
  .cal-agenda .ag-day { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
  .cal-agenda .ag-day:first-child { border-top: 0; }
  .cal-agenda .ag-date { font-weight: 900; font-size: 17px; letter-spacing: -0.03em; }
  .cal-agenda .ag-date small { display: block; font-weight: 700; color: var(--ink-2); font-size: 13px; }
  .cal-agenda .ag-day.is-sat .ag-date { color: var(--sat); }
  .cal-agenda .ag-day.is-sun .ag-date { color: var(--sun); }
  .cal-agenda .ev { margin-bottom: 5px; }
  .month-nav { width: 100%; }
  .month-label { flex: 1; text-align: left; min-width: 0; }

  .table-wrap { overflow: visible; }
  table.ipo { min-width: 0; }
  .ipo thead { display: none; }
  .ipo tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 16px 14px; border-bottom: 1px solid var(--line); }
  .ipo tbody tr[hidden] { display: none; }
  .ipo tbody tr:last-child { border-bottom: 0; }
  .ipo td { padding: 0; border: 0; }
  .ipo td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--ink-3); font-weight: 700; }
  .ipo td.name { grid-column: 1 / 3; }
  .ipo td.st { grid-column: 3; justify-self: end; }
  .ipo td.wide { grid-column: 1 / -1; }
  .ipo td.num { text-align: left; }
  .ipo td.num small { display: inline; }
  .ipo tr.ad-row { display: block; padding: 12px; }
  .ipo tr.ad-row td { display: block; background: none; }
  .ipo td.empty { grid-column: 1 / -1; }

  .detail-head h1 { font-size: 32px; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr; padding: 4px 16px; }
  .alloc-wrap { padding: 4px 14px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
