@font-face{font-family:Montserrat;src:url('../../画面案/ロゴ/fonts/montserrat-600.ttf') format('truetype');font-weight:600;font-display:swap}
@font-face{font-family:Montserrat;src:url('../../画面案/ロゴ/fonts/montserrat-500.ttf') format('truetype');font-weight:500;font-display:swap}
:root{color-scheme:dark;font-family:'Noto Sans JP','Hiragino Sans','Yu Gothic','Meiryo',sans-serif;font-size:87.5%;line-height:1.4;background:#090d1a;color:#e3e8f6;--gold:#d6b56a;--app-height:100dvh}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{color:inherit;background:#182239;border:1px solid #4c566e;border-radius:9px;min-height:38px;padding:6px 10px;cursor:pointer}button:disabled{opacity:.4;cursor:default}button:focus-visible,[role=button]:focus-visible{outline:2px solid var(--gold);outline-offset:2px}button:hover:enabled{border-color:var(--gold)}input,select{background:#111a2c;color:inherit;border:1px solid #74819d;border-radius:6px;padding:8px;min-width:0;width:100%}input{user-select:text;-webkit-user-select:text}input:focus{outline:2px solid var(--gold)}[hidden]{display:none!important}
#app{height:var(--app-height);display:flex;flex-direction:column;padding:max(6px,env(safe-area-inset-top)) max(7px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left));gap:5px;max-width:1500px;margin:auto}
header{display:flex;align-items:center;gap:9px;flex:none}.logo{background:none;border:none;display:flex;flex-direction:column;align-items:center;min-height:44px;line-height:1;padding:3px 4px;color:var(--gold);width:100px}.prism{font-family:Montserrat,sans-serif;font-weight:600;font-size:1.714286rem;letter-spacing:3px}.notes{font-family:Montserrat,sans-serif;font-weight:500;font-size:0.642857rem;letter-spacing:5px;margin-top:5px;margin-left:4px}.heading{min-width:0;flex:1}.heading strong{display:block;font-size:clamp(0.857143rem,2vw,1.142857rem)}small{display:block;font-size:0.785714rem;color:#a8b6d0;overflow-wrap:anywhere}header>button:last-child{min-width:38px}
#workspace{display:flex;flex:1;min-height:0;gap:6px}#stage{position:relative;flex:1;min-width:0;min-height:0;border:1px solid #253553;border-radius:16px;background:radial-gradient(ellipse at 50% 35%,#192442,#090d1a 78%)}#board{display:block;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.zoom-controls{position:absolute;right:6px;bottom:6px;display:flex;gap:3px}.zoom-controls button{min-height:32px;font-size:0.857143rem}#add-controls{position:absolute;left:6px;top:6px;display:flex;gap:3px}#add-controls button{font-size:0.785714rem;min-height:32px;padding:4px 6px}
.node-hit{fill:transparent}.node-symbol{stroke:var(--gold);stroke-width:3;fill:#18203a}.source .node-symbol{fill:#756646}.goal .node-symbol{fill:#1d405d}.node-name{font-size:2rem;fill:#fff;text-anchor:middle;pointer-events:none}.node-time{font-size:1.642857rem;fill:#a3b6d4;text-anchor:middle;pointer-events:none}.selected .node-symbol{stroke:#fff;stroke-width:5}.move-handle{fill:#a3b6d4;stroke:#fff;stroke-width:3;cursor:move}.choice .node-symbol{animation:flash 1.3s ease-in-out infinite}.edge-line{fill:none;stroke:#c4a362;stroke-width:4}.edge-hit{fill:none;stroke:transparent;stroke-width:45}.edge-time{font-size:1.714286rem;fill:#b3c6e5;text-anchor:middle}.candidate .edge-line{stroke:#59657f;stroke-dasharray:11 12;stroke-width:3}.candidate .edge-time{fill:#687795}.edge.selected .edge-line{stroke:#fff;stroke-width:7}.unavailable{opacity:.3}.wire-preview{stroke:#fff;stroke-width:5;fill:none;stroke-dasharray:10 8;pointer-events:none}.particle{fill:#fff4c7;stroke:#c4a362;stroke-width:3;filter:drop-shadow(0 0 8px #fde0a0);pointer-events:none}.particle.waiting{fill:#85a3eb}.particle.processing{fill:#bff8e0}.particle.deadend{fill:none;stroke:#a585bf}.goal.arrived .node-symbol{fill:#83aab9;filter:drop-shadow(0 0 18px #dce5ff)}@keyframes flash{50%{stroke:#fff;filter:drop-shadow(0 0 12px #e4cc9b)}}@media(prefers-reduced-motion:reduce){.choice .node-symbol{animation:none;stroke:#fff}}
#result{flex:none;min-height:22px;font-size:0.857143rem;overflow-wrap:anywhere}#result.error{color:#f3b3a7}#play-controls{display:flex;gap:5px;flex:none}#play-controls button{flex:1;min-width:0;padding:6px 4px;font-size:0.857143rem}#play{background:#705e37;border-color:var(--gold)}footer{display:flex;justify-content:space-between;gap:4px;font-size:0.714286rem;color:#8b9bb8;flex:none}#hint{min-width:0;overflow-wrap:anywhere}footer>span:last-child{white-space:nowrap}#guide-bar{display:flex;align-items:center;gap:5px;font-size:0.857143rem}#guide-text{flex:1}#guide-bar button{font-size:0.785714rem;min-height:32px}
#records-panel{display:flex;flex-direction:column;min-height:0;width:36%;background:#111a2a;border:1px solid #39485f;border-radius:12px;padding:6px}.panel-heading{display:flex;align-items:center;gap:5px;flex:none}.panel-heading strong,.panel-heading h2{flex:1;margin:0;font-size:1rem}.panel-heading button{min-height:32px;padding:3px 8px}.pager{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none}.pager button{min-height:32px;font-size:0.857143rem}.pager span{font-size:0.785714rem}#record-list{flex:1;min-height:0;display:flex;flex-direction:column;gap:4px;margin:5px 0}.record-row{font-size:0.785714rem;min-height:32px;text-align:left;display:block;overflow-wrap:anywhere;padding:4px 7px}
dialog{width:min(480px,calc(100vw - 18px));max-width:calc(100vw - 18px);height:min(430px,calc(var(--app-height) - 22px));max-height:calc(var(--app-height) - 22px);margin:auto;padding:12px;border:1px solid #8a7854;border-radius:16px;background:#101827;color:inherit}dialog::backdrop{background:#03051099}dialog form{height:100%;display:flex;flex-direction:column;gap:8px;min-height:0}#dialog-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:7px}#dialog-body p{margin:0;font-size:0.928571rem;overflow-wrap:anywhere}#dialog-body label{display:block;font-size:0.928571rem}.dialog-list{display:flex;flex-direction:column;flex:1;gap:5px;min-height:0}.dialog-list button{text-align:left}.dialog-list .pager{margin-top:auto}.dialog-row{display:flex;gap:5px}.dialog-row>*{flex:1;min-width:0}#dialog-actions{display:flex;flex:none;gap:5px;flex-wrap:wrap}#dialog-actions button{flex:1;font-size:0.857143rem}#dialog-error{margin:0;font-size:0.857143rem;color:#ffb0a2;overflow-wrap:anywhere}#dialog-error:empty{display:none}.detail-value{white-space:pre-wrap;word-break:break-all}.input-focus dialog{height:calc(var(--app-height) - 12px)}.input-focus #workspace{visibility:hidden}
.node-name{font-size:calc(2rem * var(--board-factor,1))}.node-time,.node-state{font-size:calc(1.642857rem * var(--board-factor,1));fill:#a3b6d4;text-anchor:middle;pointer-events:none}.edge-time{font-size:calc(1.714286rem * var(--board-factor,1))}
.heading strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#dialog-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dialog-list button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#result-line{display:flex;gap:4px;align-items:center;flex:none;min-height:26px}#result{flex:1;min-width:0}#retry-result{font-size:0.714286rem;min-height:26px;padding:3px 5px;flex:none}
@media(max-aspect-ratio:1/1){#workspace:has(#records-panel:not([hidden])){flex-direction:column}#records-panel{width:100%;height:38%;min-height:120px}}
@media(max-height:360px){:root{font-size:87.5%}#app{gap:3px}header .logo{min-height:32px}.prism{font-size:1.428571rem}.notes{font-size:0.535714rem;margin-top:3px}.heading strong{font-size:0.857143rem}#play-controls button{min-height:30px}#result{min-height:17px}footer{font-size:0.642857rem}dialog{padding:7px}dialog form{gap:4px}#dialog-actions button{min-height:29px}#dialog-body{gap:4px}#guide-bar button{min-height:28px}#records-panel{padding:4px}.panel-heading button{min-height:26px}#records-panel .pager button{min-height:26px}.record-row{min-height:28px}}
#app,dialog{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}input,textarea,select{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}button,img{-webkit-touch-callout:none}img{user-select:none;-webkit-user-drag:none}
#guide-spirit{width:38px;height:56px;object-fit:contain;flex:none;pointer-events:none}#guide-text{min-width:0}#guide-bar button{flex:none}
.scene,.symbol-art,.arrival-layer,.light-trail{pointer-events:none}.sky-stars{fill:#d8dff3}.floating-ruin{opacity:.22}.island{fill:#070b15;stroke:#485272;stroke-width:2}.stone{fill:#17233b;stroke:#68789d;stroke-width:2}.stone-line{fill:none;stroke:#879ac2;stroke-width:2}.observatory{opacity:.17}.dome-shell{fill:#121b30;stroke:#a28c64;stroke-width:2}.dome-line,.armillary{fill:none;stroke:#b7a16d;stroke-width:2}
.prism-facet{fill:#6d7cbb;opacity:.32}.prism-seam{fill:none;stroke:#bdc8f0;stroke-width:1.5;opacity:.55}.star-core,.chime-clapper{fill:#fff0bb}.altar-steps{fill:none;stroke:var(--gold);stroke-width:3}.disabled-mark{fill:none;stroke:#e4c7be;stroke-width:4;pointer-events:none}.light-trail{fill:none;stroke:#f8e3ac;stroke-width:5;stroke-linecap:round;opacity:.75}
.arrival-art{animation:altar-fade 1300ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.arrival-glow{fill:url(#altar-light);transform-box:fill-box;transform-origin:center;animation:altar-bloom 1200ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.constellation-line{fill:none;stroke:#c5d9f8;stroke-width:1;animation:star-threads 1100ms ease-out both;animation-delay:calc(var(--arrival-age,0ms) + 100ms)}
.constellation-star{fill:#fff1cf;filter:drop-shadow(0 0 4px #f1d395);animation:star-light 850ms ease-out both;animation-delay:calc(var(--arrival-age,0ms) + var(--star-delay,0ms))}
.star-ray{fill:none;stroke:#e9d7ad;stroke-width:.8;opacity:.65}
@keyframes altar-fade{0%,70%{opacity:1}100%{opacity:0}}
@keyframes altar-bloom{0%{opacity:0;transform:scale(.55)}18%{opacity:.85}100%{opacity:0;transform:scale(1.35)}}
@keyframes star-threads{0%{opacity:0}30%,60%{opacity:.25}100%{opacity:0}}
@keyframes star-light{0%{opacity:0}20%,45%{opacity:1}100%{opacity:0}}
@media(max-height:360px){#guide-spirit{width:25px;height:36px}}
@media(prefers-reduced-motion:reduce){.arrival-art{animation-timing-function:steps(1,end)}.arrival-glow,.constellation-line,.constellation-star{animation:none}.arrival-glow{opacity:.3}.constellation-line{opacity:.2}.constellation-star{opacity:.8}}

.dialog-list>*{flex-shrink:0}.dialog-list>.dialog-list{flex-shrink:1}.dialog-list>p,#record-list>p{margin:0}.pager span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-row{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0}

.logo{padding:0;width:100px;height:44px;flex:none}.logo svg{display:block;width:100%;height:100%;fill:currentColor}.logo .prism{font-size:240px;letter-spacing:30px;text-anchor:middle}.logo .notes{font-size:90px;letter-spacing:50px;text-anchor:middle}.heading small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#hint{font:inherit;line-height:inherit;text-align:left;border:0;background:none;padding:0;min-height:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pager button{white-space:nowrap}.compact .logo{height:32px;min-height:32px}.compact #condition,.compact #guide-bar{display:none}.compact #stage-controls{position:absolute;left:4px;right:4px;bottom:4px;display:flex;justify-content:space-between;gap:5px}.compact #add-controls,.compact .zoom-controls{position:static;flex:none}.compact #stage-controls button{white-space:nowrap}body.records-fullscreen #app>:not(#workspace){visibility:hidden}body.records-fullscreen #workspace{position:fixed;inset:6px;z-index:3}body.records-fullscreen #stage{display:none}body.records-fullscreen #records-panel{width:100%;height:100%;min-height:0}.records-fullscreen #record-list>p{font-size:0.785714rem}

.flow-fields{display:flex;flex-direction:column;gap:7px;flex:none}.flow-fields.columns{flex-direction:row}.flow-field{flex:1;min-width:0}.flow-field label{margin-bottom:4px}.condensed-form>label{display:none}#record-list>p{font-size:0.785714rem}.dialog-row input{flex:2}.dialog-row button{flex:1}@media(max-height:360px){input,select{padding:4px}}
#dialog-body.condensed-form>label{display:none}
#condition-info{background:none;border:0;padding:0;min-height:0;text-align:left}.heading-title{display:flex;align-items:center;gap:4px}.heading-title strong{flex:1;min-width:0}
.text-enlarged #stage{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.text-enlarged #board{grid-column:1;grid-row:1;min-width:0;min-height:0}.compact #stage-controls{position:static;grid-column:1;grid-row:2;padding:4px}.text-enlarged:not(.compact) #stage{grid-template-rows:auto minmax(0,1fr)}.text-enlarged:not(.compact) #board{grid-row:2}.text-enlarged:not(.compact) #stage-controls{display:contents}.text-enlarged:not(.compact) #add-controls{position:static;grid-column:1;grid-row:1;padding:6px}
.text-enlarged:not(.compact) #stage:has(#add-controls:not([hidden])){row-gap:.5rem}
#dialog-actions button{flex:1 1 auto}
@media(max-height:360px){dialog{height:calc(var(--app-height) - 12px);max-height:calc(var(--app-height) - 12px)}}

/* Keep the portrait frame on the device. Only its readable content counter-rotates. */
:root{--layout-width:100vw;--layout-height:var(--app-height);--ui-rotation:0deg;--safe-top:env(safe-area-inset-top);--safe-right:env(safe-area-inset-right);--safe-bottom:env(safe-area-inset-bottom);--safe-left:env(safe-area-inset-left)}
body{height:var(--app-height)}
#app{position:absolute;left:0;top:0;width:var(--layout-width);height:var(--layout-height);max-width:none;margin:0;transform-origin:0 0;padding:max(6px,var(--safe-top)) max(7px,var(--safe-right)) max(5px,var(--safe-bottom)) max(7px,var(--safe-left))}
.device-landscape{--safe-top:env(safe-area-inset-right);--safe-right:env(safe-area-inset-bottom);--safe-bottom:env(safe-area-inset-left);--safe-left:env(safe-area-inset-top)}
.device-left{--safe-top:env(safe-area-inset-left);--safe-right:env(safe-area-inset-top);--safe-bottom:env(safe-area-inset-right);--safe-left:env(safe-area-inset-bottom)}
.device-inverted{--safe-top:env(safe-area-inset-bottom);--safe-right:env(safe-area-inset-left);--safe-bottom:env(safe-area-inset-top);--safe-left:env(safe-area-inset-right)}
.orientation-content{display:flex;flex:1;min-width:0;min-height:0;gap:inherit;align-items:inherit;justify-content:inherit}
.records-content{width:100%;height:100%;flex-direction:column;gap:5px}
.footer-content>span:last-child{white-space:nowrap}
.app-version{white-space:nowrap;font:inherit;color:inherit;border:0;background:none;padding:0;min-height:0}
#edit-controls{position:absolute;left:6px;bottom:6px;display:flex;gap:3px;max-width:calc(50% - 10px)}
#edit-controls button{font-size:.857143rem;min-height:32px;padding:4px 6px;white-space:nowrap}
#magnifier-toggle[aria-pressed=true],button[aria-pressed=true]{background:#d6b56a;color:#111827;border-color:#f5ddb0;box-shadow:inset 0 0 0 1px #f5ddb0}
button:active:enabled{background:#52617f;box-shadow:inset 0 0 0 2px #e3e8f6}
.button-response{animation:button-response .22s ease-out}
@keyframes button-response{0%,45%{box-shadow:inset 0 0 0 2px #fff;background:#52617f}100%{}}
#play[data-state=running]{background:#466e61;color:#fff}#play[data-state=paused]{background:#745e3a;color:#fff}
dialog.menu-dialog{height:calc(var(--app-height) - 22px)}
#dialog-body.menu-grid{display:grid;grid-template-columns:repeat(var(--menu-columns,2),minmax(0,1fr));grid-auto-rows:minmax(0,max-content);align-content:start;gap:5px}
.menu-grid button{min-width:0;padding:3px 4px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
.menu-grid.tight-menu button{padding-inline:0}
.version-tools{display:flex;align-items:center;justify-content:end;gap:4px;flex-wrap:wrap;flex:none}
.copyright{color:#a6acba;white-space:nowrap;letter-spacing:.025em}
.version-tools{gap:8px;line-height:1.2}
.title-credits{display:flex;flex-wrap:wrap;justify-content:center;gap:3px 14px}
.device-landscape .version-tools{flex-direction:column;align-items:center;gap:0}
.device-landscape .version-tools .copyright{white-space:normal;overflow-wrap:anywhere;text-align:center}
#update-notice{font:inherit;min-height:0;padding:1px 4px;color:#f5ddb0;border-color:#8a7854}
.device-landscape .version-tools{justify-content:center}
#wire-magnifier{position:fixed;z-index:5;pointer-events:none;overflow:hidden;border:2px solid var(--gold);border-radius:12px;background:#101827;color:#fff;box-shadow:0 2px 12px #0009;font:12px/19px sans-serif}
#wire-magnifier>span{display:block;height:19px;padding:0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#wire-magnifier svg{display:block;width:100%;height:calc(100% - 19px)}
.magnifier-center{fill:none;stroke:#fff;stroke-width:1.5;pointer-events:none}
header> .header-content>button:last-child{min-width:38px}
.device-landscape .orientation-region{position:relative}
.device-landscape .orientation-content{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(var(--ui-rotation));align-items:stretch}
.device-landscape .header-content,.device-landscape .play-content,.device-landscape .zoom-content,.device-landscape .add-content,.device-landscape .guide-content,.device-landscape .result-content,.device-landscape .footer-content{flex-direction:column}
.device-landscape .edit-content{flex-direction:column}
.device-left .edit-content{flex-direction:column-reverse}
.device-landscape #edit-controls{width:calc(100% - 12px);max-width:calc(7 * var(--layout-font) + 12px);height:clamp(60px,calc(4.5 * var(--layout-font)),160px)}
.device-landscape #edit-controls button{flex:1;min-height:0;padding:2px;font-size:.785714rem}
.device-inverted .edit-content{flex-direction:row-reverse}
.text-enlarged #edit-controls{position:static;grid-column:1;grid-row:3;padding:0;max-width:none;flex:none}
.text-enlarged #stage,.text-enlarged:not(.compact) #stage{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto minmax(0,1fr) auto}
.text-enlarged #board{grid-column:1/-1;grid-row:2}
.text-enlarged #stage-controls,.text-enlarged:not(.compact) #stage-controls{display:contents}
.text-enlarged #stage-controls button{padding:2px;line-height:1.4}
.text-enlarged .zoom-controls{position:static;grid-column:2;grid-row:3;padding:0;flex:none;justify-self:end}
.text-enlarged #add-controls{position:static;grid-column:1/-1;grid-row:1;padding:4px}
.device-landscape .text-enlarged #edit-controls{position:absolute;left:6px;bottom:6px;max-width:calc(7 * var(--layout-font) + 12px);padding:0}
.device-left .header-content,.device-left .play-content,.device-left .zoom-content,.device-left .add-content,.device-left .guide-content,.device-left .result-content,.device-left .footer-content{flex-direction:column-reverse}
.device-landscape header{height:clamp(70px,calc(2.7 * var(--layout-font)),100px)}
.device-landscape .header-content .logo{width:100%;max-width:100px;align-self:center;height:38px;min-height:38px}
.device-landscape .heading-title{justify-content:center}
.device-landscape .header-content .heading{width:100%;display:flex;flex-direction:column;justify-content:center;text-align:center}
.device-landscape .heading strong{white-space:nowrap}
.device-landscape #workspace{flex-direction:column}
.device-landscape #records-panel{width:100%;height:38%;min-height:110px}
.device-landscape #play-controls{height:clamp(54px,calc(4.2 * var(--layout-font)),130px)}
.device-landscape #play-controls button{min-height:0;padding:4px 2px}
.device-landscape #result-line{height:clamp(70px,calc(3.8 * var(--layout-font)),130px)}
.device-landscape .result-content{justify-content:center}
.device-landscape #result{flex:none}
.device-landscape #guide-bar{height:clamp(95px,7rem,160px)}
.device-landscape .guide-content{align-items:center;justify-content:center}
.device-landscape #guide-text{flex:none;width:100%}
.device-landscape footer{height:clamp(50px,calc(4.2 * var(--layout-footer-font)),140px)}
.device-landscape .footer-content{justify-content:space-between}
.device-landscape .footer-content>span:last-child{white-space:normal;text-align:center}
.device-landscape #hint{text-align:center;white-space:normal;overflow-wrap:anywhere;overflow:visible}
.device-landscape .text-enlarged #hint{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-landscape #stage-controls{display:contents}
.device-landscape #add-controls,.device-landscape .zoom-controls{position:absolute;width:calc(100% - 12px);max-width:calc(11 * var(--layout-font) + 12px);height:clamp(34px,calc(3.5 * var(--layout-font)),110px);padding:0;flex:none}
.device-landscape #stage-controls button{flex:1;min-height:0;padding:2px;font-size:.857143rem;white-space:nowrap}
.device-landscape .compact #stage-controls{display:contents}
.device-landscape .text-enlarged #stage{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto minmax(0,1fr) auto}
.device-landscape .text-enlarged #board{grid-column:1/-1;grid-row:2}
.device-landscape .text-enlarged #stage-controls,.device-landscape .text-enlarged:not(.compact) #stage-controls{display:contents}
.device-landscape .text-enlarged #stage-controls button{padding:0;line-height:1.4}
.device-landscape .text-enlarged #edit-controls{position:relative;left:0;bottom:0;grid-column:1;grid-row:3;width:100%;max-width:none;height:clamp(68px,calc(2.7 * var(--layout-font)),110px)}
.device-landscape .text-enlarged .zoom-controls{position:relative;right:0;bottom:0;grid-column:2;grid-row:3;width:100%;max-width:none;height:clamp(68px,calc(2.7 * var(--layout-font)),110px)}
.device-landscape .text-enlarged #add-controls{position:relative;left:0;top:0;grid-column:1/-1;grid-row:1;padding:0;width:100%;max-width:none;height:clamp(80px,calc(3.4 * var(--layout-font)),140px)}
.device-landscape body.records-fullscreen #workspace{position:absolute;inset:6px}
.device-landscape body.records-fullscreen #records-panel{height:100%;min-height:0}
.device-inverted .orientation-content{transform:rotate(180deg)}
.device-inverted .header-content,.device-inverted .play-content,.device-inverted .zoom-content,.device-inverted .add-content,.device-inverted .guide-content,.device-inverted .result-content,.device-inverted .footer-content{flex-direction:row-reverse}
.device-inverted .records-content{flex-direction:column-reverse}
.device-landscape body:not(.records-fullscreen) .text-enlarged .records-content>.panel-heading{flex-wrap:wrap}
.device-landscape body:not(.records-fullscreen) .text-enlarged #record-title{flex-basis:100%;min-width:0}
.device-landscape body:not(.records-fullscreen) .text-enlarged .records-content>.panel-heading button{flex:1;min-width:0;padding:3px 1px}
.device-landscape body:not(.records-fullscreen) .text-enlarged .records-content>.pager{flex-wrap:wrap}
.device-landscape body:not(.records-fullscreen) .text-enlarged .records-content>.pager span{order:-1;flex-basis:100%;text-align:center}
.device-landscape body:not(.records-fullscreen) .text-enlarged .records-content>.pager button{flex:1;min-width:0;padding:3px 1px}
body.records-fullscreen #app>:not(#workspace){display:none}

/* Readable seconds at the fit scale, with a dark outline over paths and artwork. */
.node-time,.edge-time{font-size:calc(2.285714rem * var(--board-factor,1));font-weight:600;fill:#f3f6ff;stroke:#090d1a;stroke-width:calc(6px * var(--board-factor,1));stroke-linejoin:round;paint-order:stroke;pointer-events:none}
.candidate .edge-time{fill:#ced8ea}
.header-actions{display:flex;gap:5px;flex:none;align-items:center;justify-content:center}
.header-actions button{min-width:38px;min-height:38px}
#update-notice{font:inherit;min-height:38px;min-width:48px;padding:6px 8px;background:#d6b56a;color:#111827;border-color:#f5ddb0;font-weight:600;white-space:nowrap}
#clear-toast{position:fixed;z-index:6;padding:10px;border:1px solid #d6b56a;border-radius:12px;background:#111a2cf5;box-shadow:0 4px 20px #0008;font-size:.928571rem;line-height:1.4}
.clear-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.clear-heading strong{min-width:0}.clear-heading button{padding:0;min-width:32px;min-height:32px;flex:none}
.clear-actions{display:flex;flex-wrap:wrap;gap:6px}.clear-actions button{flex:1;white-space:nowrap;padding:6px}
#clear-again{border-color:#d6b56a}#clear-next{background:#d6b56a;color:#111827;border-color:#f5ddb0}

/* Opaque time cards and brighter buildable paths; decoration remains behind input. */
.edge-time{stroke:none;paint-order:normal}
.edge-label-card{fill:#18243b;fill-opacity:1;stroke:#8198bf;stroke-width:calc(2px * var(--board-factor,1))}
.candidate .edge-line{stroke:#a3b8de;stroke-width:calc(3px * var(--board-factor,1));stroke-dasharray:12 10}
.candidate .edge-label-card{fill:#142139;stroke:#738eb8}
.floating-ruin{opacity:.6}.observatory{opacity:.55}
.stone{fill:#223854;stroke:#8ea4d1}.stone-line{stroke:#adc8f3}
.dome-shell{fill:#263953;stroke:#d4b77f}.dome-line,.armillary{stroke:#e3c98c}

.device-landscape header:has(#update-notice:not([hidden])){height:clamp(110px,calc(4.5 * var(--layout-font)),150px)}

/* Keep status from shrinking the board; tapping reveals the complete text. */
#result-info{flex:1;min-width:0;min-height:0;border:0;background:none;padding:0;text-align:left;overflow:hidden}
#result{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.device-landscape #result-info{flex:none;width:100%}

.scene path,.scene ellipse{vector-effect:non-scaling-stroke;stroke-width:1px}
.sky-stars circle{r:calc(1.5px * var(--board-factor,1))}
.device-landscape .compact footer{height:60px}
.device-landscape .compact #result-line{height:70px}
.device-landscape .compact #play-controls{height:90px}
.device-landscape .compact header:has(#update-notice:not([hidden])){height:110px}

.device-landscape .text-enlarged.compact #stage{display:block}
.device-landscape .text-enlarged.compact #board{width:100%;height:100%}
.device-landscape .text-enlarged.compact #edit-controls{position:absolute;left:6px;bottom:6px;width:calc(50% - 12px);max-width:none;height:68px}
.device-landscape .text-enlarged.compact .zoom-controls{position:absolute;right:6px;bottom:6px;width:calc(50% - 12px);max-width:none;height:68px}

.edge-label-leader{fill:none;stroke:#a3b8de;stroke-width:1px;vector-effect:non-scaling-stroke;pointer-events:none}

#clear-toast.narrow{padding:6px}
.narrow .clear-heading{gap:4px;margin-bottom:6px;flex-wrap:wrap}.narrow .clear-heading strong{font-size:max(12px,.65em)}
.narrow .clear-heading button{min-width:24px;min-height:28px}
.narrow .clear-actions{display:grid;grid-template-columns:minmax(0,1fr)}.narrow .clear-actions button{white-space:normal;overflow-wrap:anywhere;padding:4px}
#clear-toast.slim{display:flex;align-items:center;gap:4px;padding:1px 3px}
#clear-toast.docked .clear-actions button{font-size:.785714rem;padding:2px}
#clear-toast.slim .clear-heading,#clear-toast.slim .clear-actions{display:contents}
#clear-toast.slim .clear-heading strong{font-size:.65rem;white-space:nowrap}
#clear-toast.slim .clear-actions button{font-size:.785714rem;line-height:1.15;padding:2px 4px;min-height:30px;white-space:nowrap;flex:1}
#clear-toast.slim #clear-dismiss{order:4;min-width:28px;min-height:30px;padding:0;font-size:.785714rem;line-height:1.15}

/* Adopted painted artwork; only interactive routes carry diagram lines. */
.scene-shade{fill:#090d1a;opacity:.22}
.floating-ruin,.observatory{opacity:.72}
.node-halo{fill:none;stroke:transparent;stroke-width:3}
.selected .node-halo{stroke:#fff}
.choice .node-halo{stroke:#f3d68e;stroke-dasharray:7 5}
.node-name{font-size:calc(2rem * var(--board-factor,1));font-weight:600;stroke:#090d1a;stroke-width:5;paint-order:stroke}
.edge-line{stroke-width:calc(4px * var(--board-factor,1))}
.node-separation{fill:url(#node-depth)}
.node-symbol{filter:drop-shadow(0 0 3px #040b19) drop-shadow(0 4px 7px #020610b3)}
.edge-backdrop{fill:none;stroke:#030a17;stroke-opacity:.65;stroke-width:calc(7px * var(--board-factor,1));stroke-linecap:round;pointer-events:none}
.candidate .edge-backdrop{stroke-dasharray:12 10}
.edge.selected .edge-backdrop{stroke-width:calc(12px * var(--board-factor,1))}

/* A quiet title assembled from the adopted ruins and observatory artwork. */
#title-screen{position:fixed;inset:0;z-index:8;background:#090d1a;overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.title-art{position:absolute;inset:0;pointer-events:none}.title-art img{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center;opacity:.7}
.title-ruins{mask-image:linear-gradient(110deg,#000 12%,transparent 75%)}.title-observatory{mask-image:linear-gradient(110deg,transparent 15%,#000 90%)}
.title-art:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,#090d1a33,#090d1a55 40%,#090d1ae8 90%)}
.title-layout{position:relative;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:clamp(8px,2vh,24px);height:100%;max-width:1000px;margin:auto;padding:max(20px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
.title-hero{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:0;text-align:center}.title-logo{width:min(360px,90%);margin:0;color:#e6c577;filter:drop-shadow(0 3px 10px #050b18)}
.title-logo svg{display:block;width:100%;max-height:25vh;fill:currentColor}.title-logo .prism{font-size:240px;letter-spacing:30px;text-anchor:middle}.title-logo .notes{font-size:90px;letter-spacing:50px;text-anchor:middle}
.title-hero p{font-size:.928571rem;line-height:1.5;color:#e5e9f3;text-shadow:0 2px 5px #000;margin:12px 0}
.title-symbols{display:flex;align-items:center;justify-content:center;width:min(360px,85%);max-height:24vh;gap:12px}.title-symbols img{width:23%;height:clamp(42px,12vh,95px);object-fit:contain;filter:drop-shadow(0 4px 9px #030816)}.title-symbols span{flex:1;height:1px;background:linear-gradient(90deg,transparent,#d8ba71,transparent)}
.title-menu{display:flex;flex-direction:column;gap:8px;width:min(430px,100%);margin:0 auto;text-align:center}.title-modes,.title-details{display:flex;gap:8px}.title-menu button{flex:1;min-width:0;min-height:44px;background:#152138e8;border-color:#7785a0;font-size:1rem}.title-modes button{min-height:48px;border-color:#ceb474;color:#fff0c6}.title-menu #title-start{background:#c3a158;color:#091020;border-color:#ceb474}.title-menu small{font-size:.714286rem;color:#9fabbe}.title-menu #title-resume{background:transparent;border-color:#52617c}.title-menu #title-update{background:#d6b56a;color:#111827}.title-menu p{margin:0;color:#f5b7a4;font-size:.857143rem}.title-menu p:empty{display:none}
.dialog-list .part-description{display:flex;align-items:center;gap:12px;min-height:75px;white-space:normal}.part-description img{width:48px;height:65px;object-fit:contain;flex:none}.part-description strong{font-size:1rem}.part-description p{line-height:1.4}.dialog-list .part-description.compact{min-height:48px;padding:4px 7px}.part-description.compact img{width:42px;height:40px}
@media(max-aspect-ratio:1/1) and (max-height:600px){.title-layout{padding-top:10px;padding-bottom:8px;gap:6px}.title-symbols{display:none}.title-hero p{margin:5px 0}.title-menu{gap:5px}.title-menu button{min-height:38px}.title-modes button{min-height:42px}}
@media(min-aspect-ratio:1/1){.title-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:center;gap:24px}.title-logo svg{max-height:40vh}.title-symbols{max-height:28vh}.title-symbols img{height:clamp(42px,20vh,95px)}}
@media(min-aspect-ratio:1/1) and (max-height:360px){.title-layout{padding:10px 18px;gap:18px}.title-menu{gap:4px}.title-menu button,.title-modes button{min-height:34px;padding:5px}.title-hero p{margin:6px 0;font-size:.857143rem}.title-symbols{gap:6px}.title-menu small{font-size:.642857rem}}
.title-compact .title-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.title-compact .title-modes,.title-compact .title-details,.title-compact #title-tutorial,.title-compact #title-start,.title-compact #title-resume,.title-compact .title-menu small,.title-compact .title-menu p{grid-column:1/-1}.title-compact .title-symbols,.title-compact .title-hero p{display:none}
.title-menu #title-update{position:fixed;top:max(10px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));min-width:64px}
.title-compact:has(#title-update:not([hidden])) #title-resume{grid-column:1}
.title-compact .title-menu #title-update{position:static;min-width:0}
@media(max-aspect-ratio:1/1){.title-hero{padding-bottom:clamp(16px,4vh,40px)}}
@media(min-aspect-ratio:1/1){.title-compact .title-layout{grid-template-columns:minmax(0,.6fr) minmax(0,1.4fr)}.title-compact .title-menu{grid-template-columns:repeat(3,minmax(0,1fr))}.title-compact #title-tutorial{grid-column:1/3;grid-row:1}.title-compact #title-start{grid-column:1/3;grid-row:2}.title-compact .title-modes{grid-column:1/3;grid-row:3}.title-compact .title-details{display:contents}.title-compact #title-parts{grid-column:3;grid-row:1}.title-compact #title-about{grid-column:3;grid-row:2}.title-compact #title-resume,.title-compact:has(#title-update:not([hidden])) #title-resume{grid-column:3;grid-row:3}.title-compact .title-menu #title-update{grid-column:3;grid-row:4}.title-compact:has(#title-update:not([hidden])) .title-menu small{grid-column:1/3;grid-row:4;align-self:center}}

.launching .source .node-symbol{filter:drop-shadow(0 0 calc(4px + 6px * var(--launch-progress,0)) #edd397)}
@media(prefers-reduced-motion:reduce){.launching .source .node-symbol{filter:drop-shadow(0 0 6px #edd397)}}

#candidate-times{white-space:nowrap;min-width:0}
.device-landscape #app:not(.text-enlarged) #edit-controls:has(#candidate-times:not([hidden])){height:clamp(96px,calc(6.5 * var(--layout-font)),190px)}

html:not(.device-landscape) #app:not(.text-enlarged) #edit-controls:has(#candidate-times:not([hidden])){max-width:calc(100% - 128px)}

.text-enlarged #stage:has(#candidate-times:not([hidden])){grid-template-columns:minmax(0,3fr) minmax(0,2fr)}

/* Keep enlarged controls in one row in short desktop windows. */
html:not(.device-landscape) .text-enlarged.compact #stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
html:not(.device-landscape) .text-enlarged.compact #board{grid-column:1;grid-row:1}
html:not(.device-landscape) .text-enlarged.compact #stage-controls{display:flex;grid-column:1;grid-row:2;gap:4px;padding:2px;align-items:center}
html:not(.device-landscape) .text-enlarged.compact #add-controls{order:-1;padding:0}
html:not(.device-landscape) .text-enlarged.compact #edit-controls,html:not(.device-landscape) .text-enlarged.compact .zoom-controls{position:static;padding:0;max-width:none}
html:not(.device-landscape) .text-enlarged.compact .header-actions button{padding:2px;min-height:30px;line-height:1.2}
html:not(.device-landscape) .text-enlarged.compact #play-controls button{padding:2px 4px}

/* Task and wire counts use the complete header width, independent of the title. */
html:not(.device-landscape) .header-content:has(#challenge-info:not([hidden])){display:grid;grid-template-columns:100px minmax(0,1fr) auto;gap:3px 9px}
#challenge-info{grid-column:1/-1;min-width:0;min-height:0;padding:3px 6px;text-align:left;background:#111a2c88;border-color:#394861}
#challenge-goal{display:block;white-space:normal;font-size:.928571rem;line-height:1.35;overflow-wrap:anywhere}
#wire-budget{display:flex;flex-wrap:wrap;gap:0 7px;margin-top:2px;font-size:.857143rem;line-height:1.4;color:#c4cde0}
#wire-budget span{white-space:nowrap}
#wire-budget>span:first-child{color:var(--gold);font-weight:600}
.compact #challenge-info{display:none}
.device-landscape #challenge-info{text-align:center}
.device-landscape #wire-budget{justify-content:center}
.device-landscape header:has(#challenge-info:not([hidden])){height:clamp(90px,calc(5.4 * var(--layout-font)),170px)}
.text-enlarged .header-actions button,.text-enlarged #update-notice{padding:2px;min-height:38px;line-height:1.2}
.text-enlarged .logo{height:32px;min-height:32px}
.text-enlarged #condition{display:none}

.wire-count{display:inline-block;min-width:calc(var(--wire-digits,1) * 1ch);text-align:right;font-weight:inherit;font-variant-numeric:tabular-nums}
html:not(.device-landscape) .text-enlarged.compact #update-notice{min-height:30px}

.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])){height:clamp(70px,calc(2.7 * var(--layout-font)),100px)}
.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])) .logo{display:none}
.device-landscape .text-enlarged #wire-budget span{white-space:normal}

.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])):has(#update-notice:not([hidden])){height:clamp(110px,calc(4.5 * var(--layout-font)),150px)}

/* Thumb actions stay at the lower edge; occasional tools share the header. */
#home.logo{width:100px;height:44px;min-height:44px}
html:not(.device-landscape) .header-content,html:not(.device-landscape) .header-content:has(#challenge-info:not([hidden])){display:grid;grid-template-columns:100px minmax(0,1fr) auto;gap:4px;align-items:center}
.header-actions{gap:4px;justify-content:end}
.header-actions button,.header-actions #update-notice{min-width:44px;min-height:44px;padding:4px;font-size:1rem;line-height:1.2}
.heading strong,.heading small{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25;overflow-wrap:anywhere}
#sound .sound-icon{display:none;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#sound[aria-pressed=false] .sound-waves,#sound[aria-pressed=true] .sound-off{display:none}
.text-enlarged #sound-label{display:none}.text-enlarged #sound .sound-icon{display:block}
.text-enlarged .header-actions button,.text-enlarged .header-actions #update-notice{min-height:44px}
#play-controls{min-height:56px}
.play-content{display:flex;gap:6px;align-items:stretch}
#play-controls button{min-height:56px;min-width:0;font-size:1rem;line-height:1.2;padding:6px}
#play-controls #play{flex:2;font-size:1.15rem;font-weight:600;background:#c3a158;color:#091020;border-color:#e3c780}
#play-controls #play[data-state=running]{background:#466e61;color:#fff}
#play-controls #play[data-state=paused]{background:#745e3a;color:#fff}
#stop{border-color:#9b8290}
#edit-controls button,.zoom-controls button{min-height:40px}
html:not(.device-landscape) .text-enlarged:not(.compact) .header-content{grid-template-columns:100px minmax(0,1fr)}
html:not(.device-landscape) .text-enlarged:not(.compact) #home{grid-column:1;grid-row:1}
html:not(.device-landscape) .text-enlarged:not(.compact) .header-actions{grid-column:2;grid-row:1}
html:not(.device-landscape) .text-enlarged:not(.compact) #condition-info{grid-column:1/-1;grid-row:2}
html:not(.device-landscape) .text-enlarged:not(.compact) #challenge-info{grid-row:3}
html:not(.device-landscape) .compact .header-content{grid-template-columns:44px minmax(0,1fr) auto}
html:not(.device-landscape) .compact #home{width:44px;height:32px;min-height:32px}
html:not(.device-landscape) .compact #play-controls,html:not(.device-landscape) .compact #play-controls button{min-height:44px}
.device-landscape #play-controls{height:clamp(64px,calc(4 * var(--layout-font)),128px);min-height:0}
.device-landscape .play-content{display:flex;gap:6px}
.device-landscape #play-controls button{min-height:0}
.device-landscape .header-actions{flex-direction:row;flex-wrap:wrap}
.device-landscape .header-actions button{min-height:44px;min-width:40px;flex:1 1 40px}
.device-landscape .header-content .heading strong{white-space:normal}
.device-landscape .header-content .logo{max-width:min(100px,100%)}
.dialog-list button.challenge-row{display:flex;align-items:center;gap:10px;white-space:normal;overflow:visible;text-overflow:clip;padding:8px 10px;min-height:52px}
.challenge-name{flex:1;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.challenge-number{color:#e3c780;white-space:nowrap}
.challenge-tier{display:block;color:#aebbd1;font-size:.785714rem}
.challenge-score{flex:none;display:flex;flex-direction:column;align-items:end;gap:2px;white-space:nowrap;color:#e5eaf4}
.challenge-score small{font-size:.714286rem;color:#aebbd1}.challenge-score strong{font-size:.928571rem;font-weight:500;font-variant-numeric:tabular-nums}
.device-landscape .text-enlarged .heading-title>span[aria-hidden]{display:none}
.device-landscape .text-enlarged #wire-budget::before{content:'配線';width:100%;font-size:.714286rem}
.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])),.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])):has(#update-notice:not([hidden])){height:clamp(88px,calc(3.2 * var(--layout-font)),140px)}
/* User-created circuit names can be arbitrarily long; their full text opens
   from the heading. Fixed challenge names remain wrapped and fully visible. */
.header-content:not(:has(#challenge-info:not([hidden]))) .heading strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.header-content:not(:has(#challenge-info:not([hidden]))) .heading small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#condition-info{line-height:1.4;padding-block:2px}
.text-enlarged .heading strong{font-size:.857143rem;line-height:1.4}
html:not(.device-landscape) .text-enlarged.compact #stage-controls button{min-height:34px}
html:not(.device-landscape) .text-enlarged.compact #play{font-size:1rem}
html:not(.device-landscape) .text-enlarged.compact #stage-controls button{line-height:1.2}
html:not(.device-landscape) .text-enlarged.compact #play-controls,html:not(.device-landscape) .text-enlarged.compact #play-controls button{min-height:40px}
html:not(.device-landscape) .text-enlarged.compact .heading strong{font-size:.857143rem}
.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])),.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])):has(#update-notice:not([hidden])){height:clamp(116px,calc(4.15 * var(--layout-font)),160px)}
.device-landscape .text-enlarged .header-actions{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:stretch}
.device-landscape .text-enlarged .header-actions button{flex:1 1 40px;min-width:0}
.device-landscape .text-enlarged .header-actions #records,.device-landscape .text-enlarged .header-actions #update-notice{flex-basis:62px}
.device-landscape .text-enlarged #sound{display:flex;align-items:center;justify-content:center}
.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])),.device-landscape .text-enlarged header:has(#challenge-info:not([hidden])):has(#update-notice:not([hidden])){height:108px}
.device-landscape .text-enlarged #play-controls{height:88px}
.device-landscape .text-enlarged #result-line{height:80px}
.device-landscape .text-enlarged footer{height:70px}
/* Quiet outcome notice, outside the rotated app so its text stays upright. */
#failure-toast{position:fixed;z-index:6;left:8px;top:8px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:hidden;padding:10px;border:1px solid #ab9094;border-radius:12px;background:#111a2cf5;box-shadow:0 4px 20px #0008;font-size:1rem;line-height:1.5}
.failure-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
#failure-title{color:#f3b3a7;font-size:1.071429rem;overflow-wrap:anywhere}
#failure-dismiss{min-width:32px;min-height:32px;padding:0;flex:none}
#failure-reason{margin:0 0 10px;white-space:normal;overflow-wrap:anywhere}
#failure-timing{margin-bottom:10px;overflow-wrap:anywhere}
#failure-condition{margin:0 0 4px;color:#e6d3a0}
.failure-caption{margin:0 0 3px;color:#b7c7df;font-size:.857143rem}
#failure-arrivals{list-style:none;margin:0;padding:0;display:grid;gap:2px}
#failure-arrivals li{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 4px}
#failure-arrivals b{font-variant-numeric:tabular-nums;color:#fff}
#failure-arrivals small{font-size:.857143rem;color:#bdcce3}
.failure-actions{display:flex;gap:6px}.failure-actions button{flex:1;min-width:0;padding:6px;white-space:normal;overflow-wrap:anywhere}
#failure-edit{border-color:#d6b56a}
#failure-toast.compact-notice{display:flex;align-items:center;gap:6px;padding:4px 6px}
.compact-notice .failure-heading,.compact-notice .failure-actions{display:contents}
.compact-notice #failure-title{font-size:1rem;white-space:nowrap}
.compact-notice #failure-dismiss{order:3;min-width:28px;min-height:30px}
.compact-notice #failure-details{font-size:.857143rem;min-height:32px;padding:2px 4px}
#failure-toast.narrow-notice.compact-notice{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:4px}
.narrow-notice.compact-notice #failure-title{white-space:normal;text-align:center}
.narrow-notice.compact-notice #failure-dismiss{order:3}
#failure-toast.slim-notice{padding:0 2px;gap:4px;line-height:1.4;border-width:0}
.slim-notice #failure-title{font-size:clamp(12px,.714286rem,20px);line-height:1.4}
.slim-notice #failure-details{font-size:clamp(12px,.714286rem,20px);line-height:1.4;min-height:24px;padding:0 2px;border-width:0}
.slim-notice #failure-dismiss{font-size:clamp(12px,.714286rem,20px);line-height:1.4;min-width:24px;min-height:24px;border-width:0}
@media(max-width:360px){
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .header-content{grid-template-columns:64px minmax(0,1fr) auto}
  html:not(.device-landscape) #app:not(.compact) #home{width:64px}
  html:not(.device-landscape) #app.text-enlarged:not(.compact) .header-content{grid-template-columns:64px minmax(0,1fr)}
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .heading small{display:none}
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .header-content:has(#update-notice:not([hidden])){grid-template-columns:64px minmax(0,1fr)}
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .header-content:has(#update-notice:not([hidden])) #home{grid-column:1;grid-row:1}
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .header-content:has(#update-notice:not([hidden])) .header-actions{grid-column:2;grid-row:1}
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .header-content:has(#update-notice:not([hidden])) #condition-info{grid-column:1/-1;grid-row:2}
  html:not(.device-landscape) #app:not(.text-enlarged):not(.compact) .header-content:has(#update-notice:not([hidden])) #challenge-info{grid-row:3}
}
@media(min-width:361px) and (max-width:600px) and (min-height:361px){
  html:not(.device-landscape) #app:not(.compact) .header-content{grid-template-columns:100px minmax(0,1fr)}
  html:not(.device-landscape) #app:not(.compact) #home{grid-column:1;grid-row:1}
  html:not(.device-landscape) #app:not(.compact) .header-actions{grid-column:2;grid-row:1}
  html:not(.device-landscape) #app:not(.compact) #condition-info{grid-column:1/-1;grid-row:2}
  html:not(.device-landscape) #app:not(.compact) #challenge-info{grid-row:3}
}

/* Arrival light answers the exact prism/bell event, behind the painted parts. */
.arrival-art{animation:arrival-fade var(--arrival-duration,1800ms) ease-out both;animation-delay:var(--arrival-age,0ms)}
.arrival-glow{animation:altar-bloom 1500ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.altar-column{fill:url(#altar-column);animation:altar-column 1500ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.altar-rays{fill:none;stroke:#ffe6a6;stroke-width:3;stroke-linecap:round;animation:altar-rays 1300ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.bell-constellation{pointer-events:none}
.constellation-line{stroke:#d8e8f6;stroke-width:.85px;stroke-linecap:round;vector-effect:non-scaling-stroke;stroke-dasharray:1;animation:constellation-link 280ms ease-out both;animation-delay:calc(var(--arrival-age,0ms) + var(--link-delay,0ms))}
.constellation-star{fill:#fff2d2;filter:none;animation:constellation-spark 160ms ease-out both;animation-delay:calc(var(--arrival-age,0ms) + var(--star-delay,0ms))}
.star-aureole{fill:url(#altar-light);opacity:.6}.star-point{fill:#fff9e9;filter:drop-shadow(0 0 2px #eac57b)}.star-diffraction{fill:#fff3d5;opacity:.9}
.star-ray{stroke:#fff0c0;stroke-width:1.8;opacity:.9}
.constellation-star .star-ray{stroke-width:1.3px;vector-effect:non-scaling-stroke}
.prism-arrival-glow{fill:url(#prism-light);animation:prism-bloom 900ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.prism-shard{fill:var(--shard-color);animation:prism-scatter 950ms cubic-bezier(.1,.6,.3,1) both;animation-delay:var(--arrival-age,0ms)}
.prism.arrived .node-symbol{filter:drop-shadow(0 0 10px #cceaff)}
.goal.arrived .node-symbol{filter:drop-shadow(0 0 13px #ffe6a6)}
.fireworks-layer{pointer-events:none}
.firework-rocket{fill:none;stroke:#fff1cf;stroke-width:2.5;stroke-linecap:round;stroke-dasharray:.15 1;animation:firework-rise 450ms ease-out both;animation-delay:var(--firework-delay)}
.firework-ray{fill:none;stroke:var(--firework-color);stroke-width:3;stroke-linecap:round;stroke-dasharray:.23 1;animation:firework-ray 1150ms cubic-bezier(.1,.6,.3,1) both;animation-delay:calc(var(--firework-delay) + 400ms)}
.firework-star{fill:var(--firework-color);animation:firework-star 1100ms ease-out both;animation-delay:calc(var(--firework-delay) + 450ms)}
@keyframes arrival-fade{0%,72%{opacity:1}100%{opacity:0}}
@keyframes altar-bloom{0%{opacity:0;transform:scale(.5)}12%{opacity:1}55%{opacity:.6}100%{opacity:0;transform:scale(1.2)}}
@keyframes altar-column{0%{opacity:0}12%,25%{opacity:.9}100%{opacity:0}}
@keyframes altar-rays{0%{opacity:0}14%{opacity:.85}100%{opacity:0}}
@keyframes constellation-link{0%{opacity:0;stroke-dashoffset:1}20%{opacity:.85}100%{opacity:.85;stroke-dashoffset:0}}
@keyframes constellation-spark{from{opacity:0}to{opacity:1}}
@keyframes prism-bloom{0%{opacity:0}12%{opacity:1}100%{opacity:0}}
@keyframes prism-scatter{0%{opacity:0;transform:translate(0,0) scale(.5)}12%,55%{opacity:1}100%{opacity:0;transform:translate(var(--shard-x),var(--shard-y)) scale(.7)}}
@keyframes firework-rise{0%{opacity:0;stroke-dashoffset:1}12%{opacity:.95}88%{opacity:1}100%{opacity:0;stroke-dashoffset:0}}
@keyframes firework-ray{0%{opacity:0;stroke-dashoffset:1}12%{opacity:1}65%{opacity:.8}100%{opacity:0;stroke-dashoffset:0}}
@keyframes firework-star{0%,10%{opacity:0}24%,45%{opacity:1}100%{opacity:0}}
/* Result numbers carry the hierarchy; the same values stay on the small notice. */
#clear-toast{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:hidden}
#clear-toast.perfect-clear{border-color:#f0d489;background:linear-gradient(145deg,#26283cf7,#101a2df7 65%);box-shadow:0 4px 24px #0008,0 0 20px #d6b56a20}
#clear-toast .clear-heading strong{color:#f5ddb0;font-size:1.071429rem;white-space:normal;overflow-wrap:anywhere}
#clear-toast .clear-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 12px;text-align:center}
#clear-toast .clear-summary dt{font-size:.857143rem;color:#bdcce3;margin-bottom:2px}
#clear-toast .clear-summary dd{margin:0;font-size:1.8rem;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.25;overflow-wrap:anywhere}
#clear-score{color:#ffe3a2}
#clear-toast.narrow .clear-summary{grid-template-columns:1fr;gap:6px}
#clear-toast.compact-clear .clear-summary{margin-bottom:6px;gap:4px}
#clear-toast.compact-clear .clear-summary dt{display:none}
#clear-toast.compact-clear .clear-summary dd{font-size:1.071429rem;line-height:1.4}
#clear-toast.slim{padding:0 2px;border-width:0;gap:4px;line-height:1.4}
#clear-toast.slim .clear-summary,#clear-toast.slim .clear-summary>div{display:contents}
#clear-toast.slim .clear-heading strong,#clear-toast.slim .clear-summary dd,#clear-toast.slim #clear-details,#clear-toast.slim #clear-dismiss{font-size:clamp(12px,.714286rem,20px);line-height:1.4}
#clear-toast.slim #clear-details{padding:0 2px;min-height:24px;border-width:0;flex:1}
#clear-toast.slim #clear-dismiss{min-width:24px;min-height:24px;border-width:0;order:6}
#clear-toast.slim.narrow{flex-direction:column;align-items:stretch;padding:2px}
#clear-toast.slim.narrow .clear-heading strong,#clear-toast.slim.narrow .clear-summary dd{text-align:center}
@media(prefers-reduced-motion:reduce){
  .arrival-art{animation-timing-function:steps(1,end)}
  .arrival-glow,.altar-column,.altar-rays,.constellation-line,.constellation-star,.prism-arrival-glow,.prism-shard,.firework-ray,.firework-star{animation:none}
  .arrival-glow,.prism-arrival-glow{opacity:.65}.altar-column{opacity:.3}.altar-rays,.constellation-line{opacity:.65}.constellation-star,.firework-ray,.firework-star{opacity:.85}
  .constellation-line{stroke-dasharray:none;stroke-dashoffset:0}
  .prism-shard{opacity:.8;transform:translate(var(--shard-x),var(--shard-y)) scale(.6)}
  .firework-rocket{display:none}.firework-ray{stroke-dasharray:none}
}

/* Built routes keep an actual screen-pixel width at every board zoom. */
.edge:not(.candidate) .edge-line{stroke:#e9c56d;stroke-width:4px;stroke-linecap:round;vector-effect:non-scaling-stroke}
.edge:not(.candidate) .edge-backdrop{stroke-width:8px;stroke-opacity:.88;vector-effect:non-scaling-stroke}
.edge-core{fill:none;stroke:#fff0c0;stroke-width:1.15px;stroke-linecap:round;opacity:.85;vector-effect:non-scaling-stroke;pointer-events:none}
.edge.selected:not(.candidate) .edge-line{stroke:#fff5d4;stroke-width:5px}

.prism-flare{fill:none;stroke:#d7ecff;stroke-width:3;stroke-linecap:round;animation:prism-flare 800ms ease-out both;animation-delay:var(--arrival-age,0ms)}
@keyframes prism-flare{0%{opacity:0}12%,40%{opacity:.95}100%{opacity:0}}
.firework-rocket{stroke-width:1.5px;vector-effect:non-scaling-stroke}
.firework-ray{stroke-width:1.8px;vector-effect:non-scaling-stroke}
@media(prefers-reduced-motion:reduce){.prism-flare{animation:none;opacity:.7}}

#board{overflow:hidden}
.light-particle{pointer-events:none}
.particle-glow{fill:url(#particle-light)}
.particle-spark{fill:#fff;stroke:none}
.particle{fill:#fffbe6;stroke:#ffe4a3;stroke-width:2;filter:drop-shadow(0 0 8px #ffe7aa)}
.particle.waiting{fill:#b5caff}.particle.processing{fill:#d7ffec}.particle.deadend{fill:none;stroke:#a585bf;filter:none}
.light-particle.waiting .particle-glow{opacity:.7}
.light-trail{stroke:#fff0c6;stroke-width:2.4px;vector-effect:non-scaling-stroke;opacity:.85}

/* A very short window uses the existing compact guide and full-text entry. */
html:not(.device-landscape) body:not(.records-fullscreen) .compact #stage{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}
html:not(.device-landscape) body:not(.records-fullscreen) .compact #board{grid-column:1;grid-row:1;min-width:0;min-height:0}

/* Arrival remains legible after the transient constellation and in failed trials. */
.goal-reached-aura{fill:url(#altar-light);opacity:0}
.goal-arrival-stars{opacity:0}
.goal.has-arrived .goal-reached-aura{opacity:.48}
.goal.has-arrived .goal-arrival-stars{opacity:.3}
.goal.last-arrival .goal-reached-aura{opacity:.85}
.goal.last-arrival .goal-arrival-stars{opacity:1}
.goal.has-arrived .node-symbol{filter:drop-shadow(0 0 5px #eacb83)}
.goal.last-arrival .node-symbol{filter:brightness(1.18) drop-shadow(0 0 5px #fff2ce) drop-shadow(0 0 11px #e9c879)}
.goal.arrived .node-symbol{filter:brightness(1.35) drop-shadow(0 0 7px #fff7dc) drop-shadow(0 0 15px #efce7e)}
.bell-arrival-beacon{transform-origin:0 0;animation:bell-beacon 1400ms ease-out both;animation-delay:var(--arrival-age,0ms)}
.bell-arrival-ray{fill:none;stroke:#fff0c1;stroke-width:2px;stroke-linecap:round;vector-effect:non-scaling-stroke}
@keyframes bell-beacon{0%{opacity:0;transform:scale(.75)}12%,30%{opacity:1}100%{opacity:0;transform:scale(1.22)}}
@media(prefers-reduced-motion:reduce){.bell-arrival-beacon{animation:none;opacity:.65}.goal.arrived .node-symbol{filter:drop-shadow(0 0 9px #f3dca5)}}

/* Keep the selected path visible behind a small, explicit confirmation. */
.edge.pending-delete:not(.candidate) .edge-line{stroke:#ff9488;stroke-width:6px}
.edge.pending-delete:not(.candidate) .edge-core{stroke:#ffe4df;opacity:1}
.edge.pending-delete:not(.candidate) .edge-backdrop{stroke:#381721;stroke-width:11px;stroke-opacity:1}
.edge.pending-delete .edge-label-card{fill:#382330;stroke:#f2ada1}
.edge.pending-delete.unavailable{opacity:1}
#wire-delete-toast{position:fixed;inset:auto;width:min(430px,calc(100vw - 16px));height:auto;max-height:calc(100dvh - 16px);margin:0;padding:12px;overflow:hidden;border-color:#cf9288;box-shadow:0 8px 28px #02061177}
#wire-delete-toast[open]{display:flex;flex-direction:column;gap:8px}
#wire-delete-toast::backdrop{background:#05091318}
#wire-delete-title{font-size:1rem;line-height:1.35}
#wire-delete-target{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:44px;margin:0;padding:5px 8px;text-align:left;line-height:1.3;overflow-wrap:anywhere;color:#dae2f2;background:#152035;border-color:#40506c}
.wire-delete-actions{display:flex;gap:10px}
.wire-delete-actions button{flex:1;min-width:0;min-height:52px;font-size:1rem}
#wire-delete-ok{background:#6d353a;border-color:#e3aaa0;color:#fff4ee;font-weight:600}
#wire-delete-cancel{border-color:#8d9bb7}
dialog.settings-dialog{width:min(540px,calc(100vw - 18px));height:min(560px,calc(var(--app-height) - 20px))}
dialog.settings-dialog .panel-heading button,dialog.time-dialog .panel-heading button{min-width:44px;min-height:44px}
dialog.settings-dialog #dialog-actions button,dialog.time-dialog #dialog-actions button{min-height:48px;font-size:1rem}
dialog.settings-dialog .setting-option{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:10px 14px;white-space:normal;font-size:1rem}
dialog.settings-dialog .pager button{min-height:44px;min-width:60px}
.setting-value{font-variant-numeric:tabular-nums;font-weight:600;color:#ead39b;overflow-wrap:anywhere;text-align:right}
dialog.time-dialog{width:min(520px,calc(100vw - 18px));height:min(360px,calc(var(--app-height) - 20px))}
dialog.time-dialog #dialog-body{justify-content:center}
dialog.time-dialog .dialog-row{gap:10px;align-items:stretch}
dialog.time-dialog .dialog-row button{min-height:56px;flex:1;font-size:1rem;padding:8px 5px}
dialog.time-dialog .dialog-row input{flex:1.6;min-height:56px;font-size:1.4rem;text-align:center;font-variant-numeric:tabular-nums}
