@font-face { font-family: UI; src: url(fonts/gothica1-Regular.woff2) format('woff2'); font-weight: 400; font-display: block; }
@font-face { font-family: UI; src: url(fonts/gothica1-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: block; }
@font-face { font-family: UI; src: url(fonts/gothica1-ExtraBold.woff2) format('woff2'); font-weight: 800; font-display: block; }
@font-face { font-family: Inter; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: block; }
@font-face { font-family: Serif; src: url(fonts/instrument-italic.woff2) format('woff2'); font-style: italic; font-display: block; }
@font-face { font-family: Mono; src: url(fonts/geistmono.woff2) format('woff2'); font-weight: 100 900; font-display: block; }
:root { --bg: #ecebe7; --ink: #181613; --mute: #8a857c; --line: rgba(0,0,0,.09); --ac: #161616; --sans: Inter, UI, system-ui, sans-serif; --kr: UI, Inter, system-ui, sans-serif; --mono: Mono, ui-monospace, monospace; }
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 400 15px/1.5 var(--kr); -webkit-font-smoothing: antialiased; }
a { color: inherit; } [hidden] { display: none !important; } button { font: inherit; color: inherit; }
.top, .intro, .app, .how, .foot { max-width: 1320px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 2px; }
.brand { display: flex; align-items: center; gap: 9px; } .brand b { font: 800 18px var(--kr); letter-spacing: -.03em; }
.brand i { font: 500 12px var(--mono); color: var(--mute); font-style: normal; }
.gh { font: 600 14px var(--sans); text-decoration: none; }
h1 { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 18px; word-break: keep-all; }
h1 .q { font: 800 44px/1.08 var(--kr); letter-spacing: -.045em; word-spacing: .06em; } h1 em { font: italic 400 28px/1.1 Serif, serif; letter-spacing: -.02em; color: #4d4943; }
.btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 11px; font: 800 13.5px var(--kr); box-shadow: inset 0 0 0 1.5px var(--ink); white-space: nowrap; }
.btn.dark { background: var(--ink); color: #fff; }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; padding-top: 40px; } .how h3 { margin: 0 0 6px; font: 800 15px var(--kr); } .how p { margin: 0; font-size: 14px; color: #4d4943; word-break: keep-all; }
.foot { padding-top: 26px; padding-bottom: 90px; font: 400 12.5px var(--sans); color: var(--mute); }
.toast { position: fixed; left: 50%; top: 22px; transform: translate(-50%, -20px); opacity: 0; background: var(--ink); color: #fff; font: 600 13.5px var(--kr); padding: 9px 16px; border-radius: 99px; transition: .25s; pointer-events: none; z-index: 50; } .toast.on { opacity: 1; transform: translate(-50%, 0); }
.lnk { all: unset; cursor: pointer; font: 700 13px var(--kr); color: #6b665d; text-decoration: underline; text-underline-offset: 3px; }
.seg { display: inline-flex; background: #fff; border-radius: 11px; padding: 3px; gap: 2px; box-shadow: 0 0 0 1px var(--line); } .seg button { all: unset; cursor: pointer; padding: 6px 11px; border-radius: 8px; font: 700 12.5px var(--kr); color: #6b665d; white-space: nowrap; } .seg button.on { background: var(--ink); color: #fff; } .seg button:disabled { opacity: .35; cursor: not-allowed; }
.cur { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; }
.cur svg { position: absolute; left: -9px; top: -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); } .cur path { fill: #fff; stroke: #111; stroke-width: 1.4; stroke-linejoin: round; } .cur .closed { display: none; } .cur.down .open { display: none; } .cur.down .closed { display: block; }
.cur i { position: absolute; left: 26px; top: 26px; white-space: nowrap; font: 700 13px var(--kr); font-style: normal; background: var(--ink); color: #fff; padding: 4px 10px; border-radius: 99px; } .cur i:empty { display: none; }
.cur.flip i { left: auto; right: 14px; }
.intro { padding-top: 22px; } .lede { margin: 10px 0 0; max-width: 780px; color: #4d4943; word-break: keep-all; }
.seg button:not(.on):hover { color: var(--ink); }
.seg.sm button { padding: 5px 9px; font-size: 12px; }
.mini { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 99px; background: #f1eee8; font: 700 12.5px var(--kr); color: #5d584f; white-space: nowrap; } .mini:hover { filter: brightness(.96); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.lb { font: 700 12.5px var(--kr); color: #5d584f; white-space: nowrap; min-width: 58px; }
.row { display: flex; align-items: center; gap: 10px; } .row .seg { background: #f1eee8; box-shadow: none; }
.hint { margin: -4px 0 0; min-height: 18px; font: 500 12px var(--kr); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rng input { flex: 1; width: auto; accent-color: var(--ink); } .rng output { width: 40px; text-align: right; }
.mini:disabled { opacity: .35; cursor: not-allowed; }
.tog { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 7px; border-radius: 99px; background: #f1eee8; font: 700 12.5px var(--kr); color: #5d584f; }
.tog i { width: 26px; height: 16px; border-radius: 99px; background: #cfcac0; position: relative; transition: background .2s; } .tog i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s; }
.tog.on { background: var(--ink); color: #fff; } .tog.on i { background: #6fd6a8; } .tog.on i::after { transform: translateX(10px); }
.ph { display: flex; align-items: center; gap: 8px; } .ph b { font: 800 14px var(--kr); white-space: nowrap; } .ph .seg { background: #f1eee8; box-shadow: none; }
.xb { display: flex; gap: 6px; } .xb .btn { flex: 1; } .btn.wide { width: 100%; box-sizing: border-box; }
.card { background: #fff; border-radius: 22px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -24px rgba(40,30,10,.4); min-height: 0; }
.cur.up i { top: auto; bottom: 22px; }
:root { --lime: #c8f05a; --coral: #ff5a4e; --paper: #f6f5f1; }
.brand b::before { border-radius: 4px; background: var(--ink); box-shadow: none; -webkit-mask: none; }
.brand b { display: inline-flex; align-items: center; gap: 9px; }
.brand b::before { content: ''; width: 22px; height: 22px; border-radius: 6px; -webkit-mask: none; box-shadow: none; background: radial-gradient(circle at 30% 50%, var(--lime) 0 3px, transparent 3.5px), radial-gradient(circle at 52% 50%, var(--lime) 0 3px, transparent 3.5px), radial-gradient(circle at 80% 50%, var(--coral) 0 3px, transparent 3.5px), var(--ink); }
.sp { flex: 1; }
.app { display: grid; grid-template-columns: 330px minmax(0, 1fr) 300px; gap: 16px; padding-top: 22px; height: 700px; }
body.film .app { height: 610px; }
/* library */
.lib { display: flex; flex-direction: column; padding: 14px 14px 0; gap: 10px; overflow: hidden; }
.srch { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 12px; background: #f1eee8; flex: none; }
.srch svg { fill: none; stroke: #6b665d; stroke-width: 2; stroke-linecap: round; flex: none; } .srch input { all: unset; flex: 1; min-width: 0; font: 600 13.5px var(--kr); color: var(--ink); } .srch input::placeholder { color: #9a958b; }
.groups { display: flex; gap: 5px; flex-wrap: wrap; flex: none; }
.groups button { all: unset; cursor: pointer; padding: 4px 9px; border-radius: 99px; background: #f1eee8; font: 700 12px var(--kr); color: #5d584f; white-space: nowrap; }
.groups button i { font: 600 10.5px var(--mono); font-style: normal; margin-left: 4px; opacity: .55; } .groups button.on { background: var(--ink); color: #fff; }
.grid { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; padding: 2px 2px 14px; scrollbar-width: thin; }
.grid.empty::before { content: attr(data-empty); grid-column: 1 / -1; padding: 30px 0; text-align: center; font: 600 13px var(--kr); color: var(--mute); }
.ec { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 1px; padding: 5px 5px 8px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.ec:hover { box-shadow: inset 0 0 0 1.5px #b9b4aa; } .ec.on { background: var(--ink); color: #fff; box-shadow: none; } .ec.on .en { color: #a9a49b; }
.ec .th { display: block; border-radius: 10px; overflow: hidden; margin-bottom: 5px; aspect-ratio: 16 / 10; background: #fff; } .ec .th svg { display: block; width: 100%; height: 100%; }
.ec .th .tg { display: none; }
.ec .nm { font: 800 13px var(--kr); letter-spacing: -.02em; padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ec .en { font: 500 10.5px var(--sans); font-style: normal; color: var(--mute); padding: 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* stage */
.stagec { display: flex; flex-direction: column; padding: 16px 18px 16px; gap: 12px; min-width: 0; }
.shead { display: flex; align-items: center; gap: 6px; } .tt { display: flex; align-items: baseline; gap: 10px; min-width: 0; overflow: hidden; }
.tt b { font: 800 26px var(--kr); letter-spacing: -.04em; white-space: nowrap; } .tt i { font: italic 400 19px Serif, serif; color: #6b665d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gname { font: 700 11.5px var(--kr); color: #5d584f; background: #f1eee8; padding: 3px 9px; border-radius: 99px; white-space: nowrap; align-self: center; }
body.quizzing .tt b, body.quizzing .tt i, body.quizzing .gname { display: none; } body.quizzing .tt::before { content: '이 원리의 이름은?'; font: 800 26px var(--kr); letter-spacing: -.04em; white-space: nowrap; }
body.quizzing .stage .tg { visibility: hidden; }
.stage { flex: 1; min-height: 0; position: relative; border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.stage svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.stage .tg, .ec .tg { font-family: Mono, ui-monospace, monospace; font-weight: 600; }
.ctrls { display: grid; gap: 10px; flex: none; min-height: 34px; } .ctrls .lb { min-width: 92px; }
.ctrls input[type=range] { height: 22px; } .rng output { width: 54px; font: 600 12px var(--mono); color: #5d584f; }
/* info */
.info { display: flex; flex-direction: column; padding: 18px; gap: 10px; overflow: hidden; }
.pane { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.aka { margin: 0; font: 700 12.5px var(--kr); color: var(--coral); }
.one { margin: 0; font: 800 19px/1.38 var(--kr); letter-spacing: -.035em; word-break: keep-all; }
.info h4 { margin: 8px 0 0; font: 800 12px var(--kr); color: var(--mute); } .see, .use { margin: 0; font: 400 14px/1.6 var(--kr); color: #3d3933; word-break: keep-all; }
.acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.quizb { flex: none; background: var(--lime); box-shadow: none; } .quizb svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
body.qmode .quizb { background: #f1eee8; }
.qq { margin: 0; font: 800 20px var(--kr); letter-spacing: -.035em; } .qh { margin: -4px 0 4px; font: 500 13px var(--kr); color: var(--mute); }
.choices { display: grid; gap: 7px; }
.ch { all: unset; cursor: pointer; display: flex; flex-direction: column; padding: 10px 14px; border-radius: 13px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .2s, opacity .2s; }
.ch b { font: 800 16px var(--kr); letter-spacing: -.03em; } .ch i { font: 500 11.5px var(--sans); font-style: normal; color: var(--mute); }
.ch:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } .ch.right { background: var(--lime); box-shadow: inset 0 0 0 2px var(--ink); } .ch.wrong { background: #ffd6d2; box-shadow: inset 0 0 0 2px var(--coral); } .ch.dim { opacity: .45; }
.qr { margin: 0; font: 600 13.5px/1.55 var(--kr); word-break: keep-all; min-height: 40px; } .qr.ok::first-line { color: #2b7a4b; } .qr.no { color: #3d3933; }
.score { font: 700 13px var(--mono); color: var(--mute); margin-left: auto; }
@media (max-width: 1180px) { .app { grid-template-columns: minmax(0, 1fr) 300px; height: auto; } .stagec { height: 560px; } .lib { grid-column: 1 / -1; order: 3; height: 520px; } .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
@media (max-width: 760px) {
  .top, .intro, .app, .how, .foot { padding-left: 16px; padding-right: 16px; }
  h1 .q { font-size: 30px; } h1 em { font-size: 20px; }
  .app { grid-template-columns: 1fr; } .stagec { height: auto; } .stage { aspect-ratio: 16 / 10; flex: none; } .info { min-height: 0; } .pane { overflow: visible; }
  .how { grid-template-columns: 1fr 1fr; } .tt b { font-size: 22px; } .tt i { font-size: 15px; } .ctrls .lb { min-width: 70px; }
}
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tt i { display: none; } }
body.film .lede, body.film .how, body.film .foot { display: none; }
body.film .intro { padding-top: 10px; } body.film h1 .q { font-size: 36px; } body.film h1 em { font-size: 23px; }
/* 9:16 film */
body.tall .top, body.tall .intro, body.tall .app { padding-left: 14px; padding-right: 14px; }
body.tall h1 .q { font-size: 27px; } body.tall h1 em { display: block; font-size: 18px; margin-top: 2px; }
body.tall .app { grid-template-columns: 1fr; height: auto; gap: 10px; padding-top: 12px; }
body.tall .stagec { order: 1; height: auto; padding: 12px 12px 12px; gap: 8px; } body.tall .stage { aspect-ratio: 16 / 10; flex: none; }
body.tall .tt b, body.tall.quizzing .tt::before { font-size: 21px; } body.tall .tt i { font-size: 15px; } body.tall .shead .mini { display: none; }
body.tall .info { order: 2; padding: 12px; gap: 8px; } body.tall #about .see, body.tall #about h4, body.tall #about .use, body.tall #about .acts { display: none; } body.tall .one { font-size: 15px; }
body.tall .qh { display: none; } body.tall .qq { font-size: 16px; } body.tall .choices { grid-template-columns: 1fr 1fr; gap: 6px; } body.tall .ch { padding: 7px 11px; } body.tall .ch b { font-size: 14px; } body.tall .qr { min-height: 0; font-size: 12.5px; } body.tall #quizp .acts { display: none; }
body.tall .lib { order: 3; height: 300px; grid-column: auto; padding: 10px 10px 0; gap: 8px; } body.tall .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } body.tall .ec .en { display: none; } body.tall .ec .nm { font-size: 12px; }
