/* BOOK-001 전용 테마. 다른 페이지의 site-shell과 색상·레이아웃을 공유하지 않습니다. */
:root {
  color-scheme: light;
  --bg: #fbfaf5;
  --surface: #ffffff;
  --line: #d7e2d9;
  --text: #293e37;
  --muted: #52665f;
  --brand: #306251;
  --brand-dark: #234a3d;
  --mint: #e6f2e9;
  --sky: #eaf3f5;
  --cream: #fff5d9;
  --lavender: #f1edf8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--brand); text-underline-offset: 4px; }
button, input, select { font: inherit; }
button, .button {
  min-height: 48px; padding: 11px 20px; border: 1px solid var(--brand); border-radius: 12px;
  background: var(--brand); color: #ffffff; cursor: pointer; font-weight: 700;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 12px; line-height: 1.5;
}
button:hover:not(:disabled), .button:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.secondary { color: var(--brand); background: #ffffff; border-color: #91ada0; }
.secondary:hover:not(:disabled) { background: var(--mint); color: var(--brand-dark); }
.danger { background: #934635; border-color: #934635; color: #ffffff; }
.danger:hover:not(:disabled) { background: #763726; border-color: #763726; }
button:disabled { background: #e1e7e2; color: #59665e; border-color: #becdc3; cursor: not-allowed; }
:focus-visible { outline: 3px solid #307c9a; outline-offset: 4px; }
input:not([type="checkbox"]):not([type="radio"]), select {
  display: block; width: 100%; min-width: 0; min-height: 50px; background: #ffffff;
  border: 1px solid #91a69b; color: var(--text); border-radius: 10px; padding: 11px 13px; margin-top: 6px;
}
input::placeholder { color: #65766c; opacity: 1; }
input:disabled { background: #f1f4f1 !important; color: #59665e !important; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; margin: 0; }
input[type="number"] { max-width: 180px; }
label { display: block; font-weight: 600; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
/* 카드에 display가 있어도 인증·신청 상태에 따른 hidden을 반드시 우선합니다. */
[hidden] { display: none !important; }
.library-masthead, .page, .library-footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.library-masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 26px; }
.library-name { display: flex; align-items: center; gap: 12px; }
.library-name img { flex-shrink: 0; }
.library-name strong { display: block; font-size: 19px; letter-spacing: -.04em; }
.library-name span { display: block; font-size: 12px; color: var(--muted); }
.term-label { color: var(--brand); font-size: 13px; font-weight: 700; border: 1px solid var(--line); border-radius: 30px; padding: 6px 14px; white-space: nowrap; }
.page { margin-bottom: 64px; }
.hero {
  position: relative; display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 14px;
  padding: 42px 42px 38px; background: var(--sky); border-radius: 28px; border: 1px solid #dce9e8;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow { font-size: 13px; color: var(--brand); font-weight: 700; margin: 0 0 10px; letter-spacing: .03em; }
h1 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.35; letter-spacing: -.055em; margin: 0 0 18px; }
.hero-kicker { display: block; font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--brand); margin-bottom: 13px; }
h2 { font-size: 22px; line-height: 1.5; letter-spacing: -.04em; margin: 0; }
h3 { font-size: 18px; margin: 8px 0; }
.lead { color: var(--muted); font-size: 15px; margin: 0; }
.actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 25px; }
.quiet-link { font-size: 14px; color: var(--muted); padding: 10px 0; }
.library-illustration { width: 100%; max-width: 400px; height: auto; justify-self: center; }
.guide-strip { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px 44px; list-style: none; padding: 20px 0; margin: 0 0 12px; }
.guide-strip li { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 9px; }
.guide-strip span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 800; color: var(--brand); background: var(--mint); }
.guide-strip li:nth-child(2) span { background: var(--cream); color: #765e23; }
.guide-strip li:nth-child(3) span { background: var(--lavender); color: #6b5789; }
.status-panel { display: flex; align-items: center; gap: 20px; border: 1px solid #e0d3ae; background: var(--cream); padding: 22px 28px; border-radius: 18px; margin-bottom: 28px; }
.status-panel h2 { font-size: 18px; }
.status-panel p { margin: 4px 0 0; color: #665c41; font-size: 14px; }
.status-panel button { margin-left: auto; flex-shrink: 0; }
.badge { display: inline-block; white-space: nowrap; padding: 6px 12px; border-radius: 8px; background: #f2df9f; color: #5a481a; font-size: 13px; font-weight: 800; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px 32px; margin: 24px 0; scroll-margin-top: 24px; box-shadow: 0 4px 14px #3c594506; }
.section-title { display: flex; gap: 16px; align-items: center; }
.section-title .eyebrow { margin: 0 0 3px; }
.step { display: grid; place-items: center; width: 44px; height: 48px; border-radius: 12px; background: var(--mint); font-size: 19px; color: var(--brand); font-weight: 800; flex-shrink: 0; white-space: nowrap; }
.muted { color: var(--muted); font-size: 14px; }
.bookstore-shortcuts { margin: 18px 0 22px; }
.bookstore-label { margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.bookstore-label span { display: inline-block; margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.bookstore-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.bookstore-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 1px solid #91ada0; border-radius: 10px; background: #ffffff; font-size: 14px; font-weight: 700; text-decoration: none; }
.bookstore-link:hover { background: var(--mint); color: var(--brand-dark); }
.input-row { display: flex; align-items: end; gap: 12px; }
.input-row input { flex: 1; min-width: 0; }
.input-row button { white-space: nowrap; min-height: 50px; }
.preview { border: 1px solid #c8dccf; border-left: 4px solid #74a28a; background: #f0f7ef; border-radius: 12px; margin: 24px 0; padding: 22px; }
.preview .eyebrow { margin: 0; }
.preview input { max-width: 160px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.wide { grid-column: 1/-1; }
.radio-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.radio-group label, .check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.radio-group label { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fafcf9; cursor: pointer; }
.radio-group label:has(input:checked) { background: var(--mint); border-color: #6b9b84; }
.privacy { margin: 26px 0; padding: 22px; background: var(--lavender); border: 1px solid #e2daef; border-radius: 14px; }
.privacy p { font-size: 14px; color: #5e566d; line-height: 1.9; }
.privacy .check { align-items: flex-start; }
.privacy input { margin-top: 4px; }
.message { padding: 16px 20px; color: #2b5541; background: #edf7ef; border: 1px solid #95bba1; border-radius: 12px; white-space: pre-line; }
.message.error { background: #fff0ea; color: #803e2d; border-color: #cc917e; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.count { display: inline-block; padding: 2px 10px; background: var(--mint); border-radius: 25px; font-size: 15px; color: var(--brand); margin-left: 7px; vertical-align: middle; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin-top: 16px; scrollbar-color: #8ca998 #edf3ed; }
table { border-collapse: collapse; width: 100%; min-width: 950px; font-size: 14px; }
th, td { padding: 16px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--mint); color: #345d49; white-space: nowrap; font-size: 13px; }
tbody tr:nth-child(even) { background: #f8fbf7; }
td:nth-child(n + 5) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td:nth-child(2) { min-width: 230px; max-width: 330px; }
td a { text-decoration-thickness: 1px; }
tbody tr:last-child td { border-bottom: 0; }
.scroll-hint { display: none; font-size: 13px; color: var(--muted); }
.totals { font-size: 14px; color: var(--brand); text-align: right; margin: 20px 0 0; font-weight: 600; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
/* 빈 8열 표의 안내가 모바일 화면 밖으로 밀려나지 않게 합니다. */
.table-scroll td.empty { text-align: left; padding: 30px 18px; }
.skip { position: absolute; left: 10px; top: -100px; z-index: 999; padding: 12px; background: #fff; color: var(--brand); }
.skip:focus { top: 10px; }
.library-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px 28px; border-top: 1px solid var(--line); padding: 26px 4px 36px; color: var(--muted); font-size: 12px; }
.library-footer p { margin: 0; }
.library-footer a { font-size: 13px; font-weight: 700; white-space: nowrap; padding-block: 10px; }
.admin-page { background: #f4f7f2; }
.admin-hero { background: var(--mint); border: 1px solid #d0e3d5; border-radius: 20px; padding: 32px; margin-bottom: 24px; }
.admin-hero h1 { font-size: 34px; }
.admin-hero .actions { margin-top: 20px; gap: 12px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.admin-grid .panel { margin: 0; min-width: 0; }
.admin-grid label { margin: 14px 0; }
.admin-book { padding: 20px; border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; background: #fcfdfb; }
summary { cursor: pointer; min-height: 44px; padding-block: 8px; }
.admin-book summary { font-size: 17px; font-weight: 700; }
.admin-book[open] { border-color: #8bb59a; }
.admin-book .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.request-details { font-size: 14px; line-height: 1.9; background: var(--sky); border-radius: 10px; padding: 14px 20px 14px 30px; }
.request-details:empty { display: none; }
.purge-panel { border-color: #e5c9bb; }
.purge-panel .eyebrow { color: #854935; }
.confirm-block { border: 1px solid #dab7a7; border-radius: 12px; padding: 22px; background: #fff7f1; }
.confirm-block input { max-width: 360px; margin-bottom: 14px; }
.connection-list { font-size: 14px; }
@media (max-width: 1020px) {
  .hero { padding: 32px; grid-template-columns: 1.5fr 1fr; }
  .hero h1 { font-size: 34px; }
  .scroll-hint { display: block; }
}
@media (max-width: 700px) {
  .library-masthead, .page, .library-footer { width: calc(100% - 28px); }
  .library-masthead { padding-block: 18px; gap: 8px; }
  .library-name { gap: 9px; }
  .library-name strong { font-size: 17px; }
  .library-name img { width: 38px; height: 38px; }
  .term-label { display: none; }
  .hero { padding: 24px 20px; display: block; border-radius: 20px; }
  .hero h1 { font-size: clamp(26px, 6.8vw, 34px); }
  .hero .eyebrow { font-size: 12px; }
  .hero-kicker { font-size: 12px; }
  .lead { font-size: 14px; }
  /* 작은 그림으로 첫 화면에 접수 상태를 확인할 공간을 남깁니다. */
  .library-illustration { position: absolute; width: 76px; height: 57px; right: 8px; bottom: 22px; }
  .hero .actions { gap: 16px; margin-top: 22px; padding-right: 66px; }
  .hero .actions .button { padding-inline: 15px; }
  .hero .quiet-link { position: relative; z-index: 2; }
  .guide-strip { gap: 10px; justify-content: space-between; margin-bottom: 4px; padding: 16px 2px; }
  .guide-strip li { font-size: 11px; flex: 1; flex-direction: column; gap: 5px; text-align: center; }
  .status-panel { padding: 18px; gap: 12px; flex-wrap: wrap; border-radius: 16px; margin-bottom: 20px; }
  .status-panel > div { width: 100%; }
  .status-panel button { margin-left: 0; min-height: 44px; padding: 8px 16px; }
  .status-panel h2 { font-size: 17px; }
  .status-panel p { font-size: 13px; }
  .panel { padding: 24px 18px; margin: 20px 0; border-radius: 16px; }
  .section-title { gap: 12px; align-items: flex-start; }
  .step { width: 35px; height: 42px; font-size: 16px; }
  .input-row { flex-direction: column; align-items: stretch; }
  .bookstore-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .input-row button { width: 100%; }
  h2 { font-size: 20px; }
  .list-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .list-head button { width: 100%; }
  .totals { text-align: left; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-book { padding: 16px; }
  .admin-book .form-grid { grid-template-columns: 1fr 1fr; }
  .radio-group { gap: 8px; }
  .radio-group label { padding: 10px; font-size: 14px; gap: 6px; }
  .privacy { padding: 17px; }
  .admin-hero { padding: 24px 20px; }
  .admin-hero h1 { font-size: 28px; }
  .library-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 23px 30px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.order-panel { margin: 1rem 0; padding: 1rem; border: 1px solid #b9d1c5; border-radius: 12px; }
.order-panel summary { cursor: pointer; font-weight: 700; }
#order-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid #dce7e1; }
.order-title { min-width: 0; overflow-wrap: anywhere; }
.order-actions { display: flex; flex-shrink: 0; align-items: center; gap: .35rem; }
.order-actions button { padding: .5rem .65rem; min-height: 44px; }
.order-actions input { width: 4.5rem; min-height: 44px; }
@media (max-width: 620px) {
  .order-row { flex-direction: column; align-items: stretch; }
  .order-actions { justify-content: flex-end; flex-wrap: wrap; }
}
