/* 전공 서재의 책. 색은 ONORA LAB의 틀(template.html)과 맞춥니다. */
.study { --body: 1.0625rem; --small: .875rem; --title: 1.5rem; --space: 16px; --gap: 24px; --pill: 999px; --text: #162d28; --muted: #52665e; --accent: #174539; --on-accent: #fff; --soft: #e8eee3; --surface: #fffefa; --line: #d6ddd2; --mint: #dfeadf; --warning: #7a5a17; --s0: #2a66d9; --s1: #c9551f; --paper: #fdfbf4; --ink: #22302b; --edge: #d8d0bb; --gilt: #e3dca9; --book: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif; color: var(--text); font-size: var(--body); line-height: 1.75; }
.study p, .study li, .study dd { color: inherit; }
.study a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.study h2, .study h3 { letter-spacing: -.01em; }
.study .tag { display: block; color: var(--muted); font-size: var(--small); font-weight: 400; letter-spacing: 0; text-transform: none; }
.study .cover { background: linear-gradient(90deg, rgb(0 0 0 / .35), transparent 26px), hsl(var(--h) 38% 24%) !important; color: var(--gilt); }
.study .cover p { color: inherit; }
.study .formula { padding: 0; border: 0; border-radius: 0; color: inherit; font-size: inherit; line-height: inherit; }
.choices {
  display: grid;
  gap: 8px;
}

.choice {
  min-height: 52px;
  padding: 8px var(--space);
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.sim label {
  display: flex;
  justify-content: space-between;
  gap: var(--space);
}

.sim output {
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sim input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--accent);
}

.sim dl {
  margin: var(--space) 0 0;
}

.sim dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space);
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.sim dd {
  margin: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cover .field { display: block; min-height: 0; padding: 0; border: 0; color: inherit; letter-spacing: 0.1em; }
.cover-title { margin-inline: 24px; font-size: 2.125rem; text-wrap: balance; }
.scene { contain: layout paint style; }
.scene svg { display: block; width: 100%; max-width: 440px; margin: 0 auto; aspect-ratio: 400 / 240; }
.scene text { fill: var(--text); font-size: 14px; text-anchor: middle; }
.scene text.m { fill: var(--muted); font-size: 13px; } .scene text.b { font-weight: 700; } .scene text.ion { fill: var(--text); font-size: 16px; }
.scene .f0 { fill: var(--s0); } .scene .f1 { fill: var(--s1); } .scene .soft { fill-opacity: 0.28; }
.scene .box { fill: none; stroke: var(--muted); } .scene .ln { stroke: var(--muted); } .scene .ln0 { fill: none; stroke: var(--s0); stroke-width: 3; stroke-linejoin: round; } .scene .hi { stroke: var(--text); stroke-width: 2; stroke-dasharray: 5 4; }
.scene .thin { stroke-width: 1.6; } .scene .ln1 { stroke: var(--s1); stroke-width: 1.6; }
.scene .ar0 { stroke: var(--s0); marker-end: url(#h0); } .scene .ar1 { stroke: var(--s1); marker-end: url(#h1); }
.mission { margin-bottom: 18px; padding: 14px; border: 1px solid var(--edge); border-radius: 8px; background: var(--surface); }
.mission .q { font-weight: 700; } .mission .choices { display: grid; gap: 6px; }
.flow .mission .choice { border: 1px solid var(--muted); background: transparent; font-size: 1rem; }
.mission .picked { border-width: 2px; border-color: var(--s1); } .mission .right { border-width: 2px; border-color: var(--s0); font-weight: 700; } .mission .right::after { content: " ○ 이론의 답"; color: var(--s0); }
.mission .verdict { margin-top: 12px; font-weight: 700; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; break-inside: avoid; } .pair.one { grid-template-columns: 1fr; } .pair p { margin: 0 !important; text-align: center; } .pair .value { font-size: 1rem; font-weight: 700; } .pair .scene text { font-size: 19px; } .pair .scene text.m { font-size: 17px; } .pair.one .scene text { font-size: 14px; }
.mission .why { margin-top: 10px !important; }
@media (max-width: 480px) { .pair { grid-template-columns: 1fr; } .pair .scene text { font-size: 14px; } .pair .scene text.m { font-size: 13px; } }

/* 전공 서재: 책 */
.tome { --per: 1; --pad: 28px; position: relative; max-width: 620px; height: calc(100vh - 190px); min-height: 520px; margin: 0 auto; padding: 48px var(--pad) 44px; border: 1px solid var(--edge); border-radius: 4px 10px 10px 4px; background: var(--paper); color: var(--ink); box-shadow: 0 2px 0 var(--edge), 0 4px 0 var(--paper), 0 5px 0 var(--edge), 0 14px 32px rgb(0 0 0 / 0.18); font-family: var(--book); }
.flow { height: 100%; overflow: hidden; columns: 1; column-gap: calc(var(--pad) * 2); column-fill: auto; overscroll-behavior: contain; }
.run { position: absolute; left: var(--pad); right: var(--pad); display: flex; justify-content: space-between; color: var(--muted); font-size: var(--small); line-height: 20px; }
.run.top { top: 16px; } .run.bottom { bottom: 12px; }
.tome .run.bottom { justify-content: center; }
.chapter, .part, .leaf { break-before: column; }
#preface { break-before: auto; }
.part, .cover { display: flex; flex-direction: column; justify-content: center; text-align: center; break-inside: avoid; }
.ready .part { height: 100%; }
.ready:not(.scroll) .cover { display: none; }
.ready:not(.scroll) .at-cover .cover { position: absolute; inset: 0; z-index: 1; display: flex; border: 10px double var(--gilt); border-radius: inherit; background: linear-gradient(90deg, rgb(0 0 0 / 0.35), transparent 26px), var(--cover); color: var(--gilt); cursor: pointer; }
.ready:not(.scroll) .at-cover .flow { visibility: hidden; }
.flow h2 { margin: 0 0 12px; font-size: 1.625rem; }
.flow h3 { margin: 26px 0 8px; font-size: 1.125rem; break-after: avoid; }
.flow p { margin: 0 0 10px; orphans: 2; widows: 2; }
.flow .body p { text-align: justify; text-indent: 1em; line-height: 1.85; }
.no { margin: 0 0 4px; color: var(--accent); font-size: var(--small); font-weight: 700; letter-spacing: 0.08em; }
.one { padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--soft); font-weight: 700; break-inside: avoid; }
.miss, .formula, .work, .ask { break-inside: avoid; }
.like { padding: 16px 18px; border-radius: 8px; background: color-mix(in srgb, var(--mint) 55%, transparent); }
.flow .like p, .flow .one p { margin: 0; }
.formula ul { margin: 0; padding: 14px 18px; border: 1px solid var(--edge); list-style: none; text-align: center; }
.formula li { margin: 4px 0; }
.formula p { margin-top: 8px; font-size: 1rem; }
.work ol { margin: 0; padding-left: 1.4em; }
.work .q { font-weight: 700; }
.miss dl, .miss dd { margin: 0; }
.miss dt { font-weight: 700; }
.miss dt::before { content: "✗ "; color: var(--s1); }
.miss dd::before { content: "○ "; color: var(--accent); }
.ask summary { min-height: 44px; padding: 8px 0; color: var(--accent); cursor: pointer; }
.refs { font-size: var(--small); }
.refs li { margin: 4px 0; }
.flow .sim { padding: 0; border: 0; background: none; }
.sim-part { padding: 12px 14px; border: 1px solid var(--edge); border-radius: 8px; background: var(--surface); font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; font-size: 1rem; break-inside: avoid; }
.sim-part + .sim-part { margin-top: 10px; }
.sim-part .tag { margin: 0 0 4px; }
.flow .sim input { height: 44px; }
.flow .sim dl { margin-top: 4px; } .flow .sim dl div { padding: 5px 0; }
.sim label output { white-space: nowrap; }
.plot { position: relative; }
.plot { contain: layout paint style; }
.plot svg { display: block; width: 100%; height: 250px; touch-action: pan-y; }
.ax { fill: var(--muted); font-size: 13px; }
.grid { stroke: var(--line); }
.now { stroke: var(--muted); stroke-dasharray: 4 4; }
.cross { stroke: var(--muted); pointer-events: none; }
.s { fill: none; stroke-width: 2; stroke-linejoin: round; }
.s0 { stroke: var(--s0); } .s1 { stroke: var(--s1); stroke-dasharray: 8 4; }
.d { stroke: var(--surface); stroke-width: 2; pointer-events: none; } .d0 { fill: var(--s0); } .d1 { fill: var(--s1); }
.tip { position: absolute; top: 8px; max-width: 70%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: var(--small); line-height: 1.5; pointer-events: none; }
.flow .legend { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 4px 0 0; padding: 0; list-style: none; font-size: var(--small); }
.legend li::before { content: ""; display: inline-block; width: 24px; margin-right: 8px; border-top: 3px solid var(--s0); vertical-align: middle; }
.legend .k1::before { border-top: 3px dashed var(--s1); }
.flow .sim summary { min-height: 44px; padding: 8px 0; cursor: pointer; }
.flow table { width: 100%; border-collapse: collapse; font-size: var(--small); font-variant-numeric: tabular-nums; }
.flow th, .flow td { padding: 3px; border-top: 1px solid var(--line); text-align: right; }
.cover .mark { width: 88px; margin: 0 auto 20px; color: var(--accent); }
.cover-title { margin: 0; font-size: 2.75rem; }
.cover .by { margin-top: 40px; letter-spacing: 0.2em; }
.cover p { margin-inline: 24px; text-wrap: balance; }
.ready .at-cover .cover .mark { color: var(--gilt); }
.part .no { font-size: 1rem; }
.part h2 { font-size: 2.25rem; }
.contents { margin: 0; padding: 0; list-style: none; }
.contents li { break-inside: avoid; }
.contents .area { margin-top: 12px; color: var(--accent); font-weight: 700; break-after: avoid; }
.contents a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: inherit; text-decoration: none; line-height: 1.4; }
.contents a::after { content: ""; order: 1; flex: 1; min-width: 12px; border-bottom: 2px dotted var(--edge); }
.contents a b { order: 2; color: var(--muted); font-weight: 400; }
.bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; max-width: 1160px; margin: 20px auto 0; }
.bar[hidden] { display: none; }
.bar button { min-height: 44px; padding: 0 18px; border: 1px solid var(--muted); border-radius: var(--pill); background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; cursor: pointer; }
.bar button:disabled { opacity: 0.4; cursor: default; }
.bar input { flex: 1 1 120px; max-width: 320px; height: 44px; accent-color: var(--accent); }
.bar output { min-width: 6em; text-align: center; font-size: var(--small); }
.scroll .tome, body:not(.ready) .tome { height: auto; padding-block: var(--pad); } .scroll .flow, body:not(.ready) .flow { height: auto; columns: auto; overflow: visible; } .scroll .run, body:not(.ready) .run { display: none; }
.scroll .chapter, .scroll .part, .scroll .leaf, body:not(.ready) .chapter { margin-top: 56px; } .scroll .part, .scroll .cover, body:not(.ready) .cover { height: auto; min-height: 220px; }
.scroll #prev, .scroll #next, .scroll #slide, .scroll #at { display: none; }
.turn-f .flow { animation: turnf 0.28s ease-out; } .turn-b .flow { animation: turnb 0.28s ease-out; }
@keyframes turnf { from { opacity: 0.2; transform: translateX(28px); } } @keyframes turnb { from { opacity: 0.2; transform: translateX(-28px); } }
@media (min-width: 1040px) {
  .tome { --per: 2; --pad: 52px; max-width: 1160px; padding: 60px var(--pad) 56px; border-radius: 10px; }
  .ready:not(.scroll) .flow { columns: 2; }
  .ready:not(.scroll) .tome:not(.at-cover)::before { content: ""; position: absolute; inset: 0 calc(50% - 40px); background: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.13) 50%, transparent); pointer-events: none; }
  .tome .run.bottom { justify-content: space-between; }
  .ready:not(.scroll) .at-cover .cover { inset: -1px 25%; }
  .ready:not(.scroll) .tome.at-cover { border-color: transparent; background: none; box-shadow: none; }
  .ready:not(.scroll) .at-cover .cover { box-shadow: 0 14px 32px rgb(0 0 0 / 0.3); }
  .scroll .tome { max-width: 760px; }
}
.run span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .tome { --pad: 18px; } #head-l { display: none; }  .flow p, .flow li, .flow dd { font-size: 1.0625rem; } }

