/* 1학기 복습 원정 */
:root {
  --bg: #f5f2ea; --paper: #fffdf8; --ink: #1d2433; --muted: #586174; --line: #ddd5c3; --soft: #efe9dc;
  --unit: #3b5bdb; --ok: #2b8a3e; --ok-bg: #ebfbee; --no: #c92a2a; --no-bg: #fff0f0; --gold: #f2b705;
  --r: 16px; --shadow: 0 2px 0 rgba(29, 36, 51, .08), 0 8px 24px rgba(29, 36, 51, .07);
  --head: 'Jua', system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; scroll-padding-bottom: 100px; } /* 채점 뒤 해설로 내려갈 때 위 머리줄·아래 단추 줄에 가리지 않게 */
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif; word-break: keep-all; overflow-wrap: anywhere; }
body[data-view=stage], body[data-view=boss], body[data-view=notes] { padding-bottom: 96px; }
body[data-view=stage] #hub-identity-status, body[data-view=boss] #hub-identity-status { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.3; margin: 0 0 .4em; letter-spacing: -.01em; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
#app { max-width: 1080px; margin: 0 auto; padding: 12px 16px 40px; outline: none; }
.loading { text-align: center; padding: 80px 0; color: var(--muted); }
.center { text-align: center; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.panel.inner { box-shadow: none; padding: 14px; margin-top: 12px; border-color: var(--unit); }
.kicker { margin: 0 0 4px; font-size: 14px; color: var(--muted); font-weight: 600; }
.note { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
.hint { font-size: 15px; color: var(--muted); margin: 4px 0 10px; }
.err { color: var(--no); font-size: 14px; }
.tb { display: inline-block; font-size: 13px; font-weight: 700; color: var(--unit); background: color-mix(in srgb, var(--unit) 10%, #fff); border: 1px solid color-mix(in srgb, var(--unit) 35%, #fff); border-radius: 999px; padding: 0 9px; white-space: nowrap; vertical-align: 1px; }
.medal { color: var(--gold); letter-spacing: 1px; white-space: nowrap; text-shadow: 0 1px 0 #9a7400; }
.medal i { color: #d7d0c0; font-style: normal; text-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.hearts { color: #e03131; letter-spacing: 2px; }
.hearts i { color: #d7d0c0; font-style: normal; }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; box-shadow: 0 3px 0 var(--ink); transition: transform .06s, box-shadow .06s; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--unit); border-color: var(--ink); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.small { min-height: 38px; padding: 4px 14px; font-size: 15px; box-shadow: 0 2px 0 var(--ink); }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--muted); font-size: 14px; }
:focus-visible { outline: 3px solid #f59f00; outline-offset: 2px; }

/* 첫 화면 */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: linear-gradient(135deg, #22305c, #3b5bdb 55%, #2f9e8f); color: #fff; border-radius: 22px; padding: 26px 26px; margin: 4px 0 14px; box-shadow: var(--shadow); }
.hero h1 { font-size: 40px; margin: 2px 0 6px; }
.hero p { margin: 0; }
.hero .kicker { color: #c9d6ff; }
.hero-me { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-radius: 16px; padding: 14px 18px; text-align: center; min-width: 230px; }
.hero-me .big { font-family: var(--head); font-size: 34px; }
.hero-me small { font-size: 18px; opacity: .8; }
.hero-me .note { color: #dfe6ff; max-width: 240px; }
.hero-me .btn { margin-top: 8px; background: #fff; color: #22305c; }
.rec { display: flex; align-items: center; gap: 12px; text-decoration: none; background: #fff6d6; border: 2px solid #f2b705; border-radius: 14px; padding: 12px 16px; margin-bottom: 14px; }
.rec span { font-size: 14px; font-weight: 700; color: #8a6500; white-space: nowrap; }
.rec b { flex: 1; }
.rec i { font-style: normal; font-size: 22px; }
.rec.done { display: block; text-align: center; }
.units { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ucard { display: flex; gap: 16px; align-items: center; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-left: 8px solid var(--c); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); transition: transform .1s; }
.ucard:hover { transform: translateY(-2px); }
.uicon { width: 84px; height: 84px; flex: none; }
.uicon svg { width: 100%; height: 100%; display: block; }
.uicon.big { width: 104px; height: 104px; }
.ubody { flex: 1; min-width: 0; }
.ubody h2 { font-size: 26px; margin: 0 0 6px; }
.un { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.umeta { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.badge { color: #fff; background: var(--c, var(--unit)); border-radius: 999px; padding: 0 8px; font-size: 13px; }
.bar { height: 12px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--unit)); border-radius: 999px; transition: width .4s; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 16px; }
.tool { display: flex; flex-direction: column; gap: 2px; text-align: left; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; cursor: pointer; }
.tool b { font-size: 17px; }
.tool span { font-size: 14px; color: var(--muted); }
.foot { text-align: center; font-size: 14px; color: var(--muted); margin-top: 22px; }

/* 위쪽 줄 */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); margin: -12px -16px 10px; padding: 10px 16px; border-bottom: 3px solid var(--unit); }
.top h1 { flex: 1; font-size: 23px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--ink); background: #fff; text-decoration: none; font-size: 22px; font-weight: 700; }
.top-r { flex: none; }

/* 단원 지도 */
.uhead { display: flex; gap: 18px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px; }
.uhead p { margin: 0 0 6px; }
.goals summary { cursor: pointer; font-weight: 700; color: var(--unit); }
.goals ul { margin: 6px 0 0; padding-left: 20px; }
.path { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.path::before { content: ''; position: absolute; left: 31px; top: 20px; bottom: 20px; width: 6px; border-radius: 3px; background: repeating-linear-gradient(var(--line) 0 12px, transparent 12px 20px); }
.node { position: relative; margin: 0 0 10px; }
.node > a, .node > div { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 10px 14px 10px 10px; }
.node > a:hover { border-color: var(--unit); }
.num { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: #fff; border: 3px solid var(--line); font-family: var(--head); font-size: 22px; z-index: 1; }
.node.done .num { background: var(--unit); border-color: var(--unit); color: #fff; }
.node.next > a { border-color: var(--unit); box-shadow: 0 0 0 4px color-mix(in srgb, var(--unit) 18%, transparent); }
.node.next .num { border-color: var(--unit); color: var(--unit); }
.nt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nt small { color: var(--muted); font-size: 13px; font-weight: 600; }
.nt b { font-size: 18px; }
.nm { flex: none; text-align: right; }
.nm em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--unit); }
.node.boss > a, .node.boss > div { background: linear-gradient(90deg, color-mix(in srgb, var(--unit) 14%, #fff), #fff); border-color: var(--unit); }
.node.boss .num { background: #fff8db; border-color: var(--gold); }
.node.locked > div { opacity: .7; border-style: dashed; }
.node.locked .nm em { color: var(--muted); }

/* 판 진행 */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); padding: 6px 4px; border-radius: 999px; background: var(--soft); counter-increment: s; }
.steps li::before { content: counter(s) '. '; }
.steps li.on { background: var(--unit); color: #fff; }
.stage { max-width: 980px; margin: 0 auto; }
.card h2 { font-size: 28px; }
.cnum { margin: 0 0 6px; color: var(--muted); font-weight: 700; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ctext { font-size: 20px; line-height: 1.75; margin: 10px 0 0; }
.ctext strong, .qq strong, .fb strong, .sheet strong { color: var(--unit); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--unit) 18%, transparent) 62%); }
.csvg, .qsvg { margin: 10px auto; max-width: 440px; }
.csvg svg, .qsvg svg { max-height: 300px; }
.csvg svg, .qsvg svg { width: 100%; height: auto; display: block; }

/* 아래 단추 줄 */
.actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 253, 248, .96); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(29, 36, 51, .08); }
.actions .btn { min-width: 150px; }

/* 실험 */
.lab { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.bench { position: sticky; top: 76px; padding: 12px; }
.simsvg svg { width: 100%; height: auto; display: block; border-radius: 10px; background: #fff; }
.cap { margin: 10px 4px 0; font-weight: 700; font-size: 17px; min-height: 1.6em; }
.benchbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.mission h2 { font-size: 22px; }
.ctrls { display: grid; gap: 10px; margin: 10px 0; }
.ctrl { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 10px; margin: 0; }
.ctrl legend { font-weight: 700; font-size: 15px; padding: 0 4px; }
.ctrl legend b { color: var(--unit); margin-left: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 16px; text-align: left; }
.chip.on, .chip[aria-pressed=true] { border-color: var(--unit); background: color-mix(in srgb, var(--unit) 12%, #fff); color: var(--ink); }
.rangerow { display: flex; align-items: center; gap: 8px; }
.rangerow input { flex: 1; min-width: 0; accent-color: var(--unit); height: 32px; }
.simsteps { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.simsteps li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--muted); }
.simsteps li > b { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--line); font-size: 14px; }
.simsteps li p { margin: 0; }
.simsteps li.on { background: #fff; border: 2px solid var(--unit); color: var(--ink); }
.simsteps li.on > b { border-color: var(--unit); color: var(--unit); }
.simsteps li.done { background: var(--ok-bg); color: var(--ink); }
.simsteps li.done > b { background: var(--ok); border-color: var(--ok); color: #fff; }
.need { font-size: 14px; margin-top: 6px !important; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.need span { border: 1px dashed var(--muted); border-radius: 999px; padding: 0 8px; background: #fff; }
.need span.met { border: 1px solid var(--ok); color: var(--ok); background: var(--ok-bg); }
.need span.met::before { content: '✔ '; }
.obs { font-size: 15px; margin-top: 4px !important; color: var(--ink); }

/* 문제 */
.quiz .qtype { display: inline-block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #fff; background: var(--unit); border-radius: 999px; padding: 1px 10px; }
.qq { font-size: 21px; font-weight: 700; line-height: 1.6; margin: 0 0 12px; }
.blank { display: inline-block; min-width: 72px; padding: 0 10px; border-bottom: 3px solid var(--unit); color: var(--unit); text-align: center; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; text-align: left; padding: 10px 16px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; }
.opt:hover:not(:disabled) { border-color: var(--unit); }
.opt.on { border-color: var(--unit); background: color-mix(in srgb, var(--unit) 10%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--unit) 22%, transparent); }
.ol { font-size: 22px; color: var(--unit); flex: none; }
.opts.ox { grid-template-columns: 1fr 1fr; }
.opts.ox .opt { flex-direction: column; justify-content: center; font-weight: 700; min-height: 110px; }
.oxo, .oxx { font-family: var(--head); font-size: 48px; line-height: 1; }
.oxo { color: #1c7ed6; } .oxx { color: #e03131; }
.opt.right, .chip.right, .mi.right, .srow.right, input.right { border-color: var(--ok) !important; background: var(--ok-bg) !important; }
.opt.wrongpick, .chip.wrongpick, .mi.wrongpick, .srow.wrongpick, input.wrongpick { border-color: var(--no) !important; background: var(--no-bg) !important; }
.opt:disabled { cursor: default; color: var(--ink); }
.seq { list-style: none; padding: 10px; margin: 0 0 10px; min-height: 60px; border: 2px dashed var(--line); border-radius: 14px; display: grid; gap: 8px; }
.seq .ph { color: var(--muted); font-size: 15px; text-align: center; padding: 8px; }
.seq .chip { width: 100%; }
.seq .chip b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--unit); color: #fff; font-size: 14px; margin-right: 6px; }
#pool .chip { flex: 1 1 auto; }
.sortrows { display: grid; gap: 8px; }
.srow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 8px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; }
.st { font-weight: 700; font-size: 18px; }
.sbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.sb { min-height: 42px; padding: 4px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 15px; }
.sb[aria-pressed=true] { background: var(--unit); border-color: var(--unit); color: #fff; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcol { display: grid; gap: 8px; align-content: start; }
.mi { display: flex; align-items: center; gap: 8px; min-height: 52px; text-align: left; padding: 8px 12px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; font-weight: 600; border-left: 8px solid var(--mc, var(--line)); }
.mi.sel { box-shadow: 0 0 0 3px #f59f00; border-color: #f59f00; }
.mk { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--mc, transparent); color: #fff; font-size: 13px; flex: none; }
.mi:not(.paired) .mk { border: 2px dashed var(--line); }
.numrow { display: flex; align-items: center; gap: 10px; }
.numrow input { width: 180px; max-width: 60%; font: 700 26px/1 system-ui, sans-serif; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; text-align: right; }
.numrow input:focus { border-color: var(--unit); outline: none; }
.unit { font-size: 22px; font-weight: 700; }
.fb { margin-top: 14px; border-radius: 14px; }
.fb:empty { display: none; }
.fb.ok, .fb.no { padding: 12px 16px; }
.fb.ok { background: var(--ok-bg); border: 2px solid var(--ok); }
.fb.no { background: var(--no-bg); border: 2px solid var(--no); }
.fb p { margin: 0 0 4px; }
.fbt { font-weight: 800; font-size: 19px; }
.fb.ok .fbt { color: var(--ok); } .fb.no .fbt { color: var(--no); }
.again { font-size: 14px; color: var(--muted); }
.qprog { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.qprog .bar { flex: 1; }
.qprog .bar i { background: var(--unit); }
.where { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-weight: 700; }

/* 완료 */
.clear h2 { font-size: 30px; }
.bigmedal { font-size: 52px; margin: 4px 0; }
.sum { text-align: left; background: color-mix(in srgb, var(--unit) 8%, #fff); border: 1px solid color-mix(in srgb, var(--unit) 30%, #fff); border-radius: 14px; padding: 12px 16px; margin: 14px auto 0; max-width: 640px; }
.sum b { color: var(--unit); }
.sum p, .sum ul { margin: 4px 0 0; }

/* 보스 */
.arena { display: flex; align-items: center; gap: 16px; background: linear-gradient(180deg, color-mix(in srgb, var(--unit) 20%, #1d2433), #1d2433); color: #fff; border-radius: var(--r); padding: 12px 18px; margin-bottom: 12px; }
.bossbox { width: 120px; height: 120px; flex: none; }
.bossbox svg { width: 100%; height: 100%; display: block; }
.bossbox.intro { animation: bob 2.4s ease-in-out infinite; }
.bossbox.hit { animation: hit .5s; }
.bossbox.attack { animation: attack .5s; }
.bossbox.down { animation: down 1s forwards; }
.bossinfo { flex: 1; min-width: 0; }
.bossinfo b { font-family: var(--head); font-size: 24px; font-weight: 400; }
.hp { height: 16px; background: rgba(255, 255, 255, .2); border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.hp i { display: block; height: 100%; background: linear-gradient(90deg, #ff6b6b, #fcc419); transition: width .4s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes hit { 20% { transform: translateX(-10px) rotate(-6deg); filter: brightness(2); } 60% { transform: translateX(8px) rotate(4deg); } }
@keyframes attack { 30% { transform: scale(1.18); } }
@keyframes down { to { transform: translateY(20px) scale(.6) rotate(20deg); opacity: .25; } }

/* 오답 노트 */
.notelist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.notelist li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.notelist small { color: var(--muted); font-weight: 700; }
.notelist p { margin: 2px 0 0; }
.notechips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; justify-content: center; }
.notechips .chip { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); border-color: var(--unit); }
.panel:not(.center) .notechips { justify-content: flex-start; }
.peek { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.peek summary { cursor: pointer; color: var(--unit); font-weight: 700; font-size: 15px; }
.peek p { margin: 6px 0; font-size: 16px; }
.peek .btn { margin-top: 4px; text-decoration: none; }

/* 한 장 정리 */
.sheet header { border-bottom: 3px solid var(--unit); margin-bottom: 12px; }
.sheet h2 { font-size: 32px; }
.sgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sgrid section, .sstages, .swords { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.sgrid h3, .sstages h3, .swords h3 { font-size: 20px; color: var(--unit); }
.sgrid ul { margin: 0; padding-left: 20px; }
.sstages, .swords { margin-top: 12px; }
.sstages ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.sstages small, .swords small { color: var(--muted); }
.swords dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; }
.swords dt { font-weight: 800; }
.swords dd { margin: 0 0 4px; }

/* 용어 카드 */
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.word { position: relative; min-height: 120px; border-radius: 16px; border: 2px solid var(--line); background: #fff; cursor: pointer; padding: 14px; display: grid; place-items: center; text-align: center; }
.word .wf { font-family: var(--head); font-size: 24px; }
.word .wb { display: none; font-size: 16px; }
.word .wb small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.word[aria-pressed=true] { background: color-mix(in srgb, var(--unit) 10%, #fff); border-color: var(--unit); }
.word[aria-pressed=true] .wf { display: none; }
.word[aria-pressed=true] .wb { display: block; }

/* 대화상자 */
dialog { max-width: min(620px, calc(100vw - 32px)); border: 0; border-radius: 18px; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(20, 24, 36, .45); }
dialog ol { padding-left: 20px; }
dialog li { margin-bottom: 6px; }
.credit { font-size: 14px; color: var(--muted); }

/* ===== 2026-11-17 밤: 학습 흐름(개념→실험→넓히기→적용→떠올리기→내 말로)과 쉬운 실험 ===== */
.steps li.past { background: color-mix(in srgb, var(--unit) 22%, #fff); color: var(--ink); }
.concept .ctext.big { font-size: 22px; font-weight: 700; line-height: 1.6; }
.concept { border: 3px solid color-mix(in srgb, var(--unit) 45%, #fff); }
.flowlegend { margin: 0 0 12px; padding: 8px 14px; border-radius: 12px; background: #fff; border: 1px dashed var(--line); font-size: 15px; color: var(--muted); }
.flowlegend b { color: var(--unit); }
.pp { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pp i { font-style: normal; font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #fff; }
.pp i.on { background: var(--unit); border-color: var(--unit); color: #fff; }
.extras { margin: 14px 0 0; }
.extras h3 { font-size: 19px; margin: 0 0 8px; }
.extras h3 small { font-family: system-ui, sans-serif; font-size: 13px; color: var(--muted); font-weight: 600; }
.xlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.xcard { display: flex; flex-direction: column; gap: 2px; text-decoration: none; background: #fff; border: 2px dashed color-mix(in srgb, var(--unit) 50%, #fff); border-radius: 14px; padding: 10px 14px; }
.xcard.done { border-style: solid; background: color-mix(in srgb, var(--unit) 6%, #fff); }
.xcard small { color: var(--muted); font-weight: 700; font-size: 13px; }
.xcard span { font-size: 14px; color: var(--unit); font-weight: 700; }
/* 실험: 시작 안내·지금 할 일·반짝임·기록 비교 */
.aim { background: color-mix(in srgb, var(--unit) 7%, #fff); border: 1px solid color-mix(in srgb, var(--unit) 30%, #fff); border-radius: 12px; padding: 10px 12px; margin: 6px 0 8px; }
.aimq { margin: 0 0 6px; font-size: 17px; line-height: 1.55; }
.aimq.small { font-size: 15px; color: var(--muted); }
.aimsteps { margin: 0; padding-left: 22px; }
.aimsteps li { margin: 2px 0; }
.predict { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.predict p { margin: 0 0 6px; }
.todo { position: sticky; top: 70px; z-index: 2; margin: 6px 0 8px; padding: 8px 12px; border-radius: 12px; background: #fff7d6; border: 2px solid #f2b705; box-shadow: 0 4px 12px rgba(29, 36, 51, .08); }
.todo p { margin: 0; }
.todo .hint { margin-top: 4px; color: #6b4e00; font-weight: 700; }
.todo .go { margin-top: 4px; color: var(--ok); font-weight: 800; }
.todo.ready { background: var(--ok-bg); border-color: var(--ok); }
.todo .btn { margin-top: 6px; }
.ctrl.needed { border-color: #f2b705; box-shadow: 0 0 0 2px #fff1b8; }
.ctrl .goal { color: #a06c00; font-weight: 800; font-size: 14px; }
.pulse { animation: sem1pulse 1.1s ease-in-out infinite; border-color: #f2b705 !important; }
@keyframes sem1pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(242, 183, 5, .7); } 50% { box-shadow: 0 0 0 7px rgba(242, 183, 5, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; box-shadow: 0 0 0 3px #f2b705; } }
.look { margin: 6px 4px 0; font-size: 15px; color: #6b4e00; background: #fffbea; border-radius: 10px; padding: 4px 8px; }
.simsteps .see { color: var(--ok); font-weight: 700; margin-top: 2px; }
.labstrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.labstrip figure { flex: 0 0 auto; width: 150px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; position: relative; }
.labstrip figure > b { position: absolute; top: 4px; left: 6px; background: var(--unit); color: #fff; border-radius: 999px; font-size: 12px; padding: 0 6px; }
.labstrip svg { width: 100%; height: auto; display: block; }
.labstrip figcaption { font-size: 12px; line-height: 1.4; margin-top: 2px; }
.labres { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--ok-bg); border: 1px solid var(--ok); font-weight: 700; }
.labres b { color: var(--ok); margin-right: 4px; }
.guess { margin: 8px 0 0; font-weight: 700; }
.guess.ok { color: var(--ok); } .guess.no { color: #8a5a00; }
.labhint { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: #fffbea; color: #6b4e00; font-weight: 700; }
.labpeek { margin: 0 0 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; }
.labpeek summary { cursor: pointer; font-weight: 700; color: var(--unit); }
/* 넓히기·적용·떠올리기 */
.phasehead { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 15px; }
.scene { margin: 0 0 6px; display: inline-block; font-size: 13px; font-weight: 800; color: var(--unit); background: color-mix(in srgb, var(--unit) 10%, #fff); border-radius: 999px; padding: 2px 10px; }
.principle { margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--unit) 8%, #fff); }
.principle b { color: var(--unit); }
/* 내 말로 쓰기 */
.write .wq { font-family: system-ui, sans-serif; font-size: 20px; font-weight: 800; line-height: 1.5; }
.write textarea { width: 100%; font: inherit; font-size: 18px; line-height: 1.6; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; resize: vertical; }
.write textarea:focus { outline: none; border-color: var(--unit); }
.wtools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.wcount { color: var(--muted); font-size: 14px; }
.whints p { margin: 4px 0; padding: 6px 10px; border-radius: 10px; background: #fffbea; }
.keys span { display: inline-block; margin: 2px 4px 2px 0; padding: 0 8px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.keys .met { background: var(--ok-bg); color: var(--ok); }
.keys .miss { background: #f3efe6; color: var(--muted); }
.flow span { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 14px; color: var(--muted); background: var(--soft); }
.flow span.met { background: var(--unit); color: #fff; }

/* 2026-11-18 학습 흐름을 2판 실험 화면에 얹을 때(시작 안내는 「지금 할 일」 위, 나란히 보기는 확인 문제 위) */
.aim .aimsteps { margin: 2px 0 0; font-size: 15px; line-height: 1.6; color: var(--muted); padding: 0; }
.aim .aimsteps span { display: inline-block; margin-right: 10px; color: var(--ink); }
.aim .guessed { margin: 6px 0 0; font-size: 15px; }
.aim { padding: 6px 10px; margin: 6px 0 8px; }
.aim .aimq { font-size: 15px; line-height: 1.5; margin: 0; }
.aim .nsteps { color: var(--muted); font-size: 13px; }
.aim .predict { margin-top: 6px; padding-top: 6px; }
.aim .predict p { font-size: 15px; margin: 0 0 4px; }
.aim .predict small { color: var(--muted); }
.aim .chips .chip { min-height: 34px; padding: 3px 12px; font-size: 15px; }
.aim .guessed b { color: var(--unit); }
.labsum { margin-top: 10px; }
.concept.has-svg .ctext.big { font-size: 21px; }
@media (max-height: 700px) and (min-width: 721px) { .aim { padding: 6px 10px; margin: 4px 0 6px; } .aimq { font-size: 15px; } .aim .aimsteps { font-size: 14px; } }

/* 작은 화면 */
@media (max-width: 860px) {
  .lab { grid-template-columns: 1fr; }
  .bench { position: static; }
}
/* 세로로 긴 휴대폰·태블릿: 조절 단추를 내려도 실험 그림이 위에 남게 */
@media (max-width: 860px) and (min-height: 700px) {
  .bench { position: sticky; top: 62px; z-index: 3; padding: 8px; box-shadow: 0 6px 14px rgba(29, 36, 51, .12); }
  .bench .simsvg svg { max-height: 34vh; width: auto; max-width: 100%; margin: 0 auto; }
  .bench .cap { font-size: 15px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .benchbtns { margin-top: 6px; }
  .benchbtns .btn.small { min-height: 34px; padding: 2px 12px; font-size: 14px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .hero h1 { font-size: 32px; }
  .hero-me { min-width: 0; }
  .units { grid-template-columns: 1fr; }
  .uicon { width: 64px; height: 64px; }
  .ubody h2 { font-size: 22px; }
  .uhead { flex-direction: column; align-items: flex-start; }
  .uicon.big { width: 80px; height: 80px; }
  .top h1 { font-size: 19px; }
  .ctext { font-size: 18px; }
  .qq { font-size: 19px; }
  .opt { font-size: 17px; }
  .match { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mi { font-size: 15px; padding: 8px; }
  .sgrid, .swords dl { grid-template-columns: 1fr; }
  .actions .btn { min-width: 0; flex: 1 1 40%; }
  .arena { padding: 10px 12px; }
  .bossbox { width: 84px; height: 84px; }
  .steps li { font-size: 13px; }
  .nt b { font-size: 16px; }
  .top h1 { font-size: 17px; line-height: 1.3; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* 키가 낮은 노트북 화면(1366x630·1024x600 등): 머리줄·보기를 줄여 문제와 해설이 한 화면에 더 들어오게 */
@media (max-height: 700px) and (min-width: 721px) {
  html { scroll-padding-top: 62px; scroll-padding-bottom: 80px; }
  body[data-view=stage], body[data-view=boss], body[data-view=notes] { padding-bottom: 80px; }
  #app { padding-top: 8px; }
  .top { margin: -8px -16px 8px; padding: 6px 16px; }
  .top h1 { font-size: 20px; }
  .back { width: 40px; height: 40px; }
  .steps { margin-bottom: 8px; }
  .steps li { padding: 3px 4px; font-size: 13px; }
  .qprog { margin-bottom: 6px; }
  .stage .panel { padding: 14px 18px; }
  .qq { font-size: 19px; margin-bottom: 8px; }
  .opts { gap: 7px; }
  .opt { min-height: 46px; padding: 6px 14px; font-size: 17px; }
  .opts.ox .opt { min-height: 84px; }
  .fb { margin-top: 10px; }
  .fb.ok, .fb.no { padding: 8px 14px; }
  .card h2 { font-size: 24px; }
  .ctext { font-size: 18px; line-height: 1.65; }
  .csvg svg, .qsvg svg { max-height: calc(100vh - 380px); }
  .actions { padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
  .bench { top: 62px; padding: 10px; }
  .bench .simsvg svg { max-height: calc(100vh - 290px); width: auto; max-width: 100%; margin: 0 auto; }
  .cap { font-size: 16px; margin-top: 6px; }
  .benchbtns { margin-top: 6px; }
  .mission h2 { font-size: 20px; }
  .ctrls { gap: 8px; margin: 8px 0; }
}


/* 2판: 기억 카드(그림 옆 글, 결과표, 헷갈리지 마세요), 낱말 풍선 */
.card.has-svg { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.card.has-svg .csvg { margin: 4px 0 0; max-width: none; }
.cbody { min-width: 0; }
.ctable { overflow-x: auto; margin: 12px 0 0; }
.ctable table { border-collapse: collapse; width: 100%; font-size: 16px; background: #fff; }
.ctable th, .ctable td { border: 1px solid var(--line); padding: 6px 10px; text-align: center; line-height: 1.45; }
.ctable thead th { background: color-mix(in srgb, var(--unit) 14%, #fff); font-weight: 700; }
.ctable tbody th { background: var(--soft); font-weight: 700; }
.ctip { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff6df; border: 1px solid #f0c75e; font-size: 17px; line-height: 1.6; }
.ctip > b { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 999px; background: #e2a400; color: #fff; font-size: 14px; }
.cdots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 0; }
.cdots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.cdots i.seen { background: color-mix(in srgb, var(--unit) 45%, #fff); }
.cdots i.on { background: var(--unit); width: 26px; border-radius: 999px; }
button.gl { all: unset; cursor: pointer; text-decoration: underline dotted 2px; text-underline-offset: 4px; text-decoration-color: var(--unit); }
button.gl:hover, button.gl:focus-visible { background: color-mix(in srgb, var(--unit) 14%, transparent); border-radius: 4px; outline: none; }
#glpop { position: fixed; z-index: 60; background: #fff; border: 2px solid var(--unit, #3b5bdb); border-radius: 14px; padding: 12px 36px 12px 14px; box-shadow: 0 10px 28px rgba(29, 36, 51, .22); font-size: 16px; line-height: 1.55; }
#glpop b { color: var(--unit, #3b5bdb); font-size: 18px; }
#glpop p { margin: 4px 0 6px; }
#glpop .glx { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 22px; cursor: pointer; width: 30px; height: 30px; }

/* 2판: 실험 「지금 할 일」 */
.todo { margin: 8px 0 4px; padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--unit) 9%, #fff); border: 2px solid var(--unit); }
.todo-h { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.45; }
.todo-h span { display: inline-block; margin-right: 8px; padding: 0 10px; border-radius: 999px; background: var(--unit); color: #fff; font-size: 14px; vertical-align: 2px; }
.ops { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 4px; }
.ops li { display: flex; gap: 8px; align-items: center; font-size: 16px; color: var(--ink); }
.ops li b { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--unit); color: var(--unit); font-size: 14px; }
.ops li.ok { color: var(--ok); }
.ops li.ok b { background: var(--ok); border-color: var(--ok); color: #fff; }
.ops li.go { font-weight: 700; }
.ops li.go b { background: var(--unit); color: #fff; animation: sem1-pulse 1s ease-in-out infinite; }
.look { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; background: #fff; font-size: 16px; font-weight: 700; }
.look b { margin-right: 6px; color: #b5179e; }
.helpme { margin-top: 8px; border-color: #e2a400 !important; background: #fff6df !important; }
.ctrl.need { border: 2px dashed var(--unit); background: color-mix(in srgb, var(--unit) 4%, #fff); }
.ctrl legend em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--unit); margin-left: 6px; }
.ctrl legend em.met { color: var(--ok); }
/* 2026-11-19: 눌러야 할 칩의 반짝임은 「도와줘」를 누르거나 한참 막혔을 때만(engine.js가 #ctrls에 hint-on을 붙임) */
.ctrls.hint-on .chip.want, .ctrls.hint-on .rangerow .btn.want { border-color: var(--unit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--unit) 30%, transparent); animation: sem1-pulse 1.1s ease-in-out infinite; }
.opsrow { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.opsrow .ops { flex: 1 1 200px; min-width: 0; }
.opsrow .helpme { flex: none; margin-top: 0; }
.btn.ready { animation: sem1-glow 1s ease-in-out infinite; }
.cap.look-here { background: #fff6df; border-radius: 10px; padding: 4px 8px; outline: 2px solid #f0c75e; }
.simlog { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.simlog li { font-size: 15px; padding: 6px 10px; border-radius: 10px; background: var(--ok-bg); }
.simlog li b { margin-right: 6px; color: var(--ok); }
@keyframes sem1-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes sem1-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--unit) 55%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--unit) 0%, transparent); } }
@media (max-width: 860px) { .card.has-svg { grid-template-columns: 1fr; } .card.has-svg .csvg { max-width: 420px; margin: 0 auto; } }
@media (max-height: 700px) and (min-width: 721px) {
  .card.has-svg .csvg svg { max-height: calc(100vh - 250px); }
  .ctable table { font-size: 15px; } .ctable th, .ctable td { padding: 4px 8px; }
  .ctip { font-size: 16px; padding: 8px 12px; margin-top: 8px; }
  .cdots { margin-top: 6px; }
  .todo { padding: 8px 10px; } .todo-h { font-size: 17px; } .ops li { font-size: 15px; }
}

/* 인쇄(한 장 정리) */
@media print {
  body { background: #fff; padding: 0; }
  .top, .actions, #hub-identity-status, .bug-report-fab, [id^=bug-report] { display: none !important; }
  #app { max-width: none; padding: 0; }
  .panel { box-shadow: none; border: 0; padding: 0; }
  .sgrid section, .sstages, .swords { break-inside: avoid; }
}
.ctrl.fold { display: flex; align-items: center; gap: 10px; padding: 4px 12px 6px; color: var(--muted); }
.ctrl.fold .cur { font-weight: 700; color: var(--ink); font-size: 15px; }
.ctrl.fold .linkish { margin-left: auto; font-size: 14px; }
#coach { position: fixed; z-index: 70; background: #172b43; color: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); font-size: 16px; line-height: 1.55; }
#coach p { margin: 0 0 8px; }
.coach-on { outline: 4px solid #f0c75e !important; outline-offset: 3px; border-radius: 12px; }
@media (max-height: 700px) and (min-width: 721px) {
  .bench .simsvg svg { max-height: calc(100vh - 330px); }
  .bench .cap { font-size: 15px; line-height: 1.45; }
  .bench:has(#play) .cap { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .benchbtns .btn.small { min-height: 34px; padding: 2px 12px; font-size: 14px; }
}
.mission:has(#simq .simq) .todo, .mission:has(.labsum) .todo { position: static; box-shadow: none; }
/* 막혔을 때 도움 단추 짚어 주기 · 힌트 단추(2026-11-18) */
.actions .hintbtn { min-width: 0; background: #fffbea; }
.hintbtn:disabled { opacity: .6; cursor: default; box-shadow: 0 1px 0 var(--ink); }
.nudge-on { position: relative; z-index: 2; border-color: #9a7400 !important; background: #fff3c4 !important; color: var(--ink) !important; animation: sem1-nudge .9s ease-in-out infinite !important; }
@keyframes sem1-nudge { 0%, 100% { box-shadow: 0 3px 0 var(--ink), 0 0 0 0 rgba(242, 183, 5, .9); } 50% { box-shadow: 0 3px 0 var(--ink), 0 0 0 10px rgba(242, 183, 5, 0); } }
#nudge { position: fixed; z-index: 75; background: #172b43; color: #fff; border: 2px solid var(--gold); border-radius: 14px; padding: 10px 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); font-size: 16px; line-height: 1.5; font-weight: 700; cursor: pointer; }
#nudge p { margin: 0; }
#nudgeArrow { position: fixed; z-index: 76; width: 40px; height: 52px; pointer-events: none; animation: sem1-arrow .8s ease-in-out infinite; }
#nudgeArrow svg { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
#nudgeArrow.up svg { transform: rotate(180deg); }
#nudgeArrow.up { animation-name: sem1-arrow-up; }
@keyframes sem1-arrow { 50% { transform: translateY(6px); } }
@keyframes sem1-arrow-up { 50% { transform: translateY(-6px); } }
.opt.cut { opacity: .35; text-decoration: line-through; }
.srow.given .st::after { content: ' 💡'; }
.hintbox { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #fffbea; border: 1.5px dashed #d4a900; font-size: 16px; }
.hintbox p { margin: 2px 0; }
.hintbox .hintt { font-weight: 700; color: #7a5c00; }
@media (prefers-reduced-motion: reduce) { .nudge-on, #nudgeArrow { animation: none !important; } }
/* 내 말로 쓰기: 이렇게 고치면 맞아요(2026-11-18) */
.wfix { margin: 6px 0 0; padding: 8px 12px; border-radius: 10px; background: #fffbea; border: 1.5px dashed #d4a900; }

/* ===== 2026-11-19 재미 수정 1·2단계 ===== */
/* 마무리 도전: 보스와 하트가 든 띠를 머리줄 아래에 붙여 둔다(top 값은 engine.js pinArena가 머리줄 높이로 맞춤). 하트는 띠 안에 30px */
body[data-view=boss] .arena { position: sticky; top: 54px; z-index: 4; box-shadow: 0 6px 14px rgba(29, 36, 51, .22); }
.bossrow { display: flex; align-items: center; justify-content: space-between; gap: 4px 14px; flex-wrap: wrap; }
.arena .hearts { flex: none; font-size: 30px; line-height: 1.1; letter-spacing: 3px; color: #ff6b6b; white-space: nowrap; }
.arena .hearts i { color: rgba(255, 255, 255, .28); font-style: normal; }
.arena .hearts.lose { animation: sem1-heart .6s; }
@keyframes sem1-heart { 25% { transform: scale(1.25); } 50% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@media (max-height: 700px) and (min-width: 721px) {
  body[data-view=boss] .arena { padding: 6px 16px; margin-bottom: 8px; }
  body[data-view=boss] .bossbox { width: 88px; height: 88px; }
  body[data-view=boss] .bossinfo b { font-size: 22px; }
  body[data-view=boss] .hp { height: 14px; margin: 3px 0 0; }
}
@media (max-width: 720px) { .arena .hearts { font-size: 28px; letter-spacing: 1px; } }
/* 실험: 결론 한 줄은 「관찰 기록」을 누른 뒤에 그림 아래에 나온다(조절을 바꾸면 다시 사라짐) */
.found { margin: 6px 4px 0; padding: 5px 10px; border-radius: 10px; background: var(--ok-bg); border: 1px solid var(--ok); font-size: 16px; font-weight: 700; line-height: 1.5; text-wrap: pretty; animation: sem1-found .45s; }
.found b { color: var(--ok); margin-right: 6px; white-space: nowrap; }
@keyframes sem1-found { from { transform: translateY(-5px); opacity: 0; } }
@media (max-height: 700px) and (min-width: 721px) { .found { font-size: 15px; line-height: 1.45; padding: 4px 10px; } }
/* 문제 글·그림 아래 글 마지막 줄에 낱말 하나만 남지 않게 */
.qq, .cap { text-wrap: pretty; }
/* 2026-11-19(2차): 실험 띠·기록·정리·해설·보기 글도 마지막 줄이 짧게 남지 않게 */
.todo-h, .ops li, .look, .simlog li, .labres, .guess, .labhint, .aimq, .fb p, .labstrip figcaption, .opt, .again { text-wrap: pretty; }
/* 2026-11-19(2차): 예상을 고르기 전에는 예상 칸이 상자 맨 위(점선은 아래쪽) */
.aim .predict.first { margin: 0 0 6px; padding: 0 0 6px; border-top: 0; border-bottom: 1px dashed var(--line); }
@media (max-height: 700px) and (min-width: 721px) { .aim .predict.first .chips { gap: 5px; } .aim .predict.first .chip { min-height: 31px; padding: 2px 12px; } }
/* 문제 진행 띠: 지금 몇 번째인지 */
.qprog span { white-space: nowrap; }
.qprog span b { color: var(--unit); font-size: 16px; }
/* 문제 5개마다의 짧은 쉼(1.5초, 누르면 바로 넘어감) */
#rest { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(245, 242, 234, .94); cursor: pointer; animation: sem1-rest .25s; }
.restbox { width: min(440px, 100%); text-align: center; background: var(--paper); border: 3px solid var(--unit); border-radius: 22px; padding: 20px 28px 22px; box-shadow: var(--shadow); }
.restk { margin: 0 0 6px; font-family: var(--head); font-size: 22px; color: var(--unit); }
.restn { margin: 0 0 14px; display: flex; justify-content: center; gap: 32px; font-size: 19px; font-weight: 700; white-space: nowrap; }
.restn b { font-family: var(--head); font-weight: 400; font-size: 56px; line-height: 1.1; color: var(--unit); margin-right: 4px; }
.restn span + span b { color: var(--ink); }
.restbox .bar i { background: var(--unit); }
@keyframes sem1-rest { from { opacity: 0; } }
/* 판 결과 화면 맨 위: 틀린 문제 다시 풀기 */
.redo { margin: 0 0 10px; text-align: center; }
.redo .btn { min-width: min(320px, 100%); }
/* 단원 지도: 방금 깬 판 칸에 별이 날아와 붙는다(engine.js celebrate) */
.flystar { position: fixed; left: 0; top: 0; z-index: 50; width: 64px; height: 64px; font-size: 60px; line-height: 64px; text-align: center; color: var(--gold); text-shadow: 0 2px 0 #9a7400, 0 0 18px rgba(242, 183, 5, .8); pointer-events: none; will-change: transform; }
.node.just > a, .xcard.just { animation: sem1-just 3s ease-out; }
.node.just .num { animation: sem1-numpop .8s .15s both; }
.medal.pop { display: inline-block; animation: sem1-medalpop .6s; }
@keyframes sem1-just { 0%, 55% { border-color: var(--gold); background: #fff3c4; box-shadow: 0 0 0 7px rgba(242, 183, 5, .5); } 30% { box-shadow: 0 0 0 12px rgba(242, 183, 5, .18); } 100% { box-shadow: 0 0 0 0 rgba(242, 183, 5, 0); } }
@keyframes sem1-numpop { 0% { transform: scale(.5); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes sem1-medalpop { 0% { transform: scale(2); } 100% { transform: scale(1); } }
