:root { font-family: system-ui, sans-serif; color: #183b4c; background: #fff; color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, select:focus-visible { outline: 2px solid #268c93; outline-offset: 2px; }
.template-shell { width: min(760px, calc(100% - 48px)); margin: 50px auto; }
.template-shell > h1 { font-size: clamp(calc(26px * var(--app-text-scale, 1)), calc(4vw * var(--app-text-scale, 1)), calc(38px * var(--app-text-scale, 1))); margin: 8px 0; }
.template-shell > p { color: #486572; line-height: 1.6; }
.template-open { padding: 11px 16px; background: #225c70; color: white; border: 0; border-radius: 8px; }
.template-preview { margin-top: 32px; padding: 20px; border: 1px solid #c3d9da; border-radius: 16px; background: white; }
.template-preview h2 { font-size: calc(18px * var(--app-text-scale, 1)); margin: 0 0 8px; }
.preview-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.preview-values h3 { font-size: calc(12px * var(--app-text-scale, 1)); margin: 10px 0; }
.preview-meter { display: grid; grid-template-columns: minmax(0, 1fr) 50px; gap: 4px; margin: 9px 0; font-size: calc(10px * var(--app-text-scale, 1)); }
.preview-meter-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-meter-rail { grid-column: 1; height: 5px; background: #e8f0f0; border-radius: 4px; overflow: hidden; }
.preview-meter-rail i { display: block; width: calc(var(--parameter-level, 0) * 100%); height: 100%; background: #268c93; }
.preview-meter output { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-variant-numeric: tabular-nums; }
.preview-stage .preview-values { transform: translateY(var(--preview-motion, 0)); }
.preview-stage.is-cleared-left #left-preview-values, .preview-stage.is-cleared-right #right-preview-values { opacity: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.controller-deck .developer-panel-body { background: #f5faf7; }
@media (min-width: 1000px) {
  html[data-deck-open="true"] .template-shell { width: auto; min-width: 240px; margin-left: var(--left-column-space); margin-right: var(--right-column-space); }
  html[data-deck-open="true"] .template-shell > h1 { font-size: calc(27px * var(--app-text-scale, 1)); }
  html[data-deck-open="true"] .template-preview { padding: 14px; }
}
@media (max-width: 480px) { .template-shell { width: calc(100% - 32px); margin-top: 24px; } .preview-values { gap: 8px; } }
