:root { color-scheme: light; font: 16px/1.45 system-ui,sans-serif; color: #172a27; background: #f2f6f1; --edge: #c7d6ce; --ink: #164e43; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: #155e4e; text-underline-offset: 3px; }
button,select,input { font: inherit; }
button,.file-button,select { border: 1px solid #a7bdb2; color: var(--ink); background: white; border-radius: 6px; padding: .6rem .8rem; }
button,.file-button { cursor: pointer; font-weight: 650; }
button:disabled { cursor: default; opacity: .55; }
button:not(:disabled):hover { filter: brightness(.95); }
button:focus-visible,select:focus-visible,.file-button:focus-within { outline: 3px solid #4f8d79; outline-offset: 3px; }
header { background: #fff; border-bottom: 1px solid var(--edge); }
.shell { width: min(1120px,calc(100% - 40px)); margin: auto; }
.bar { min-height: 64px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 780; color: #172a27; }
.brand img { display: block; }
main { padding-block: 34px 42px; }
h1 { margin: 0; font-size: clamp(2.4rem,5.5vw,4rem); line-height: 1.04; letter-spacing: -.055em; }
.intro { margin: .7rem 0 1.45rem; color: #415650; }
.toolbar,.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.toolbar span,.sample-credit { color: #415650; font-size: .87rem; }
.primary { background: #165c4d; border-color: #165c4d; color: #fff; }
.file-button { position: relative; display: inline-block; }
.file-button input { position: absolute; inset: 0; width: 100%; cursor: pointer; opacity: 0; }
.file-button:has(input:disabled) { opacity: .55; }
.status { color: #42584f; font-size: .9rem; margin: .55rem 0; }
.status:empty { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: 14px; align-items: start; margin-top: 16px; }
.panel { border: 1px solid var(--edge); border-radius: 11px; padding: 18px; background: #fff; }
.panel-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
h2 { letter-spacing: -.025em; font-size: 1.25rem; margin: 0; }
#instructions { font-size: .9rem; color: #40564d; margin: .6em 0 1.15em; }
#stage { position: relative; margin: 14px auto; background: #e4eee8; box-shadow: 0 0 0 1px #a5b9ae; touch-action: none; }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.handle { position: absolute; transform: translate(-50%,-50%); width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; padding: 0; background: #165c4d; color: #fff; box-shadow: 0 1px 5px #142d2c80; touch-action: none; cursor: grab; }
.empty,.preview { border-radius: 6px; background: #eaf1ec; color: #40564d; min-height: 173px; margin: 12px 0; display: grid; place-content: center; padding: 14px; text-align: center; }
.preview canvas { width: auto; max-width: 100%; height: auto; max-height: 39vh; display: block; box-shadow: 0 1px 10px #1b332137; }
.controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.controls label { display: grid; gap: 4px; font-size: .88rem; font-weight: 650; }
select { max-width: 100%; }
#pages { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
#pages li { max-width: 100%; }
#pages button { overflow-wrap: anywhere; text-align: left; }
#pages button[aria-current="true"] { background: #e1eee7; border-color: #538170; }
.page-actions button,#reset { padding: .4rem .6rem; font-size: .88rem; }
footer { border-top: 1px solid var(--edge); background: #fff; padding-block: 14px; }
footer a + a { margin-left: 14px; }
.policy { max-width: 760px; }
.policy section { margin-bottom: 12px; }
.policy section h1 { font-size: 2.1rem; }
@media(max-width: 730px) { .workspace { grid-template-columns: 1fr; } }
@media(max-width: 425px) { .shell { width: calc(100% - 28px); } .panel { padding: 14px; } }
