.mp-stop { --mp-ink:#153c31; --mp-muted:#506b5e; color:var(--mp-ink); }
.mp-stop [hidden] { display:none!important }
.mp-stop .mp-method { max-width:69ch; margin:0 0 1.15rem; color:var(--mp-muted); line-height:1.65; }
.mp-body { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(15.5rem,.85fr); gap:clamp(.85rem,2.3vw,1.65rem); align-items:stretch; }
.mp-stop .mp-stage { display:flex; flex-direction:column; justify-content:center; background:#0b3029; border:1px solid #3b5d4e; border-radius:14px; overflow:hidden; color:#e1efdf; position:relative; min-width:0; }
.mp-stage:focus-visible { outline:3px solid #b17b37; outline-offset:3px }
.mp-stage > svg { display:block; width:100%; height:auto; min-height:120px; max-height:315px; flex:1; }
.mp-stage-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.4rem .8rem; padding:.7rem 1rem; font-size:.83rem; font-weight:600; border-bottom:1px solid #426254; }
.mp-stage-head span { display:inline-flex; align-items:center; gap:.45rem; }
.mp-state i { width:8px; height:8px; border-radius:50%; border:1px solid #b7ceb4; background:transparent; }
.mp-stage[data-state=running] .mp-state i { background:#9ed4a9; }
.mp-stage[data-state=paused] .mp-state i { background:#d5a866; }
.mp-stage-head .mp-key { color:#e9c68c;font-weight:500; }
.mp-key i { display:inline-block; width:17px; height:0; border-top:2px dashed #e7bd7d; }
.mp-console { display:flex; flex-direction:column; justify-content:center; align-items:stretch; gap:.9rem; min-width:0; padding-block:.15rem; }
.mp-length,.mp-pace { font-size:1rem; font-weight:650; display:flex; align-items:center; justify-content:space-between; gap:.65rem;}
.mp-length input,.mp-pace select { min-width:6.7rem; height:42px; padding:.35rem .6rem; background:#fbfcf8; border:1px solid #b5c5b8; border-radius:.5rem; font-variant-numeric:tabular-nums; }
.mp-display { display:flex; flex-direction:column; gap:.25rem; padding:.65rem 1rem .7rem; background:#edf1e8; border:1px solid #cfdbcb; border-radius:.7rem; }
.mp-display > span { font-size:.9rem; color:var(--mp-muted); }
.mp-display > div { align-self:start; line-height:1.1; }
.mp-display strong { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-variant-numeric:tabular-nums; font-size:clamp(2.25rem,5vw,3.85rem); letter-spacing:-.06em; font-weight:550; }
.mp-display small { font-size:1rem; color:var(--mp-muted); }
.mp-actions { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; }
.mp-actions button { min-height:44px; padding:.55rem .9rem; line-height:1.4; }
.mp-actions button[disabled] { opacity:.5; cursor:default; }
.mp-stop .mp-feedback { margin:0; font-size:.92rem; line-height:1.55; color:var(--mp-muted); }
.mp-feedback:empty { display:none }
.mp-results { margin-top:1.35rem; border-top:1px solid #d5ded1; padding-top:1.1rem; min-width:0; }
.mp-results h3 { margin:0 0 .7rem; font-size:1.12rem; font-weight:650; display:flex; gap:.5rem; align-items:baseline; flex-wrap:wrap; }
.mp-results h3 bdi { font-size:.88rem; font-weight:500; color:var(--mp-muted); }
.mp-stats { display:grid; grid-template-columns:minmax(80px,.65fr) repeat(2,minmax(100px,1fr)); gap:.6rem; }
.mp-stat > span,.mp-stats .mi-stat > span { display:block; font-size:.86rem; color:var(--mp-muted); }
.mp-stats .mi-stat > strong { display:inline-block; font-variant-numeric:tabular-nums; line-height:1.2; font-size:1.4rem; }
.mp-stats small { font-size:.79rem; color:var(--mp-muted); font-weight:500; }
.mp-results .mi-note { margin:.65rem 0 0; color:var(--mp-muted); line-height:1.5; }
.mp-table:not(:empty) { overflow:auto; margin-top:.75rem; border:1px solid #cbd8c9; border-radius:9px; max-height:240px; }
.mp-table table { width:100%; border-collapse:collapse; font-size:.9rem; }
.mp-table td,.mp-table th { text-align:start; padding:.4rem .7rem; font-variant-numeric:tabular-nums; border-bottom:1px solid #dbe4d8; }
.mp-table tr:last-child td,.mp-table tbody tr:last-child th { border-bottom:0; }
.mp-table thead th { background:#edf2e8;color:#3e5d4c; font-weight:600; }
.mp-table tbody th { font-weight:500; }
.mp-warning { display:inline-grid; place-content:center; font-size:.68rem; font-weight:800; width:1.2em; height:1.2em; border-radius:50%; margin-inline-start:.25em; background:#f4dfbc; color:#754919; }
@media(max-width:720px){
  .mp-body {grid-template-columns:1fr;}
  .mp-console {display:grid;grid-template-columns:1fr 1fr; align-items:center; gap:.7rem;}
  .mp-length,.mp-pace {flex-direction:column;align-items:start;justify-content:center;gap:.25rem;font-size:.94rem;}
  .mp-actions,.mp-feedback {grid-column:1/-1}
  .mp-stage > svg {max-height:270px}
  .mp-stats {grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem;}
  .mp-stats .mi-stat {min-width:0;padding:.55rem .45rem;}
}
@media(max-width:400px){
  .mp-stage-head {padding:.5rem .6rem;}
  .mp-console {gap:.5rem;}
  .mp-length input,.mp-pace select {min-width:0;max-width:100%}
  .mp-stats .mi-stat > strong {font-size:1.13rem}
  .mp-table td,.mp-table th {padding:.4rem;}
}

.mp-length input {box-sizing:border-box;width:9rem;max-width:100%;font:inherit;font-weight:500}
.mp-pace select {font:inherit;font-weight:500;max-width:100%}
.mp-pace {flex-wrap:wrap}
.mp-display strong {overflow-wrap:anywhere}

.mp-console .mp-length {display:grid;grid-template-columns:minmax(0,1fr);gap:.35rem}
.mp-length .mp-measure {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem}
.mp-length .mp-measure input {min-width:0;width:100%;height:44px}
.mp-measure select,.mp-display select {font:inherit;color:var(--mp-ink);background:#fbfcf8;border:1px solid #b5c5b8;border-radius:.5rem;min-height:44px;padding:.35rem .5rem}
.mp-length input[type=range] {width:100%;min-width:0;height:32px;margin:0;padding:0;border:0;background:transparent;accent-color:#18735b;touch-action:pan-y}
.mp-length small {color:var(--mp-muted);font-size:.875rem;line-height:1.4;font-weight:400}
.mp-display > div {display:flex;align-items:baseline;gap:.4rem;flex-wrap:wrap}
.mp-display select {min-height:36px;font-size:1rem}
@media(max-width:580px){.mp-console{grid-template-columns:minmax(0,1fr)}.mp-length,.mp-pace{width:100%}.mp-pace select{width:100%;min-height:44px}}
.mp-pages{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-top:.6rem}
.mp-pages[hidden]{display:none}
.mp-pages input{width:4.5rem;min-height:38px;font:inherit;padding:.25rem .5rem;border:1px solid #b5c5b8;border-radius:.4rem}

.wb-guide-toggle,.mp-jump {display:none}
@media(max-width:600px) {
  .wb-pendulum .wb-guide-toggle,.mp-actions .mp-jump:not([hidden]) {display:inline-flex;align-items:center;min-height:44px}
  .wb-pendulum .wb-guide-toggle {gap:.5rem}
  .wb-pendulum .wb-guide-toggle::after {content:"";width:.45rem;height:.45rem;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
  .wb-pendulum .wb-guide-toggle[aria-expanded=true]::after {transform:rotate(225deg)}
  .wb-pendulum:has(.wb-guide-toggle[aria-expanded=false]) :is(.wb-head > p,.wb-head > .lesson-navigation,.wb-investigation,.mp-method) {display:none}
  .wb-pendulum .wb-head {margin:.3rem 0 .6rem}
  .wb-pendulum .wb-head h1 {margin:.2rem 0 .35rem}
  .wb-pendulum .lesson-navigation {margin-block:.35rem 0}
  .wb-pendulum .wb-mode-switch {margin-bottom:.55rem}
  .wb-pendulum .wb-row-actions button {min-width:44px;min-height:44px}
}
