/* 갈피 — 종이 위에 쓰는 느낌. 색은 잉크 한 가지, 강조는 아주 조금만. */

:root {
  --paper: #f6f4ef;
  --paper-2: #efece5;
  --card: #fbfaf7;
  --ink: #1f1d1a;
  --ink-2: #4a4640;
  --muted: #8d877d;
  --faint: #b9b3a8;
  --line: #e4dfd5;
  --accent: #9a4a2e;
  --accent-soft: #f1e4dc;
  --danger: #a3392b;

  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;

  --w: 540px;
  --pad: 24px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #141311;
  --paper-2: #1c1a17;
  --card: #1a1916;
  --ink: #ece7de;
  --ink-2: #c4beb3;
  --muted: #8a847a;
  --faint: #5c5750;
  --line: #2a2723;
  --accent: #d38b6c;
  --accent-soft: #2c211c;
  --danger: #e07b6a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.01em;
}
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }

.app {
  max-width: var(--w);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 var(--pad) calc(var(--tabbar-h) + var(--safe-b) + 40px);
}
.app.no-tabbar { padding-bottom: 48px; }

.view { animation: rise .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view, .sheet, .sheet-dim { animation: none !important; } }

.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- 상단 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar .title { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 4px; min-width: 40px; }
.topbar .right { justify-content: flex-end; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 999px; color: var(--ink-2);
  transition: background .15s;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 22px; height: 22px; }

