:root { color-scheme:light dark; --bg:light-dark(#f2f7f6,#142324); --surface:light-dark(#fff,#1d3031); --ink:light-dark(#143638,#e7f5f2); --muted:light-dark(#587173,#a9c2bf); --line:light-dark(#dce8e5,#365052); --brand:light-dark(#006e70,#83ddd3); --on-brand:light-dark(#fff,#103330); --soft:light-dark(#e7f4f0,#294542); --warn:light-dark(#fff4db,#43391f); --warn-ink:light-dark(#71511a,#f4d795); --error:light-dark(#a52b3b,#ffa8b5); }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:400 15px/1.5 system-ui,"Segoe UI",sans-serif; }
button,input,select,textarea { font:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; color:inherit; }
button:disabled { opacity:.45; cursor:not-allowed; }
[hidden] { display:none!important; }
a { color:var(--brand); }
h1 { font-size:26px; line-height:1.25; letter-spacing:-.6px; margin:0 0 6px; }
h2 { font-size:18px; margin:0; }
h3 { font-size:16px; margin:0 0 12px; }
p { margin:0; }
.muted { color:var(--muted); font-size:13px; }
.app-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px max(18px,env(safe-area-inset-left)); padding-top:max(14px,env(safe-area-inset-top)); background:var(--surface); border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:10px; min-width:0; text-decoration:none; color:var(--ink); }
.brand strong { display:block; font-size:20px; letter-spacing:-.7px; }
.brand small { display:block; font-size:11px; color:var(--muted); overflow-wrap:anywhere; }
.brand-mark { width:24px; flex-shrink:0; display:flex; gap:3px; align-items:center; }
.brand-mark b { width:11px; height:26px; display:block; border-radius:4px; background:var(--brand); transform:rotate(-10deg); }
.brand-mark span { display:grid; gap:3px; transform:rotate(-10deg); }
.brand-mark i { width:9px; height:10px; border-radius:3px; background:var(--brand); }
.brand-mark i:last-child { background:light-dark(#ffac72,#e7a474); }
.avatar { width:44px; height:44px; flex-shrink:0; border:0; border-radius:50%; background:var(--soft); color:var(--brand); display:grid; place-items:center; font-weight:600; }
.person-row { width:100%; background:transparent; border:0; text-align:start; color:inherit; }
.person-row:hover { background:var(--soft); }
.person-heading { display:flex; align-items:center; gap:16px; margin-block:18px; }
.person-heading .person-avatar { width:64px; height:64px; }
.person-heading h1 { overflow-wrap:anywhere; }
.inactive { background:var(--line); color:var(--muted); }
.status-confirm { border:1px solid var(--line); border-radius:16px; padding:20px; margin-top:20px; background:var(--warn); }
.status-confirm p { margin-top:10px; font-size:14px; }
#content { max-width:1000px; margin:auto; padding:26px max(18px,env(safe-area-inset-left)) calc(110px + env(safe-area-inset-bottom)); }
.bottom-nav { position:fixed; bottom:0; inset-inline:0; background:var(--surface); border-top:1px solid var(--line); padding:7px max(7px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-bottom)); display:flex; gap:4px; z-index:10; }
.bottom-nav button { background:transparent; border:0; border-radius:12px; flex:1; min-height:54px; padding:8px 3px; display:flex; flex-direction:column; align-items:center; gap:4px; font-size:11px; color:var(--muted); }
.bottom-nav button[aria-current="page"] { color:var(--brand); background:var(--soft); font-weight:600; }
.ico { font-size:20px; line-height:1; display:inline-block; flex-shrink:0; }
.primary,.secondary { display:flex; gap:9px; align-items:center; justify-content:center; min-height:48px; padding:13px 17px; border-radius:14px; width:100%; font-weight:600; text-decoration:none; }
.primary { background:var(--brand); color:var(--on-brand); border:0; }
.buttons:has(.saved-file) > [data-action^="produce-"] { display:none; }
.secondary { background:var(--surface); color:var(--ink); border:1px solid var(--line); font-weight:500; }
.text-action { color:var(--brand); border:0; background:transparent; padding:9px 0; min-height:44px; font-size:13px; font-weight:600; text-decoration:none; display:inline-flex; gap:6px; align-items:center; }
.section { margin-top:24px; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.home-grid,.flow { display:grid; gap:24px; margin-top:24px; }
.home-cta { padding:22px; border-radius:20px; text-align:left; justify-content:space-between; align-items:flex-start; }
.home-cta strong { display:block; font-size:20px; margin-bottom:4px; }
.home-cta small { display:block; font-size:12px; font-weight:400; opacity:.9; }
.quick { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.quick .secondary { justify-content:flex-start; }
.list { background:var(--surface); border:1px solid var(--line); border-radius:20px; overflow:hidden; }
.row { display:flex; align-items:center; gap:12px; min-width:0; padding:16px; border-bottom:1px solid var(--line); }
.row:last-child { border-bottom:0; }
button.row,a.row { background:transparent; border-top:0; border-left:0; border-right:0; width:100%; color:inherit; text-align:left; text-decoration:none; }
.row-text { flex:1; min-width:0; overflow-wrap:anywhere; }
.row-text strong { display:block; font-weight:600; font-size:14px; }
.row-text small { display:block; font-size:12px; color:var(--muted); margin-top:3px; }
.doc-icon { width:40px; height:46px; display:grid; place-items:center; border-radius:11px; background:var(--soft); color:var(--brand); flex-shrink:0; }
.person-avatar { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--soft); color:var(--brand); font-weight:600; flex-shrink:0; overflow:hidden; }
.person-avatar img { width:100%; height:100%; object-fit:cover; }
.notice { display:flex; gap:9px; align-items:center; background:var(--warn); color:var(--warn-ink); padding:12px 14px; font-size:12px; border-radius:12px; margin-top:18px; }
.back { border:0; background:transparent; color:var(--muted); display:flex; gap:8px; align-items:center; padding:7px 0; min-height:44px; margin-bottom:6px; font-size:13px; }
.steps { display:flex; gap:10px; margin:20px 0; }
.step { display:flex; align-items:center; gap:6px; flex:1; font-size:12px; color:var(--muted); border-bottom:2px solid var(--line); padding-bottom:12px; }
.step b { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; border:1px solid var(--line); background:var(--surface); }
.step.active { color:var(--brand); border-color:var(--brand); }
.step.active b { background:var(--brand); color:var(--on-brand); border-color:var(--brand); }
.choice { display:flex; align-items:center; gap:12px; width:100%; min-height:78px; padding:16px; margin-bottom:10px; text-align:left; border:1px solid var(--line); border-radius:18px; background:var(--surface); }
.choice[aria-pressed="true"] { background:var(--soft); border-color:var(--brand); }
.choice .ico:last-child { color:var(--brand); }
.field-label { display:block; font-size:13px; color:var(--muted); margin-top:16px; }
.field { width:100%; min-width:0; min-height:48px; padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font-size:16px; margin:7px 0 14px; }
.field::placeholder { color:var(--muted); }
textarea.field { min-height:96px; resize:vertical; }
.buttons { display:grid; gap:9px; margin-top:20px; }
.details { background:var(--surface); border:1px solid var(--line); border-radius:14px; margin-top:16px; overflow:hidden; }
.details summary { min-height:48px; padding:14px; color:var(--brand); cursor:pointer; }
.details-body { padding:0 14px 14px; }
.info { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-top:1px solid var(--line); font-size:13px; overflow-wrap:anywhere; }
.info span:first-child { color:var(--muted); flex:1; }
.info span:last-child { flex:1; text-align:right; }
.preview-panel { min-width:0; align-self:start; }
.pdf-preview { width:100%; border:1px solid var(--line); border-radius:18px; overflow:hidden; background:#edf0f1; color:#143638; }
.pdf-controls { display:flex; align-items:center; justify-content:center; gap:20px; padding:5px 12px; border-bottom:1px solid var(--line); }
.pdf-controls button { width:44px; height:44px; font-size:28px; background:transparent; border:0; color:#006e70; }
.pdf-controls button:disabled { opacity:.3; }
.pdf-counter { min-width:50px; text-align:center; font-size:13px; }
.pdf-sheet { margin:10px; background:#fff; }
.pdf-sheet canvas { display:block; width:100%; height:auto; }
.pdf-status { padding:8px 14px; font-size:13px; }
.placeholder { padding:36px 20px; border:1px dashed var(--line); border-radius:20px; text-align:center; background:var(--surface); color:var(--muted); font-size:13px; }
.placeholder .ico { display:block; font-size:28px; margin-bottom:12px; color:var(--brand); }
.pill { font-size:11px; padding:4px 8px; border-radius:7px; color:var(--brand); background:var(--soft); }
.segment { display:flex; gap:7px; flex-wrap:wrap; margin:18px 0 14px; }
.segment button { padding:9px 15px; min-height:44px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.segment button[aria-pressed="true"] { color:var(--brand); background:var(--soft); border-color:var(--brand); }
.empty { padding:20px; color:var(--muted); font-size:13px; }
.login { max-width:440px; margin:20px auto; }
.message { position:sticky; bottom:86px; z-index:20; margin:0 auto 16px; max-width:calc(100% - 36px); width:fit-content; padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--brand); box-shadow:0 6px 24px light-dark(#14363816,#00000055); overflow-wrap:anywhere; }
.message.error { color:var(--error); }
.flow > section { min-width:0; }
.flow.preview-stage .preview-panel { order:-1; }
.mobile-only { display:block; }
.wide-only { display:none; }
.person-results { margin:6px 0 16px; }
.full-name { font-size:19px; margin-bottom:4px; }
@media (min-width:650px) {
  #content { padding:32px 28px 116px; }
  .app-header { padding:16px 28px; }
  .home-grid { grid-template-columns:1fr 1fr; gap:30px; }
  .flow { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .flow.preview-stage .preview-panel { order:0; }
  .flow.single { grid-template-columns:1fr; max-width:650px; }
  .mobile-only { display:none; }
  .wide-only { display:block; }
  .bottom-nav { padding-left:calc((100% - min(100%,1000px))/2); padding-right:calc((100% - min(100%,1000px))/2); }
}
@media (max-width:340px) {
  #content { padding-inline:12px; }
  .app-header { padding-inline:12px; }
  .quick { gap:7px; }
  .quick button { padding:12px 9px; font-size:13px; }
  .steps { gap:6px; }
  .step { font-size:11px; }
}
@media (prefers-reduced-motion:no-preference) { button { transition:background-color .15s; } }