.mission { break-inside: avoid; }
.look { break-inside: avoid; }
.mission [hidden] { display: none; }
.mission .verdict { margin: 8px 0 0; }
.mission .verdict.right { color: var(--s0); border: 0; }
.mission .verdict.right::after { content: ""; }
.flow .mission .again { margin-top: 4px; }
.flow .terms { display: block; margin: 0; padding-left: 1.2em; font-size: 1rem; }

.flow .evidence { margin: 0 0 12px; padding: 4px 18px 14px; background: transparent; break-inside: avoid; }
.flow .evidence h3 { margin-top: 12px; }
.flow .kin { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--edge); }
.flow .kin a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; border-bottom: 1px solid var(--edge); line-height: 1.4; }

.cover-title { font-family: var(--book); font-weight: 700; line-height: 1.4; }
.study .contents a, .study .kin a { color: inherit; text-decoration: none; }
.study .tome { height: calc(100vh - 290px); min-height: 520px; }
.study button:disabled { opacity: .45; }
@media (max-width: 760px) { .study { display: flex; flex-direction: column; margin-inline: -8px; } .study .tome { width: 100%; } .study .bar { order: -1; margin: 0 8px 12px; } .study .tome { height: calc(100svh - 250px); } .flow p, .flow li, .flow dd { font-size: 1rem; } }
/* 이어서 보기에서는 책의 높이를 글의 길이에 맞춥니다. */
.scroll .study .tome, body:not(.ready) .study .tome { height: auto; }
@media print { header, footer, .tabbar, .bar, .run { display: none !important; } .tome { height: auto !important; max-width: none !important; border: 0; box-shadow: none; padding: 0 !important; } .flow { height: auto !important; columns: auto !important; overflow: visible !important; } .chapter, .leaf { break-before: page; } }
