/* Shared guide styles, scoped to the classic desktop page. */
.manual-modal { width:min(650px,94vw); }
.desktop-paper-tools { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:8px 0; color:var(--studio-ink); }
.desktop-paper-tools select,.explorer select,.explorer input { background:var(--studio-soft); color:var(--studio-ink); border:1px solid var(--studio-border); border-radius:8px; }
.desktop-paper-tools small { font-size:11px; }
.desktop-wave-indicator { display:flex; align-items:center; justify-content:space-between; color:var(--studio-ink); position:sticky; top:0; background:var(--studio-panel); z-index:2; }
.desktop-wave-indicator[hidden], .drawer-slider[hidden] { display:none; }
.desktop-wave-indicator svg { max-width:150px; max-height:60px; }
.desktop-wave-reset { border:0; background:transparent; color:var(--studio-accent); cursor:pointer; padding:3px 6px; }
#desktopShareCode { width:100%; min-width:min(420px,72vw); box-sizing:border-box; resize:vertical; background:var(--studio-soft); color:var(--studio-ink); }
.explorer .picker-options { position:absolute; background:var(--studio-panel); border:1px solid var(--studio-border); padding:6px; border-radius:10px; overflow:auto; box-shadow:0 6px 18px #0005; }
.explorer .picker-options[hidden] { display:none; }
.explorer .lead-options-actions { display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.explorer .lead-options-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; }
.explorer .picker-options h3 { margin:5px 0; font-size:11px; }
.explorer .picker-options button { width:100%; }
.explorer .ecg-tip-diagram { width:100%; max-height:100px; }
@media print { .desktop-paper-tools { display:none!important; } }
.explorer { display:grid; gap:10px; font-size:12px; }
.explorer h4, .explorer p { margin:0; }
.explorer-toolbar { display:grid; grid-template-columns:1fr minmax(76px, .4fr); gap:8px; align-items:end; }
.explorer-toolbar label { display:grid; gap:4px; }
.explorer-toolbar select, .explorer-toolbar input { min-width:0; padding:7px; }
.explorer-map { display:block; width:100%; max-height:340px; background:#142838; border:1px solid #426074; border-radius:12px; }
.explorer-map [data-lead] { cursor:pointer; outline:none; }
.explorer-map [data-lead]:focus-visible circle { stroke:#fff; stroke-width:3px; }
.explorer-buttons { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; }
.explorer button { background:var(--studio-soft); color:var(--studio-ink); border:1px solid var(--studio-border); border-radius:8px; padding:8px 3px; min-height:36px; font-size:12px; cursor:pointer; }
.explorer button[aria-pressed="true"] { color:var(--studio-panel); background:var(--studio-accent); font-weight:700; }
.explorer .explorer-actions { display:flex; flex-wrap:wrap; gap:6px; }
.explorer-actions button { flex:1; }
.explorer-trace { display:block; width:100%; height:auto; border-radius:8px; }
.explorer-comparison { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.explorer-comparison[hidden] { display:none; }
.explorer-caption { font-size:10px; opacity:.8; }
.explorer a { color:var(--studio-ink); text-decoration:underline; }
@media (min-width:600px) { .explorer-comparison { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Final mobile review polish. The lead selector reuses the main picker styling. */
.unavailable-reason { display:block; font-size:10px; line-height:1.35; margin-top:5px; color:var(--studio-muted); }
.explorer-lead-picker { position:relative; z-index:3; min-width:0; }
.explorer-lead-trigger { display:flex; width:100%; align-items:center; justify-content:space-between; padding:9px 12px!important; }
.explorer-lead-options { position:absolute; top:calc(100% + 5px); bottom:auto; left:0; width:100%; max-height:min(320px,48dvh); box-sizing:border-box; z-index:5; }
.explorer .explorer-lead-options button { min-height:38px; }
.explorer-lead-options .right-lead-toggle { display:flex; justify-content:space-between; gap:6px; }
.explorer-visual-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.explorer-reference { margin:0 0 8px; border:1px solid var(--studio-border); border-radius:10px; overflow:hidden; }
.explorer-reference img { display:block; width:100%; height:auto; max-height:290px; object-fit:contain; background:#fff; }
.explorer-reference figcaption, .explorer-reference summary { font-size:10px; padding:7px 9px; color:var(--studio-ink); }
.explorer-reference summary { cursor:pointer; }
.explorer-live { display:grid; gap:5px; }
.explorer [data-ex-map][hidden], .explorer [data-ex-reference][hidden] { display:none; }
.explorer-map { max-height:min(330px,48dvh); }

/* Release candidate: compact guide toolbar and readable electrode overlays. */
.explorer-toolbar { grid-template-columns:minmax(0,1fr) 56px 62px 44px; gap:5px; align-items:end; }
.explorer-toolbar label,.explorer-field-label { font-size:10px; line-height:1.2; min-width:0; }
.explorer-toolbar select,.explorer-toolbar input,.explorer-toolbar button { min-height:36px; height:36px; min-width:0; box-sizing:border-box; font-size:11px; padding:5px!important; }
.explorer-toolbar select { text-overflow:ellipsis; }
.explorer-field-label { display:block; margin-bottom:4px; }
.explorer-lead-trigger { gap:3px; }
.explorer-compare-control button { width:100%; }
.explorer-lead-options { width:min(300px,calc(100vw - 42px)); left:auto; right:-49px; }
.explorer-anatomy { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:7px; align-items:center; }
.explorer-anatomy figure { margin:0; min-width:0; }
.explorer-anatomy figcaption { font-size:10px; color:var(--studio-muted); margin:0 0 4px; }
.explorer-anatomy svg { width:100%; height:auto; max-height:none; background:#f4f7f6; border-color:var(--studio-border); }
.explorer-anatomy .explorer-body-map { max-height:310px; }
.explorer-anatomy .explorer-chest-map { max-height:245px; }
.explorer-legend { display:flex; flex-wrap:wrap; gap:5px 10px; margin-top:7px; font-size:10px; color:var(--studio-muted); }
.explorer-legend span { display:flex; align-items:center; gap:4px; }
.explorer-legend i { width:8px; height:8px; border-radius:50%; display:inline-block; }
.explorer-live-heading { display:flex; align-items:center; justify-content:space-between; gap:5px; flex-wrap:wrap; }
.explorer-live-heading span { color:var(--studio-accent); font-size:11px; font-weight:600; }
.explorer-source { font-size:10px; padding:6px; }
.explorer-reference img { max-height:420px; }
@media(max-width:430px) {
  .explorer-toolbar { grid-template-columns:minmax(0,1fr) 50px 56px 39px; gap:4px; }
  .explorer-anatomy { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:5px; }
  .explorer-anatomy figcaption { font-size:9px; }
  .explorer-reference img { max-height:360px; }
}

/* Keep additional teaching material out of the collapsed mobile guide. */
.explorer-more { border:1px solid var(--studio-border); border-radius:9px; background:var(--studio-soft); }
.explorer-more > summary { cursor:pointer; padding:9px 11px; font-weight:600; font-size:12px; }
.explorer-more-content { display:grid; gap:7px; padding:0 10px 10px; }
.explorer-more-content > details > summary { cursor:pointer; padding:5px 0; }

/* Classic desktop: balanced toolbar, one ECG signature, paper fills remaining height. */
.app-wrapper { grid-template-rows:auto auto minmax(0,1fr); }
.app-header-inner { grid-template-columns:minmax(48px,1fr) minmax(0,auto) minmax(0,1fr); }
.header-left { gap:7px; }
.app-header .header-btn { min-height:40px; height:40px; border-radius:11px; padding:0 12px; white-space:nowrap; box-shadow:0 2px 8px #00000010; }
.app-header .settings-mini-btn,.app-header .manual-header-btn,.app-header .desktop-icon-action { width:40px; min-width:40px; max-width:40px; padding:0; flex:0 0 40px; }
.app-header .ecg-controls-header-btn,.app-header .print-header-btn { min-width:0; max-width:none; width:auto; flex:0 0 auto; }
.app-header .btn-svg-icon { width:18px; height:18px; }
.app-header .desktop-icon-action svg { filter:none; }
.app-header .header-btn:focus-visible { outline:2px solid var(--studio-accent); outline-offset:3px; }
.app-header #desktopFullscreen[aria-pressed="true"] { border-color:var(--studio-accent); color:var(--studio-accent); }
.desktop-paper-tools { margin:0; padding:0 10px; min-height:30px; }
.desktop-paper-tools label { display:flex; align-items:center; gap:8px; font-size:12px; }
.desktop-paper-tools select { min-width:108px; padding:4px 8px; }
.desktop-paper-tools small { color:var(--studio-muted); }
.desktop-paper-meta { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px 14px; }
.desktop-paper-meta a { display:inline-flex; align-items:center; min-height:30px; color:var(--studio-ink); font-size:.875rem; text-underline-offset:.18em; }
.paper-shell { min-height:0; }
@media(max-width:1200px) {
  .app-header-inner { grid-template-columns:48px minmax(0,1fr) auto; }
  .app-header .brand-title { font-size:clamp(1.05rem,2.3vw,1.7rem); }
}
@media(max-width:850px) {
  .app-header .header-left .btn-text { display:none; }
  .app-header .header-left .header-btn { width:38px; min-width:38px; max-width:38px; padding:0; flex:0 0 38px; }
  .app-header .brand-subtitle { font-size:.67rem; white-space:normal; }
}
@media(max-width:550px) {
  .app-header-inner { grid-template-columns:auto auto; grid-template-areas:"brand brand" "settings actions"; }
}
@media(max-width:1050px) { .app-wrapper { grid-template-rows:auto auto auto; } .paper-shell { min-height:420px; } }
