/* Bookbery website style: "Paper & Rose" (chosen 9 Nov 2026). Calm and bookish: a pale blush page,
   warm dark-brown text, Lora headings, thin lines between sections, and deep-rose buttons taken from the watercolor logo.
   The look before this is saved in git as the tag "before-paper-rose". */
:root {
  --ink: #2e2326; --ink-2: #574a4d; --muted: #706063; --faint: #7f7072;
  --line: #efdfde; --line-strong: #e3c3c5;
  --bg: #fbf6f5; --bg-soft: #f5ebe9; --bg-warm: #f8efed;
  --rose: #e9a4a8; --rose-deep: #9a4855; --rose-dark: #7f3a46; --rose-soft: #fcf0f1; --rose-line: #f1d3d7;
  --rust: #b4532a; --ok: #2f7d5b;
  /* older names used across the pages, pointed at the new palette */
  --green: var(--rose-deep); --green-dark: var(--ink); --green-soft: var(--rose-soft); --green-line: var(--rose-line); --bg-mint: var(--bg-warm);
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(29, 29, 31, .04), 0 8px 28px -12px rgba(60, 35, 35, .18);
  --font: Inter, "Noto Sans KR", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: Lora, Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--rose-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -.01em; text-wrap: balance; color: var(--ink); }
h1 { font-size: clamp(30px, 4.2vw, 44px); }
h2 { font-size: clamp(23px, 3vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid var(--rose-line); outline-offset: 2px; }

/* header: light, see-through, stays at the top */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 245, .88); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo .mark { width: 38px; height: 38px; display: block; }
.logo .word { height: 19px; width: auto; display: block; margin-top: 2px; }
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; padding: 7px 13px; border-radius: 999px; font-size: 15px; transition: background .15s, color .15s; }
.site-nav .who { font-weight: 600; padding: 7px 13px; font-size: 15px; }
.site-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--rose-soft); color: var(--rose-deep); }
/* phones: the menu folds behind a Menu button */
.menu-btn { display: none; margin-left: auto; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.menu-btn span, .menu-btn span::before { display: block; width: 14px; height: 1.5px; background: currentColor; border-radius: 1px; position: relative; }
.menu-btn span { margin: 3px 0; box-shadow: 0 -4px 0 currentColor; } .menu-btn span::before { content: ""; top: 4px; }
@media (max-width: 719px) {
  .menu-btn { display: inline-flex; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 12px; }
  .site-header.open .site-nav { display: flex; }
  .site-nav a, .site-nav .who { padding: 12px 6px; border-radius: 10px; font-size: 16px; }
  .site-nav a[aria-current="page"] { background: transparent; color: var(--rose-deep); }
}
.test-banner { background: var(--bg-soft); color: var(--muted); font-size: 13px; text-align: center; padding: 6px 16px; }

/* avatar circle with a reader's first letter (Family, profiles) */
.logo-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-deep); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 18px; flex: none; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--rose-deep); color: #fff; font: inherit; font-weight: 500; font-size: 15px; letter-spacing: 0; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: var(--rose-dark); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: #fff; border-color: var(--rose); }
.btn.danger { background: #fff; color: var(--rust); border-color: #ecc9b9; }
.btn.danger:hover { background: #fdf4ef; }
.btn.small { min-height: 36px; padding: 0 15px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
label.field { display: grid; gap: 6px; align-content: start; font-weight: 500; font-size: 14px; color: var(--ink-2); }
label.field span.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=search], input[type=password], input[type=number], select, textarea {
  font: inherit; font-size: 16px; min-height: 46px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea { padding: 12px 14px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose-deep); box-shadow: 0 0 0 3px var(--rose-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); }
.notice { border-radius: var(--radius-sm); padding: 14px 16px; background: var(--rose-soft); color: var(--ink); font-size: 15px; }
.notice.warn { background: #fdf3ee; color: #7a3a1c; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }

/* sections */
.hero { background: transparent; border-bottom: 1px solid var(--line); }
.hero .wrap { padding-top: 64px; padding-bottom: 64px; display: grid; gap: 20px; }
.hero p.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 600px; }
.hero .ko { color: var(--muted); font-size: 15px; }
section.block { padding: 64px 0; }
section.block h2 { margin-bottom: 28px; padding-top: 18px; border-top: 1px solid var(--ink); font-weight: 400; }
.steps { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step .num { font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--rose-deep); margin-bottom: 8px; }
.step h3 { margin-bottom: 6px; font-size: 24px; font-weight: 400; }
.step p { color: var(--ink-2); font-size: 15px; }

/* book cards */
.book-grid { display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
.book-card { text-decoration: none; color: inherit; display: grid; gap: 8px; align-content: start; }
.cover { aspect-ratio: 2 / 3; border-radius: 0; overflow: hidden; background: var(--bg-soft); position: relative;
  box-shadow: 0 1px 2px rgba(29, 29, 31, .06), 0 10px 24px -14px rgba(60, 35, 35, .35); transition: transform .2s, box-shadow .2s; }
.book-card:hover .cover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(29, 29, 31, .06), 0 18px 32px -14px rgba(60, 35, 35, .4); }
@media (prefers-reduced-motion: reduce) { .cover, .btn { transition: none; } .book-card:hover .cover { transform: none; } }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover.placeholder { display: grid; place-items: center; padding: 14px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink-2);
  background: radial-gradient(circle at 30% 25%, #f8dfe2 0, transparent 55%), radial-gradient(circle at 75% 78%, #f3e6dc 0, transparent 50%), var(--bg-warm); }
.book-card .title { font-weight: 600; line-height: 1.3; margin-top: 4px; }
.book-card .author { color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.tag.best { background: #fdf3ee; color: var(--rust); border-color: #f2dccf; }
/* top 3 best sellers: gold, silver, bronze */
.tag.best-1 { background: #fdf6dc; color: #8a6a00; border-color: #ecd690; font-weight: 600; }
.tag.best-2 { background: #f1f3f5; color: #5c6670; border-color: #cdd3d9; font-weight: 600; }
.tag.best-3 { background: #f9ece2; color: #8c4f24; border-color: #e6c3a6; font-weight: 600; }
.tag.ar { background: var(--rose-soft); color: var(--rose-deep); border-color: var(--rose-line); }
/* AR level tag: the color of that AR level's palette (set on the tag), white letters */
/* interest level (e.g. UE–HS) and adult novels */
.tag.il { background: #fff; color: var(--ink-2); border-color: var(--line-strong); }
.tag.arlvl { color: #fff; border-color: transparent; font-weight: 600; text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
.price { font-weight: 600; }
.soon { color: var(--faint); font-weight: 500; font-size: 14px; }

/* catalog filters */
.filters { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; align-items: end; }
.filters .field.search { grid-column: 1 / -1; }
.filters .field { font-size: 13px; }
@media (min-width: 900px) { .filters { grid-template-columns: minmax(220px, 2fr) repeat(auto-fit, minmax(140px, 1fr)); } .filters .field.search { grid-column: auto; } }
.filter-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.filter-foot .linkbtn { font-size: 14px; }
/* My Library: a progress bar the width of the cover */
.book-card .pbar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 2px; }
.book-card .pbar span { display: block; height: 100%; border-radius: 999px; background: var(--rose-deep); }
.book-card .prog { font-size: 13px; color: var(--muted); }
.book-card .prog.done { color: var(--rose-deep); font-weight: 600; }
.book-card .guide { font-size: 13px; color: var(--ink-2); }

/* book page */
.book-top { display: grid; gap: 36px; padding: 44px 0; }
@media (min-width: 760px) { .book-top { grid-template-columns: 260px 1fr; } }
.book-top .cover { max-width: 260px; }
.book-info { display: grid; gap: 14px; align-content: start; }
.buy-box { display: grid; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--bg-soft); max-width: 520px; }
.buy-box .price { font-size: 28px; letter-spacing: -.01em; }
.unit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.unit-list li { padding: 13px 4px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.unit-list b { color: var(--rose-deep); font-weight: 600; white-space: nowrap; }

/* library */
.lib-list { display: grid; gap: 14px; }
.lib-item { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.lib-item .cover { width: 72px; }
.lib-item .cover.placeholder { font-size: 11px; padding: 6px; }
@media (min-width: 720px) { .lib-item { grid-template-columns: 72px 1fr auto; } }
.guide-row { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (min-width: 720px) { .guide-row { grid-template-columns: 1fr auto; align-items: center; } }
.badge-active { display: inline-block; font-size: 12px; font-weight: 600; color: var(--rose-deep); background: var(--rose-soft); padding: 2px 9px; border-radius: 999px; margin-left: 8px; vertical-align: 2px; }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(29, 29, 31, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 20px; padding: 26px; width: min(460px, 100%); display: grid; gap: 14px; box-shadow: 0 24px 60px -20px rgba(29, 29, 31, .35); }

/* footer */
.site-footer { background: transparent; border-top: 1px solid var(--line); margin-top: 64px; padding: 36px 0 44px; color: var(--muted); font-size: 13px; }
.site-footer .foot { display: flex; gap: 16px; align-items: flex-start; }
.site-footer .foot img { width: 44px; height: 44px; flex: none; }

/* toast */
.bb-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; transition: .2s; z-index: 1100; pointer-events: none; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.bb-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* book badge pictures */
.badge-pic { display: block; object-fit: contain; }
.medal-pop .badge-pic { filter: drop-shadow(0 6px 10px rgba(40, 30, 10, .25)); }

/* small text buttons, renaming in place, and a spinner for buttons that are working */
.linkbtn { font: inherit; color: var(--rose-deep); background: none; border: 0; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.rename { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rename input { min-height: 36px; width: min(320px, 70vw); font-size: 15px; }
.bb-spin { width: 15px; height: 15px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; vertical-align: -2px; animation: bbspin .7s linear infinite; }
@keyframes bbspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bb-spin { animation: none; } }

/* English / 한국어 switch (menu and footer) */
.lang-switch { font-size: 14px; color: var(--muted); white-space: nowrap; }
.lang-switch a { color: inherit; text-decoration: none; padding: 0 2px; }
.lang-switch a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.site-nav .lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 7px 8px; }
.site-nav .lang-switch a { padding: 0; }
html[lang="ko"] body { word-break: keep-all; }

/* The free guide of the month (My Library, home page, the book's page) */
.fg { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; background: linear-gradient(135deg, var(--rose-soft), #fff 70%); border-color: var(--rose-line); }
.fg.fg-compact { grid-template-columns: 1fr !important; margin-bottom: 16px; }
.fg-cover img { width: 110px; display: block; box-shadow: 0 10px 22px -12px rgba(60,35,35,.5); }
.fg-body { display: grid; gap: 10px; min-width: 0; }
.fg-body h2 { font-size: 24px; }
.fg-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rose-deep); }
.fg-eds { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 220px)); gap: 12px; align-items: end; }
@media (max-width: 560px) { .fg { grid-template-columns: 80px 1fr; gap: 14px; } .fg-cover img { width: 80px; } }
@media (min-width: 900px) { .fg { grid-template-columns: 180px 1fr; gap: 28px; } .fg-cover img { width: 180px; } }

/* Pre-launch banner (under the header) */
.prebar { background: var(--ink); color: #fff; font-size: 14px; padding: 9px 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prebar .wrap { overflow: hidden; text-overflow: ellipsis; }
.prebar a { color: #fff; font-weight: 600; }

/* Region selector (footer) */
.region-sel { font-size: 14px; color: var(--muted); white-space: nowrap; }
.region-sel select { font: inherit; font-size: 13px; min-height: 0; width: auto; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); }

/* Owner pages: tabs */
.owner-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.owner-tabs a { text-decoration: none; color: var(--ink-2); font-weight: 500; padding: 7px 14px; border-radius: 999px; }
.owner-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }

/* Footer layout (18 Nov 2026): groups with breathing room */
.site-footer .foot-body { display: grid; gap: 14px; line-height: 1.6; }
.site-footer .foot-group { display: grid; gap: 2px; }
.site-footer .foot-group b { font-weight: 500; color: var(--ink-2); }
.site-footer .foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.site-footer .biz { font-size: 12px; color: var(--faint); gap: 1px; }
