:root {
  color-scheme:light; --bg:#f4f3ec; --paper:#fdfcf8; --ink:#192b27; --muted:#52635d;
  --line:#d6dbd0; --accent:#18553f; --active:#e3efdf; --on-accent:#fff; --warn:#8b331f;
  font:16px/1.48 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
:root[data-theme=dark] {
  color-scheme:dark; --bg:#16201d; --paper:#202d28; --ink:#edf0e7; --muted:#bbc9bb;
  --line:#44574d; --accent:#a5dbb6; --active:#344b3c; --on-accent:#102d20; --warn:#ffb5a2;
}
* { box-sizing:border-box }
body { margin:0; color:var(--ink); background:var(--bg) }
main { width:min(100%,650px); margin:auto; padding:16px max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)) }
header { display:flex; align-items:center; gap:12px; margin:4px 2px 22px; min-height:40px }
.brand { font:bold 32px/1 Georgia,serif; letter-spacing:-2px }
.brand-dot { color:var(--accent) }
.product { border-left:1px solid var(--line); padding-left:12px; font-size:14px; color:var(--muted) }
#mode { margin-left:auto; font-size:12px; color:var(--muted) }
article { background:var(--paper); border:1px solid var(--line); border-top:4px solid var(--accent); padding:clamp(18px,5vw,36px); border-radius:4px 4px 16px 16px }
.phase { display:flex; justify-content:space-between; color:var(--muted); font-size:13px; font-weight:600 }
.progress { display:flex; gap:5px; list-style:none; margin:9px 0 27px; padding:0 }
.progress li { height:4px; border-radius:2px; flex:1; background:var(--line) }
.progress li.past, .progress li[aria-current] { background:var(--accent) }
h1 { font:normal clamp(31px,7vw,46px)/1.07 Georgia,"Times New Roman",serif; letter-spacing:-1.1px; margin:0 0 15px; overflow-wrap:anywhere }
#prompt { color:var(--muted); white-space:pre-line; overflow-wrap:anywhere; margin:0 0 22px }
#prompt p { margin:0; padding:10px 0; border-top:1px solid var(--line) }
#prompt p:first-child { padding-top:0; border:0 }
fieldset { margin:0; padding:0; border:0; min-width:0 }
.row { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px }
button,.file { width:100%; min-height:46px; background:transparent; color:var(--ink); border:1px solid var(--line); border-radius:9px; font:inherit; font-weight:550; padding:10px 14px; text-align:left; cursor:pointer; overflow-wrap:anywhere }
.row button { flex:1; min-width:0 }
.row.months { gap:4px }
.months button { text-align:center; padding:9px 0 }
button:focus-visible,input:focus-visible,textarea:focus-visible,.file:focus-within { outline:3px solid var(--accent); outline-offset:2px }
button:hover,.file:hover { background:var(--active) }
button.primary { background:var(--accent); color:var(--on-accent); border-color:var(--accent); text-align:center }
button[aria-pressed=true] { border-color:var(--accent); background:var(--active) }
button:disabled,fieldset:disabled .file { opacity:.6; cursor:wait }
form { display:grid; gap:8px; margin:8px 0 15px }
label { font-size:14px; color:var(--muted) }
input,textarea { width:100%; min-height:48px; min-width:0; padding:11px 12px; border-radius:8px; border:1px solid var(--line); color:var(--ink); background:var(--bg); font:inherit }
textarea { min-height:105px; resize:vertical }
.file { position:relative; display:block; font-size:15px; color:var(--accent); text-align:center; border-style:dashed; margin:10px 0 }
.file input { width:100%; height:100%; position:absolute; inset:0; opacity:0; cursor:pointer }
#status:not(:empty) { margin:0 0 14px; padding:10px 12px; border-left:3px solid var(--accent); background:var(--paper) }
#status.error { color:var(--warn); border-color:var(--warn) }
#meta:not(:empty) { margin-top:24px; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; font-variant-numeric:tabular-nums }
.quiet { color:var(--muted); border:0; font-size:13px; text-align:center; margin-top:8px }
[hidden]{display:none!important}
