/* Maßstabsrechner (Modellbahn) – Styles */
.mstr{--mstr-accent:#b8860b;--mstr-border:#d9d9d9;--mstr-bg:#fff;--mstr-bg-soft:#f7f5f0;--mstr-text:#222;--mstr-muted:#666;box-sizing:border-box;max-width:860px;margin:1.5em auto;padding:1.25em 1.5em;border:1px solid var(--mstr-border);border-radius:10px;background:var(--mstr-bg);color:var(--mstr-text);font-size:16px;line-height:1.45}
.mstr *,.mstr ::before,.mstr ::after{box-sizing:inherit}
.mstr [hidden]{display:none!important}
.mstr-head{margin-bottom:1em}
.mstr-title{margin:0 0 .15em;font-size:1.35em;color:var(--mstr-text)}
.mstr-sub{margin:0;color:var(--mstr-muted);font-size:.9em}
.mstr-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.25em}
@media (max-width:700px){.mstr-grid{grid-template-columns:1fr}}
.mstr-panel{display:flex;flex-direction:column;gap:.7em;padding:.75em;border:1px solid var(--mstr-border);border-radius:8px;background:var(--mstr-bg-soft)}
.mstr-field{display:flex;flex-direction:column;gap:.25em}
.mstr-label{font-weight:600;font-size:.9em}
.mstr-hint{font-size:.78em;color:var(--mstr-muted)}
.mstr-select,.mstr-input{font-size:1em;font-family:inherit;color:var(--mstr-text);background:var(--mstr-bg);border:1px solid var(--mstr-border);border-radius:6px;padding:.4em .5em;width:100%}
.mstr-select:focus,.mstr-input:focus{outline:2px solid var(--mstr-accent);outline-offset:1px}
.mstr-row{display:flex;gap:.5em}
.mstr-row .mstr-input{flex:1 1 auto}
.mstr-row .mstr-select{flex:0 0 6.5em;width:auto}
.mstr-dir{display:flex;gap:.35em;flex-wrap:wrap}
.mstr-dirbtn{flex:1 1 auto;font-size:.85em;font-family:inherit;padding:.45em .5em;border:1px solid var(--mstr-border);border-radius:999px;background:var(--mstr-bg);color:var(--mstr-text);cursor:pointer;transition:.15s}
.mstr-dirbtn:hover{border-color:var(--mstr-accent)}
.mstr-dirbtn.is-active{background:var(--mstr-accent);border-color:var(--mstr-accent);color:#fff;font-weight:600}
.mstr-presets{display:flex;flex-wrap:wrap;gap:.35em;align-items:center}
.mstr-presets-label{font-size:.85em;font-weight:600;width:100%}
.mstr-preset{font-size:.8em;font-family:inherit;padding:.3em .6em;border:1px solid var(--mstr-border);border-radius:999px;background:var(--mstr-bg);color:var(--mstr-text);cursor:pointer;transition:.15s}
.mstr-preset:hover{border-color:var(--mstr-accent);background:var(--mstr-accent);color:#fff}
.mstr-result{display:flex;flex-direction:column;align-items:flex-start;gap:.35em;padding:.75em;border:1px solid var(--mstr-border);border-radius:8px}
.mstr-result-label{font-weight:600;font-size:.9em}
.mstr-out{font-size:2em;font-weight:700;line-height:1.15;color:var(--mstr-accent);word-break:break-word}
.mstr-out-alt{font-size:.95em;color:var(--mstr-muted)}
.mstr-formula{margin-top:.4em;font-size:.85em;background:var(--mstr-bg-soft);border-radius:6px;padding:.5em .65em;width:100%}
.mstr-warn{color:#a33;background:#fdeeee;border:1px solid #e8b4b4;border-radius:6px;padding:.35em .6em;font-size:.85em;width:100%}
.mstr-tablewrap{margin-top:1.1em;overflow-x:auto}
.mstr-tabletitle{margin:0 0 .5em;font-size:1em}
.mstr-table{border-collapse:collapse;width:100%;font-size:.9em;min-width:420px}
.mstr-table th,.mstr-table td{border:1px solid var(--mstr-border);padding:.4em .6em;text-align:left}
.mstr-table th{background:var(--mstr-bg-soft);font-weight:600}
.mstr-table td.mstr-num{text-align:right;font-variant-numeric:tabular-nums}
.mstr-table tr.is-active td{background:#fdf6e3;font-weight:600}
.mstr-footer{margin:1em 0 0;font-size:.75em;color:var(--mstr-muted)}
