/* Print797 shared light / dark mode */
:root{
  --p797-bg:#f7fbff;
  --p797-surface:#ffffff;
  --p797-surface-2:#f1f6fc;
  --p797-text:#0f172a;
  --p797-muted:#526070;
  --p797-line:#dbe6f2;
  --p797-blue:#0071ce;
  --p797-blue-dark:#004f9a;
  --p797-yellow:#ffc220;
  color-scheme: light;
}
html[data-theme="dark"]{
  --p797-bg:#0f172a;
  --p797-surface:#1e293b;
  --p797-surface-2:#111827;
  --p797-text:#f8fafc;
  --p797-muted:#cbd5e1;
  --p797-line:#334155;
  --p797-blue:#4aa3ff;
  --p797-blue-dark:#93c5fd;
  --p797-yellow:#ffc220;
  color-scheme: dark;
}
html[data-theme="dark"] body{background:var(--p797-bg)!important;color:var(--p797-text)!important;}
html[data-theme="dark"] main,html[data-theme="dark"] section,html[data-theme="dark"] .panel,html[data-theme="dark"] .card,html[data-theme="dark"] .tool-card,html[data-theme="dark"] .planner-card,html[data-theme="dark"] .controls,html[data-theme="dark"] .preview-card,html[data-theme="dark"] .sheet-card,html[data-theme="dark"] .stage-card,html[data-theme="dark"] .modal-card,html[data-theme="dark"] .size-card,html[data-theme="dark"] .week-card,html[data-theme="dark"] .tool-panel,html[data-theme="dark"] .info-panel,html[data-theme="dark"] .info-card{
  background:var(--p797-surface)!important;color:var(--p797-text)!important;border-color:var(--p797-line)!important;
}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{
  background:#0b1220!important;color:var(--p797-text)!important;border-color:var(--p797-line)!important;
}
html[data-theme="dark"] p,html[data-theme="dark"] span,html[data-theme="dark"] label,html[data-theme="dark"] small,html[data-theme="dark"] .hint,html[data-theme="dark"] .muted,html[data-theme="dark"] .subhead{color:var(--p797-muted)!important;}
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] strong{color:var(--p797-text)!important;}
html[data-theme="dark"] canvas,html[data-theme="dark"] .preview,html[data-theme="dark"] .sheet,html[data-theme="dark"] .poster-stage{box-shadow:0 16px 45px rgba(0,0,0,.35)!important;}
.theme-toggle{
  position:fixed;right:16px;top:14px;z-index:99999;border:1px solid rgba(148,163,184,.45);
  background:rgba(255,255,255,.92);color:#0f172a;border-radius:999px;padding:9px 13px;
  font:800 13px system-ui,-apple-system,Segoe UI,sans-serif;box-shadow:0 10px 30px rgba(15,23,42,.16);cursor:pointer;
  backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
}
html[data-theme="dark"] .theme-toggle{background:rgba(30,41,59,.92);color:#f8fafc;border-color:#475569;}
@media(max-width:680px){.theme-toggle{top:10px;right:10px;padding:8px 11px;font-size:12px;}}

/* v20 dark-mode visibility and shared app polish */
html[data-theme="dark"]{
  --p797-bg:#0b1220;
  --p797-surface:#1e293b;
  --p797-surface-2:#111827;
  --p797-field:#0b1220;
  --p797-text:#f8fafc;
  --p797-muted:#d7e2f0;
  --p797-line:#3b4a60;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .app,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .designer-shell,
html[data-theme="dark"] .planner-shell{
  background:#0b1220!important;
  color:var(--p797-text)!important;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .controls-card,
html[data-theme="dark"] .preview-card,
html[data-theme="dark"] .sheet-card,
html[data-theme="dark"] .card,
html[data-theme="dark"] .week-card,
html[data-theme="dark"] .glance-card,
html[data-theme="dark"] .tool-list-panel,
html[data-theme="dark"] .info-strip div,
html[data-theme="dark"] .privacy-disclaimer,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .size-option,
html[data-theme="dark"] .week-tab,
html[data-theme="dark"] .day-col,
html[data-theme="dark"] .schedule-row,
html[data-theme="dark"] .check-row,
html[data-theme="dark"] .tool-note,
html[data-theme="dark"] .print-note{
  background:#1e293b!important;
  color:#f8fafc!important;
  border-color:#3b4a60!important;
  box-shadow:0 18px 46px rgba(0,0,0,.30)!important;
}
html[data-theme="dark"] .sheet-stage,
html[data-theme="dark"] .poster-stage,
html[data-theme="dark"] .preview-wrap,
html[data-theme="dark"] .preview-area,
html[data-theme="dark"] .preview-panel{
  background:#111827!important;
  border-color:#3b4a60!important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select{
  background:#0b1220!important;
  color:#f8fafc!important;
  border-color:#4b5e77!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#aab8ca!important;opacity:1!important;}
html[data-theme="dark"] button:not(.primary):not(.secondary):not(.danger):not(.home-link):not(.theme-toggle):not(.top-theme-toggle),
html[data-theme="dark"] .ghost,
html[data-theme="dark"] .import-label{
  background:#334155!important;
  color:#f8fafc!important;
  border-color:#475569!important;
}
html[data-theme="dark"] label,
html[data-theme="dark"] p,
html[data-theme="dark"] span,
html[data-theme="dark"] small,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .subhead,
html[data-theme="dark"] .subtitle,
html[data-theme="dark"] .card-heading p,
html[data-theme="dark"] .sheet-header p,
html[data-theme="dark"] .preview-help,
html[data-theme="dark"] .status{
  color:#d7e2f0!important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] strong,
html[data-theme="dark"] .row-content strong,
html[data-theme="dark"] .day-title strong,
html[data-theme="dark"] .task-body strong,
html[data-theme="dark"] .section-title-row h2{
  color:#ffffff!important;
}
html[data-theme="dark"] .week-card strong,
html[data-theme="dark"] .glance-row strong,
html[data-theme="dark"] .info-strip strong,
html[data-theme="dark"] .privacy-disclaimer strong,
html[data-theme="dark"] .range-label strong,
html[data-theme="dark"] .section-kicker,
html[data-theme="dark"] .home-link{
  color:#93c5fd!important;
}
html[data-theme="dark"] .size-option.active,
html[data-theme="dark"] .week-tab.active,
html[data-theme="dark"] .segmented button.active{
  background:linear-gradient(135deg,#0071ce,#004f9a)!important;
  color:#ffffff!important;
  border-color:#4aa3ff!important;
}
html[data-theme="dark"] .size-option.active span,
html[data-theme="dark"] .week-tab.active small,
html[data-theme="dark"] .segmented button.active span{color:#ffffff!important;}
html[data-theme="dark"] .task-card{
  background:#f8fafc!important;
  color:#0f172a!important;
  border-color:#dbe6f2!important;
}
html[data-theme="dark"] .task-card strong{color:#0f172a!important;}
html[data-theme="dark"] .task-card p{color:#334155!important;}
html[data-theme="dark"] .task-card.completed strong{color:#64748b!important;}
html[data-theme="dark"] .delete{background:#e2e8f0!important;color:#0f172a!important;}
html[data-theme="dark"] .delete:hover{background:#fee2e2!important;color:#991b1b!important;}
html[data-theme="dark"] .shift-pill{background:#dbeafe!important;color:#004f9a!important;}
html[data-theme="dark"] .shift-pill.off{background:#e5e7eb!important;color:#475569!important;}
html[data-theme="dark"] .poster-sheet,
html[data-theme="dark"] canvas,
html[data-theme="dark"] .poster{background-color:#ffffff;}
html[data-theme="dark"] input[type="color"]{background:#0b1220!important;}
html[data-theme="dark"] a{color:#93c5fd;}
html[data-theme="dark"] button:disabled,
html[data-theme="dark"] .disabled,
html[data-theme="dark"] .size-option:disabled,
html[data-theme="dark"] .week-tab:disabled{
  opacity:.72!important;
  color:#e2e8f0!important;
}
html[data-theme="dark"] .poster-stage{background-color:#111827!important;}
html[data-theme="dark"] .app-header,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .top-bar{
  border-color:#334155!important;
}
