:root{color-scheme:light}body{margin:0;background:#f2f5f2}*{box-sizing:border-box}
#prep-final-preview { width: 100%; }
#prep-final-preview .pe-caption { color: var(--muted-foreground); margin-bottom: 12px; }
#prep-final-preview .pe-bottom { margin-top: 12px; margin-bottom: 0; }
#prep-final-preview .pe-stage { padding: 18px 12px; display: flex; justify-content: center; }
#prep-final-preview .pe-phone {
  --pe-bg: light-dark(#ffffff, #1c201e);
  --pe-fg: light-dark(#1d2822, #f2f5f3);
  --pe-muted: light-dark(#58655e, #bdc9c2);
  --pe-line: light-dark(#dce4df, #3b4941);
  --pe-soft: light-dark(#f0f5f2, #28332d);
  --pe-accent: light-dark(#155b3d, #9bdfb5);
  --pe-warm-bg: light-dark(#fff3d9, #463923);
  --pe-warm-fg: light-dark(#6d4a04, #f3d694);
  --pe-error: light-dark(#b22525, #ffb4b4);
  width: 100%; max-width: 480px; border: 1px solid var(--pe-line); border-radius: 24px; overflow: hidden;
  color: var(--pe-fg); background: var(--pe-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.4;
}
#prep-final-preview .pe-phone * { box-sizing: border-box; }
#prep-final-preview .pe-header { padding: 22px 18px 16px; }
#prep-final-preview .pe-brand { color: var(--pe-accent); font-size: 12px; font-weight: 500; letter-spacing: .08em; }
#prep-final-preview .pe-header h2 { color: var(--pe-fg); font-size: 24px; line-height: 1.2; font-weight: 500; margin: 9px 0 6px; }
#prep-final-preview .pe-subtitle { color: var(--pe-muted); }
#prep-final-preview .pe-branch-label { display: block; color: var(--pe-muted); font-size: 12px; margin: 16px 0 5px; }
#prep-final-preview select { width: 100%; min-height: 44px; border: 1px solid var(--pe-line); border-radius: 9px; background: var(--pe-bg); color: var(--pe-fg); padding: 9px 10px; font: inherit; font-size: 16px; }
#prep-final-preview .pe-period { display: grid; gap: 3px; padding: 12px 18px; background: var(--pe-soft); }
#prep-final-preview .pe-period span { color: var(--pe-muted); font-size: 12px; }
#prep-final-preview strong { font-weight: 500; }
#prep-final-preview input[type="text"] { width: 68px; min-height: 44px; padding: 8px 7px; border: 1px solid var(--pe-line); border-radius: 9px; background: var(--pe-bg); color: var(--pe-fg); font: inherit; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
#prep-final-preview input[aria-invalid="true"] { border-color: var(--pe-error); }
#prep-final-preview .pe-hint { color: var(--pe-muted); font-size: 12px; padding: 14px 18px 10px; }
#prep-final-preview .pe-columns,
#prep-final-preview .pe-row { display: grid; grid-template-columns: minmax(0, 1fr) 68px 96px; gap: 12px; align-items: center; padding: 10px 18px; }
#prep-final-preview .pe-columns { padding-top: 0; padding-bottom: 8px; color: var(--pe-muted); font-size: 12px; }
#prep-final-preview .pe-columns span:not(:first-child) { text-align: right; }
#prep-final-preview .pe-item { border-top: 1px solid var(--pe-line); }
#prep-final-preview .pe-name { background: transparent; color: var(--pe-fg); border: 0; padding: 4px 0; margin: 0; min-height: 44px; display: flex; align-items: center; gap: 7px; text-align: left; font: inherit; width: 100%; }
#prep-final-preview .pe-chevron { width: 14px; height: 16px; flex: 0 0 14px; color: var(--pe-muted); display: inline-flex; align-items: center; transition: transform 120ms ease; }
#prep-final-preview .pe-chevron svg { width: 14px; height: 14px; }
#prep-final-preview .pe-name[aria-expanded="true"] .pe-chevron { transform: rotate(90deg); }
#prep-final-preview .pe-name-text { min-width: 0; display: grid; gap: 4px; }
#prep-final-preview .pe-product-title { font-weight: 500; overflow-wrap: anywhere; }
#prep-final-preview .pe-tag { color: var(--pe-muted); font-size: 11px; }
#prep-final-preview .pe-tag.pe-today { color: var(--pe-warm-fg); }
#prep-final-preview .pe-result { display: grid; gap: 4px; text-align: right; min-width: 0; }
#prep-final-preview .pe-result output { font-size: 20px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
#prep-final-preview .pe-result output.pe-needs-check { font-size: 13px; line-height: 1.3; color: var(--pe-warm-fg); }
#prep-final-preview .pe-result small { color: var(--pe-muted); font-size: 11px; overflow-wrap: anywhere; }
#prep-final-preview .pe-row-error { color: var(--pe-error); padding: 0 18px 10px; font-size: 12px; }
#prep-final-preview .pe-row-error:empty { display: none; }
#prep-final-preview .pe-detail { margin: 0 12px 12px; padding: 14px; border-radius: 12px; background: var(--pe-soft); }
#prep-final-preview [hidden] { display: none !important; }
#prep-final-preview .pe-detail h3 { color: var(--pe-fg); font: inherit; font-weight: 500; margin: 0 0 12px; }
#prep-final-preview .pe-detail dl { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 16px; margin: 0; }
#prep-final-preview .pe-detail dt { color: var(--pe-muted); }
#prep-final-preview .pe-detail dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
#prep-final-preview .pe-formula { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pe-line); font-weight: 500; overflow-wrap: anywhere; }
#prep-final-preview .pe-explain { margin-top: 7px; color: var(--pe-muted); font-size: 12px; }
#prep-final-preview .pe-storage { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pe-line); font-size: 12px; }
#prep-final-preview .pe-storage strong { display: block; margin-bottom: 4px; }
#prep-final-preview .pe-warning { background: var(--pe-warm-bg); color: var(--pe-warm-fg); padding: 9px 10px; border-radius: 8px; margin-top: 12px; font-size: 12px; }
#prep-final-preview .pe-footer { border-top: 1px solid var(--pe-line); padding: 14px 18px 18px; color: var(--pe-muted); font-size: 12px; }
#prep-final-preview .pe-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 380px) {
  #prep-final-preview .pe-stage { padding: 12px 0; }
  #prep-final-preview .pe-columns,
  #prep-final-preview .pe-row { grid-template-columns: minmax(0,1fr) 57px 82px; gap: 8px; padding-left: 12px; padding-right: 12px; }
  #prep-final-preview .pe-row input { width: 57px; }
  #prep-final-preview .pe-name { gap: 4px; }
  #prep-final-preview .pe-header,
  #prep-final-preview .pe-period,
  #prep-final-preview .pe-hint,
  #prep-final-preview .pe-footer { padding-left: 12px; padding-right: 12px; }
  #prep-final-preview .pe-detail { margin-left: 8px; margin-right: 8px; padding: 12px; }
  #prep-final-preview .pe-detail dl { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { #prep-final-preview .pe-chevron { transition: none; } }

#prep-final-preview .pe-phone{max-width:620px}#prep-final-preview .pe-stage{padding:24px 12px}.pe-status{padding:12px 18px;background:#fff3d9;color:#6d4a04;font-size:13px}.pe-save{font-size:12px;padding:10px 18px;color:#58655e;min-height:38px}.pe-date{color:#58655e;margin-top:8px}.pe-button{min-height:44px;border:1px solid #c3d2c8;border-radius:8px;background:white;color:#155b3d;padding:8px 12px;font:inherit;cursor:pointer}.pe-actions{padding:0 18px 12px;display:flex;gap:8px;flex-wrap:wrap}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #46956b;outline-offset:2px}.pe-conflict{padding:14px 18px;border-bottom:1px solid #dce4df;background:#fff3d9}.pe-conflict p{margin:0 0 10px}.pe-unsaved{color:#9a4e00!important}@media(max-width:380px){#prep-final-preview .pe-stage{padding:0}#prep-final-preview .pe-phone{border-radius:0;border-left:0;border-right:0}.pe-status{padding:12px}.pe-save{padding:10px 12px}}
