:root {
  color-scheme: dark;
  --dh-accent: #bbf47c;
  --dh-on-accent: #182915;
  --dh-fg: #eaf0e8;
  --dh-bg: #171d19;
  --dh-muted: #a4b2a7;
  --dh-faint: #829287;
  --dh-well: #222b25;
  --dh-raised: #2a342c;
  --dh-edge: #38443b;
  font-family: system-ui, sans-serif;
  background: #101512;
  color: var(--dh-fg);
}
* { box-sizing: border-box; }
body { margin: 0; }
.dh-dash { min-height: 100dvh; }
.dh-dash-app { min-height: calc(100dvh - 60px); }
.dh-dash-main { padding-bottom: 36px; }
.dh-dash-team { cursor: default; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }
p { line-height: 1.5; }
label { display: grid; gap: 5px; font-size: .85rem; }
input, select { min-width: 0; width: 100%; padding: 8px; border: 1px solid var(--dh-edge); border-radius: 8px; background: var(--dh-well); color: var(--dh-fg); }
dialog { width: min(460px, calc(100% - 32px)); max-height: 85dvh; overflow: auto; padding: 24px; border: 1px solid var(--dh-edge); border-radius: 15px; color: var(--dh-fg); background: var(--dh-bg); }
dialog::backdrop { background: #0a110dd9; }
dialog form, .stack { display: grid; gap: 14px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--dh-accent); outline-offset: 3px; }
.resin-card { padding: 20px; border: 1px solid var(--dh-edge); border-radius: 13px; background: var(--dh-bg); }
.resin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.resin-stat { font-size: 2rem; display: block; margin-top: 6px; }
.resin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.resin-toolbar > input { width: min(280px, 100%); }
.resin-table { overflow: auto; }
.resin-table table { width: 100%; border-collapse: collapse; }
.resin-table th, .resin-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--dh-edge); }
.resin-table th button { background: transparent; border: 0; color: inherit; padding: 0; }
.resin-table tr:last-child td { border-bottom: 0; }
.resin-chart { display: grid; gap: 12px; }
.resin-chart progress { width: 100%; accent-color: var(--dh-accent); }
.dh-dash .resin-histogram { width: 100%; height: auto; }
.resin-chart-axis { display: flex; justify-content: space-between; color: var(--dh-muted); }
.resin-card h2 { font-size: 1.05rem; font-weight: 650; }
.dh-dash .resin-card :is(h2, p) { margin-bottom: 8px; }
.dh-dash .resin-toolbar :is(input, select), .dh-dash .resin-editor input { border: 1px solid var(--dh-edge); background: var(--dh-well); padding: 8px; }
[data-reduce-motion] *, [data-reduce-motion] *::before, [data-reduce-motion] *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
.resin-editor { display: grid; gap: 14px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.resin-editor canvas { width: 100%; height: auto; display: block; border-radius: 9px; touch-action: none; background: #111813; }
.resin-editor fieldset { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--dh-edge); border-radius: 8px; }
.resin-editor fieldset button { grid-column: span 2; }
#toast { position: fixed; z-index: 20; bottom: 20px; right: 20px; max-width: min(400px, calc(100% - 40px)); }
#toast:not(:empty) { padding: 12px 16px; border-radius: 10px; background: var(--dh-raised); border: 1px solid var(--dh-edge); }
#results { list-style: none; padding: 0; display: grid; gap: 5px; }
#results button { width: 100%; text-align: left; }
#notifications { margin: 0; padding: 14px; list-style: none; }
#server-meter { width: 0; }
#token, #code { font-family: monospace; }
@media (max-width: 800px) { .resin-editor { grid-template-columns: 1fr; } }
