/* 갓생 — 인쇄 페이지 (기록용 시트 · 출력용 리포트)
   화면: 먹빛 서안(書案) 위에 A4 종이 미리보기 + 도구 막대
   인쇄: 종이만, A4 세로, 잉크를 아끼는 선 위주 */
:root {
  color-scheme: dark;
  --desk: #100e0b;
  --desk-2: #1a1713;
  --desk-ink: #f2ebdd;
  --desk-muted: rgba(242, 235, 221, .58);
  --desk-line: rgba(255, 255, 255, .1);
  --ember: #a8261a;
  --ember-2: #c0402a;
  --amber: #c9a24e;

  /* 종이 */
  --ink: #17140f;
  --ink-2: #3a342c;
  --gray: #6e665a;
  --rule: #9c9486;
  --rule-2: #cbc4b6;
  --rule-3: #e6e0d4;
  --acc: #a3261c;
  --acc-soft: #f5e2da;
  --h0: #efebe3;
  --h1: #f1d7cc;
  --h2: #dfa794;
  --h3: #c46a52;
  --h4: #a3261c;
  --h5: #5e140d;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --num: "Hahmlet", "Nanum Myeongjo", "AppleMyungjo", serif;
  --serif: "Hahmlet", "Nanum Myeongjo", "AppleMyungjo", serif;
  --brush: "Song Myung", "Hahmlet", serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root:not([data-theme="light"]) { color-scheme: dark; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --desk: #0c0b09; } }
body.mono {
  --acc: #141414;
  --acc-soft: #ececec;
  --h1: #e6e6e6; --h2: #c4c4c4; --h3: #9a9a9a; --h4: #5e5e5e; --h5: #222;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--desk); }
body {
  font-family: var(--sans); color: var(--desk-ink); min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(900px 500px at 50% -120px, rgba(168, 38, 26, .2), transparent 70%),
    var(--desk);
  -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

/* ───── 도구 막대 ───── */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(16, 14, 11, .86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--desk-line); }
.bar-in { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 8px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--desk-ink); box-shadow: inset 0 0 0 1px var(--desk-line); white-space: nowrap; }
.back:hover { background: rgba(255, 255, 255, .06); }
.back svg.mark { width: 20px; height: 20px; }
.bar h1 { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.bar h1 small { display: block; font-size: 12px; font-weight: 500; color: var(--desk-muted); letter-spacing: 0; }
.ctrls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; order: 3; width: 100%; }
.go { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 13px; font-weight: 800; font-size: 15px; color: #fbf3e4; white-space: nowrap;
  background: linear-gradient(160deg, #b8321f, #7f1a13); box-shadow: 0 10px 24px -12px rgba(168, 38, 26, .9), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(201, 162, 78, .35); transition: transform .2s var(--ease); }
.go:hover { transform: translateY(-1px); }
.go:active { transform: scale(.97); }
@media (min-width: 900px) { .ctrls { order: 0; width: auto; margin-left: 12px; } }

.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--desk-line); }
.seg button { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--desk-muted); white-space: nowrap; transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--desk-ink); color: #111; }
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager button { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--desk-line); }
.pager button:hover { background: rgba(255, 255, 255, .06); }
.pager span { min-width: 92px; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tog { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 8px; border-radius: 11px; font-size: 13px; font-weight: 650; color: var(--desk-muted); box-shadow: inset 0 0 0 1px var(--desk-line); white-space: nowrap; }
.tog i { width: 30px; height: 18px; border-radius: 99px; background: rgba(255, 255, 255, .14); position: relative; transition: background .2s; }
.tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.tog[aria-pressed="true"] { color: var(--desk-ink); }
.tog[aria-pressed="true"] i { background: var(--ember); }
.tog[aria-pressed="true"] i::after { transform: translateX(12px); }

.tip { max-width: 1120px; margin: 14px auto 0; padding: 0 16px; display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--desk-muted); line-height: 1.55; }
.tip b { color: var(--desk-ink); font-weight: 650; }

