@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: #2f6bff; --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 b::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; box-shadow: inset 0 0 0 2.5px var(--ink); background: radial-gradient(circle, var(--ac) 0 3px, transparent 3.5px); }
.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; }
.rng input { width: 110px; accent-color: var(--ink); } .rng output { font: 500 12px var(--mono); width: 22px; color: var(--ink); } .rng.off { opacity: .35; pointer-events: none; }
.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: 760px; color: #4d4943; word-break: keep-all; }
.app { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr) minmax(0, 1fr) 272px; gap: 14px; padding-top: 22px; height: 660px; }
body:not(.has) .app > :not(.empty):not(input) { visibility: hidden; }
.empty { position: absolute; inset: 22px 40px 0; z-index: 3; display: grid; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -30px rgba(40,30,10,.45); padding: 30px; }
body.dragging .drop { box-shadow: inset 0 0 0 3px var(--ac); background: #f4f7ff; }
.dicon { width: 58px; height: 58px; color: var(--ac); } .drop h2 { margin: 4px 0 0; font: 800 26px var(--kr); letter-spacing: -.03em; } .drop p { margin: 0; color: var(--mute); font-size: 14.5px; }
.dacts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; justify-content: center; } .dacts .btn { padding: 12px 18px; font-size: 14.5px; } .cam { display: none; }
.samples { display: flex; gap: 14px; margin-top: 22px; } .samples button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 700 12px var(--kr); color: #6b665d; }
.samples img { width: 96px; height: 128px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 8px 18px -12px rgba(0,0,0,.5); transition: transform .15s; } .samples button:hover img { transform: translateY(-2px) rotate(-1.5deg); }
.pages { display: flex; flex-direction: column; gap: 10px; overflow: auto; padding: 2px 2px 10px; }
.pg { all: unset; cursor: pointer; position: relative; flex: none; display: grid; place-items: center; width: 96px; min-height: 70px; padding: 6px 0; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.pg canvas { display: block; max-width: 74px; max-height: 98px; width: auto; height: auto; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.pg.on { box-shadow: inset 0 0 0 2.5px var(--ac); } .pg em { position: absolute; left: 6px; top: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--ink); color: #fff; font: 600 11px/18px var(--mono); font-style: normal; text-align: center; } .pg.on em { background: var(--ac); }
.pg .ld { width: 60px; height: 82px; border-radius: 4px; background: linear-gradient(100deg, #eee 30%, #f8f8f8 50%, #eee 70%) 0 0 / 300% 100%; animation: sh 1.1s linear infinite; }
@keyframes sh { to { background-position: -150% 0; } }
.pg.add { height: 70px; min-height: 0; color: #8a857c; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.16); font: 400 26px var(--sans); } .pg.add:hover { color: var(--ink); }
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 22px; overflow: hidden; }
.ph { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; } .ph b { font: 800 14px var(--kr); } .ph .sub { font: 600 12px var(--kr); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ph .sp { flex: 1; }
.mini { all: unset; cursor: pointer; padding: 5px 10px; border-radius: 99px; font: 700 12px var(--kr); white-space: nowrap; }
.psrc { background: #23211e; color: #fff; } .psrc .sub { color: #a29c92; } .psrc .mini { background: rgba(255,255,255,.12); } .psrc .mini:hover { background: rgba(255,255,255,.2); }
.stage { position: relative; flex: 1; min-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas#src { position: absolute; border-radius: 3px; }
#ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#ov .dim { fill: rgba(16,14,12,.55); } #ov .edge { fill: rgba(47,107,255,.08); stroke: var(--ac); stroke-width: 2.5; stroke-linejoin: round; }
#ov .h { cursor: grab; } #ov .hit { fill: transparent; } #ov .ring { fill: rgba(255,255,255,.22); stroke: #fff; stroke-width: 3; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); } #ov .dot { fill: var(--ac); }
#ov .h.on .ring { fill: rgba(47,107,255,.35); stroke: var(--ac); } #ov .h.on { cursor: grabbing; }
.loupe { position: absolute; left: 0; top: 0; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 10px 24px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: opacity .12s; } .loupe.on { opacity: 1; }
.loupe canvas { display: block; } .loupe::before, .loupe::after { content: ''; position: absolute; background: var(--ac); left: 50%; top: 50%; } .loupe::before { width: 24px; height: 2px; margin: -1px 0 0 -12px; } .loupe::after { width: 2px; height: 24px; margin: -12px 0 0 -1px; }
.pout { background: #dcdad5; } .ostage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.paper { position: relative; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 14px 30px -14px rgba(0,0,0,.35); overflow: hidden; }
.paper canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.sweep { position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(rgba(47,107,255,0), rgba(47,107,255,.22) 85%, rgba(47,107,255,.9)); opacity: 0; transform: translateY(-100%); }
.paper.busy .sweep { opacity: 1; animation: sweep 1.1s cubic-bezier(.5,0,.5,1) infinite; } @keyframes sweep { to { transform: translateY(340%); } }
.panel { background: #fff; border-radius: 22px; padding: 4px 18px 16px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -24px rgba(40,30,10,.4); display: flex; flex-direction: column; min-height: 0; }
.grp { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--line); padding: 13px 0 14px; } .panel > .grp:first-child { border-top: 0; }
.grp h4 { margin: 0; font: 800 13px var(--kr); color: #4d4943; }
.flts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.flts button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 12px; background: #f6f4ef; font: 700 13px var(--kr); color: #5d584f; }
.flts button.on { background: #fff; box-shadow: inset 0 0 0 2px var(--ac); color: var(--ink); }
.sw { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-style: normal; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); } .sw b { font: 800 12px var(--kr); letter-spacing: -.03em; }
.sw-orig { background: linear-gradient(135deg, #d6c9ad, #a8987b); } .sw-orig b { color: #3b3427; }
.sw-clean { background: #fff; } .sw-clean b { color: #1d2a5e; background: linear-gradient(transparent 55%, #fff27a 55%); }
.sw-bw { background: #fff; } .sw-bw b { color: #000; } .sw-gray { background: #ececec; } .sw-gray b { color: #444; }
.tools { display: flex; gap: 6px; } .ic { all: unset; cursor: pointer; flex: 1; text-align: center; padding: 7px 0; border-radius: 10px; background: #f6f4ef; font: 600 17px/1.2 var(--sans); } .ic:hover { background: #ece8e0; } .ic.del { color: #c4382a; }
.g-size .seg { align-self: flex-start; background: #f6f4ef; box-shadow: none; }
#fname { all: unset; box-sizing: border-box; width: 100%; padding: 9px 12px; border-radius: 11px; background: #f6f4ef; font: 700 14px var(--kr); } #fname:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.acts { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 6px; } .acts .btn { padding: 12px 14px; font-size: 14.5px; } .btn.wait { opacity: .6; pointer-events: none; }
.pinfo { margin: 2px 0 0; display: flex; justify-content: space-between; } .lnk { font-size: 12.5px; }
button, label, .pg { touch-action: manipulation; }
@media (max-width: 1060px) { .app { grid-template-columns: 96px minmax(0, 1fr) minmax(0, 1fr); height: auto; } .app > .pane { height: 560px; } .panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; } .panel > .grp:nth-child(2) { border-top: 0; } .empty { position: static; grid-column: 1 / -1; } body:not(.has) .app > :not(.empty):not(input) { display: none; } }
@media (max-width: 760px) {
  .top, .intro, .app, .how, .foot { padding-left: 16px; padding-right: 16px; } h1 .q { font-size: 31px; } h1 em { font-size: 21px; } .gh { font-size: 13px; }
  .app { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 16px; } .app > .pane { height: auto; } .stage { height: 62vh; min-height: 380px; flex: none; } .ostage { height: 56vh; min-height: 340px; flex: none; }
  .pages { flex-direction: row; overflow-x: auto; padding: 2px; order: -1; } .pg { width: 76px; min-height: 92px; } .pg canvas { max-width: 60px; max-height: 80px; } .pg.add { height: auto; min-height: 92px; }
  .panel { grid-template-columns: minmax(0, 1fr); } .panel > .grp:nth-child(2) { border-top: 1px solid var(--line); }
  .drop { padding: 28px 18px; } .cam { display: inline-flex; } .samples img { width: 84px; height: 112px; }
  .how { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }
/* film framing */
body.film:not(.tall) .lede { display: none; } body.film:not(.tall) .app { height: 604px; padding-top: 14px; } body.film:not(.tall) .empty { inset: 14px 40px 0; }
body.film.tall .top, body.film.tall .intro { padding-left: 14px; padding-right: 14px; } body.film.tall h1 em, body.film.tall .lede { display: none; } body.film.tall h1 .q { font-size: 28px; } body.film.tall .intro { padding-top: 12px; }
body.film.tall .app { grid-template-columns: 1fr 1fr; grid-template-areas: "src out" "pages pages" "panel panel"; height: auto; gap: 8px; padding: 10px 14px 0; }
body.film.tall .psrc { grid-area: src; height: 372px; } body.film.tall .pout { grid-area: out; height: 372px; } body.film.tall .pages { grid-area: pages; flex-direction: row; } body.film.tall .panel { grid-area: panel; }
body.film.tall .ph .sub, body.film.tall #full { display: none; } body.film.tall .pane { border-radius: 16px; } body.film.tall .ph { padding: 9px 10px 6px; }
body.film.tall .pg { width: 64px; min-height: 76px; padding: 4px 0; } body.film.tall .pg canvas { max-width: 48px; max-height: 66px; } body.film.tall .pg.add { min-height: 76px; height: auto; }
body.film.tall .panel { display: grid; grid-template-columns: 1fr; padding: 2px 14px 12px; border-radius: 16px; } body.film.tall .g-name, body.film.tall .g-size, body.film.tall #jpg { display: none; }
body.film.tall .grp { padding: 9px 0 10px; gap: 7px; } body.film.tall .flts { grid-template-columns: repeat(4, 1fr); gap: 5px; } body.film.tall .flts button { flex-direction: column; gap: 3px; font-size: 11.5px; padding: 6px 2px 5px; } body.film.tall .sw { width: 30px; height: 30px; }
body.film.tall .acts { padding-top: 2px; } body.film.tall .empty { position: absolute; inset: 10px 14px auto; height: 600px; } body.film.tall .samples img { width: 104px; height: 139px; }
body.film.tall .stage, body.film.tall .ostage { height: auto; min-height: 0; flex: 1; }
body.film.tall .empty { position: static; grid-column: 1 / -1; height: 640px; }
