:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#f5f3ee;--surface:#fff;--surface-2:#f0ede6;--text:#1f2328;--text-muted:#6b7280;--border:#ddd8cc;--accent:#2f6fd6;--accent-text:#fff;--danger:#c0392b;--floor:#e9e2d2;--floor-edge:#d3c8b0;--ringer:#6b6f78;--ringer-user:#2f6fd6;--skin:#e8c4a0;--rope:#c8b48a;--sally-1:#c0392b;--sally-2:#f4f1ea;--sally-3:#2457a6;--strike:#fff;--side-before:#e08a00;--side-after:#13a38b;--side-cover:#8b5cf6;--good:#2e9d57;--fair:#d4a017;--poor:#e07020;--clash:#d03030;--blue-line:#2f6fd6;--treble-line:#d03030;--strike-line:#d97706;--second-line:#0d9488;--second-strike-line:#c026d3;--row-band:#2f6fd61f;--row-cursor:#2f6fd657;--rule:#c9ced6;--call:#b45309;--grid-l:40%;--radius:10px;--shadow:0 1px 2px #0000000f, 0 4px 16px #0000000f}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}:root:not([data-theme=light]){--bg:#15171b;--surface:#1d2025;--surface-2:#252930;--text:#e6e8eb;--text-muted:#9aa1ab;--border:#343941;--accent:#5b8ff0;--floor:#2a2620;--floor-edge:#3b352b;--ringer:#8a909b;--ringer-user:#5b8ff0;--skin:#d9b38f;--rope:#a8956e;--sally-2:#e8e4da;--strike:#fff7d6;--blue-line:#6b9cf5;--treble-line:#f06060;--strike-line:#fbbf24;--second-line:#26a69a;--second-strike-line:#e879f9;--row-band:#5b8ff02e;--row-cursor:#5b8ff073;--side-before:#f5a524;--side-after:#2dd4b5;--side-cover:#a78bfa;--rule:#434954;--call:#f0a050;--grid-l:64%;--shadow:0 1px 2px #0006, 0 4px 16px #0000004d}}:root[data-theme=dark]{--bg:#15171b;--surface:#1d2025;--surface-2:#252930;--text:#e6e8eb;--text-muted:#9aa1ab;--border:#343941;--accent:#5b8ff0}*{box-sizing:border-box}html,body{touch-action:manipulation;background:var(--bg);height:100%;color:var(--text);margin:0;font:14px/1.4 system-ui,-apple-system,Segoe UI,sans-serif}#app{height:100%}button,select,input{font:inherit;color:inherit}button{cursor:pointer;border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:6px 12px}button:hover{border-color:var(--accent)}.line-button,.striking-button,.settings-button{align-items:center;gap:6px;display:inline-flex}.icon{flex:none}@media (width<=1599px){.line-button .button-text,.striking-button .button-text,.settings-button .button-text{display:none}}button:disabled{opacity:.45;cursor:default}button:disabled:hover{border-color:var(--border)}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text);min-width:92px;font-weight:600}button.ghost{background:0 0}select,input[type=text],input[type=number]{border:1px solid var(--border);background:var(--surface);border-radius:8px;padding:5px 8px}.app{grid-template-rows:auto 1fr auto;height:100%;display:grid}header.topbar{background:var(--surface);border-bottom:1px solid var(--border);flex-wrap:wrap;align-items:center;gap:8px 10px;padding:10px 16px;display:flex}.brand{letter-spacing:.2px;align-items:center;gap:8px;margin-right:4px;font-size:16px;font-weight:700;display:flex}@media (width<=959px){.app:not(.touch) header.topbar{gap:6px 8px;padding:8px 12px}.app:not(.touch) .brand-text,.app:not(.touch) .peal-time,.app:not(.touch) header .button-text{display:none}}.method-button{text-align:left;flex-direction:column;flex:1 0 190px;align-items:flex-start;min-width:0;max-width:22em;line-height:1.15;display:flex}.method-button>*{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.method-button small{color:var(--text-muted)}.field{color:var(--text-muted);align-items:center;gap:6px;display:flex}.spacer{margin-left:auto}.touch-field{position:relative}.touch-field input{width:4em}.touch-field input[aria-invalid=true]{border-color:var(--clash);color:var(--clash)}.hud .chip.clash{border-radius:10px;max-width:min(40em,100%)}.touch-word{color:inherit;text-underline-offset:4px;background:0 0;border:none;padding:6px 0;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.touch-help{z-index:20;background:var(--surface);width:max-content;max-width:min(18em,100vw - 32px);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:8px;padding:8px 10px;font-size:14px;line-height:1.4;position:absolute;top:calc(100% + 6px);left:0}.touch-help p{margin:0}.touch-help>*+*{margin-top:8px}.touch-help table{border-collapse:collapse}.touch-help th,.touch-help td{text-align:left;vertical-align:top;padding:1px 12px 1px 0}.touch-help th{white-space:nowrap;font-weight:600}.touch-help th i{font-weight:400}.touch-help td+td{color:var(--text-muted)}.bell-picker label:first-child select{width:4.6em}.bell-picker{display:contents}.bell-row{border-top:1px solid var(--border);border-left:1px solid var(--border);background:var(--surface);flex-wrap:wrap;align-items:center;gap:6px 8px;padding:6px 12px;display:flex}.bell-row .touch-field{flex:16em;margin-left:auto}.bell-row .touch-field input{flex:1;min-width:0}.bell-row .touch-help{inset:auto 0 calc(100% + 6px) auto}.calls{gap:4px;display:flex}main.stage{grid-template-rows:1fr auto;grid-template-columns:1fr minmax(240px,30%);min-height:0;display:grid}.tower{grid-row:span 2;min-height:0;position:relative}.tower canvas,.line canvas{width:100%;height:100%;display:block}.tower canvas{touch-action:none;cursor:grab}.tower canvas:active{cursor:grabbing}.line canvas{touch-action:none}.line canvas.look-back{cursor:ns-resize}.view-pad{grid-template-rows:repeat(3,34px);grid-template-columns:repeat(3,34px);grid-template-areas:".up.""left reset right"".down.";gap:3px;display:grid;position:absolute;bottom:12px;right:12px}.view-pad button{background:color-mix(in srgb, var(--surface) 85%, transparent);color:var(--text-muted);touch-action:manipulation;border-radius:8px;padding:0;font-size:13px;line-height:1}.view-pad.on-line{display:none}.view-pad .up{grid-area:up}.view-pad .left{grid-area:left}.view-pad .reset{grid-area:reset;font-size:16px}.view-pad .right{grid-area:right}.view-pad .down{grid-area:down}.swatch{border-radius:3px;width:10px;height:10px;margin:0 2px 0 4px;display:inline-block}.swatch.before{background:var(--side-before)}.swatch.after{background:var(--side-after)}.swatch.cover{background:var(--side-cover)}.swatch.hunt{background:var(--treble-line)}.swatch.struck{background:var(--strike-line)}.swatch.second{background:var(--second-line)}.swatch.second-struck{background:var(--second-strike-line)}.line{border-left:1px solid var(--border);background:var(--surface);grid-template-rows:1fr auto;min-height:0;display:grid}.line .canvas-wrap{min-height:0;position:relative}.method-facts{border-top:1px solid var(--border);color:var(--text-muted);grid-template-columns:auto 1fr;gap:2px 10px;padding:10px 14px;font-size:12.5px;display:grid}.method-facts b{color:var(--text);word-break:break-all;font-weight:500}.banner{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);pointer-events:none;white-space:nowrap;border-radius:999px;padding:8px 20px;font-size:20px;font-weight:600;transition:opacity .3s;position:absolute;top:18px;left:50%;transform:translate(-50%)}.hud{flex-wrap:wrap;align-items:center;gap:10px;display:flex;position:absolute;bottom:14px;left:16px}.chip{background:var(--surface);border:1px solid var(--border);font-variant-numeric:tabular-nums;border-radius:999px;padding:4px 12px}.chip.good{border-color:var(--good);color:var(--good)}.chip.fair{border-color:var(--fair);color:var(--fair)}.chip.poor{border-color:var(--poor);color:var(--poor)}.chip.clash{border-color:var(--clash);color:var(--clash)}.hint{text-align:center;color:var(--text-muted);pointer-events:none;padding:64px 16px 0;font-size:15px;position:absolute;inset:0}.error{color:var(--danger)}footer.keys{border-top:1px solid var(--border);background:var(--surface);color:var(--text-muted);flex-wrap:wrap;gap:4px 14px;padding:8px 16px;font-size:12.5px;display:flex}kbd{text-align:center;border:1px solid var(--border);background:var(--surface-2);min-width:1.7em;color:var(--text);border-bottom-width:2px;border-radius:5px;margin-right:4px;padding:1px 6px;font:600 12px ui-monospace,Consolas,monospace;display:inline-block}dialog{border:1px solid var(--border);background:var(--surface);color:var(--text);box-shadow:var(--shadow);border-radius:14px;width:min(720px,100vw - 32px);max-height:calc(100vh - 48px);padding:0}dialog.wide{width:min(1100px,100vw - 32px)}dialog::backdrop{background:#00000059}.dialog-body{flex-direction:column;max-height:calc(100vh - 50px);display:flex}@supports (height:100dvh){dialog{max-height:calc(100dvh - 48px)}.dialog-body{max-height:calc(100dvh - 50px)}}.dialog-head{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:14px 18px;display:flex}.dialog-head h2{margin:0;font-size:17px}.dialog-content{padding:14px 18px 18px;overflow:auto}.search-row{flex-wrap:wrap;gap:8px;margin-bottom:10px;display:flex}.search-row input[type=text]{flex:1;min-width:200px}@media (width<=760px){.search-row input[type=text]{flex-basis:100%}.search-row select{flex:1 1 0;min-width:0}}.results{border:1px solid var(--border);border-radius:var(--radius);max-height:46vh;margin:0;padding:0;list-style:none;overflow:auto}@supports (height:100dvh){.results{max-height:46dvh}}.results li button{all:unset;box-sizing:border-box;cursor:pointer;border-bottom:1px solid var(--border);justify-content:space-between;gap:10px;width:100%;padding:7px 12px;display:flex}.results li:last-child button{border-bottom:none}.results li button:hover,.results li button:focus-visible{background:var(--row-band)}.results li.selected button{background:var(--row-band);font-weight:600}.results small{color:var(--text-muted);white-space:nowrap}.muted{color:var(--text-muted)}.section{margin-top:18px}.section h3{text-transform:uppercase;letter-spacing:.6px;color:var(--text-muted);margin:0 0 8px;font-size:13px}.grid-form{grid-template-columns:minmax(150px,auto) minmax(0,1fr);align-items:center;gap:8px 14px;display:grid}.grid-form label{color:var(--text-muted)}.grid-form select{max-width:100%}.grid-form>input[type=range]{margin-inline:0}@media (width<=760px){.grid-form{grid-template-columns:minmax(0,1fr);gap:4px}.grid-form>:nth-child(odd):not(:first-child){margin-top:10px}}.inline{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.choice{align-items:baseline;gap:8px;display:flex}input[type=range]{width:min(260px,100%);accent-color:var(--accent)}.key-row{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.capture{border-color:var(--accent);color:var(--accent)}.stats{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px;display:grid}.stat{border:1px solid var(--border);border-radius:var(--radius);padding:10px 12px}.stat .value{font-variant-numeric:tabular-nums;font-size:22px;font-weight:650}.stat .label{color:var(--text-muted);font-size:12px}.histogram{border-bottom:1px solid var(--border);align-items:flex-end;gap:2px;height:140px;padding:8px 0 0;display:flex}.histogram div{background:var(--accent);border-radius:3px 3px 0 0;flex:1;min-height:1px}.histogram-axis{color:var(--text-muted);justify-content:space-between;margin-top:4px;font-size:11.5px;display:flex}.touch-bar{padding:10px 12px max(10px, env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--surface);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;gap:8px;display:grid}.touch-row{gap:8px;display:flex}.touch-row>.primary{flex:1}.touch-row .calls{flex:2}.touch-row .calls button{flex:1}.touch-bar button{touch-action:manipulation;min-height:44px}.touch-ring{gap:10px;display:flex}.touch-ring .ring{border:2px solid var(--ringer-user);background:var(--row-band);min-height:92px;color:var(--ringer-user);touch-action:none;border-radius:16px;flex:1;font-size:22px;font-weight:700}.touch-ring .ring:active{background:var(--ringer-user);color:var(--accent-text)}.touch-ring .ring.second{border-color:var(--second-line);background:color-mix(in srgb, var(--second-line) 14%, transparent);color:var(--second-line)}.touch-ring .ring.second:active{background:var(--second-line);color:var(--accent-text)}@media (width<=760px),(height<=520px){header.topbar{gap:6px 8px;padding:8px 12px}.brand-text,.peal-time,.button-text{display:none}.hud{gap:6px;font-size:12px;inset:8px 8px auto}.chip{padding:2px 9px}.banner{padding:6px 14px;font-size:16px;top:40px}.hint{padding-top:48px;font-size:14px}.view-pad{grid-template-rows:repeat(3,30px);grid-template-columns:repeat(3,30px);bottom:8px;right:8px}}@media (width<=760px){.view-pad.on-tower{display:none}.view-pad.on-line{display:grid;top:8px;bottom:auto}.method-button{flex:120px;min-width:0;max-width:none}.striking-button,.line-button,.settings-button{min-height:40px}.tower{grid-row:auto}.bell-row{border-left:none}.bell-row .touch-field{flex-basis:7em}.spacer{display:none}main.stage{grid-template-rows:1fr 112px auto;grid-template-columns:1fr}.line{border-left:none;border-top:1px solid var(--border);grid-template-rows:1fr}.method-facts{display:none}.line .hint{justify-content:center;align-items:center;padding:0 124px 0 16px;display:flex}}@media (height<=520px){.touch-bar{padding-top:6px;padding-bottom:max(6px, env(safe-area-inset-bottom));grid-template-columns:auto 1fr;align-items:stretch}.touch-bar button{min-height:40px}.touch-ring .ring{min-height:0;font-size:18px}.method-facts,footer.keys{display:none}}.build{margin:18px 0 0;font-size:12px}button.pause{min-width:48px;font-weight:600}button.pause.paused{border-color:var(--accent);color:var(--accent)}.paused-veil{background:color-mix(in srgb, var(--bg) 45%, transparent);color:var(--text);letter-spacing:.5px;pointer-events:none;justify-content:center;align-items:center;font-size:28px;font-weight:700;display:flex;position:absolute;inset:0}.line-controls{flex-wrap:wrap;align-items:center;gap:8px 18px;margin-bottom:10px;display:flex}.calls-row{flex-wrap:wrap;align-items:center;gap:8px 10px;margin-bottom:14px;display:flex}.line-controls .field{align-items:center;gap:6px;display:inline-flex}@media (width<=760px){.line-controls{grid-template-columns:minmax(min-content,max-content) minmax(max-content,1fr);place-items:center start;gap:8px 12px;display:grid}.line-controls .field{display:contents}.line-controls .field.compress{grid-column:2;display:inline-flex}}@media (width<=340px){.line-controls{grid-template-columns:minmax(min-content,max-content) minmax(0,1fr)}}.seg{display:inline-flex}.seg button{border-radius:0}.seg button:first-child{border-radius:8px 0 0 8px}.seg button:last-child{border-radius:0 8px 8px 0;margin-left:-1px}.seg button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.diagram{flex-wrap:wrap;align-items:flex-start;gap:16px 18px;display:flex}.diagram.compressed{gap:10px 14px}.lead-block{flex:none;display:block}.lead-block.pick{cursor:pointer}.lead-block text{fill:var(--text);text-anchor:middle;dominant-baseline:central;font:12px ui-monospace,Consolas,monospace}.lead-block text.lead-head{font-weight:700}.lead-block text.place-bell{fill:var(--text-muted);font:11px system-ui,sans-serif}.lead-block polyline{fill:none;stroke-linejoin:round;stroke-linecap:round}.lead-block .blue{stroke:var(--blue-line);stroke-width:2px}.lead-block .treble{stroke:var(--treble-line);stroke-width:1.25px}.lead-block .lead-rule{stroke:var(--rule);stroke-width:1px}.lead-block text.place-bell.side{text-anchor:start}.lead-block .call-mark{cursor:pointer}.lead-block .call-mark rect{fill:#0000}.lead-block .call-mark circle{fill:none;stroke:var(--text-muted);stroke-width:1.2px}.lead-block .call-mark:hover circle{stroke:var(--accent);stroke-width:2px}.lead-block .call-mark text{fill:var(--call);font:700 16px system-ui,sans-serif}.lead-block .call-band{fill:color-mix(in srgb, var(--call) 16%, transparent)}.lead-block .other{stroke-width:1.4px}.lead-block text.end-bell{font:700 11px ui-monospace,Consolas,monospace}.lead-block text.call-caption{fill:var(--call);font:600 12px system-ui,sans-serif}.call-blocks{border-left:1px solid var(--border);flex-wrap:wrap;align-items:flex-start;gap:16px 18px;padding-left:14px;display:flex}.diagram.inline{flex-wrap:nowrap;justify-content:safe center}.diagram.inline>.all-lines{flex:0 auto;height:auto;position:sticky;top:0}@media (width<=760px){.diagram.inline{gap:10px}}
