/* =====================================================================
 *  castrecord — 공개 사이트 디자인 (2026-10 리뉴얼)
 *  방향: 방송 편성표·큐시트 같은 차분한 편집 디자인
 *   - 따뜻한 종이색 바탕 + 먹색 글자, 강조는 녹화 표시(REC) 붉은색 하나
 *   - 카드·그림자·그라데이션 대신 얇은 선과 표, 숫자는 고정폭
 *  페이지 마크업은 Tailwind 유틸리티 + 아래 컴포넌트 클래스를 함께 쓴다.
 * ===================================================================== */
:root {
  --paper: #f5f3ee;
  --paper-2: #ece9e1;
  --surface: #fffefb;
  --ink: #191814;
  --ink-2: #45423b;
  --muted: #7a766d;
  --line: #e2ded4;
  --line-2: #cfcabd;
  --rec: #c9452f;
  --rec-dark: #a73724;
  --rec-tint: #f7e4de;
  --ok: #2f6b45;
  --ok-tint: #e3efe6;
  --warn: #9a5b0b;
  --warn-tint: #f6ead6;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1200px;
  --head-h: 64px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 기본 ---------- */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.65; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
* { font-family: inherit; }
::selection { background: var(--rec-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--rec); outline-offset: 2px; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; word-break: keep-all; }
p, li, dd, blockquote { word-break: keep-all; overflow-wrap: anywhere; }
p { text-wrap: pretty; }
img { max-width: 100%; height: auto; }
.num, .mono { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 90; padding: 8px 14px; background: var(--ink); color: #fff; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* ---------- 머리 ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgb(245 243 238 / 96%); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
/* 로고 표시 = favicon 과 같은 그림 (assets/img/favicon.svg) */
.brand .rec-dot { width: 22px; height: 22px; flex: none; background: url(/recording/assets/img/favicon.svg) center / contain no-repeat; }
.brand small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.gnav { display: none; align-items: center; gap: 4px; }
.gnav a { position: relative; padding: 8px 12px; font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none; border-radius: var(--r-sm); transition: color .2s, background-color .2s; }
.gnav a:hover { color: var(--ink); background: var(--paper-2); }
.gnav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.gnav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--ink); }
.head-act { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.head-act .who { font-size: 14px; color: var(--muted); text-decoration: none; }
.head-act .who:hover { color: var(--ink); }
.head-act .pt { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; margin-right: 4px; border: 1px solid var(--line-2); border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; transition: border-color .15s, background-color .15s; }
.head-act .pt:hover { border-color: var(--ink); background: var(--surface); }
.menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--ink); cursor: pointer; }
.menu-btn:hover { background: var(--paper-2); }
.mnav { display: none; border-top: 1px solid var(--line); background: var(--paper); padding: 8px 0 16px; }
.mnav.is-open { display: block; }
.mnav a { display: block; padding: 12px 20px; font-size: 16px; color: var(--ink); text-decoration: none; }
.mnav a[aria-current="page"] { font-weight: 700; }
.mnav hr { border: 0; border-top: 1px solid var(--line); margin: 8px 20px; }
@media (min-width: 900px) { .gnav { display: flex; } .menu-btn { display: none; } .mnav { display: none !important; } }
@media (max-width: 520px) { .head-act .who, .head-act .hide-sm { display: none; } }