/* ───── 종이 미리보기 ───── */
.desk { padding: 18px 16px 56px; display: grid; justify-items: center; }
.sheet-wrap { width: 210mm; transform-origin: top center; }
.paper {
  width: 210mm; min-height: 297mm; padding: 10mm 11mm; background: #fff; color: var(--ink);
  font-size: 9pt; line-height: 1.4; border-radius: 3px; position: relative;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 30px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  animation: paperIn .7s var(--ease) both;
}
@keyframes paperIn { from { opacity: 0; transform: translateY(24px) scale(.985); } }
.page-foot { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; font-size: 12.5px; color: var(--desk-muted); text-align: center; line-height: 1.7; }
.page-foot a { color: var(--desk-ink); text-underline-offset: 3px; }

.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* 종이 머리 */
.ph { display: flex; align-items: flex-end; gap: 6mm; padding-bottom: 3.2mm; border-bottom: .6mm solid var(--ink); }
.ph-l { display: flex; align-items: center; gap: 3mm; min-width: 0; }
.ph-l svg { width: 11mm; height: 11mm; flex: none; }
.kicker { display: block; font-family: var(--num); font-weight: 700; font-size: 6.6pt; letter-spacing: .22em; color: var(--gray); }
.ph h1 { font-family: var(--serif); font-size: 19pt; font-weight: 700; letter-spacing: -.03em; line-height: 1.12; }
.ph-r { margin-left: auto; display: flex; align-items: flex-end; gap: 6mm; text-align: right; }
.ph-range b { display: block; font-family: var(--num); font-weight: 800; font-size: 15pt; letter-spacing: -.02em; line-height: 1; }
.ph-range span { font-size: 7.5pt; color: var(--gray); }
.ph-range .blank { display: inline-block; width: 30mm; border-bottom: .25mm solid var(--rule); height: 6mm; }
.ph-goal { display: flex; align-items: baseline; gap: 1mm; padding: 1.6mm 3mm; border: .3mm solid var(--ink); border-radius: 2mm; }
.ph-goal span { font-size: 7.5pt; color: var(--ink-2); }
.ph-goal b { font-family: var(--num); font-weight: 800; font-size: 14pt; line-height: 1; }
.howto { margin: 2.6mm 0 3mm; font-size: 7.6pt; color: var(--ink-2); display: flex; gap: 2mm; align-items: baseline; }
.howto b { color: var(--ink); }
.howto i { display: inline-block; width: 2.6mm; height: 2.6mm; border: .25mm solid var(--ink); border-radius: .6mm; vertical-align: -.3mm; }

