:root {
  color-scheme: light;
  --background: #f1f3ed;
  --panel: #fcfcf8;
  --ink: #183229;
  --soft-ink: #53675c;
  --rule: #cbd4c7;
  --accent: #174a36;
  font-family: 'Work Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .22em; }
.site-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); gap: 1rem; padding: 1rem max(1.2rem, calc((100vw - 1060px) / 2)); font-size: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: .45rem; }
main { width: min(1060px, calc(100% - 2.4rem)); margin: 0 auto; }
.intro { padding: 2.4rem 0 1.5rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); letter-spacing: -.06em; line-height: 1.03; }
.intro p { color: var(--soft-ink); margin-top: .68rem; font-size: 1.06rem; }
.workspace { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; gap: 1rem; }
.panel { border: 1px solid var(--rule); border-radius: .9rem; background: var(--panel); padding: 1.2rem; min-width: 0; }
label:not(.file-button) { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .38rem; }
select, button, textarea, .file-button { border: 1px solid var(--rule); border-radius: .45rem; color: var(--ink); background: #fff; font: inherit; }
select { width: 100%; padding: .64rem .46rem; min-height: 42px; }
textarea { width: 100%; resize: vertical; padding: .72rem; min-height: 9rem; font-family: ui-monospace, monospace; display: block; }
button, .file-button { font-size: .86rem; font-weight: 700; min-height: 42px; padding: .62rem .8rem; white-space: nowrap; cursor: pointer; }
button:hover:not(:disabled), .file-button:hover { background: #ecf2e9; }
button:disabled, select:disabled { opacity: .53; cursor: default; }
:focus-visible { outline: 2px solid #477e61; outline-offset: 3px; }
.file-button:has(+ input:focus-visible) { outline: 2px solid #477e61; outline-offset: 3px; }
.file-button { display: inline-flex; align-items: center; margin: .75rem 0 1.1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.input-actions, .settings { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.input-actions { grid-template-columns: 1fr auto; align-items: end; margin-bottom: 1rem; }
.settings { border-top: 1px solid var(--rule); padding-top: 1rem; }
.hint, #summary { color: var(--soft-ink); font-size: .82rem; line-height: 1.55; margin-top: .45rem; }
.privacy { margin-top: 1rem; }
.error { background: #fff0eb; color: #8b291c; padding: .6rem .7rem; margin-top: .7rem; border-radius: .4rem; font-size: .88rem; }
.result-header { display: flex; gap: .55rem; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
h2 { font-size: 1.15rem; letter-spacing: -.02em; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary:hover:not(:disabled) { background: #246049; }
.sheet-area { background: #e5e9df; border: 1px solid #d7dfd2; border-radius: .55rem; padding: .8rem; }
.page { display: grid; grid-template-columns: 1fr 1fr; background: #fff; padding: .42rem; width: min(100%, 430px); margin: 0 auto; min-height: 7.4rem; }
.page:empty { display: none; }
.label { border: 1px solid #e2e5dc; aspect-ratio: 96 / 33; display: grid; place-items: center; padding: 4%; width: 100%; min-width: 0; }
.label svg { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.empty { padding: 3.5rem 0; text-align: center; color: var(--soft-ink); font-size: .9rem; }
.singles { display: grid; align-items: end; grid-template-columns: 1fr auto auto; gap: .5rem; margin-top: .8rem; border-top: 1px solid var(--rule); padding-top: .8rem; }
.singles > div { min-width: 0; }
#status:empty { display: none; }
footer { display: flex; gap: 1rem; width: min(1060px, calc(100% - 2.4rem)); margin: 1.5rem auto; font-size: .86rem; }
.info { max-width: 720px; line-height: 1.6; }
.info section { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
.info p { margin: .55rem 0; }
.info ul { padding-left: 1.3rem; }
[hidden] { display: none !important; }
@media (max-width: 760px) { .workspace { grid-template-columns: 1fr; } .intro { padding: 1.7rem 0 1.1rem; } }
@media (max-width: 400px) { main,footer { width: calc(100% - 1.35rem); } .panel { padding: .85rem; } .site-header { padding-inline: .85rem; } }
