.wm-note{font-size:.88rem}
.wm-tabs{flex-wrap:wrap}
.wm-pane{margin:1rem 0}
.wm-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;margin:1rem 0}
.wm-card,.wm-panel{background:#fff;border:1px solid #e1e5ec;border-radius:10px;padding:1rem;margin:0 0 1rem}
.wm-card h3,.wm-panel h3{margin:.1rem 0 .5rem;font-size:1.05rem}
.wm-card.on{border-color:var(--gold,#C9A227);box-shadow:0 0 0 2px #f3e7bf}
.wm-card p{margin:.3rem 0;font-size:.86rem}
.wm-ok{color:#1e8449;font-weight:600}.wm-bad{color:#9b2c1f;font-weight:600}.wm-warn{color:#8a5a00;font-weight:600}
.wm-map{width:100%;border-collapse:collapse;font-size:.86rem}
.wm-map th,.wm-map td{border-bottom:1px solid #eef1f5;padding:.3rem .4rem;text-align:left;vertical-align:middle}
.wm-map select{font:inherit;padding:.25rem .35rem;border:1px solid #c9cfda;border-radius:6px;max-width:100%}
.wm-map .ex{color:#5b6475;font-size:.8rem;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wm-how{display:inline-block;font-size:.72rem;border-radius:8px;padding:0 6px;background:#eef1f5;color:#5b6475}
.wm-how.preset{background:#e7f4ec;color:#1e8449}.wm-how.synonym{background:#eaf1fb;color:#1d4f91}.wm-how.none{background:#fdecea;color:#9b2c1f}
.wm-row{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin:.4rem 0}
.wm-row label{display:inline-flex;align-items:center;gap:.35rem;font-size:.85rem}
.wm-row input[type=text],.wm-row input[type=number],.wm-row select{font:inherit;padding:.35rem .45rem;border:1px solid #c9cfda;border-radius:6px}
.wm-row input.wm-pat{min-width:min(340px,100%);font-family:ui-monospace,Menlo,Consolas,monospace}
.wm-test{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.8rem;color:#33415c;margin:.3rem 0}
.wm-issues{list-style:none;padding:0;margin:.4rem 0}
.wm-issues li{padding:.35rem .6rem;border-radius:8px;margin:.25rem 0;font-size:.9rem}
.wm-issues li.error{background:#fdecea;color:#9b2c1f}.wm-issues li.warn{background:#fff6e0;color:#7a5200}.wm-issues li.ok{background:#e7f4ec;color:#1e8449}
.wm-bar{display:inline-block;height:10px;border-radius:5px;background:#e4e9f0;width:120px;vertical-align:middle;overflow:hidden}
.wm-bar i{display:block;height:100%;background:var(--navy,#0B2545)}
.wm-view{background:#fff;border:1px solid #e1e5ec;border-radius:10px;padding:.6rem;margin:0 0 1rem}
.wm-viewbar{display:flex;gap:.4rem;margin-bottom:.5rem}
.wm-viewbar button{border:1px solid #c9cfda;background:#fff;border-radius:999px;padding:.3rem .9rem;font:inherit;font-size:.85rem;cursor:pointer}
.wm-viewbar button[aria-pressed=true]{background:var(--navy,#0B2545);color:#fff;border-color:var(--navy,#0B2545)}
.wm-plan svg{width:100%;height:auto;max-height:640px;display:block}
.wm-3d{position:relative;height:560px;border-radius:8px;overflow:hidden;background:#eef1f5}
.wm-legend{display:flex;flex-wrap:wrap;gap:.8rem;font-size:.8rem;color:#33415c;margin:.4rem 0}
.wm-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:4px;vertical-align:-2px}
.wm-cmp td.up{color:#1e8449;font-weight:600}.wm-cmp td.down{color:#9b2c1f;font-weight:600}
.wm-exp{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}
.wm-exp .wm-panel p{font-size:.86rem}
details.wm-det{margin:.4rem 0}details.wm-det summary{cursor:pointer;font-weight:600;font-size:.9rem}
.wm-ex{display:inline-block;background:#fdecea;color:#9b2c1f;border:1px solid #f1b0a8;border-radius:10px;padding:1px 8px;font-size:.75rem;font-weight:700}
@media (max-width:640px){
  .wm-3d{height:360px}
  .wm-tabs button{font-size:.8rem;padding:.4rem .5rem}
  .wm-map .ex{display:none}
  .wm-row input.wm-pat{min-width:0;width:100%}
  .tk-actions .tk-btn{width:100%;text-align:center}
}
/* keep form rows inside narrow screens (mapping preset / saved-mapping selects) */
.wm-row label { max-width: 100%; min-width: 0; }
.wm-row select, .wm-row input[type=text], #patternBox select, #patternBox input { max-width: 100%; min-width: 0; }
@media (max-width: 560px) { .wm-row label { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; } .wm-row select { width: 100%; } }
