
/* MosaicGenny tool-app dark theme overrides */
:root{
  --tool-bg:#f7f7f5;
  --tool-surface:#ffffff;
  --tool-surface-2:#f1f2f0;
  --tool-text:#1f2529;
  --tool-muted:#687178;
  --tool-border:#cfd5d8;
  --tool-input:#ffffff;
  --tool-input-text:#1f2529;
  --tool-accent:#1f7880;
  --tool-shadow:0 8px 24px rgba(0,0,0,.07);
  color-scheme:light;
}
html[data-theme="dark"]{
  --tool-bg:#11161a;
  --tool-surface:#1a2126;
  --tool-surface-2:#232c32;
  --tool-text:#edf2f4;
  --tool-muted:#a9b4bb;
  --tool-border:#39454d;
  --tool-input:#20282e;
  --tool-input-text:#f2f5f6;
  --tool-accent:#43aeb6;
  --tool-shadow:0 8px 24px rgba(0,0,0,.28);
  color-scheme:dark;
}
html,body{
  background:var(--tool-bg)!important;
  color:var(--tool-text)!important;
}
body{
  transition:background-color .18s ease,color .18s ease;
}
h1,h2,h3,h4,h5,h6,label,strong,b,legend,th,td{
  color:var(--tool-text);
}
p,.note,.mini,.muted,.sub,.help,.hint,small{
  color:var(--tool-muted)!important;
}
.panel,.card,.controls,.control-panel,.sidebar,.section,.box,.toolbar,.dropzone,
.color-row,.summary-card,.stain-picker,.preview-card,.output-card,
fieldset,table,.table-wrap,.settings,.settings-panel{
  background:var(--tool-surface)!important;
  color:var(--tool-text)!important;
  border-color:var(--tool-border)!important;
  box-shadow:var(--tool-shadow);
}
input,select,textarea{
  background:var(--tool-input)!important;
  color:var(--tool-input-text)!important;
  border-color:var(--tool-border)!important;
}
input::placeholder,textarea::placeholder{
  color:#89959c;
}
button{
  border-color:var(--tool-border);
}
html[data-theme="dark"] button:not(.primary):not(.danger){
  background:#2a353c!important;
  color:#f1f4f5!important;
}
html[data-theme="dark"] button:hover:not(.primary):not(.danger){
  background:#334048!important;
}
html[data-theme="dark"] a{
  color:#70c8cf;
}
html[data-theme="dark"] hr{
  border-color:var(--tool-border);
}
html[data-theme="dark"] table{
  border-color:var(--tool-border)!important;
}
html[data-theme="dark"] th{
  background:#263139!important;
}
html[data-theme="dark"] td{
  background:var(--tool-surface)!important;
}
html[data-theme="dark"] .dropzone{
  background:#182127!important;
  border-color:#41505a!important;
}
html[data-theme="dark"] .preview-wrap,
html[data-theme="dark"] #previewWrap,
html[data-theme="dark"] .preview,
html[data-theme="dark"] #preview{
  background:#f8f8f5!important;
  border-color:#4b5962!important;
}
/* Keep SVG/design canvases light so black cut lines remain visible and exports are unaffected. */
html[data-theme="dark"] svg{
  background:#f8f8f5;
}
html[data-theme="dark"] .ok{
  color:#7bd88f!important;
}
html[data-theme="dark"] .err,
html[data-theme="dark"] .error{
  color:#ff8b8b!important;
}
html[data-theme="dark"] .source-note{
  background:#29251b!important;
  color:#dfd6c0!important;
  border-color:#8f7840!important;
}