.brand { font-family: var(--serif); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.group-chip { font-size: 13px; color: var(--muted); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 15px;
  transition: transform .12s var(--ease), opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .35; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.small { height: 36px; padding: 0 16px; font-size: 14px; }
.text-btn { color: var(--muted); font-size: 14px; padding: 6px 2px; }
.text-btn:hover { color: var(--ink); }
.text-btn.danger { color: var(--danger); }

/* ---------- 입장 ---------- */
.welcome { min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between; padding: 14vh 0 40px; }
.welcome .mark { font-family: var(--serif); font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.welcome .lede { font-family: var(--serif); font-size: 19px; line-height: 1.75; color: var(--ink-2); margin: 28px 0 0; }
.welcome .lede em { font-style: normal; color: var(--ink); box-shadow: inset 0 -0.45em 0 var(--accent-soft); }
.field { display: block; margin-top: 20px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.input {
  width: 100%; height: 54px; padding: 0 2px;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  font-size: 20px; font-family: var(--serif); outline: none;
  transition: border-color .2s;
}
.input:focus { border-color: var(--ink); }
.input.code { letter-spacing: .18em; text-transform: uppercase; }
.input::placeholder { color: var(--faint); letter-spacing: normal; }
.form-error { color: var(--danger); font-size: 13px; min-height: 20px; margin: 10px 0 0; }
.demo-hint {
  margin-top: 28px; padding: 16px 18px; border-radius: 14px;
  background: var(--paper-2); font-size: 13px; color: var(--ink-2); line-height: 1.7;
}
.demo-hint b { font-weight: 600; letter-spacing: .06em; }
.demo-hint .codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.demo-hint .codes button {
  font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); letter-spacing: .06em;
}

/* ---------- 이번 책 ---------- */
.now { padding: 28px 0 8px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .12em; }
.now-book { display: grid; grid-template-columns: 108px 1fr; gap: 22px; align-items: end; margin-top: 18px; }
.now-title { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.3; letter-spacing: -0.03em; margin: 0; word-break: keep-all; }
.now-author { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.now-due { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dday { font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.dday.over { color: var(--muted); }
.now-note {
  font-family: var(--serif); font-size: 15px; line-height: 1.85; color: var(--ink-2);
  margin: 22px 0 0; padding-left: 14px; border-left: 2px solid var(--line); word-break: keep-all;
}
.now-actions { display: flex; gap: 8px; margin-top: 24px; }
.now-actions .btn { flex: 1; }

/* 책 표지(이미지가 없으면 글자로 만든 표지) */
.cover {
  position: relative; aspect-ratio: 2 / 3; width: 100%;
  border-radius: 3px 6px 6px 3px; overflow: hidden;
  box-shadow: 0 1px 1px rgba(0,0,0,.06), 0 10px 24px -10px rgba(40,30,20,.45);
  background: var(--cover, #3b4a40);
  color: #f3efe6;
}
.cover::before { /* 책등 그림자 */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 7px;
  background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(255,255,255,.06) 60%, transparent);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover .c-title {
  position: absolute; left: 14px; right: 10px; top: 16%;
  font-family: var(--serif); font-weight: 600; font-size: 15px; line-height: 1.35; letter-spacing: -0.02em; word-break: keep-all;
}
.cover .c-author { position: absolute; left: 14px; right: 10px; bottom: 12px; font-size: 9.5px; opacity: .75; letter-spacing: .04em; }
.cover .c-rule { position: absolute; left: 14px; width: 18px; top: calc(16% - 10px); height: 1px; background: currentColor; opacity: .6; }
.cover.sm .c-title { font-size: 11px; top: 14%; left: 10px; }
.cover.sm .c-author { display: none; }
.cover.sm .c-rule { left: 10px; top: calc(14% - 7px); width: 12px; }
.cover.xs .c-title, .cover.xs .c-author { display: none; }
.cover.xs .c-rule { left: 8px; top: 18%; width: 10px; }

/* ---------- 제출 현황 ---------- */
.roll { margin-top: 34px; padding: 20px 0 6px; border-top: 1px solid var(--line); }
.roll-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.roll-head .count { font-family: var(--serif); font-size: 17px; }
.roll-head .count b { font-weight: 600; }
.roll-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.dot {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: -0.04em;
  box-shadow: inset 0 0 0 1px var(--line); color: var(--faint); background: transparent;
}
.dot.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.dot.me { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dot.on.me { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--accent); }
.roll-names { margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.roll-names b { color: var(--ink-2); font-weight: 500; }

/* ---------- 탭(독후감/발제문) ---------- */
.seg { display: flex; gap: 22px; margin: 34px 0 4px; border-bottom: 1px solid var(--line); }
.seg button {
  position: relative; padding: 10px 0 12px; font-size: 15px; color: var(--muted); font-weight: 500;
}
.seg button .n { font-size: 12px; margin-left: 4px; color: var(--faint); }
.seg button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.seg button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink);
}

/* ---------- 글 목록 ---------- */
.feed { list-style: none; margin: 0; padding: 0; }
.entry { display: block; padding: 26px 0 24px; border-bottom: 1px solid var(--line); }
.feed > li:last-child > .entry { border-bottom: 0; }
.entry .e-kind { font-size: 11.5px; font-weight: 600; color: var(--accent); letter-spacing: .08em; margin-bottom: 10px; }
.entry .e-title { font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.45; margin: 0 0 8px; letter-spacing: -0.02em; word-break: keep-all; }
.entry .e-body {
  font-family: var(--serif); font-size: 15px; line-height: 1.85; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  word-break: keep-all; margin: 0;
}
.entry .e-qs { margin: 0; padding: 0; list-style: none; font-family: var(--serif); font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.entry .e-qs li { display: flex; gap: 10px; padding: 3px 0; }
.entry .e-qs li .qn { color: var(--faint); font-family: var(--sans); font-size: 12px; padding-top: 3px; min-width: 14px; }
.entry .e-more { font-size: 13px; color: var(--muted); margin-top: 4px; }
.meta { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.meta .sep { width: 2px; height: 2px; border-radius: 9px; background: var(--faint); }
.meta .stat { display: inline-flex; align-items: center; gap: 4px; }
.meta .stat svg { width: 14px; height: 14px; }
.meta .pill { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--paper-2); color: var(--muted); }
.meta .grow { flex: 1; }

.empty { padding: 56px 0 40px; text-align: center; }
.empty .e-line { font-family: var(--serif); font-size: 17px; color: var(--ink-2); line-height: 1.7; }
.empty .e-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 글 읽기 ---------- */
.read { padding: 20px 0 0; }
.read-book { display: flex; align-items: center; gap: 12px; padding: 10px 0 26px; }
.read-book .cover { width: 34px; flex: none; border-radius: 2px 3px 3px 2px; }
.read-book .rb-t { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.read-book .rb-a { font-size: 12px; color: var(--muted); }
.read h1 { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.4; letter-spacing: -0.03em; margin: 8px 0 0; word-break: keep-all; }
.read .byline { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.avatar {
  width: 28px; height: 28px; border-radius: 999px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  background: var(--paper-2); color: var(--ink-2); letter-spacing: -0.04em;
}
.read .byline .name { color: var(--ink); font-weight: 500; }
.prose {
  font-family: var(--serif); font-size: 17px; line-height: 2; color: var(--ink);
  margin-top: 36px; word-break: keep-all; overflow-wrap: anywhere;
}
.prose p { margin: 0 0 1.2em; }
.qs { list-style: none; margin: 36px 0 0; padding: 0; counter-reset: q; }
.qs li {
  counter-increment: q; position: relative; padding: 18px 0 18px 36px; border-top: 1px solid var(--line);
  font-family: var(--serif); font-size: 17px; line-height: 1.85; word-break: keep-all;
}
.qs li:last-child { border-bottom: 1px solid var(--line); }
.qs li::before {
  content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: 22px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--accent); letter-spacing: .04em;
}
.read-actions { display: flex; align-items: center; gap: 10px; margin: 40px 0 0; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.like-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s, box-shadow .15s;
}
.like-btn svg { width: 18px; height: 18px; }
.like-btn.on { color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.like-btn.on svg path { fill: currentColor; }
.read-actions .grow { flex: 1; }

/* 댓글 */
.comments { padding-top: 28px; }
.comments h2 { font-size: 14px; font-weight: 600; margin: 0 0 6px; color: var(--ink-2); }
.comment { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.comment:last-of-type { border-bottom: 0; }
.comment .c-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.comment .c-head .name { font-weight: 600; }
.comment .c-head .time { color: var(--muted); }
.comment .c-head .grow { flex: 1; }
.comment .c-body { font-size: 15px; line-height: 1.75; color: var(--ink-2); margin-top: 4px; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.composer {
  position: sticky; bottom: 0; margin: 12px calc(var(--pad) * -1) 0; padding: 12px var(--pad) calc(12px + var(--safe-b));
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-end;
}
.composer textarea {
  flex: 1; min-height: 42px; max-height: 140px; resize: none; border: 0; outline: none;
  background: var(--paper-2); border-radius: 21px; padding: 10px 16px; font-size: 15px; line-height: 1.5;
}
.composer .btn { height: 42px; padding: 0 18px; }

/* ---------- 글쓰기 ---------- */
.writer { padding-top: 4px; }
.kind-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--paper-2); }
.kind-switch button { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: var(--muted); font-weight: 500; }
.kind-switch button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }
.writer-book { margin: 26px 0 0; font-size: 13px; color: var(--muted); }
.writer-book b { color: var(--ink-2); font-weight: 500; }
.writer .t-input {
  width: 100%; border: 0; outline: none; background: transparent; padding: 0;
  font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.4;
  margin-top: 18px;
}
.writer .t-input::placeholder, .writer .b-input::placeholder, .q-row textarea::placeholder { color: var(--faint); font-weight: 400; }
.writer .b-input {
  width: 100%; min-height: 52vh; border: 0; outline: none; background: transparent; resize: none; padding: 0;
  font-family: var(--serif); font-size: 17px; line-height: 2; margin-top: 22px; word-break: keep-all;
}
.q-list { margin-top: 22px; }
.q-row { display: grid; grid-template-columns: 30px 1fr 28px; gap: 6px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.q-row:last-child { border-bottom: 1px solid var(--line); }
.q-row .qn { font-size: 12px; font-weight: 600; color: var(--accent); padding-top: 7px; letter-spacing: .04em; }
.q-row textarea {
  width: 100%; border: 0; outline: none; background: transparent; resize: none; padding: 2px 0; min-height: 34px;
  font-family: var(--serif); font-size: 17px; line-height: 1.8; word-break: keep-all; overflow: hidden;
}
.q-row .q-del { width: 28px; height: 28px; color: var(--faint); display: grid; place-items: center; border-radius: 99px; margin-top: 4px; }
.q-row .q-del:hover { color: var(--danger); background: var(--paper-2); }
.q-row .q-del svg { width: 16px; height: 16px; }
.q-add { margin-top: 14px; font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; }
.q-add svg { width: 16px; height: 16px; }
.writer-foot {
  position: sticky; bottom: 0; margin: 28px calc(var(--pad) * -1) 0; padding: 12px var(--pad) calc(12px + var(--safe-b));
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted);
}
.writer-foot .grow { flex: 1; }
.vis-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.vis-btn svg { width: 14px; height: 14px; }

/* ---------- 둘러보기 ---------- */
.page-head { padding: 28px 0 6px; }
.page-head h1 { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -0.03em; margin: 0; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 20px calc(var(--pad) * -1) 6px; padding: 0 var(--pad) 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; font-weight: 600; }

/* ---------- 나 ---------- */
.me-head { padding: 34px 0 6px; display: flex; align-items: center; gap: 16px; }
.me-head .avatar { width: 56px; height: 56px; font-size: 18px; }
.me-head .n { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.me-head .g { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 18px 0; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.stats span { font-size: 12px; color: var(--muted); }
.section { margin-top: 38px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-h h2 { font-size: 14px; font-weight: 600; margin: 0; color: var(--ink-2); }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 12px; }
.shelf .s-item .s-cap { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; word-break: keep-all; }
.list-rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; }
.row .grow { flex: 1; }
.row .sub { font-size: 13px; color: var(--muted); }
.row svg { width: 18px; height: 18px; color: var(--faint); }

/* ---------- 시트(아래에서 올라오는 창) ---------- */
.sheet-dim { position: fixed; inset: 0; background: rgba(20,16,12,.32); z-index: 30; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 31; width: min(var(--w), 100%); transform: translateX(-50%);
  background: var(--card); border-radius: 22px 22px 0 0; padding: 10px var(--pad) calc(24px + var(--safe-b));
  max-height: 88dvh; overflow-y: auto; animation: up .28s var(--ease) both;
  box-shadow: 0 -10px 40px -10px rgba(0,0,0,.2);
}
@keyframes up { from { transform: translate(-50%, 24px); opacity: 0; } }
.sheet .grab { width: 36px; height: 4px; border-radius: 9px; background: var(--line); margin: 0 auto 18px; }
.sheet h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
.sheet .s-desc { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 0; border-bottom: 1px solid var(--line); text-align: left; }
.opt:last-child { border-bottom: 0; }
.opt .o-t { font-size: 15px; font-weight: 500; }
.opt .o-d { font-size: 13px; color: var(--muted); }
.opt .grow { flex: 1; }
.opt .check { width: 20px; height: 20px; color: var(--ink); opacity: 0; }
.opt[aria-checked="true"] .check { opacity: 1; }
.sheet .field { margin-top: 14px; }
.sheet .input { font-size: 17px; height: 46px; }
.sheet .s-actions { display: flex; gap: 8px; margin-top: 26px; }
.sheet .s-actions .btn { flex: 1; }
.code-list { margin-top: 8px; }
.code-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.code-row code { font-family: var(--sans); font-weight: 600; letter-spacing: .14em; }

/* ---------- 하단 탭 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar .inner { max-width: var(--w); margin: 0 auto; height: var(--tabbar-h); display: grid; grid-template-columns: repeat(3, 1fr); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--faint); font-weight: 500; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--ink); }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); transform: translateX(-50%);
  z-index: 40; background: var(--ink); color: var(--paper); font-size: 14px; padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.35); animation: toast-in .25s var(--ease) both; white-space: nowrap;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translate(-50%, 0); } }
.app.no-tabbar ~ .toast { bottom: calc(var(--safe-b) + 84px); }

@media (min-width: 720px) {
  :root { --pad: 32px; }
  .now-title { font-size: 32px; }
  .now-book { grid-template-columns: 124px 1fr; }
}