/* ───── 기록용 시트 표 ───── */
.grid { width: 100%; border-collapse: collapse; table-layout: fixed; --rh: 9mm; }
.grid col.c-name { width: 47mm; }
.grid col.c-n { width: 13mm; }
.grid th, .grid td { border: .2mm solid var(--rule-2); padding: 0; vertical-align: middle; }
.grid thead th { height: 9mm; border-top: 0; border-left: 0; border-right: 0; border-bottom: .35mm solid var(--ink); font-weight: 700; font-size: 8pt; text-align: center; }
.grid thead th.c-name { text-align: left; font-size: 7pt; color: var(--gray); font-weight: 600; letter-spacing: .02em; }
.grid thead th b { display: block; font-family: var(--num); font-weight: 800; font-size: 11pt; line-height: 1.05; }
.grid thead th.we b, .grid thead th.we { color: var(--ink-2); }
.grid thead th .bl { display: block; margin: .6mm auto 0; width: 8mm; height: 4.6mm; border-bottom: .25mm solid var(--rule); }
.grid tbody th { text-align: left; font-weight: 600; padding: 0 2mm; border-left: 0; }
.grid tbody td:last-child { border-right: 0; }
.grid tbody tr { height: var(--rh); break-inside: avoid; }
.grid .nm { display: block; font-size: 8.6pt; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid tbody th small { display: block; font-size: 6.4pt; color: var(--gray); font-weight: 500; }
.cell { position: relative; text-align: center; }
.cell .bx { display: inline-block; width: 4.6mm; height: 4.6mm; border: .3mm solid var(--ink); border-radius: 1mm; vertical-align: middle; }
.cell em { position: absolute; top: .5mm; right: .9mm; font-style: normal; font-family: var(--num); font-weight: 700; font-size: 5.8pt; color: var(--gray); line-height: 1; }
.cell.off { background: repeating-linear-gradient(135deg, transparent 0 1.6mm, var(--rule-3) 1.6mm 1.9mm); }
.cell.off span { font-size: 6pt; color: var(--rule); }
.cell .ln { display: inline-flex; align-items: flex-end; gap: .6mm; font-size: 6pt; color: var(--gray); }
.cell .ln i { display: inline-block; width: 7mm; border-bottom: .25mm solid var(--rule); height: 3.2mm; }
.c-n-td { text-align: right; padding-right: 1.6mm !important; font-size: 7pt; color: var(--gray); }
.c-n-td b { font-family: var(--num); font-weight: 700; color: var(--ink-2); }
.grid tr.spare th { color: var(--rule); font-weight: 400; }
.grid tr.spare th span { display: block; border-bottom: .25mm dotted var(--rule-2); height: 4.2mm; margin-right: 2mm; }
.grid tr.sec th { height: 7mm; padding-top: 2.4mm; border-left: 0; border-right: 0; border-top: 0; font-size: 7pt; font-weight: 700; letter-spacing: .02em; color: var(--ink); }
.grid tr.sec th span { color: var(--gray); font-weight: 500; }
.grid tr.sec { height: 7mm; }
.grid tbody.sum tr.score-r { height: 17mm; }
.grid tbody.sum tr.score-r th, .grid tbody.sum tr.score-r td { border-top: .35mm solid var(--ink); }
.grid tbody.sum th b { display: block; font-size: 9pt; }
.ring { width: 13.4mm; height: 13.4mm; display: block; margin: 0 auto; }
.ring .seg-a { fill: none; stroke: var(--rule-2); stroke-width: 2.6; }
.ring .g { stroke: var(--acc); stroke-width: 1.6; }
.mood { display: flex; justify-content: center; gap: 1.1mm; }
.mood i { width: 2.4mm; height: 2.4mm; border: .22mm solid var(--rule); border-radius: 50%; }
.grid tr.mood-r { height: 7mm; }
.grid tr.memo-r { height: 15mm; }
.grid tr.memo-r td { vertical-align: top; }
.memo-l { display: grid; gap: 4.4mm; padding: 4mm 1.4mm 0; }
.memo-l i { display: block; border-bottom: .2mm dotted var(--rule-2); }
.rest-tag { font-size: 6.4pt; color: var(--gray); }

.review { margin-top: 5mm; display: grid; grid-template-columns: 1fr 64mm; gap: 6mm; break-inside: avoid; }
.review h2 { font-family: var(--serif); font-size: 8.4pt; font-weight: 700; margin-bottom: 1mm; }
.lines { display: grid; }
.lines i { display: block; height: 7.4mm; border-bottom: .2mm solid var(--rule-2); }
.tally { display: grid; gap: 2.2mm; align-content: start; }
.tally div { display: flex; align-items: center; gap: 2mm; height: 10mm; padding: 0 3mm; border: .25mm solid var(--ink); border-radius: 2mm; font-size: 7.8pt; font-weight: 600; }
.tally div i { margin-left: auto; width: 16mm; border-bottom: .25mm solid var(--rule); height: 5mm; }
.tally div span { font-size: 7pt; color: var(--gray); font-weight: 500; }
.tally div.main { border-width: .45mm; }
.tally div.main i { width: 20mm; }
.pf { margin-top: 4mm; padding-top: 2.4mm; border-top: .2mm solid var(--rule-2); display: flex; justify-content: space-between; gap: 4mm; font-size: 6.6pt; color: var(--gray); }
.pf b { color: var(--ink); font-weight: 700; }

/* ───── 출력용 리포트 ───── */
.r-hero { display: grid; grid-template-columns: 1fr auto; gap: 6mm; align-items: center; margin-top: 3.5mm; }
.r-verdict { font-size: 12pt; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
.r-verdict small { display: block; font-size: 7.8pt; font-weight: 500; color: var(--gray); margin-top: 1mm; letter-spacing: 0; }
.r-score { position: relative; width: 27mm; height: 27mm; }
.r-score svg { width: 100%; height: 100%; display: block; }
.r-score .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.r-score .c b { font-family: var(--num); font-weight: 800; font-size: 21pt; line-height: .95; letter-spacing: -.04em; }
.r-score .c span { font-size: 6.8pt; color: var(--gray); margin-top: .8mm; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 3.5mm; border-top: .2mm solid var(--rule-2); border-bottom: .2mm solid var(--rule-2); }
.kpi { padding: 2.6mm 3mm; border-left: .2mm solid var(--rule-3); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi span { display: block; font-size: 6.8pt; color: var(--gray); font-weight: 600; }
.kpi b { font-family: var(--num); font-weight: 800; font-size: 15pt; line-height: 1.15; letter-spacing: -.02em; }
.kpi b small { font-family: var(--sans); font-size: 7.4pt; font-weight: 600; color: var(--ink-2); margin-left: .5mm; letter-spacing: 0; }
.kpi .d { font-size: 6.8pt; font-weight: 700; color: var(--ink-2); }
.r-sec { margin-top: 5mm; break-inside: avoid; }
.r-sec > h2 { display: flex; align-items: baseline; gap: 2mm; font-family: var(--serif); font-size: 9.4pt; font-weight: 700; letter-spacing: -.01em; padding-bottom: 1.6mm; margin-bottom: 2.4mm; border-bottom: .35mm solid var(--ink); }
.r-sec > h2 span { font-size: 7pt; font-weight: 500; color: var(--gray); }
.r-sec > h2 .end { margin-left: auto; }
.bars-svg { width: 100%; height: auto; display: block; }
.bars-svg .b { fill: var(--rule-2); }
.bars-svg .b.hit { fill: var(--ink); }
.bars-svg .b.pf { fill: var(--acc); }
.bars-svg .base { stroke: var(--ink); stroke-width: 1; }
.bars-svg .goal { stroke: var(--acc); stroke-width: 1; stroke-dasharray: 3 3; }
.bars-svg text { font-family: var(--num); font-size: 10px; fill: var(--ink-2); font-weight: 700; }
.bars-svg text.lb { font-family: var(--sans); font-weight: 600; fill: var(--gray); font-size: 9.5px; }
.bars-svg text.gl { fill: var(--acc); font-family: var(--sans); font-size: 9px; }
.bars-svg text.nd { fill: var(--rule); }
.cols { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 7mm; }
.cols > .r-sec { min-width: 0; }

.mx { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mx th, .mx td { height: 6mm; border-bottom: .2mm solid var(--rule-3); text-align: center; font-size: 7.4pt; }
.mx thead th { font-size: 6.8pt; color: var(--gray); font-weight: 600; height: 5mm; }
.mx tbody th { text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2mm; }
.mx td.pc { text-align: right; font-family: var(--num); font-weight: 700; }
.dot { display: inline-block; width: 3mm; height: 3mm; border-radius: 50%; vertical-align: middle; }
.dot.done { background: var(--ink); }
.dot.miss { border: .3mm solid var(--ink-2); }
.dot.off { width: 2mm; height: .3mm; border-radius: 0; background: var(--rule-2); }
.dot.future { width: 1mm; height: 1mm; background: var(--rule); }
.rate { display: grid; grid-template-columns: minmax(0, 1fr) 13mm; gap: .8mm 3mm; align-items: center; padding: 1.5mm 0; border-bottom: .2mm solid var(--rule-3); }
.rate b { font-weight: 600; font-size: 7.8pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate em { font-style: normal; text-align: right; font-family: var(--num); font-weight: 800; font-size: 8pt; }
.rate .tr { grid-column: 1; height: 1.6mm; border: .2mm solid var(--ink); border-radius: 1mm; overflow: hidden; }
.rate .tr i { display: block; height: 100%; background: var(--ink); }
.rate small { text-align: right; font-size: 6.4pt; color: var(--gray); }

.heat { width: 100%; max-width: 64mm; height: auto; display: block; }
.heat .l-2 { fill: none; }
.heat .l-1 { fill: none; stroke: var(--rule-3); stroke-width: .8; }
.heat .l0 { fill: var(--h0); }
.heat .l1 { fill: var(--h1); }
.heat .l2 { fill: var(--h2); }
.heat .l3 { fill: var(--h3); }
.heat .l4 { fill: var(--h4); }
.heat .l5 { fill: var(--h5); }
.heat .cur { stroke: var(--ink); stroke-width: 1.2; }
.heat text { font-family: var(--sans); font-size: 7px; fill: var(--gray); }
.heat-legend { display: flex; align-items: center; gap: 1mm; margin-top: 1.6mm; font-size: 6.4pt; color: var(--gray); }
.heat-legend i { width: 2.6mm; height: 2.6mm; border-radius: .5mm; }
.cal { width: 100%; border-collapse: separate; border-spacing: .9mm; table-layout: fixed; margin: -.9mm; width: calc(100% + 1.8mm); }
.cal th { font-size: 6.4pt; color: var(--gray); font-weight: 600; height: 4mm; }
.cal td { height: 9.6mm; border-radius: 1mm; vertical-align: top; padding: .7mm 1mm; position: relative; background: var(--h0); }
.cal td.out { background: none; }
.cal td.no { background: none; box-shadow: inset 0 0 0 .2mm var(--rule-3); }
.cal td.fu { background: none; box-shadow: inset 0 0 0 .2mm var(--rule-3); }
.cal td.l1 { background: var(--h1); } .cal td.l2 { background: var(--h2); } .cal td.l3 { background: var(--h3); }
.cal td.l4 { background: var(--h4); color: #fff; } .cal td.l5 { background: var(--h5); color: #fff; }
.cal td span { font-size: 6pt; font-weight: 600; opacity: .8; }
.cal td b { position: absolute; right: 1mm; bottom: .6mm; font-family: var(--num); font-weight: 800; font-size: 8pt; }
.ex { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4mm; margin-top: 1mm; }
.ex div { padding: 1.8mm 0; border-bottom: .2mm solid var(--rule-3); min-width: 0; }
.ex span { display: block; font-size: 6.8pt; color: var(--gray); font-weight: 600; }
.ex b { font-family: var(--num); font-weight: 800; font-size: 11pt; }
.ex small { display: block; font-size: 6.2pt; color: var(--gray); }
.hl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4mm; }
.hl div { padding: 2.6mm 3mm; border: .25mm solid var(--ink); border-radius: 2mm; min-width: 0; }
.hl div.k-best { border-width: .45mm; }
.hl span { display: block; font-size: 6.6pt; color: var(--gray); font-weight: 600; }
.hl b { display: block; font-family: var(--num); font-weight: 800; font-size: 13pt; line-height: 1.15; letter-spacing: -.02em; }
.hl small { display: block; font-size: 7pt; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.achs { display: flex; flex-wrap: wrap; gap: 3mm 5mm; }
.ach { display: flex; align-items: center; gap: 2.2mm; }
.ach svg { width: 10mm; height: 10mm; flex: none; }
.ach svg text { font-family: var(--num); font-weight: 800; fill: var(--ink); }
.ach b { display: block; font-size: 8pt; }
.ach small { display: block; font-size: 6.4pt; color: var(--gray); }
.notes { list-style: none; columns: 2; column-gap: 7mm; }
.notes li { break-inside: avoid; display: grid; grid-template-columns: 13mm 1fr; gap: 2mm; padding: 1.5mm 0; border-bottom: .2mm solid var(--rule-3); font-size: 7.8pt; }
.notes li span { font-size: 6.6pt; color: var(--gray); font-weight: 600; }
.notes li span b { display: block; font-family: var(--num); color: var(--ink); font-size: 8pt; }
.empty-p { margin-top: 30mm; text-align: center; }
.empty-p b { display: block; font-size: 16pt; font-weight: 800; letter-spacing: -.03em; }
.empty-p p { margin-top: 2mm; color: var(--gray); font-size: 9pt; }
.empty-p a { display: inline-block; margin-top: 6mm; padding: 2.4mm 5mm; border: .3mm solid var(--ink); border-radius: 2mm; text-decoration: none; font-weight: 700; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ───── 인쇄 ───── */
@page { size: A4 portrait; margin: 10mm 11mm; }
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] { color-scheme: light !important; }
  html, body { background: #fff !important; color: var(--ink); min-height: 0; }
  .bar, .tip, .page-foot, .no-print { display: none !important; }
  .desk { padding: 0; display: block; }
  .sheet-wrap { width: auto; transform: none !important; zoom: 1 !important; height: auto !important; }
  .paper { width: auto; min-height: 0; padding: 0; box-shadow: none; border-radius: 0; animation: none; }
  .r-sec, .review, .hl div, .notes li { break-inside: avoid; }
  .r-sec > h2 { break-after: avoid; }
}

/* 휴대폰: 도구 막대를 짧게 */
@media screen and (max-width: 899px) {
  .bar { position: static; }
  .bar h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media screen and (max-width: 559px) {
  .bar h1 small { display: none; }
  .go { padding: 0 14px; }
  .seg button { padding: 0 10px; }
}
