/* reader.css: 리플로우 전자책 리더(장 HTML을 쪽 단위로 가로 넘김). 모바일 우선. 레거시 쪽 이미지 뷰어는 viewer.css */

html { height: 100%; overscroll-behavior: none; }
body.bare {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  overscroll-behavior: none;
  background: #fff;
}
body.bare > main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}

/* ── 테마 ── */
.rd {
  --bg: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #8a8a8f;
  --line: #e5e5ea;
  --line-2: #c9c9cf;
  --shade: #eef3f9;
  --soft: #f2f2f5;
  --bar: #ffffff;
  --accent: #0a6cff;
  --me: #ffe94a;
  --me-ink: #1d1d1f;
  --you: #f0f0f3;
  --k-red: #d7372a;
  --k-orange: #e5590b;
  --k-gold: #b07f00;
  --k-green: #23843a;
  --k-blue: #1b62d0;
  --k-purple: #7a3dc2;
  --k-gray: #77777d;
  --fs: 17px;
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.rd[data-theme='sepia'] {
  --bg: #f6efe2;
  --ink: #3a2f22;
  --ink-2: #4e4234;
  --muted: #8f7f68;
  --line: #e4d8c2;
  --line-2: #cdbd9f;
  --shade: #ece1c9;
  --soft: #efe5d1;
  --bar: #f6efe2;
  --me: #f6dc5a;
  --you: #ebe0c9;
  --k-gray: #85765f;
}
.rd[data-theme='dark'] {
  --bg: #17171a;
  --ink: #e4e4e7;
  --ink-2: #c9c9ce;
  --muted: #8d8d93;
  --line: #2c2c31;
  --line-2: #45454c;
  --shade: #23262d;
  --soft: #232328;
  --bar: #1c1c1f;
  --accent: #5ea2ff;
  --me: #d9c24a;
  --me-ink: #17171a;
  --you: #2a2a30;
  --k-red: #ff7a6e;
  --k-orange: #ff9d5c;
  --k-gold: #e8c15a;
  --k-green: #74d48a;
  --k-blue: #7fb0ff;
  --k-purple: #c19cff;
  --k-gray: #a0a0a6;
}
.rd [hidden] { display: none !important; }

/* ── 본문 무대(세로 스크롤 없음, 가로로 쪽을 넘긴다) ── */
.rd-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  outline: none;
  background: var(--bg);
  touch-action: none;
}
/* 쪽 틀(가운데 정렬, 옆 쪽이 비치지 않게 자른다) */
.rd-view {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.rd-track {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 1px;
  will-change: transform;
}
.rd-wm {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.rd-run {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 max(56px, env(safe-area-inset-left)) 0 max(56px, env(safe-area-inset-right));
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.rd-run-top { top: 0; padding-top: env(safe-area-inset-top); }
.rd-run-bottom { bottom: 0; align-items: flex-start; padding-top: 8px; padding-bottom: env(safe-area-inset-bottom); }
.rd-run-bottom.compact { align-items: center; justify-content: flex-end; padding-top: 0; padding-right: max(22px, env(safe-area-inset-right)); }

/* 장 하나 = 다단 컨테이너 하나(열 폭 = 쪽 폭). 위치·크기는 reader.js가 정한다 */
.rd-ch {
  position: absolute;
  top: 0;
  box-sizing: content-box;
  column-fill: auto;
  font-size: var(--fs);
  line-height: 1.75;
  color: var(--ink);
  text-align: start;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-hyphens: none;
  hyphens: none;
  orphans: 2;
  widows: 2;
}
/* 끝 표시: 앞 블록 아래 여백 때문에 빈 쪽이 생기지 않게 위로 당긴다 */
.rd-end { display: block; height: 0; margin: -1em 0 0; padding: 0; break-before: avoid; }

/* ── 장 본문 어휘(scripts/book-reflow.py) ── */
.rd-ch > :first-child,
.rd-ch .bx-row > :first-child { margin-top: 0; }
.rd-ch p { margin: 0 0 0.95em; }
.rd-ch p.tight { margin-top: -0.75em; }
.rd-ch p.c { text-align: center; }
.rd-ch p.r { text-align: right; }
.rd-ch p.li { padding-left: 1.35em; text-indent: -1.35em; margin-bottom: 0.45em; }
.rd-ch p.li.c { padding-left: 0; text-indent: 0; }
.rd-ch p.li + p:not(.li) { margin-top: 0.7em; }
.rd-ch p.note { color: var(--ink-2); font-size: 0.94em; padding-left: 1.2em; text-indent: -1.2em; }
.rd-ch p.sm { font-size: 0.88em; color: var(--muted); line-height: 1.6; }
.rd-ch p.lg { font-size: 1.1em; }
.rd-ch p.xl { font-size: 1.28em; font-weight: 700; line-height: 1.5; }
.rd-ch b, .rd-ch strong { font-weight: 700; }
.rd-ch u { text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; }
.rd-ch i { font-style: italic; }
.k-red { color: var(--k-red); }
.k-orange { color: var(--k-orange); }
.k-gold { color: var(--k-gold); }
.k-green { color: var(--k-green); }
.k-blue { color: var(--k-blue); }
.k-purple { color: var(--k-purple); }
.k-gray { color: var(--k-gray); }

/* 장 첫머리 */
.rd-ch .opener {
  margin: 0 0 2.2em;
  padding-top: calc(var(--ch, 600px) * 0.16);
  break-after: avoid;
}
.rd-ch .opener::before {
  content: '';
  display: block;
  width: 2.2em;
  height: 3px;
  margin-bottom: 1.1em;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.8;
}
.rd-ch .t-part {
  margin: 0;
  font-size: 1.62em;
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.rd-ch .t-sub {
  margin: 0.65em 0 0;
  font-size: 1.04em;
  line-height: 1.6;
  color: var(--ink-2);
}
.rd-ch h3,
.rd-ch h4,
.rd-ch h5 {
  break-after: avoid;
  break-inside: avoid;
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.rd-ch h3 { margin: 1.7em 0 0.7em; font-size: 1.22em; font-weight: 800; }
.rd-ch h4 { margin: 1.4em 0 0.55em; font-size: 1.08em; font-weight: 700; }
.rd-ch h5 { margin: 1.1em 0 0.45em; font-size: 1em; font-weight: 700; }

/* 상자 */
.rd-ch .bx {
  margin: 1.1em 0 1.3em;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.rd-ch .bx-row {
  padding: 0.85em 0.95em 0.15em;
  border-top: 1px solid var(--line);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.rd-ch .bx-row:first-child { border-top: 0; }
.rd-ch .bx-row.sh { background: var(--shade); padding-bottom: 0.25em; }
.rd-ch .bx-row.sh:first-child { border-radius: 11px 11px 0 0; }
.rd-ch .bx-row p { margin-bottom: 0.7em; }
.rd-ch .bx-row p.tight { margin-top: -0.5em; }
.rd-ch .bx h5:first-child { margin-top: 0; }

/* 대화(카톡 말풍선) */
.rd-ch .dlg { margin: 0.9em 0 1.2em; }
.rd-ch .msg {
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 84%;
  margin: 0 0 0.55em;
  padding: 0.55em 0.85em;
  border-radius: 16px;
  line-height: 1.6;
  break-inside: avoid;
  text-indent: 0;
}
.rd-ch .msg.you { background: var(--you); border-top-left-radius: 5px; }
.rd-ch .msg.me { margin-left: auto; background: var(--me); color: var(--me-ink); border-top-right-radius: 5px; }
.rd-ch .msg .who {
  display: block;
  margin-bottom: 0.1em;
  font-size: max(12px, 0.78em);
  font-weight: 700;
  color: var(--muted);
}
.rd-ch .msg.me .who { display: none; }
.rd-ch p.say {
  width: -webkit-fit-content;
  width: fit-content;
  max-width: 90%;
  padding: 0.6em 0.95em;
  border-radius: 16px;
  border-top-left-radius: 5px;
  background: var(--you);
  line-height: 1.6;
  break-inside: avoid;
}
.rd-ch p.say.c { margin-left: auto; margin-right: auto; border-top-left-radius: 16px; }

/* 그림 */
.rd-ch .fig {
  margin: 0.9em 0 1.1em;
  text-align: center;
  break-inside: avoid;
}
.rd-ch .fig-box {
  position: relative;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 6px;
  background: var(--soft);
  overflow: hidden;
}
.rd-ch .fig-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
/* 그림 크게 보기 단추(오른쪽 위, 누르는 영역 44px) */
.rd-ch .rd-figzoom {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.rd-ch .rd-figzoom::before {
  content: '';
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 17px no-repeat;
}
.rd-ch .fig.loading .rd-figzoom,
.rd-ch .fig.error .rd-figzoom { display: none; }
.rd-ch .fig.loading .fig-box::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--line-2);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: rd-spin 0.8s linear infinite;
}
.rd-ch .fig.error .fig-box::after {
  content: '그림을 불러오지 못했어요';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}
.rd-ch .fig figcaption {
  margin-top: 0.5em;
  font-size: max(12px, 0.86em);
  line-height: 1.55;
  color: var(--muted);
}
.rd-ch .fig.fig-page {
  margin: 0;
  break-before: column;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.rd-ch .fig.fig-page:first-child { break-before: auto; }
.rd-ch .fig.fig-page .fig-box { flex: none; }
.rd-ch hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
.rd-ch .rd-more { margin-top: 1.6em; color: var(--muted); font-size: 0.92em; text-align: center; }
.rd-hl {
  position: absolute;
  z-index: 1;
  background: rgba(255, 214, 10, 0.45);
  border-radius: 3px;
  pointer-events: none;
  transition: opacity 0.6s;
}

/* 한 쪽짜리 안내(불러오는 중·본문 열기·미리보기 끝·다시 시도) */
.rd-ph {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}
.rd-ph .rd-spin {
  width: 26px;
  height: 26px;
  border: 2px solid var(--line-2);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: rd-spin 0.8s linear infinite;
}
@keyframes rd-spin { to { transform: rotate(360deg); } }
.rd-card {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 24px 20px 18px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.rd-card strong { font-size: 19px; color: var(--ink); line-height: 1.45; }
.rd-card p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.rd-card .rd-primary { width: 100%; margin-top: 6px; }

/* ── 상·하단 막대(가운데 탭으로 숨김/보임) ── */
.rd-bar {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bar);
  padding-left: max(4px, env(safe-area-inset-left));
  padding-right: max(4px, env(safe-area-inset-right));
  transition: opacity 0.18s ease, transform 0.18s ease;
  touch-action: manipulation;
}
.rd-top { top: 0; min-height: 52px; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); }
.rd-bottom {
  bottom: 0;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  gap: 10px;
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right));
}
.rd.bars-off .rd-top { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.rd.bars-off .rd-bottom { opacity: 0; transform: translateY(10px); pointer-events: none; }
.rd-title {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.rd-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4cc;
  color: #7a5b00;
  font-size: 12px;
  font-weight: 700;
  vertical-align: 1px;
}
.rd-btn {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.rd-btn:active { background: var(--soft); }
.rd-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rd-back { font-size: 30px; line-height: 1; padding-bottom: 4px; }
.rd-aa { font-weight: 700; font-size: 16px; }
.rd-pageno, .rd-pct {
  flex: none;
  min-width: 52px;
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rd-pct { text-align: right; min-width: 40px; }
.rd-slider {
  flex: 1;
  min-width: 0;
  height: 44px;
  margin: 0;
  background: transparent;
  accent-color: var(--ink);
  touch-action: none;
  cursor: pointer;
}

/* 글자·화면 색 설정 */
.rd-settings {
  position: absolute;
  z-index: 5;
  top: calc(56px + env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  width: min(92vw, 340px);
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--bar);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  touch-action: manipulation;
}
.rd-set-row { display: flex; align-items: center; gap: 6px; }
.rd-set-label { flex: 1; font-size: 14px; color: var(--ink-2); }
.rd-fs { border: 1px solid var(--line-2); min-width: 52px; font-weight: 700; }
.rd-fs-val { min-width: 44px; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.rd-theme {
  min-width: 64px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.rd-theme[data-theme-set='light'] { background: #fff; color: #1d1d1f; }
.rd-theme[data-theme-set='sepia'] { background: #f6efe2; color: #3a2f22; }
.rd-theme[data-theme-set='dark'] { background: #17171a; color: #e4e4e7; }
.rd-theme.on { outline: 2px solid var(--accent); outline-offset: 1px; font-weight: 700; }

/* 서랍(목차·검색) */
.rd-dim { position: absolute; inset: 0; z-index: 6; background: rgba(0, 0, 0, 0.38); }
.rd-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  width: min(88vw, 400px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.22);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-right: env(safe-area-inset-right);
  touch-action: manipulation;
}
.rd-drawer-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 0 4px 0 8px; }
.rd-tabs { display: flex; }
.rd-tabs button {
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
}
.rd-tabs button.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.rd-toc,
.rd-search { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.rd-toc ul,
.rd-results { list-style: none; margin: 0; padding: 0; }
.rd-toc button,
.rd-results button {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.rd-toc button { display: flex; justify-content: space-between; align-items: center; gap: 12px; line-height: 1.45; }
.rd-toc li.l2 button { min-height: 46px; padding-left: 32px; font-size: 14px; color: var(--ink-2); }
.rd-toc-title { flex: 1; word-break: keep-all; }
.rd-toc-side { flex: none; color: var(--muted); font-size: 13px; }
.rd-toc button.locked { color: var(--muted); }
.rd-toc li.on > button { background: var(--soft); font-weight: 700; color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.rd-toc .rd-empty { padding: 16px; color: var(--muted); }
.rd-search-form { display: flex; gap: 8px; padding: 12px 16px 4px; }
.rd-search-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  -webkit-user-select: text;
  user-select: text;
}
.rd-search-form button { min-width: 64px; min-height: 48px; border: 0; border-radius: 10px; background: var(--ink); color: var(--bg); font: inherit; font-weight: 600; }
.rd-search-msg { margin: 6px 16px; color: var(--muted); font-size: 13px; min-height: 18px; }
.rd-search-msg .rd-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--accent); text-decoration: underline; cursor: pointer; }
.rd-results button { display: flex; flex-direction: column; gap: 4px; line-height: 1.55; }
.rd-results b { font-size: 13px; color: var(--muted); font-weight: 600; }
.rd-results mark { background: #ffe58a; color: #1d1d1f; border-radius: 2px; }

/* 그림 크게 보기 */
.rd-zoom {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: #0d0d0f;
  touch-action: none;
}
.rd-zoom-stage { position: absolute; inset: 0; overflow: hidden; }
.rd-zoom-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; }
.rd-zoom-bar {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
}
.rd-zoom-bar .rd-btn { min-width: 48px; min-height: 48px; border-radius: 24px; background: rgba(40, 40, 44, 0.9); color: #fff; font-size: 20px; }

/* 공통 버튼 */
.rd-primary,
.rd-secondary {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.rd-primary { border: 0; background: var(--ink); color: var(--bg); }
.rd-secondary { border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); }
.rd-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--muted); font-size: 14px; padding: 0 10px; }

/* 안내창·토스트 */
.rd-modal {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  touch-action: manipulation;
}
.rd-modal-box { width: 100%; max-width: 400px; box-sizing: border-box; padding: 24px 20px 16px; border-radius: 16px; background: var(--bg); color: var(--ink); }
.rd-modal-box h2 { margin: 0 0 8px; font-size: 18px; }
.rd-modal-box p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; word-break: keep-all; }
.rd-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.rd-toast {
  position: absolute;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  width: max-content;
  max-width: min(92vw, 480px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 16px;
  border-radius: 12px;
  background: rgba(28, 28, 30, 0.94);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
  touch-action: manipulation;
}
.rd-toast button { flex: none; min-height: 44px; border: 0; background: none; color: #ffd60a; font: inherit; font-weight: 700; }
.rd-noscript { color: var(--ink); text-align: center; padding: 40px 20px; }

@media (min-width: 768px) {
  .rd-title { font-size: 16px; }
}

/* 인쇄 막기 */
.rd.rd-printing .rd-track,
.rd.rd-printing .rd-zoom { display: none; }
@media print {
  body * { display: none !important; }
  body::after { content: '이 화면은 인쇄할 수 없습니다.'; display: block; padding: 40px; font-size: 18px; }
}
