@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: #efede8; --ink: #181613; --mute: #8a857c; --line: rgba(0,0,0,.09); --ac: #ff8a3d; --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; }
.lede { margin: 6px 0 0; max-width: 980px; color: #4d4943; font-size: 14.5px; word-break: keep-all; } .lede b { color: var(--ink); }

/* app */
.app { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; padding-top: 14px; }
.story { position: relative; height: min(76vh, 680px); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #2a2724; box-shadow: 0 0 0 1px var(--line), 0 24px 50px -30px rgba(30,20,5,.55); touch-action: none; user-select: none; -webkit-user-select: none; }
#bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.sbar { position: absolute; left: 10px; right: 10px; top: 9px; display: flex; gap: 4px; } .sbar i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.55); } .sbar i:first-child { background: #fff; }
.stk { position: absolute; left: 0; top: 0; cursor: grab; touch-action: none; } .stk.drag { cursor: grabbing; }
.hint { position: absolute; left: 50%; top: 56%; transform: translateX(-50%); margin: 0; background: rgba(0,0,0,.45); color: #fff; font: 700 12px var(--kr); padding: 6px 12px; border-radius: 99px; white-space: nowrap; pointer-events: none; transition: opacity .3s; } .hint.off { opacity: 0; }
.bgrow { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px; display: flex; gap: 7px; justify-content: center; align-items: flex-end; background: linear-gradient(transparent, rgba(0,0,0,.42)); }
.bgs { display: flex; gap: 7px; } .bgs button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 700 10.5px var(--kr); color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.bgs img, .mine span { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.6); display: block; }
.bgs button.on img { box-shadow: 0 0 0 2.5px #fff, 0 0 0 4.5px var(--ac); } .bgs button.on { color: #fff; }
.mine { cursor: pointer; padding-bottom: 17px; } .mine span { display: grid; place-items: center; background: rgba(255,255,255,.2); color: #fff; font: 700 20px var(--sans); backdrop-filter: blur(6px); }
.panel { background: #fff; border-radius: 22px; padding: 6px 20px 18px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -24px rgba(40,30,10,.4); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 0 28px; }
.pcol { display: flex; flex-direction: column; min-width: 0; }
.grp { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--line); padding: 13px 0 14px; } .pcol > .grp:first-child { border-top: 0; }
.grp h4 { margin: 0; font: 800 13px var(--kr); color: #4d4943; }
.gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.gal button { all: unset; cursor: pointer; height: 62px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; background: #f3f0ea conic-gradient(#f6f4ef 25%, #ece8e0 0 50%, #f6f4ef 0 75%, #ece8e0 0) 0 0 / 12px 12px; box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s; }
.gal button canvas { max-width: 92%; max-height: 88%; } .gal button:hover { transform: translateY(-1px); } .gal button.on { box-shadow: inset 0 0 0 2px var(--ink); }
textarea { all: unset; box-sizing: border-box; width: 100%; padding: 10px 13px; border-radius: 12px; background: #f6f4ef; box-shadow: inset 0 0 0 1px var(--line); font: 700 17px/1.35 var(--kr); white-space: pre-wrap; } textarea:focus { box-shadow: inset 0 0 0 2px var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chips button { all: unset; cursor: pointer; padding: 4px 10px; border-radius: 99px; background: #f1eee8; font: 700 12px var(--kr); color: #5d584f; } .chips button:hover { background: #e7e2d9; }
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.shapes button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 62px; border-radius: 12px; background: #f6f4ef; font: 700 11px var(--kr); color: #6b665d; padding-bottom: 5px; box-sizing: border-box; }
.shapes canvas { max-width: 86%; max-height: 40px; margin: auto 0 0; } .shapes button.on { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .lb { font: 700 12.5px var(--kr); color: #4d4943; } .seg.off { opacity: .35; pointer-events: none; }
.fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .fonts button { all: unset; cursor: pointer; text-align: center; padding: 8px 4px; border-radius: 11px; background: #f6f4ef; font-size: 17px; line-height: 1.2; white-space: nowrap; } .fonts button.on { background: var(--ink); color: #fff; }
.pals { display: flex; flex-wrap: wrap; gap: 6px; } .pals button, .pals label { all: unset; cursor: pointer; position: relative; }
.pals i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--f); color: var(--i); font: 400 15px 'S-jua', var(--kr); font-style: normal; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.12); }
.pals label i { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); } .pals label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pals .on i { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.tg { display: flex; align-items: center; gap: 8px; font: 700 13px var(--kr); cursor: pointer; } .tg input { display: none; } .tgs { gap: 14px; }
.tg i { width: 34px; height: 20px; border-radius: 99px; background: #d9d4cb; position: relative; transition: background .2s; } .tg i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.tg input:checked + i { background: var(--ink); } .tg input:checked + i::after { transform: translateX(14px); }
.rng { display: flex; align-items: center; gap: 10px; font: 700 12.5px var(--kr); color: #4d4943; } .rng span { width: 42px; } .rng input { flex: 1; accent-color: var(--ink); } .rng output { font: 500 12px var(--mono); width: 40px; text-align: right; color: var(--ink); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; } .acts .btn { padding: 12px 16px; font-size: 14px; } .acts .dark { flex: 1; } .acts p { flex-basis: 100%; margin: 0; font: 500 12px var(--sans); color: var(--mute); }
.how { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1060px) { .panel { grid-template-columns: minmax(0, 1fr); } .pcol + .pcol > .grp:first-child { border-top: 1px solid var(--line); } }
@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; } .lede { font-size: 13.5px; }
  .app { grid-template-columns: minmax(0, 1fr); gap: 12px; } .stage { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; padding: 8px 0; background: var(--bg); } .story { height: min(50vh, 560px); }
  .how { grid-template-columns: 1fr 1fr; } .panel { padding: 4px 14px 14px; }
}
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }
body.film { cursor: none; } body.film .how, body.film .foot { display: none; } body.film .app { max-width: none; }
body.film .hint { display: none; }
body.film:not(.tall) .lede { display: none; } body.film:not(.tall) .story { height: 586px; } body.film:not(.tall) .app { padding-top: 10px; }
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 .app { display: grid; grid-template-columns: 218px minmax(0, 1fr); grid-template-areas: "story gal" "txt txt" "shape shape" "font font" "pal pal" "deco deco" "acts acts"; gap: 8px 10px; padding: 8px 14px 0; }
body.film.tall .stage { grid-area: story; position: static; padding: 0; } body.film.tall .story { height: 388px; width: 218px; }
body.film.tall .panel, body.film.tall .pcol { display: contents; }
body.film.tall .grp { background: #fff; border: 0; border-radius: 14px; padding: 8px 10px; box-shadow: 0 0 0 1px var(--line); gap: 6px; } body.film.tall .grp h4 { display: none; }
body.film.tall .g-gal { grid-area: gal; } body.film.tall .g-txt { grid-area: txt; } body.film.tall .g-shape { grid-area: shape; } body.film.tall .g-font { grid-area: font; } body.film.tall .g-pal { grid-area: pal; } body.film.tall .g-deco { grid-area: deco; } body.film.tall .acts { grid-area: acts; border: 0; padding-top: 2px; }
body.film.tall .gal { grid-template-columns: 1fr 1fr; gap: 6px; } body.film.tall .gal button { height: 87px; }
body.film.tall .chips, body.film.tall .g-shape .row, body.film.tall .tgs, body.film.tall .g-deco .rng:last-child, body.film.tall .acts p, body.film.tall #savestory { display: none; }
body.film.tall textarea { padding: 7px 11px; font-size: 16px; } body.film.tall .shapes { grid-template-columns: repeat(8, 1fr); gap: 4px; } body.film.tall .shapes button { height: 50px; font-size: 9.5px; padding-bottom: 3px; } body.film.tall .shapes canvas { max-height: 28px; }
body.film.tall .fonts { grid-template-columns: repeat(6, 1fr); gap: 4px; } body.film.tall .fonts button { font-size: 13px; padding: 7px 2px; } body.film.tall .pals { gap: 5px; justify-content: space-between; } body.film.tall .pals i { width: 31px; height: 31px; }
body.film.tall .acts .btn { padding: 11px 14px; }
body.film:not(.tall) .grp { padding: 10px 0 11px; } body.film:not(.tall) .story { height: 572px; }
body.film.tall .bgrow { gap: 4px; padding: 20px 6px 7px; } body.film.tall .bgs { gap: 4px; } body.film.tall .bgs img, body.film.tall .mine span { width: 30px; height: 30px; } body.film.tall .bgs button { font-size: 9.5px; } body.film.tall .mine span { font-size: 16px; } body.film.tall .mine { padding-bottom: 15px; }
.panel button, .panel label, .bgs button { touch-action: manipulation; }
