/* Оболочка экскурсии: режимы, сворачиваемый список и мобильная карточка. */
:root{color-scheme:dark;--panel:#14202af5;--line:#d0e3ef26;--muted:#abbcc8;--accent:#f49a61;--safe-bottom:env(safe-area-inset-bottom,0px)}
#tour{height:100dvh;min-height:0;isolation:isolate}
button,summary{-webkit-tap-highlight-color:transparent}
button:disabled{opacity:.35;cursor:default}
button:hover:not(:disabled){border-color:#f49a6180}
summary:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
#tour svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.vignette{background:linear-gradient(180deg,#0c151c66,transparent 22%,transparent 72%,#0b141caa)}
#tour header{top:24px;left:28px;right:28px;z-index:10}
#tour header details{pointer-events:auto}
.brand{grid-template-columns:40px auto;column-gap:10px;font-size:18px;letter-spacing:.8px}.mark{width:40px}.brand-sub{font-size:9px;letter-spacing:2px;margin-top:5px}
.top-right{gap:8px}
#fullscreen,#settings summary{display:flex;align-items:center;justify-content:center;height:44px;min-height:44px;border:1px solid var(--line);border-radius:8px;background:#14202ade}
#fullscreen{width:44px}
#settings{position:relative}
#settings summary{list-style:none;gap:9px;padding:0 13px;font-size:12px;cursor:pointer}
#settings summary::-webkit-details-marker{display:none}
#settings[open] summary{border-color:var(--accent)}
.settings-panel{position:absolute;right:0;top:54px;width:262px;padding:20px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 48px #0006;backdrop-filter:blur(16px)}
.settings-panel>.eyebrow{margin-bottom:12px}
#settings .quality-control,#settings .settings-panel>button{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;font-size:12px;min-height:50px;height:auto;border-radius:0;background:none}
#settings .quality-control{padding:0;margin-bottom:8px}
#settings .quality-control select{font:inherit;font-size:12px;width:112px;max-width:none;min-height:44px;background:#203341;border:1px solid var(--line);border-radius:5px;padding:6px}
#settings .settings-panel>button{border:0;border-top:1px solid var(--line);padding:4px 0;text-align:left}
#settings button[aria-pressed=true]{color:var(--accent)}
.switch{width:30px;height:18px;border-radius:12px;background:#485863;padding:3px;flex-shrink:0}
.switch::after{content:'';display:block;width:12px;height:12px;border-radius:50%;background:#d4dfe5;transition:transform .18s}
[aria-pressed=true] .switch{background:#a95022}[aria-pressed=true] .switch::after{transform:translateX(12px);background:#ffd3b9}
.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.8px;text-transform:uppercase;color:var(--accent);line-height:1.5}
.eyebrow .live-dot{display:inline-block;width:6px;height:6px;background:var(--accent);border-radius:50%;margin-right:3px}
#welcome{position:absolute;left:5%;top:50%;transform:translateY(-42%);width:370px;padding:30px;background:linear-gradient(135deg,#14202af2,#14202add);border:1px solid var(--line);border-radius:16px;backdrop-filter:blur(16px);box-shadow:0 20px 80px #0003;z-index:5}
#welcome h1{font-size:40px;letter-spacing:-1.4px;line-height:1.08;margin:22px 0 14px;font-weight:600}
#welcome p{font-size:14px;line-height:1.65;color:var(--muted);margin:0 0 28px}
.primary-action,.secondary-action{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:48px;border-radius:7px;padding:12px;font-size:13px;font-weight:600;line-height:1.35}
.primary-action{background:#f3f5f7;border:1px solid #f3f5f7;color:#18242e}.primary-action:hover{background:#ffffff}
.primary-action>span:last-child,.secondary-action>span:last-child{margin-left:auto}
.secondary-action{background:#ffffff05;color:#e7edf1;border:1px solid #ffffff35;margin-top:10px}
.welcome-note{font-size:10px;color:#9cabb6;text-align:center;margin-top:17px;line-height:1.5}
#tour .view-tools{left:50%;top:auto;bottom:calc(24px + var(--safe-bottom));transform:translateX(-50%);display:flex;flex-wrap:nowrap;align-items:center;gap:4px;padding:5px;border:1px solid var(--line);border-radius:12px;background:#14202aee;backdrop-filter:blur(16px);box-shadow:0 8px 32px #0004;z-index:5}
#tour .view-tools button{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:0 18px;border-radius:7px;background:transparent;border:1px solid transparent;font-size:12px;white-space:nowrap}
#tour .view-tools span{font-size:12px;margin:0}
#tour .view-tools button[aria-pressed=true],#tour .view-tools button[aria-expanded=true]{background:#f49a611a;border-color:#f49a6166;color:#ffc39c}
#tour #catalogue-toggle{border-left-color:var(--line)}
#tour-hint{position:absolute;left:50%;bottom:calc(91px + var(--safe-bottom));transform:translateX(-50%);margin:0;font-size:11px;color:#c2cdd4;text-shadow:0 1px 4px #000;pointer-events:none;white-space:nowrap}
#tour #equipment-catalogue{bottom:calc(96px + var(--safe-bottom));left:24px;right:24px;border:1px solid var(--line);border-radius:12px;padding:0 14px 10px;background:var(--panel);backdrop-filter:blur(16px);z-index:6;box-shadow:0 10px 32px #0005;pointer-events:auto}
.catalogue-heading{display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:11px;letter-spacing:.5px;color:#c9d5de}
#catalogue-close{width:44px;height:44px;border:0;background:none;font-size:24px}
#tour #machine-shortcuts{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:0 0 4px}
#tour #machine-shortcuts button{flex:0 0 196px;gap:8px;min-height:86px;padding:12px;border-radius:7px}
#tour #machine-shortcuts button>span:nth-child(2){font-size:12px;line-height:1.3}
#tour #machine-shortcuts small{display:block;font-size:10px}
#tour #mini-map{right:28px;top:86px;width:248px;height:60px;background:#14202ac9;border:1px solid var(--line);border-radius:9px;z-index:3}
#tour #mini-map svg{width:100%;height:100%}
#mini-map text{stroke:none}#mini-map .map-machine{stroke:none}
#tour .equipment-pin{width:44px;height:44px}
#tour #detail{right:28px;left:auto;top:162px;bottom:110px;width:354px;max-height:none;padding:0;display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:14px;overflow:hidden;z-index:6}
.detail-header{position:relative;flex-shrink:0;padding:24px 24px 16px;border-bottom:1px solid var(--line)}
#detail-toggle{display:none}
/* Крестик закреплён в шапке; прокручивается только содержимое карточки. */
#tour #close{float:right;margin:-12px -12px 0 4px;border-radius:7px;background:#253746;color:#cad6de}
#category{padding-right:28px;font-size:9px}
#tour #machine-title{font-size:26px;line-height:1.15;letter-spacing:-.6px;margin:14px 0 0;font-weight:500;outline:none}
#detail-content{overflow:auto;overscroll-behavior:contain;padding:0 24px 24px;min-height:0;scrollbar-width:thin;scrollbar-color:#536978 transparent}
.machine-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:18px 0}
.machine-actions button{min-height:44px;padding:8px;border-radius:6px;font-size:12px}
.machine-actions button[aria-pressed=true]{border-color:#f49a6199;background:#f49a6115;color:#ffc39c}
#description{font-size:13px}dl div{font-size:12px;line-height:1.5}
.next{align-items:center;min-height:46px;padding:12px 14px;background:var(--accent);border:1px solid var(--accent);border-radius:6px;font-size:12px}
#next{background:none;border-color:var(--line);color:#d3e0e8}
#calculate{margin:18px 0 10px}
#tour-guide{left:28px;top:auto;bottom:110px;width:320px;padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:14px;z-index:6;backdrop-filter:blur(16px)}
#guide-close{top:8px;right:8px;width:44px;height:44px;border-radius:7px}
#guide-kind{padding-right:28px;font-size:9px}
#guide-title{font-size:23px;font-weight:500;line-height:1.2;letter-spacing:-.5px;margin:22px 0 8px}
#guide-text{font-size:13px;line-height:1.55;margin:8px 0 16px}
.guide-buttons button{min-height:44px;padding:8px;border-radius:6px;font-size:12px}
#guide-prev{flex:0 0 44px;font-size:18px}#guide-next{background:var(--accent);color:#14202a;border-color:var(--accent)}
#guide-info{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin-top:8px;border:0;background:none;font-size:12px;color:#c3d2dc}
.guide-track{margin:18px 0}#guide-progress{background:var(--accent)}
.sample-part{left:calc(50% - 48px)}
#walk-controls{bottom:calc(104px + var(--safe-bottom));background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:14px}
#walk-controls>div{display:flex;gap:6px;margin-top:10px}
#walk-controls button{min-width:44px;min-height:44px;margin:0;padding:8px;border-radius:5px}#walk-exit{flex:1}
#tour.choosing .view-tools,#tour.choosing #tour-hint,#tour.choosing #mini-map,#tour.choosing #equipment-pins{display:none}
#tour.catalogue-open #tour-hint,#tour.selected #tour-hint,#tour.guided #tour-hint,#tour.walking #tour-hint{display:none}
#error a{color:#cbd9e1;font-size:13px}
@media(max-width:700px){
  #tour header{top:12px;left:14px;right:14px}
  .brand{grid-template-columns:28px auto;font-size:12px;column-gap:7px;letter-spacing:.3px}.mark{width:28px}.brand-sub{font-size:7px;letter-spacing:1px}
  #settings summary{width:44px;padding:0}#settings summary>span{display:none}
  .settings-panel{right:-52px;width:min(280px,calc(100vw - 28px));top:52px}
  #welcome{left:16px;right:16px;top:auto;bottom:calc(20px + var(--safe-bottom));transform:none;width:auto;padding:24px;border-radius:14px;background:#14202af2}
  #welcome h1{font-size:32px;margin:17px 0 12px;letter-spacing:-1px}
  #welcome p{font-size:13px;margin-bottom:20px}.desktop-break{display:none}.welcome-note{margin-top:13px}
  #tour .view-tools{left:12px;right:12px;bottom:calc(12px + var(--safe-bottom));max-width:none;transform:none;gap:2px;justify-content:space-between;padding:4px}
  #tour .view-tools button{flex:1;flex-direction:column;gap:5px;min-height:58px;padding:6px 4px}#tour .view-tools span{font-size:10px}
  #tour .view-tools svg{width:19px;height:19px}
  #tour-hint{bottom:calc(91px + var(--safe-bottom));font-size:10px}
  #tour #mini-map{top:72px;right:14px;width:155px;height:44px}
  #tour #equipment-catalogue{left:12px;right:12px;bottom:calc(91px + var(--safe-bottom));padding:0 10px 8px}
  #tour #machine-shortcuts button{flex-basis:166px;min-height:82px}
  #tour #detail{left:0;right:0;top:auto;bottom:0;width:100%;height:min(44dvh,380px);min-height:240px;max-height:calc(100dvh - 72px);border-radius:18px 18px 0 0;border-bottom:0;transition:height .25s ease}
  #tour #detail.sheet-expanded{height:calc(100dvh - 80px)}
  .detail-header{padding:0 20px 14px}
  #detail-toggle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;margin:0 auto;min-width:112px;min-height:44px;padding:5px 14px;border:0;background:none;font-size:10px;color:#abbcc8;touch-action:none}
  #detail-toggle i{display:block;width:32px;height:3px;border-radius:4px;background:#647886}
  #tour #close{margin:0 -6px 0 8px;background:#273946}
  #tour #machine-title{font-size:20px;letter-spacing:-.4px;margin:6px 0 0;padding-right:36px}
  #category{font-size:9px;padding-right:44px}
  #detail-content{padding:0 20px calc(20px + var(--safe-bottom))}
  .machine-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:14px 0}.machine-actions button{font-size:10px;padding:6px 3px}
  #tour.selected .view-tools,#tour.selected #equipment-catalogue{display:none}
  #tour-guide{left:12px;right:12px;bottom:calc(12px + var(--safe-bottom));top:auto;width:auto;padding:20px;max-height:calc(100dvh - 136px);overflow:auto}
  #guide-title{font-size:23px;margin-top:20px}#guide-text{font-size:13px}
  #tour.guided .view-tools,#tour.guided #equipment-catalogue{display:none}
  #walk-controls{bottom:calc(91px + var(--safe-bottom));max-width:calc(100% - 24px);padding:12px}#walk-controls>span{font-size:10px}
}



@media(max-height:600px){
  #welcome{padding:20px;bottom:12px;top:auto;transform:none}
  #welcome h1{font-size:28px;margin:12px 0}#welcome p{margin-bottom:14px}.welcome-note{margin-top:10px}
  #tour #detail{top:78px;bottom:90px}#tour #mini-map{display:none}
  #tour-guide{bottom:90px;max-height:calc(100dvh - 168px);overflow:auto;padding:18px}
}
@media(max-width:700px) and (max-height:600px){
  #welcome{bottom:12px}#welcome h1{font-size:28px}#welcome .welcome-note{display:none}
  #tour #detail{top:auto;bottom:0;min-height:220px;height:52dvh}
  #tour #detail.sheet-expanded{height:calc(100dvh - 66px)}
  #tour-guide{bottom:12px;max-height:calc(100dvh - 80px)}
}
@media(prefers-reduced-motion:reduce){.switch::after,#detail{transition:none!important}}

/* Совместимость с актуальными карточками и раздельной загрузкой цехов v82. */
#tour header .hall-switch{display:flex;gap:3px;padding:3px;background:#14202ade;border:1px solid var(--line);border-radius:8px}
#tour header .hall-switch button{width:auto;height:36px;min-height:36px;min-width:62px;border-radius:5px;font-size:12px;padding:0 10px;background:none;border:1px solid transparent}
#tour header .hall-switch button[aria-pressed=true]{color:#ffc39c;border-color:#f49a6166;background:#f49a611a}
#tour #detail-expand,#tour #detail-collapse{display:none!important}
#tour #machine-shortcuts button{padding:0;display:block;min-height:0}
#tour #machine-shortcuts .thumb-wrap{height:100px}
#tour #machine-shortcuts .shortcut-copy{padding:10px 12px;min-height:61px}
#tour #machine-shortcuts .number{align-self:auto}
#tour #rail-picker{width:180px;max-width:100%;min-height:44px}
#tour .catalogue-heading{gap:12px;padding:6px 0}
#tour .catalogue-heading>span{margin-right:auto}
#tour #detail .machine-actions{grid-template-columns:repeat(auto-fit,minmax(80px,1fr));padding-right:0}
#tour #work-controls{position:static;width:auto;margin:14px 0;padding:0 0 12px;border-bottom:1px solid var(--line)}
#tour .work-buttons button,#tour .work-stages button{min-height:44px}
#tour #machine-model{margin:16px 0 0}
#tour #detail.sheet-expanded #work-timeline{display:block}
#tour.selected header{left:28px;right:28px;justify-content:space-between}
html.embedded #tour.selected header{justify-content:flex-end}
#tour #tour-guide{max-height:calc(100dvh - 205px);overflow:auto}
@media(max-width:700px){
  #tour header .hall-switch{position:absolute;left:0;top:60px}
  html.embedded #tour header .hall-switch{top:0}
  #tour.selected header{left:14px;right:14px}
  #tour #equipment-catalogue .catalogue-heading>span{display:none}
  #tour #rail-picker{width:100%}.rail-quick{flex:1}
  #tour #machine-shortcuts .thumb-wrap{height:82px}
  #tour #machine-shortcuts .shortcut-copy{min-height:56px}
  #tour #detail-content .machine-actions{grid-template-columns:repeat(auto-fit,minmax(80px,1fr))}
  #tour #detail-content .machine-actions button{font-size:11px}
  #tour #tour-guide{max-height:calc(100dvh - 136px)}
  #tour #work-controls{margin:12px 0;padding-bottom:12px}
  #tour #guide-workpiece{display:block}
  #tour.selected:has(#detail.sheet-expanded) :is(.hall-switch,#mini-map){visibility:hidden}
}
@media(max-width:700px) and (max-height:600px){#tour #tour-guide{max-height:calc(100dvh - 80px)}}

/* Ракурсы и путь одного кронштейна. */
#camera-presets{position:absolute;left:28px;top:88px;display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:9px;background:#14202ae8;z-index:4;backdrop-filter:blur(12px)}
#camera-presets button{min-height:40px;padding:0 14px;border:1px solid transparent;border-radius:5px;background:none;font-size:12px}
#camera-presets button[aria-pressed=true]{background:#f49a611a;border-color:#f49a6170;color:#ffc39c}
#tour.choosing #camera-presets,#tour.selected #camera-presets,#tour.guided #camera-presets,#tour.walking #camera-presets{display:none}
#tour #guide-workpiece{height:auto;padding:14px 0 0;border:1px solid var(--line);background:linear-gradient(145deg,#203440,#101f29);border-radius:9px;overflow:hidden}
.journey-part-label{padding:0 14px;display:flex;flex-direction:column;gap:5px}
.journey-part-label strong{font-size:12px;font-weight:500;color:#e2ebef}
.journey-part-label span{font-size:10px;color:var(--muted)}
#journey-piece{display:block;width:100%;height:164px;touch-action:pan-y;cursor:grab;outline-offset:-3px}
#journey-piece:active{cursor:grabbing}
#tour #guide-workpiece small{margin:0 0 12px;font-size:9px;text-align:center;color:#a6bac7}
#journey-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:7px;border-top:1px solid var(--line);background:#0e1c25}
#journey-steps button{min-height:46px;padding:5px 2px;border:1px solid transparent;border-radius:5px;background:none;font-size:11px;color:#9dabb5}
#journey-steps button span{display:block;margin-top:5px;font-size:9px}
#journey-steps button[aria-pressed=true]{color:#ffbf96;background:#f49a611a;border-color:#f49a6170}
#journey-steps button.done{color:#d5e6ed}
#tour-guide:has(#guide-workpiece:not([hidden])) .guide-track{margin:14px 0}
#tour-guide[data-completed=true] #guide-title{color:#bce2ce}
#tour #tour-guide{left:auto;right:28px;width:340px}
@media(max-width:700px){
  #camera-presets{left:14px;top:128px;right:auto;padding:3px;gap:2px}
  #camera-presets button{min-height:40px;padding:0 12px;font-size:11px}
  html.embedded #camera-presets{top:78px}
  #tour .view-tools button{padding-left:2px;padding-right:2px}
  #tour .view-tools span{font-size:9px}
  #tour #tour-guide{left:12px;right:12px;width:auto}
  #tour #tour-guide:has(#guide-workpiece:not([hidden])){padding:16px;max-height:calc(100dvh - 130px)}
  #tour-guide:has(#guide-workpiece:not([hidden])) #guide-kind{display:none}
  #tour-guide:has(#guide-workpiece:not([hidden])) #guide-title{font-size:20px;margin:4px 26px 7px 0}
  #tour-guide:has(#guide-workpiece:not([hidden])) #guide-text{font-size:12px;line-height:1.45;margin:7px 0 12px}
  #journey-piece{height:120px}
  #tour #guide-workpiece{padding-top:10px}
  .journey-part-label{flex-direction:row;justify-content:space-between;align-items:center;padding:0 10px;gap:6px}
  .journey-part-label strong{font-size:10px}.journey-part-label span{font-size:9px}
  #tour #guide-workpiece small{font-size:9px;margin-bottom:8px}
}
@media(max-height:600px){#camera-presets{top:78px}#journey-piece{height:110px}}

/* Каталог операций, фотографии и крупный просмотр изделия. */
#operation-filters{display:flex;gap:6px;overflow-x:auto;padding:5px 0 7px;scrollbar-width:thin}
#operation-filters button{flex-shrink:0;min-height:40px;padding:0 13px;background:#172731;border:1px solid #34444e;border-radius:6px;font-size:12px}
#operation-filters button[aria-pressed=true]{color:#ffc399;border-color:#e5a274;background:#5b382744}
#filter-status{margin:3px 0 8px;color:#a9bdc9;font-size:11px;line-height:1.4}
#tour[data-operation]:not([data-operation=all]) .equipment-pin{color:#14202a;background:#ffc08f;box-shadow:0 0 0 5px #ffb87922}
#tour #mini-map .operation-match{fill:#ffc08f;stroke:#ffc08f;stroke-width:1.5}
#tour #piece-expand{display:block;min-height:38px;margin:0 auto 7px;padding:5px 12px;color:#d0e4ee;font-size:11px;border:1px solid #567080;border-radius:5px;background:#203745}
#tour .drawing-link{display:flex;justify-content:space-between;gap:10px;padding:14px 16px;margin-top:18px;border:1px solid #edb083;border-radius:6px;background:#ffd0ae;color:#18232c;text-decoration:none;font-weight:600;font-size:13px}
#tour .drawing-link[hidden]{display:none}
#tour .tour-dialog{box-sizing:border-box;margin:auto;padding:24px;width:min(1000px,calc(100vw - 48px));max-height:calc(100dvh - 48px);border:1px solid #52626e;border-radius:16px;background:#152530;color:#e5edf2;box-shadow:0 24px 100px #0008;overflow-y:auto}
.tour-dialog::backdrop{background:#07121be6;backdrop-filter:blur(8px)}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:18px;border-bottom:1px solid #ffffff20}
.dialog-heading h2{font-size:27px;line-height:1.2;font-weight:500;margin:7px 0 0}
.dialog-heading .eyebrow{font-size:10px;letter-spacing:1px;color:#a8becb}
#tour .dialog-close{flex:none;width:44px;height:44px;background:#283b48;border:1px solid #536572;border-radius:50%;font-size:27px}
#tour .tour-dialog button:focus-visible,#tour .tour-dialog canvas:focus-visible{outline:2px solid #ffc399;outline-offset:3px}
.viewer-description,.gallery-note{font-size:14px;line-height:1.6;color:#bbccd6;margin:16px 0}
.viewer-stages{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
#tour .viewer-stages button,#tour .viewer-controls button,#tour .gallery-controls button{min-height:44px;border:1px solid #48616f;border-radius:6px;background:#213946;padding:8px 13px;font-size:13px}
#tour .viewer-stages button[aria-pressed=true],#tour .piece-compare[aria-pressed=true]{border-color:#f2b184;color:#ffd0ac;background:#5b382755}
.piece-panes{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:16px 0}
.piece-panes.comparing{grid-template-columns:repeat(2,minmax(0,1fr))}
.piece-panes figure{margin:0;min-width:0;border:1px solid #ffffff15;border-radius:10px;background:radial-gradient(ellipse at 50% 30%,#304c5e,#101e28);overflow:hidden}
.piece-panes figure[hidden]{display:none}
.piece-panes figcaption{padding:14px 16px;font-size:12px;color:#bbcfda}
.piece-panes canvas{display:block;width:100%;height:min(43dvh,370px);touch-action:none;cursor:grab}
.piece-panes canvas:active{cursor:grabbing}
.viewer-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.zoom-controls{display:flex;gap:6px}
.viewer-help{font-size:12px;line-height:1.6;color:#9ab2c0;margin:14px 0 0}
.gallery-body figure{margin:0}
.gallery-body figure img{display:block;width:100%;height:min(54dvh,500px);object-fit:contain;background:#0c1820;border-radius:8px}
.gallery-body figcaption{margin:12px 0;font-size:14px;color:#d5e3eb}
.gallery-controls{display:flex;justify-content:center;align-items:center;gap:24px;margin:12px 0}
.gallery-controls[hidden]{display:none}
.gallery-count{font-size:13px;color:#bbced9}
.gallery-thumbs{display:flex;gap:10px;justify-content:center}
#tour .gallery-thumbs button{padding:3px;border:1px solid transparent;border-radius:6px;background:#253b48}
#tour .gallery-thumbs button[aria-pressed=true]{border-color:#ffc399}
.gallery-thumbs img{display:block;width:88px;height:58px;object-fit:cover;border-radius:3px}
.gallery-error{color:#ffc399;font-size:13px}
@media(max-width:700px){
 #operation-filters button{font-size:11px;padding:0 10px}
 #tour #equipment-catalogue{max-height:50dvh;overflow:auto}
 #tour .tour-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:16px;border-radius:12px}
 .dialog-heading{gap:10px;padding-bottom:14px}.dialog-heading h2{font-size:23px}.dialog-heading .eyebrow{font-size:8px}
 .viewer-description,.gallery-note{font-size:12px;margin:12px 0}
 .viewer-stages{grid-template-columns:repeat(2,1fr);gap:6px}
 #tour .viewer-stages button{font-size:12px;padding:8px}
 .piece-panes{gap:7px;margin:12px 0}.piece-panes canvas{height:250px}
 .piece-panes.comparing canvas{height:190px}
 .piece-panes figcaption{font-size:10px;min-height:42px;padding:12px 8px}
 .viewer-controls{justify-content:center;gap:8px}.viewer-help{font-size:10px}
 #tour .viewer-controls button{font-size:12px;padding:8px 10px}
 .gallery-body figure img{height:43dvh}.gallery-thumbs img{width:76px;height:54px}
}

/* Навигация v86: боковой каталог и карта с названиями участков. */
#tour #mini-map{height:auto;padding:7px 10px;width:248px;background:#14202aee;backdrop-filter:blur(12px);z-index:7}
#tour #map-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:32px;padding:0;border:0;background:none;font-size:11px;color:#dce7ee}
#tour #mini-map .map-plan{height:54px}
#tour #mini-map .map-plan svg{display:block;height:100%;width:100%}
#tour #mini-map.map-open{width:322px}
#map-stations{max-height:min(60dvh,510px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 0 5px}
#map-stations h3{margin:16px 0 7px;color:#a9bcc9;font-size:10px;font-weight:500;letter-spacing:.3px}
.map-legend{font-size:10px;line-height:1.5;color:#9cb4c4;margin:9px 0}
#tour #map-stations button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;min-height:44px;padding:7px 8px;border:1px solid transparent;background:none;border-radius:5px;font-size:12px;color:#d2dfe7}
#tour #map-stations button:hover,#tour #map-stations button.map-selected{background:#283d49;border-color:#7b929f}
.map-number{flex:none;font-size:10px;color:#b9cbd6;width:20px}.map-visited{margin-left:auto;color:#b6d6c2}
#tour #mini-map circle.map-selected{fill:#fff;stroke:#fff;stroke-width:2.5}
#tour #mini-map [data-station].operation-match{color:#ffbd91;border-color:#ffbd9140}
#tour #mini-map circle[data-map-key]{cursor:pointer}
.filter-pin-label{display:none}
#tour[data-operation]:not([data-operation=all]) .filter-pin-label{display:block;position:absolute;top:48px;left:50%;transform:translateX(-50%);max-width:170px;width:max-content;border:1px solid #d6956555;background:#172630f2;color:#f3d8c5;padding:6px 9px;border-radius:5px;font-size:11px;font-weight:400;line-height:1.3;pointer-events:none}
.station-advice{padding:4px 0 10px;border-bottom:1px solid var(--line)}
.station-advice h3{font-size:12px;font-weight:600;color:#dce8ef;margin:16px 0 7px}
.station-advice p,.station-advice ul{font-size:12px;line-height:1.65;color:#afc2ce;margin:0}
.station-advice ul{padding-left:17px}.station-advice li{margin:3px 0}
#tour #send-drawing{width:100%;text-align:left;cursor:pointer}
#journey-product-label{display:block;font-size:10px;color:#a7bdca;margin:15px 0 10px}
#journey-product-label[hidden]{display:none}
#journey-product{display:block;width:100%;margin-top:6px;padding:10px 8px;min-height:44px;border:1px solid #55707f;border-radius:6px;background:#213745;color:#e4eef3;font-size:12px}
#tour #drawing-request{width:min(820px,calc(100vw - 48px));height:min(850px,calc(100dvh - 48px));padding:0;overflow:hidden}
#drawing-request .dialog-heading{padding:18px 24px}
#drawing-request .dialog-heading h2{font-size:22px}
.drawing-request-body{height:calc(100% - 107px);min-height:0}
.drawing-request-body iframe{display:block;width:100%;height:100%;border:0;background:#14202a}
.drawing-request-body iframe[hidden]{display:none}
@media(min-width:1000px){
 #tour #equipment-catalogue{left:auto;right:28px;top:188px;bottom:110px;width:306px;padding:0 12px 10px;display:flex;flex-direction:column;max-height:none}
 #tour #equipment-catalogue[hidden]{display:none}
 #tour #equipment-catalogue .catalogue-heading{flex-wrap:wrap;gap:0;padding:3px 0 8px;flex-shrink:0}
 #tour #equipment-catalogue .catalogue-heading>span{font-size:11px;order:0}
 #tour #catalogue-close{order:1}
 #tour #equipment-catalogue .rail-quick{width:100%;order:2}
 #tour #rail-picker{width:100%}
 #operation-filters{flex-wrap:wrap;overflow:visible;gap:5px;flex-shrink:0}
 #operation-filters button{font-size:11px;min-height:36px;padding:0 9px}
 #filter-status{flex-shrink:0;margin:7px 0 10px}
 #tour #machine-shortcuts{display:flex;flex-direction:column;gap:7px;overflow-y:auto;overflow-x:hidden;min-height:0;padding:0 3px 0 0}
 #tour #machine-shortcuts button{display:flex;flex-direction:row;align-items:stretch;flex:0 0 auto;width:100%;min-height:77px}
 #tour #machine-shortcuts .thumb-wrap{width:96px;height:77px;flex-shrink:0}
 #tour #machine-shortcuts .shortcut-copy{flex:1;min-width:0;padding:10px 8px;text-align:left;min-height:0}
 #tour #machine-shortcuts .shortcut-copy strong{font-size:11px}
 #tour #machine-shortcuts .shortcut-copy small{font-size:9px}
 #tour #machine-shortcuts .shortcut-arrow{display:none}
 #tour #detail{top:188px}
}
@media(max-width:700px){
 #tour #mini-map{top:72px;right:14px;width:155px;padding:3px 7px}
 #tour #map-toggle{min-height:25px;font-size:10px}
 #tour #mini-map .map-plan{height:36px}
 #tour #mini-map.map-open{width:min(322px,calc(100vw - 28px))}
 #map-stations{max-height:calc(100dvh - 245px)}
 #journey-product-label{margin:0 35px 12px 0}
 #journey-product{font-size:11px}
 #tour-guide:has(#guide-workpiece:not([hidden])) .journey-part-label{display:none}
 #tour #drawing-request{width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:none;padding:0}
 #drawing-request .dialog-heading{padding:14px 16px;min-height:88px}
 #drawing-request .dialog-heading h2{font-size:18px;max-width:235px}
 .drawing-request-body{height:calc(100% - 116px)}
 #tour[data-operation]:not([data-operation=all]) .filter-pin-label{font-size:10px;max-width:125px}
}

#tour.choosing #equipment-catalogue{display:none}

#tour #drawing-request[open]{display:flex;flex-direction:column}
#drawing-request .dialog-heading{flex:none}
#drawing-request .drawing-request-body{flex:1;height:auto;min-height:0}

@media(max-width:700px){#camera-presets{top:148px}html.embedded #camera-presets{top:78px}}

@media(max-width:700px){
 #tour #machine-shortcuts button{display:flex;align-items:stretch;flex:0 0 240px;min-height:80px}
 #tour #machine-shortcuts .thumb-wrap{height:80px;width:94px;flex:none}
 #tour #machine-shortcuts .shortcut-copy{min-height:0;padding:10px 8px;flex:1;min-width:0;text-align:left}
 #tour #machine-shortcuts .shortcut-copy strong{font-size:11px}
 #tour #machine-shortcuts .shortcut-copy small{font-size:9px}
}

/* v87: linked stations, process views, product itinerary and local progress. */
#tour .equipment-pin{width:32px;height:32px;font-size:11px;border-width:1.5px}
#tour .equipment-pin::before{content:"";position:absolute;inset:-7px}
#tour .equipment-pin.tour-hover{background:#ffb650;box-shadow:0 0 0 5px #ffb65038;opacity:1;filter:none}
#tour #machine-shortcuts button.tour-hover,#tour #map-stations button.tour-hover{border-color:#ffb650;background:#324452;box-shadow:inset 3px 0 #ffb650}
#tour .station-views{display:grid;grid-template-columns:1fr 1fr .8fr;gap:5px;margin:0 0 10px}
#tour .station-views button{min-height:44px;padding:6px 5px;font-size:10px;line-height:1.3;border:1px solid #526370;border-radius:6px;background:#22323e}
#tour .station-views button[aria-pressed=true]{color:#ffbc83;border-color:#f4a768;background:#3a352f}
#tour #guide-route,#tour #guide-order{width:100%;min-height:44px;border:1px solid #596c79;border-radius:6px;margin-top:9px;background:#243744;font-size:12px}
#tour #guide-route[aria-pressed=true]{color:#ffc080;border-color:#f4ad69}
#tour #guide-order{background:var(--accent);border-color:var(--accent);color:#14202a;font-weight:700}
#route-legend{font-size:10px;line-height:1.5;margin:8px 0 0;color:#9eafba}
#route-legend span::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#72cbb1;margin:0 5px 1px 0}
#route-legend span+span{margin-left:8px}#route-legend span+span::before{background:#f5b34e}
#guide-route[hidden]+#route-legend{display:none}
#tour #tour-guide.route-overview #guide-workpiece,#tour #tour-guide.route-overview #guide-text{display:none}
#tour #tour-guide.route-overview #guide-title{font-size:19px}
#tour-resume{position:absolute;z-index:8;top:176px;left:28px;width:332px;padding:15px 16px;border:1px solid #697c89;border-radius:10px;background:#182a36f5;box-shadow:0 12px 36px #0004;backdrop-filter:blur(12px)}
#tour-resume strong{font-size:14px;font-weight:500}#tour-resume p{margin:5px 0 10px;font-size:11px;line-height:1.5}
.resume-actions{display:flex;gap:6px}.resume-actions button{min-height:40px;padding:7px 10px;background:#2a414f;border:1px solid #5a7181;border-radius:5px;font-size:11px}
.resume-actions #resume-continue{background:#f4a768;border-color:#f4a768;color:#17242d}
.resume-actions #resume-dismiss{margin-left:auto;width:34px;padding:0;font-size:20px}
@media(max-width:700px){
 #tour-resume{top:176px;left:12px;right:12px;width:auto;padding:12px 14px}
 #tour .station-views button{font-size:11px}
 #tour #tour-guide.route-overview{max-height:310px}
 #tour #tour-guide.route-overview .guide-track{margin:12px 0}
 #tour #tour-guide.route-overview #guide-info{display:none}
}

#route-transfer{font-size:11px;color:#cad9e2;line-height:1.4;margin:7px 0 0}

#tour #guide-order{margin:0 0 12px}
@media(min-width:701px){#tour #tour-guide{max-height:calc(100dvh - 310px)}}
@media(max-width:700px){#tour.guided:has(#tour-guide:not(.route-overview)) #mini-map{visibility:hidden}}

/* v88: workshop parts, finite transport and presentation. */
#tour #machine-parts{margin:10px 0 14px;border:1px solid #526675;border-radius:8px;background:#192d39}
#tour #machine-parts[hidden]{display:none}
#machine-parts summary{min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;cursor:pointer;font-size:12px;color:#e1eaf0}
#machine-parts summary::after{content:"+";font-size:20px;color:#ffc28d}#machine-parts[open] summary::after{content:"−"}
.part-buttons{display:flex;gap:5px;flex-wrap:wrap;padding:0 10px}
#tour .part-buttons button{min-height:44px;flex:1 1 42%;padding:7px 8px;font-size:11px;text-align:left;border:1px solid #536878;border-radius:5px;background:#253d4c}
#tour .part-buttons button[aria-pressed=true]{border-color:#ffc28d;color:#ffcfaa;background:#4a392d}
.part-explanation{font-size:12px!important;line-height:1.6!important;color:#c2d4df!important;margin:12px!important}
#part-pins{position:absolute;inset:0;z-index:6;pointer-events:none}
#tour .part-pin{position:absolute;top:-18px;left:-18px;width:36px;height:36px;border:1px solid #e2b991;border-radius:50%;background:#172c39eb;color:#ffe2c5;font-size:12px;pointer-events:auto;box-shadow:0 3px 15px #0005}
#tour .part-pin::before{content:"";position:absolute;inset:-5px}
#tour .part-pin[aria-pressed=true]{background:#ffc28d;color:#17242d;border-color:#ffe0c2}
#tour #station-indicator{position:absolute;z-index:6;transform:translate(-50%,-50%);display:flex;align-items:center;gap:7px;max-width:160px;min-height:46px;padding:8px 10px;border:1px solid #d4ac87;border-radius:22px;background:#18313fee;box-shadow:0 3px 14px #0005;color:#ffd2ab}
#tour #station-indicator[hidden]{display:none}
#station-indicator span{font-size:23px;flex:none}#station-indicator strong{font-weight:500;font-size:10px;line-height:1.3;text-align:left}
#product-transfer-note{margin:10px 0;padding:10px;border:1px solid #d2ac7755;border-radius:6px;background:#4b3d294d;font-size:12px;line-height:1.5;color:#ffce98}
#product-transfer-note button{display:block;width:100%;min-height:44px;margin-top:8px;border:1px solid #ac8a67;border-radius:5px;background:#2a3c47;color:#ffe0bf}
#tour.presenting>:not(#scene):not(.vignette):not(#presentation-exit):not(#compact-playback):not(#loading):not(#error){display:none!important}
#tour #presentation-exit{position:absolute;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:30;min-height:44px;padding:10px 18px;border:1px solid #82949e;border-radius:24px;background:#192b37c9;color:#e2ecf2;font-size:12px;backdrop-filter:blur(10px)}
#tour #presentation-exit[hidden]{display:none}
#tour #presentation-exit:focus-visible{outline:2px solid #ffc28d;outline-offset:4px}
@media(max-width:700px){
 #tour #station-indicator{max-width:122px}
 #machine-parts summary{font-size:12px}
 #tour #detail:has(#machine-parts[open]){max-height:52dvh;overflow-y:auto}
}

#moving-product-label{position:absolute;z-index:6;transform:translate(-50%,calc(-100% - 16px));pointer-events:none;padding:6px 9px;border:1px solid #ffcf87;border-radius:6px;background:#18313fee;color:#ffe0ac;font-size:11px;white-space:nowrap;box-shadow:0 4px 14px #0004}
#moving-product-label::after{content:"";position:absolute;left:calc(50% - 4px);bottom:-5px;width:8px;height:8px;transform:rotate(45deg);border-right:1px solid #ffcf87;border-bottom:1px solid #ffcf87;background:#18313f}

@media(max-width:700px){
 #tour #tour-guide:has(#guide-workpiece:not([hidden])){max-height:min(54dvh,460px)}
 #tour #tour-guide.route-overview:has(#guide-workpiece){max-height:min(44dvh,360px)}
 #tour #tour-guide .guide-buttons{position:sticky;bottom:0;z-index:2;padding:8px 0;background:#162935;box-shadow:0 -8px 12px #162935;}
}

/* v89: readable mobile sheets and direct access to an uncluttered model. */
#tour #detail-presentation{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;margin-top:14px;padding:9px 12px;border:1px solid #70818c;border-radius:6px;background:#223642;color:#dce9f1;font-size:12px}
#detail-presentation span{font-size:20px}
#tour #scene:focus-visible{outline:2px solid #ffc28d;outline-offset:-4px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#tour #camera-help-dialog{max-width:640px}
.camera-help-content{font-size:14px;line-height:1.65;color:#bed0dc}
.camera-help-content dl{margin:22px 0}.camera-help-content dl>div{display:block;margin:18px 0;padding:0;border:0}
.camera-help-content dt{font-size:14px;color:#ffe0c5;margin-bottom:5px}.camera-help-content dd{margin:0;font-size:13px;line-height:1.6;text-align:left;font-weight:400}
@media(max-width:700px){
 #tour #detail-presentation{margin-top:10px}
 #tour #detail:has(#machine-parts[open]){overflow:hidden}
 #tour #detail:has(#machine-parts[open]):not(.sheet-expanded){height:min(52dvh,460px)}
 #tour #detail:has(#machine-parts[open]).sheet-expanded{max-height:calc(100dvh - 80px)}
 #tour #detail-content{scroll-padding:16px}
 .camera-help-content{font-size:13px}
}

/* v90: three compact sections share a fixed, accessible card header. */
#tour .detail-actions{display:flex;gap:7px;margin-top:12px}
#tour .detail-actions>button{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:44px;margin:0;padding:9px 11px;border:1px solid #657c8c;border-radius:6px;background:#223642;color:#dce9f1;font-size:12px}
#tour .detail-actions #detail-presentation{margin:0}
#tour .detail-actions span{font-size:18px}
#tour #machine-model{margin:8px 0 0;font-size:11px;line-height:1.4;color:#a9bdca}
#tour .detail-tabs{display:flex;gap:4px;margin:14px -8px -8px;padding:4px;border-radius:8px;background:#0c1c26}
#tour .detail-tabs button{flex:1;min-height:44px;border:1px solid transparent;border-radius:5px;background:none;color:#b6c9d6;font-size:12px}
#tour .detail-tabs button[hidden]{display:none}
#tour .detail-tabs [aria-selected=true]{background:#314855;color:#ffe1ca;border-color:#a27f64}
#tour .detail-tabs button:focus-visible{outline:2px solid #ffc28d;outline-offset:1px}
#tour #detail-content>[hidden]{display:none}
#tour #detail-work #work-controls{margin:16px 0 0;border:0;padding:0}
#tour #detail-work .work-buttons{display:flex}
#tour #detail-work #work-pause{width:100%;min-height:44px}
#tour #work-timeline{margin:14px 0 0}
#tour #work-timeline summary{min-height:44px;display:flex;align-items:center;color:#b9cbd6;font-size:12px;cursor:pointer}
#tour #work-timeline summary::before{content:"›";margin-right:8px}
#tour #work-timeline[open] summary::before{content:"⌄"}
#tour #work-restart{display:block;width:100%;min-height:44px;margin:8px 0 0;border:1px solid #526775;border-radius:6px;background:#213744;font-size:12px}
#tour #detail-parts #machine-parts{margin:16px 0 0;border:0;background:none}
#tour #detail-parts #machine-parts>summary{display:none}
#tour #detail-parts .part-buttons{padding:0}
#tour #detail-parts .part-explanation{margin:14px 0 0!important}
#tour #detail-about .machine-actions{margin-top:16px}
#tour #detail-about .station-advice{margin:14px 0;padding:0 0 12px}
#tour #detail-about .station-advice summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:12px;color:#d5e3eb}
#tour #detail-about .station-advice summary::before{content:"›";margin-right:8px}
#tour #detail-about .station-advice[open] summary::before{content:"⌄"}
#tour #detail-about .station-advice ul{margin-top:10px}
@media(min-width:701px){#tour #detail:not([data-section=about]){bottom:auto;max-height:calc(100dvh - 298px)}}
@media(max-width:700px){
 #tour #detail{height:min(50dvh,440px)}
 #tour #detail.sheet-expanded{height:calc(100dvh - 80px)}
 #tour #detail:has(#machine-parts[open]):not(.sheet-expanded){height:min(50dvh,440px);max-height:52dvh}
 #tour .detail-header{padding-bottom:12px}
 #tour #machine-title{font-size:19px}
 #tour #machine-model{font-size:10px;margin-top:5px}
 #tour .detail-actions{margin-top:8px}
 #tour .detail-actions>button{font-size:11px;min-height:44px}
 #tour .detail-tabs{margin-top:8px}
 #tour .detail-tabs button{font-size:11px;min-height:44px}
 #tour #detail-work #work-controls{margin-top:12px}
}

/* v91: compact mobile viewing, clear route states and capture controls. */
.catalog-link{display:block;padding:12px 0;font-size:12px;color:#b8cbd6;text-align:center}
#settings .catalog-link{text-align:left;border-top:1px solid var(--line)}
#loading .catalog-link{margin-top:14px}#error .catalog-link{margin:20px auto;max-width:300px}
.no-script{position:fixed;inset:0;z-index:100;padding:15vh 24px;background:#14202a;text-align:center}
#snapshot-status{position:fixed;left:50%;top:118px;transform:translateX(-50%);z-index:17;max-width:calc(100vw - 36px);width:max-content;margin:0;padding:12px 18px;border-radius:8px;background:#162a38;font-size:12px;pointer-events:none}
#snapshot-status:empty{display:none}
#detail-minimize,#detail-restore{display:none}
#tour .detail-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
#tour .detail-actions button{font-size:11px;padding:9px 6px;min-width:0;gap:4px}
#tour .detail-actions button span{font-size:13px}
#part-reveal{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin:10px 0 0;padding:8px 10px;border:1px solid #536f7e;border-radius:6px;background:#203440;font-size:11px}
#part-reveal[aria-pressed=true]{border-color:#f49a6177;color:#ffd0ac}
#journey-itinerary{margin:14px 0 12px}
#journey-status{margin:0 0 9px;font-size:11px;line-height:1.5;color:#cadbe5}
#journey-itinerary #journey-steps{padding:0;border:0;background:none;gap:5px}
#journey-itinerary button{position:relative;background:#233945;border:1px solid #465d6a;min-height:66px}
#journey-itinerary button span{font-size:10px;line-height:1.3}
#journey-itinerary button small{display:block;margin-top:4px;font-size:9px;color:#a6bdca}
#journey-itinerary button[data-state=done]{border-color:#518970;color:#bde7cb;background:#244239}
#journey-itinerary button[data-state=current]{border-color:#f4ad69;color:#ffd0aa;background:#59412c}
#journey-itinerary button[data-state=next]{color:#9caeb9;background:#142731}
#tour #tour-guide.route-overview #journey-itinerary{display:block}
#tour #tour-guide.route-overview #guide-title{display:none}
@media(max-width:700px){
 #tour #mini-map{width:118px;padding:0 10px;min-height:44px}
 #tour #map-toggle{min-height:44px;font-size:11px}
 #tour #mini-map:not(.map-open) .map-plan{display:none}
 #tour #mini-map.map-open{top:124px}
 #tour #mini-map.map-open .map-plan{height:52px}
 #tour #detail-minimize{display:block;position:absolute;right:64px;top:43px;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:7px;background:#253746;font-size:24px}
 #tour #category{padding-right:95px}
 .unified-tour#tour #detail.sheet-compact:has(#detail-restore){height:auto;max-height:none;min-height:80px}
 #tour #detail.sheet-compact .detail-header{padding:12px 18px;border-bottom:0}
 #tour #detail.sheet-compact .detail-header>:not(#detail-restore):not(#close),#tour #detail.sheet-compact #detail-content{display:none}
 #tour #detail.sheet-compact #close{position:absolute;right:15px;top:16px;margin:0}
 #tour #detail.sheet-compact #detail-restore{display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:5px;width:calc(100% - 48px);min-height:54px;border:0;padding:0;background:none;text-align:left}
 #detail-restore span{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
 #detail-restore small{color:var(--muted);font-size:10px}
 #tour #detail:has(#machine-parts[open]):not(.sheet-expanded):not(.sheet-compact){height:min(54dvh,460px);max-height:54dvh}
 #journey-itinerary{margin:6px 0 10px}
 #journey-status{font-size:10px}
 #journey-itinerary button{min-height:64px}
 #tour #tour-guide.route-overview:has(#guide-workpiece){max-height:min(56dvh,465px)}
 #tour #snapshot-status{top:128px}
}

/* Playback remains next to the operation, including on a narrow screen. */
.playback-speed{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0;font-size:11px;color:#bdced8}
.playback-speed select{min-width:0;max-width:65%;min-height:44px;padding:8px;border:1px solid #49616f;border-radius:6px;background:#203440;color:#eef4f7;font:inherit}
#settings .playback-speed{flex-direction:column;align-items:stretch}#settings .playback-speed select{max-width:none;width:100%}
#tour-guide .playback-speed{margin:10px 0 12px}
#loading{gap:14px;padding:24px;text-align:center}
#loading-phase{margin:0;font-size:13px;color:#c0d2dc}
#loading-steps{list-style:none;display:flex;gap:6px;max-width:550px;width:100%;padding:0;margin:12px 0 0}
#loading-steps li{flex:1;min-width:0;padding-top:12px;border-top:3px solid #374d5b;font-size:10px;color:#7d97a8}
#loading-steps li[data-state=done]{border-color:#71ac92;color:#b2d7c4}
#loading-steps li[data-state=current]{border-color:#f49a61;color:#ffd0ab}
#loading-slow{max-width:380px;font-size:12px;color:#c0d2dc}
#loading-slow button{min-height:44px;padding:10px 18px;border:1px solid #647e8c;background:#243e4d;color:#fff;border-radius:6px}
#snapshot-editor{width:min(980px,calc(100vw - 36px));max-height:calc(100dvh - 36px);padding:22px}
#snapshot-editor .dialog-heading{margin-bottom:8px}
.snapshot-editor>p{font-size:12px;line-height:1.5;color:#bdced8;margin:8px 0 12px}
#snapshot-preview{display:block;max-width:100%;max-height:43dvh;width:auto;height:auto;margin:0 auto;background:#18242e;border:1px solid #536a79;border-radius:5px;cursor:crosshair;touch-action:none}
#snapshot-preview:focus-visible{outline:2px solid #ffad63;outline-offset:3px}
.snapshot-editor #snapshot-keyboard{font-size:10px;margin:8px 0}
.snapshot-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0 12px}
.snapshot-tools button{padding:8px 12px;min-height:44px;font-size:11px;background:#253d4b;border:1px solid #506a7b;border-radius:5px}
.snapshot-tools button:disabled{opacity:.45;cursor:default}
#snapshot-count{font-size:11px;color:#c2d5df;margin-left:auto}
.snapshot-comment{display:block;font-size:12px;color:#e8f0f5}
.snapshot-comment>span{color:#8ea9ba;font-size:10px;margin-left:8px}
.snapshot-comment textarea{box-sizing:border-box;display:block;width:100%;resize:vertical;min-height:62px;max-height:120px;margin-top:8px;padding:10px 12px;border:1px solid #4d6677;border-radius:6px;background:#122731;color:#fff;font:13px/1.5 Arial,sans-serif}
#snapshot-save-status:empty{display:none}
#snapshot-editor #snapshot-save-status{color:#ffd0a8}
.snapshot-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:12px}
.snapshot-footer p{font-size:10px;color:#a9c0ce;line-height:1.5}
#snapshot-download{min-height:44px;flex-shrink:0;padding:11px 20px;border:0;border-radius:6px;color:#18242e;background:#f49a61;font-weight:700}
@media(max-width:700px){
 #snapshot-editor{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:16px}
 #snapshot-editor .dialog-heading h2{font-size:20px}
 #snapshot-preview{max-height:34dvh}
 .snapshot-editor #snapshot-keyboard{display:none}
 .snapshot-tools{gap:6px}
 #snapshot-count{width:100%;margin-left:0;min-height:16px}
 .snapshot-footer{gap:10px}.snapshot-footer p{max-width:145px}
 #snapshot-download{padding:10px 14px}
 #loading-steps{gap:4px}#loading-steps li{font-size:8px}
}
@media(prefers-reduced-motion:reduce){#loading .loader{animation:none}}
/* v93: controls remain reachable when the equipment card is tucked away. */
#compact-playback{position:absolute;z-index:42;left:50%;bottom:100px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;width:min(430px,calc(100% - 24px));padding:9px;border:1px solid #536976;border-radius:14px;background:rgba(18,34,44,.97);box-shadow:0 8px 30px #0005}
#compact-playback[hidden]{display:none!important}
#compact-playback.floating{bottom:88px}
#compact-playback button,#compact-playback select{min-height:44px;color:#edf5f7;border:1px solid #51636c;border-radius:8px;background:#2a414e;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
#compact-playback .compact-open{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center;gap:3px;padding:4px 8px;text-align:left;border-color:transparent;background:transparent}
#compact-playback .compact-open small{font-size:10px;font-weight:500;color:#acc0ca}
#compact-playback .compact-open span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
#compact-playback .compact-pause{width:91px;flex:none;padding:0 8px}
#compact-playback select{width:74px;padding:0 5px}
#compact-playback label{flex:none}
#compact-playback :focus-visible{outline:2px solid #72d4cf;outline-offset:2px}
@media(max-width:699px){#compact-playback{bottom:calc(96px + env(safe-area-inset-bottom));gap:5px;padding:7px}#compact-playback.floating{bottom:calc(86px + env(safe-area-inset-bottom))}}
