/* =========================================================
   제15회 전국어린이독후감쓰기 대회 — cap89 스타일
   인터랙션 요소: Lucian UX/UI Prompt (MIT) → assets/lucian.css
   ========================================================= */
:root {
  --ink: #24324a;
  --muted: #667085;
  --primary: #3b63f6;
  --primary-hover: #254ed8;
  --sky: #38bdf8;
  --accent: #ffcf70;
  --secondary: #7fd8c9;
  --pink: #ff9fb5;
  --white: #ffffff;
  --panel: rgba(255, 255, 255, .72);
  --panel-line: rgba(255, 255, 255, .95);
  --hairline: rgba(36, 50, 74, .07);
  --shadow: 0 20px 60px rgba(67, 89, 146, .16);
  --shadow-sm: 0 8px 24px rgba(50, 68, 110, .08);
  --r-xl: 34px; --r-lg: 26px; --r-md: 16px; --r-sm: 14px; --r-pill: 999px;
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --head-h: 68px;

  /* Lucian --ux-* 토큰 → cap89 팔레트 */
  --ux-page: #f8fbff; --ux-surface: #ffffff; --ux-surface-2: #f4f7ff; --ux-surface-3: #e8eefc;
  --ux-ink: #24324a; --ux-ink-2: #667085; --ux-ink-3: #98a2b3;
  --ux-line: rgba(36, 50, 74, .07); --ux-line-2: rgba(36, 50, 74, .15);
  --ux-accent: #3b63f6; --ux-accent-2: #38bdf8; --ux-accent-soft: rgba(59, 99, 246, .12); --ux-accent-ink: #ffffff;
  --ux-mint: #2bb39a; --ux-warn: #f59e0b; --ux-danger: #e5486b;
  --ux-glass: rgba(255, 255, 255, .72); --ux-glass-line: rgba(255, 255, 255, .95);
  --ux-shadow: rgba(67, 89, 146, .16); --ux-shadow-strong: rgba(67, 89, 146, .32);
  --ux-grad: linear-gradient(100deg, #3b63f6 0%, #38bdf8 52%, #f59e0b 100%);
  --ux-ease: cubic-bezier(.2, .8, .2, 1);
  --ux-spring: cubic-bezier(.34, 1.45, .64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 60px); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 207, 112, .45), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(127, 216, 201, .45), transparent 30%),
    radial-gradient(circle at 75% 82%, rgba(255, 159, 181, .28), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #fffdf7 45%, #f8fffc 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--primary); }
strong { font-weight: 750; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 떠다니는 색 덩어리 */
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; animation: float 8s ease-in-out infinite; }
.blobs i:nth-child(1) { width: 260px; height: 260px; left: -60px; top: 120px; background: var(--accent); }
.blobs i:nth-child(2) { width: 300px; height: 300px; right: -80px; top: 40px; background: var(--secondary); animation-duration: 9s; }
.blobs i:nth-child(3) { width: 240px; height: 240px; right: 12%; bottom: -60px; background: var(--pink); animation-duration: 7s; }
@keyframes float { 50% { transform: translate(10px, -18px); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 헤더 ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(248, 251, 255, .78);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b63f6, #8e9cff); color: #fff; font-size: 19px; font-weight: 800;
  box-shadow: 0 10px 25px rgba(59, 99, 246, .28);
}
.btn.head-cta { display: none; }

/* 관리자 띠 */
.adminbar { display: none; background: var(--ink); color: #fff; font-size: 14px; }
body.admin .adminbar { display: block; }
.adminbar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 40px; flex-wrap: wrap; padding-block: 5px; }
.adminbar button { background: rgba(255, 255, 255, .15); color: #fff; border: 0; border-radius: 999px; padding: 5px 14px; font: inherit; font-weight: 650; cursor: pointer; }

/* ---------- 탭 패널 (PC) ---------- */
.panel { padding: 8px 0 80px; scroll-margin-top: calc(var(--head-h) + 56px); }
body.tabbed .panel { display: none; }
body.tabbed .panel.is-active { display: block; animation: pageIn .5s var(--ux-ease); }
#entries { display: none; }
body.admin:not(.tabbed) #entries, body.tabbed #entries.is-active { display: block; }

/* ---------- 히어로 ---------- */
.hero { text-align: center; padding: 44px 0 10px; position: relative; }
.hero-title { margin: 22px 0 10px; font-size: clamp(30px, 6vw, 56px); line-height: 1.15; font-weight: 850; letter-spacing: -.028em; }
.hero-title > span { display: block; }
.hero-title .grad {
  background: linear-gradient(100deg, #3b63f6 0%, #38bdf8 52%, #f59e0b 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 1.12em;
}
.hero-sub { margin: 0 auto 26px; font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 640px; }
.hero-sub strong { color: var(--ink); }

.promo {
  position: relative; margin: 0 auto 28px; border-radius: var(--r-xl); overflow: hidden;
  background: #1c2740; box-shadow: var(--shadow); border: 6px solid var(--panel-line);
}
.promo video { width: 100%; height: 100%; object-fit: cover; }
.promo.landscape { width: min(880px, 100%); aspect-ratio: 16 / 9; }
.promo.portrait { width: min(360px, 100%); aspect-ratio: 9 / 16; }
.promo .sound {
  position: absolute; right: 14px; bottom: 14px; border: 0; border-radius: 999px;
  background: rgba(36, 50, 74, .6); backdrop-filter: blur(8px); color: #fff; font: 650 14px var(--font);
  padding: 8px 15px; cursor: pointer;
}
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 26px; font: 650 16px var(--font);
  cursor: pointer; text-decoration: none; transition: transform .2s, background-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--primary); color: #fff; box-shadow: 0 12px 24px -10px rgba(59, 99, 246, .6); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.ghost { background: var(--panel); color: var(--primary); border: 1px solid var(--panel-line); box-shadow: var(--shadow-sm); backdrop-filter: blur(10px); }
.btn.small { padding: 9px 16px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 카드 ---------- */
.glass {
  background: var(--panel); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow);
}
.tile {
  background: rgba(255, 255, 255, .78); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 16px; transition: transform .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.key { text-align: center; padding: 20px 16px; }
.key .k { font-size: 14px; font-weight: 750; color: var(--primary); }
.key .v { font-weight: 800; font-size: 18px; letter-spacing: -.02em; margin-top: 4px; line-height: 1.45; }
.key small { display: block; color: var(--muted); font-weight: 500; font-size: 14px; }

/* ---------- 섹션 머리 ---------- */
.sec-head { text-align: center; margin: 56px 0 26px; }
.sec-head .eyebrow { display: block; font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--primary); }
.sec-head h2 { margin: 6px 0 0; font-size: clamp(25px, 3.4vw, 34px); font-weight: 850; letter-spacing: -.028em; line-height: 1.25; }
.sec-head p { margin: 10px 0 0; color: var(--muted); }
.panel > .wrap > .sec-head:first-child { margin-top: 36px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.glass h3 { margin: 0 0 10px; font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.glass ul { margin: 0; padding-left: 20px; }
.glass li + li { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { background: var(--ux-accent-soft); color: var(--primary); padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.hl { background: linear-gradient(transparent 58%, rgba(255, 207, 112, .7) 58%); font-weight: 750; }
.note-warn { color: #d9480f; font-weight: 700; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- 도서 ---------- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 18px; }
.book { display: block; text-decoration: none; color: inherit; text-align: center; padding: 12px; }
.book .cover { aspect-ratio: 3 / 4.2; border-radius: 12px; overflow: hidden; background: var(--ux-surface-3); box-shadow: 0 10px 22px -8px rgba(36, 50, 74, .35); }
.book img { width: 100%; height: 100%; object-fit: cover; }
.book .t { font-weight: 750; font-size: 15px; margin-top: 10px; line-height: 1.35; letter-spacing: -.02em; }
.book .a { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.credit { margin-top: 22px; text-align: center; font-size: 14px; color: var(--muted); }
.credit a { font-weight: 700; }

/* ---------- 시상 ---------- */
table.award { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--hairline); background: #fff; }
table.award th, table.award td { padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--hairline); }
table.award tr:last-child td { border-bottom: 0; }
table.award th { background: var(--ux-surface-2); color: var(--primary); font-weight: 750; }
table.award tr.grand td { background: rgba(255, 207, 112, .25); font-weight: 800; }
.award-total { text-align: center; margin: 14px 0 0; font-weight: 800; }
.award-total b { background: var(--ux-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.15em; }

/* ---------- 접수 폼 ---------- */
.form-card { max-width: 780px; margin-inline: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
legend { font-size: 19px; font-weight: 800; margin-bottom: 12px; padding: 0; letter-spacing: -.02em; }
label.f { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; }
label.f .req { color: var(--ux-danger); }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.field {
  width: 100%; height: 50px; font: 600 16px var(--font); padding: 0 14px; border: 0; border-radius: 15px;
  background: var(--ux-surface-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow .25s, background-color .25s;
}
.field:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1.5px var(--primary), 0 0 0 4px var(--ux-accent-soft); }
.field.bad { box-shadow: inset 0 0 0 1.5px var(--ux-danger); background: color-mix(in srgb, var(--ux-danger) 6%, #fff); }
select.field { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-msg { margin-top: 14px; padding: 12px 16px; border-radius: 14px; display: none; font-weight: 700; }
.form-msg.err { display: block; background: color-mix(in srgb, var(--ux-danger) 10%, #fff); color: #b4233f; }
.form-msg.info { display: block; background: rgba(255, 207, 112, .3); color: #7a5300; }
.submit { width: 100%; height: 58px; font-size: 17px; }
.done-box { text-align: center; padding: 30px 10px; display: none; }
.done-box.show { display: block; animation: pageIn .5s var(--ux-ease); }
.done-box .big { font-size: 56px; }
.done-box h3 { font-size: 26px; margin: 6px 0; }
.receipt { display: inline-block; background: var(--ux-accent-soft); color: var(--primary); padding: 6px 18px; border-radius: 999px; font-weight: 800; margin: 8px 0 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 관리자: 접수 목록 ---------- */
.entries-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.entries-tools .field { flex: 1; min-width: 180px; }
.entries-tools .count { font-weight: 800; color: var(--primary); }
.table-scroll { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--hairline); background: #fff; }
table.entries { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 900px; }
table.entries th, table.entries td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); text-align: left; white-space: nowrap; }
table.entries th { background: var(--ux-surface-2); font-weight: 750; position: sticky; top: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ux-accent-soft); text-decoration: none; margin-left: 4px; font-size: 16px; transition: transform .2s, background-color .2s;
}
.icon-btn:hover { background: rgba(59, 99, 246, .22); transform: translateY(-2px); }

/* ---------- 인라인 편집 ---------- */
[data-edit] { position: relative; }
body.admin [data-edit] { outline: 2px dashed rgba(59, 99, 246, .3); outline-offset: 4px; border-radius: 6px; }
.edit-pen {
  display: none; position: absolute; top: -14px; right: -14px; z-index: 5;
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer;
  font-size: 15px; box-shadow: 0 4px 12px rgba(36, 50, 74, .2);
}
body.admin .edit-pen { display: inline-flex; align-items: center; justify-content: center; }
[data-edit][contenteditable=true] { outline: 3px solid var(--primary); background: #fff; }
.edit-bar {
  position: absolute; z-index: 6; right: 0; bottom: -48px; display: flex; gap: 6px;
  background: #fff; padding: 6px; border-radius: 14px; box-shadow: var(--shadow);
}
.edit-bar button { border: 0; border-radius: 10px; padding: 7px 14px; font: 700 14px var(--font); cursor: pointer; }
.edit-bar .save { background: var(--primary); color: #fff; }
.edit-bar .cancel { background: var(--ux-surface-2); color: var(--ink); }

/* ---------- 로그인 대화상자 ---------- */
dialog.login { border: 0; padding: 0; background: none; max-width: calc(100% - 32px); overflow: visible; }
dialog.login::backdrop { background: rgba(36, 50, 74, .35); backdrop-filter: blur(4px); }

/* ---------- 하단 ---------- */
footer { text-align: center; padding: 34px 0 44px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--hairline); }
footer .org { font-size: 18px; font-weight: 800; color: var(--ink); }
footer p { margin: 4px 0; }
footer .admin-link { background: none; border: 0; color: var(--ux-ink-3); font: inherit; font-size: 13px; cursor: pointer; margin-top: 8px; }

/* ---------- 반응형 ---------- */
@media (max-width: 899px) {
  .btn.head-cta { display: inline-flex; }
  .admin-more { display: none; }
  .adminbar .wrap { flex-wrap: nowrap; min-height: 36px; }
  .adminbar button { padding: 3px 12px; }
}
@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .keys { grid-template-columns: 1fr; }
  .edit-pen { right: -6px; top: -20px; width: 28px; height: 28px; font-size: 13px; }
}
@media (max-width: 520px) {
  :root { --head-h: 60px; }
  .glass { padding: 20px 18px; border-radius: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .books { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .book { padding: 8px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 36px; height: 36px; font-size: 17px; }
  .hero { padding-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blobs i, body.tabbed .panel.is-active, .done-box.show { animation: none; }
  .btn, .tile { transition: none; }
}

/* ---------- 접수 확인·수정 ---------- */
.lookup-card { margin-bottom: 18px; padding: 0; overflow: hidden; }
.lookup-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px 24px; border: 0; background: none; font: 600 16px var(--font); color: var(--ink); cursor: pointer; text-align: left;
}
.lookup-toggle strong { color: var(--primary); }
.lookup-toggle .chev { transition: transform .3s var(--ux-ease); color: var(--muted); }
.lookup-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
#lookupBody { padding: 0 24px 22px; animation: pageIn .4s var(--ux-ease); }
#lookupBody > p { margin-top: 0; }
.lookup-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.lookup-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.lookup-list li { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lookup-list .meta { font-size: 14.5px; line-height: 1.55; }
.lookup-list .meta b { font-size: 15.5px; }
.lookup-list .no { display: inline-block; background: var(--ux-accent-soft); color: var(--primary); font-weight: 800; font-size: 13px; padding: 1px 10px; border-radius: 999px; margin-right: 6px; }
.edit-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: -6px 0 20px; padding: 12px 16px; border-radius: var(--r-md);
  background: rgba(255, 207, 112, .3); font-weight: 650;
}
.edit-banner[hidden] { display: none; }
form.editing #consentSet { display: none; }
@media (max-width: 520px) {
  .lookup-toggle { padding: 16px 18px; font-size: 15px; }
  #lookupBody { padding: 0 18px 18px; }
  .lookup-row { grid-template-columns: 1fr 1fr; }
  .lookup-row .btn { grid-column: 1 / -1; }
}

/* ---------- 포스터 ---------- */
.poster-card { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; margin-top: 18px; }
.poster-card .eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--primary); }
.poster-card h3 { margin: 2px 0 6px; }
.poster-thumb {
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in; background: #fff;
  border-radius: 12px; overflow: hidden; box-shadow: 0 12px 26px -10px rgba(36, 50, 74, .35); transition: transform .25s var(--ux-spring);
}
.poster-thumb:hover { transform: translateY(-4px) rotate(-1.5deg); }
.poster-thumb img { width: 100%; height: auto; }
.poster-thumb .zoom {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm); font-size: 15px;
}
dialog.lightbox {
  border: 0; padding: 0; background: none; width: min(860px, 100vw - 24px); max-height: calc(100vh - 24px); overflow: auto;
  border-radius: 18px;
}
dialog.lightbox::backdrop { background: rgba(20, 28, 45, .7); backdrop-filter: blur(4px); }
dialog.lightbox[open] { animation: pageIn .35s var(--ux-ease); }
.lb-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; padding: 10px; }
dialog.lightbox img { width: 100%; height: auto; border-radius: 14px; margin-top: -58px; box-shadow: var(--shadow); background: #fff; }
@media (max-width: 520px) {
  .poster-card { grid-template-columns: 110px 1fr; gap: 16px; }
  .poster-card .actions { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .poster-thumb, dialog.lightbox[open] { transition: none; animation: none; } }

/* 포스터 메뉴 */
.poster-page { max-width: 640px; margin-inline: auto; text-align: center; }
.poster-page .poster-thumb { width: min(480px, 100%); margin: 0 auto 22px; }
.poster-page .poster-thumb:hover { transform: translateY(-4px); }
.poster-page .poster-thumb .zoom { width: 44px; height: 44px; font-size: 19px; right: 12px; bottom: 12px; }

/* 하단 문자 보내기 아이콘 */
footer .icon-btn { width: 32px; height: 32px; font-size: 15px; margin-left: 2px; vertical-align: middle; }

/* PC 폭이 좁을 때(900~1099px) 상단 메뉴가 넘치지 않도록 */
@media (min-width: 900px) and (max-width: 1099px) {
  .u039-tab { padding: 0 10px; font-size: 13px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-mark { width: 36px; height: 36px; font-size: 17px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  body.admin .brand > span:last-child { display: none; }
}

/* ---------- 양식 내려받기 / 접수 준비 ---------- */
.dl-box { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(59, 99, 246, .06); border: 1px dashed rgba(59, 99, 246, .3); }
.dl-box p { margin: 0 0 10px; font-size: 14.5px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-btn.is-pending { opacity: .55; cursor: not-allowed; }
.dl-btn.is-pending::after { content: ' · 준비 중'; font-weight: 500; }
.prep { margin: 0 0 24px; }
.prep-title { font-weight: 800; font-size: 16px !important; margin-bottom: 6px !important; }
.prep-steps { margin: 0 0 12px; padding-left: 22px; font-size: 14.5px; }
.prep-steps li + li { margin-top: 4px; }
.up-label { margin: 0 0 8px; }
.dl-btn[hidden] { display: none; }

/* ---------- 관리 페이지 ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 26px; }
.admin-card { padding: 22px; }
.admin-card.wide { grid-column: 1 / -1; }
.admin-card h3 { margin: 0 0 12px; }
.adm-state { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; }
.adm-state .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ux-ink-3); box-shadow: 0 0 0 4px rgba(152, 162, 179, .2); }
.adm-state .dot.on { background: var(--ux-mint); box-shadow: 0 0 0 4px rgba(43, 179, 154, .2); }
.adm-state .dot.off { background: var(--ux-danger); box-shadow: 0 0 0 4px rgba(229, 72, 107, .18); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 16px; background: var(--ux-surface-2); }
.seg button { flex: 1; min-width: 110px; height: 42px; border: 0; border-radius: 12px; background: none; font: 650 14px var(--font); color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.seg button[aria-checked="true"] { background: var(--ux-ink); color: #fff; box-shadow: 0 8px 16px -10px var(--ux-shadow-strong); }
.seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.seg button:disabled { opacity: .6; cursor: progress; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { text-align: center; padding: 12px 6px; border-radius: 14px; background: var(--ux-surface-2); }
.stat b { display: block; font-size: 26px; font-weight: 850; color: var(--primary); line-height: 1.2; }
.stat span { font-size: 13px; color: var(--muted); }
.link-list { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.link-list .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.list-title { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
@media (max-width: 820px) { .admin-grid { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } }

/* 접수 삭제 */
.del-btn { background: color-mix(in srgb, var(--ux-danger) 12%, #fff); color: #b4233f; border: 1px solid color-mix(in srgb, var(--ux-danger) 30%, transparent); }
.del-btn:hover:not(:disabled) { background: var(--ux-danger); color: #fff; }
.del-btn:disabled { opacity: .45; }
table.entries th.ck, table.entries td.ck { width: 36px; text-align: center; }
table.entries input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.row-del { border: 0; background: none; cursor: pointer; font-size: 17px; padding: 4px 8px; border-radius: 8px; }
.row-del:hover { background: color-mix(in srgb, var(--ux-danger) 14%, transparent); }
table.entries tr.is-checked td { background: rgba(59, 99, 246, .06); }

/* 제목: 윗줄 단체명(18pt·진한 회색), 아랫줄 대회명(그라데이션) */
.hero-title .org-line { font-size: 24px; font-weight: 700; color: #4b5563; letter-spacing: -.01em; line-height: 1.4; margin-bottom: 6px; }
.hero-title .grad { font-size: clamp(26px, 5.2vw, 50px); line-height: 1.2; }
@media (max-width: 520px) { .hero-title .org-line { font-size: 20px; } }
.hero-title .grad { text-wrap: balance; }

/* 도서 링크 안내: 구매 링크가 아님을 표시 */
.not-buy { display: flex; gap: 12px; align-items: flex-start; max-width: 760px; margin: 0 auto 24px; padding: 16px 20px; border-radius: 16px; background: #fff7e0; border: 2px dashed #f0b429; color: #5a4300; text-align: left; }
.not-buy .nb-ico { font-size: 24px; line-height: 1.2; }
.not-buy b { font-size: 17px; color: #8a5a00; }
.not-buy p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.6; }
.not-buy strong { color: #b34700; }
.book .info-tag { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: #eef4ff; color: #3b5bdb; font-size: 12px; font-weight: 700; }
@media (max-width: 640px) { .not-buy { padding: 14px; } .not-buy b { font-size: 15.5px; } .not-buy p { font-size: 13.5px; } }

/* 접수 화면 맨 위 접수 기간 안내 */
.period-banner { display: flex; align-items: center; gap: 14px; max-width: 780px; margin: 0 auto 18px; padding: 16px 20px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(255, 207, 112, .38), rgba(255, 255, 255, .85)); border: 1px solid var(--panel-line); box-shadow: var(--shadow-sm); }
.period-banner .pb-tag { flex: none; padding: 6px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 800; background: #7a5300; color: #fff; }
.period-banner .pb-k { font-size: 13px; font-weight: 800; color: var(--muted); }
.period-banner .pb-v { font-size: clamp(16px, 2.4vw, 20px); font-weight: 850; letter-spacing: -.02em; color: var(--ink); line-height: 1.35; }
.period-banner .pb-s { margin-top: 2px; font-size: 14px; font-weight: 700; color: #7a5300; }
.period-banner[data-phase="open"] { background: linear-gradient(135deg, rgba(127, 216, 201, .45), rgba(255, 255, 255, .85)); }
.period-banner[data-phase="open"] .pb-tag { background: var(--ux-mint); }
.period-banner[data-phase="open"] .pb-s { color: #17806d; }
.period-banner[data-phase="closed"], .period-banner[data-phase="paused"] { background: rgba(255, 255, 255, .8); }
.period-banner[data-phase="closed"] .pb-tag, .period-banner[data-phase="paused"] .pb-tag { background: var(--ux-ink-3); }
.period-banner[data-phase="closed"] .pb-s, .period-banner[data-phase="paused"] .pb-s { color: var(--muted); }
@media (max-width: 560px) { .period-banner { flex-direction: column; align-items: flex-start; gap: 8px; } }