/* ---------- 버튼·링크 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r); font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s var(--ease), border-color .2s, color .2s, transform .12s; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-rec { background: var(--rec); color: #fff; }
.btn-rec:hover { background: var(--rec-dark); }
.btn-line { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--ink); }
.link-rec { color: var(--rec); }

/* ---------- 섹션 ---------- */
.sec { padding: 72px 0 84px; }
@media (min-width: 768px) { .sec { padding: 104px 0 120px; } }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-tight { padding: 48px 0 56px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--rec); letter-spacing: 0; }
.kicker::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.h-display { margin: 0; font-size: clamp(34px, 6vw, 64px); line-height: 1.12; font-weight: 750; letter-spacing: -0.045em; }
.h-sec { margin: 0; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.22; font-weight: 700; letter-spacing: -0.035em; }
.h-sub { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 650; letter-spacing: -0.02em; }
.lead { margin: 0; max-width: 34em; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head .h-sec { font-size: clamp(28px, 4vw, 44px); }
.page-head .lead { margin-top: 12px; font-size: 17px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* 정보 목록 (카드 대신 선으로 나눈 줄) */
.rows { border-top: 1px solid var(--ink); }
.rows > * { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rows dt, .rows .k { font-size: 14px; font-weight: 600; color: var(--muted); }
.rows dd, .rows .v { margin: 0; }
@media (max-width: 560px) { .rows > * { grid-template-columns: 1fr; gap: 4px; } }

/* 숫자 묶음 */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.figures > div { padding: 22px 20px 4px 0; }
.figures > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.figures b { display: block; font-size: clamp(28px, 4vw, 44px); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.figures span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .figures { grid-template-columns: 1fr; } .figures > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }

/* 작은 표시 */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12.5px; font-weight: 600; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.tag.is-rec { background: var(--rec-tint); color: var(--rec-dark); }
.tag.is-ok { background: var(--ok-tint); color: var(--ok); }
.tag.is-warn { background: var(--warn-tint); color: var(--warn); }
.tag.is-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rec); animation: rec-blink 1.6s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tag.is-live::before { animation: none; } html { scroll-behavior: auto; } }

/* 안내 상자 */
.notice { padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--surface); font-size: 15px; color: var(--ink-2); }
.notice.is-rec { border-left-color: var(--rec); background: var(--rec-tint); color: var(--ink); }
.notice.is-ok { border-left-color: var(--ok); background: var(--ok-tint); }
.notice.is-warn { border-left-color: var(--warn); background: var(--warn-tint); }

/* 바탕 판 (꼭 필요할 때만) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }

/* ---------- 폼 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; min-width: 0; }
.label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.label .req { color: var(--rec); margin-left: 2px; }
.input, .select, .textarea { width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 140px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2345423b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(25 24 20 / 10%); }
.input[readonly] { background: var(--paper-2); color: var(--ink-2); }
.input.is-invalid, .select.is-invalid { border-color: var(--rec); }
.help { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; color: var(--rec-dark); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 15px; background: var(--surface); transition: border-color .15s, background-color .15s; }
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--rec); outline-offset: 2px; }

/* ---------- 표 ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { padding: 12px 10px; border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; white-space: nowrap; }
.tbl td { padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .num { text-align: right; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 모달 (sheet) ---------- */
.sheet { position: fixed; inset: 0; z-index: 80; display: none; }
.sheet.is-open, .sheet:not(.hidden) { display: block; }
.sheet-dim { position: absolute; inset: 0; background: rgb(25 24 20 / 45%); }
.sheet-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: 0 20px 60px rgb(25 24 20 / 25%); }
.sheet-box.is-wide { width: min(860px, calc(100vw - 24px)); }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 20px 24px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-head h3 { margin: 0; flex: 1; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.sheet-x { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; }
.sheet-x:hover { background: var(--paper-2); color: var(--ink); }
.sheet-body { padding: 20px 24px 24px; }
.sheet-body.prose h4 { margin: 22px 0 8px; font-size: 16px; }
.sheet-body.prose p, .sheet-body.prose li { font-size: 15px; color: var(--ink-2); }

/* ---------- 바닥 ---------- */
.site-foot { margin-top: 0; border-top: 1px solid var(--line); background: var(--paper-2); color: var(--ink-2); font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; padding: 48px 0 32px; }
.foot-grid h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--ink); }
.foot-grid p { margin: 0 0 4px; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; padding: 18px 0 28px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }
.foot-bottom button, .foot-bottom a { border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 13px; cursor: pointer; text-decoration: none; }
.foot-bottom button:hover, .foot-bottom a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

/* 떠 있는 버튼 (챗봇·맨 위로) */
.float-btn { position: fixed; right: 20px; z-index: 40; display: grid; place-items: center; border: 0; cursor: pointer; transition: background-color .2s, opacity .2s, transform .12s; }
.float-btn:active { transform: scale(.97); }

/* ---------- 예전 마크업 정리 (아직 바꾸지 않은 조각을 위한 안전망) ---------- */
[data-aos] { opacity: 1 !important; transform: none !important; }
.blob-1, .blob-2 { display: none !important; }
.glass, .glass-dark { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.gradient-text { background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--rec) !important; }
main [class*="bg-gradient-to-"], .sheet [class*="bg-gradient-to-"], #chatbotModal [class*="bg-gradient-to-"] { background-image: linear-gradient(var(--tw-gradient-from), var(--tw-gradient-from)) !important; }
main [class*="backdrop-blur"], #chatbotModal [class*="backdrop-blur"] { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.card-hover:hover { transform: none !important; }
