/* Approved compact guide port. Screen-only; remove this link to remove the skin. */
@media screen {
  /* Normalize the legacy 99% body zoom only while this guide is active or one of its windows exists. */
  html body:has(#pipeline-content:not(.hidden) #guide-content-inner:not(.hidden)),
  html body:has(#gd-modal),
  html body:has(#gd-hist-modal),
  html body:has(#stage-checklist-popup),
  html body:has(#stage-side-panel) { zoom:1!important; }
  html #guide-content-inner > div[class] { border-radius:0!important; border-color:var(--ui-line)!important; box-shadow:none!important; }
  html #guide-content-inner,
  html #gd-modal,
  html #gd-hist-modal,
  html #stage-checklist-popup,
  html #stage-side-panel { color:var(--ui-text-1); font:12px/1.4 var(--ui-font); color-scheme:light; }
  html #guide-content-inner *,
  html #gd-modal *,
  html #gd-hist-modal *,
  html #stage-checklist-popup *,
  html #stage-side-panel * { box-sizing:border-box; }
  html #guide-content-inner [hidden],
  html #gd-modal [hidden],
  html #gd-hist-modal [hidden],
  html #stage-checklist-popup [hidden],
  html #stage-side-panel [hidden] { display:none!important; }
  html #guide-content-inner :focus-visible,
  html #gd-modal :focus-visible,
  html #gd-hist-modal :focus-visible,
  html #stage-checklist-popup :focus-visible,
  html #stage-side-panel :focus-visible { outline:2px solid var(--ui-accent-text)!important; outline-offset:-2px; }
  html #guide-content-inner { padding:12px 16px!important; background:var(--ui-surface); min-width:0; overflow-y:auto; scrollbar-gutter:stable; }
  html #guide-content-inner button,
  html #guide-content-inner .gd-open,
  html #gd-modal button,
  html #gd-hist-modal button,
  html #stage-checklist-popup button,
  html #stage-side-panel button,
  html #stage-side-panel .gd-open { cursor:pointer; font:12px/1.3 var(--ui-font); min-height:24px; padding:0 9px; border:1px solid var(--ui-line-control); border-radius:5px; background:var(--ui-surface); color:var(--ui-text-1); transition:none!important; transform:none!important; box-shadow:none; text-decoration:none; }
  html #guide-content-inner .gd-open,
  html #stage-side-panel .gd-open { display:inline-flex; align-items:center; color:var(--ui-accent-text); }
  html #guide-content-inner .gd-primary,
  html #gd-modal .gd-window-footer button:last-child,
  html #stage-checklist-popup .gd-primary { background:var(--ui-accent-text); color:var(--ui-on-accent); border-color:var(--ui-accent-text); }
  html #guide-content-inner .gd-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
  html #guide-content-inner .gd-heading h2 { margin:0; font-size:15px; font-weight:600; }
  html #guide-content-inner .gd-heading p { margin:2px 0 0; font-size:11px; color:var(--ui-text-2); }
  html #guide-content-inner .gd-heading>button { flex:none; }
  html #guide-content-inner .gd-stages { display:flex; gap:3px; overflow-x:auto; padding:2px 0 8px; scrollbar-gutter:stable; }
  html #guide-content-inner .gd-stages button { flex:none; white-space:nowrap; }
  html #guide-content-inner .gd-stages button[aria-pressed=true] { background:var(--ui-accent-tint); color:var(--ui-accent-text); border-color:var(--ui-line-control); }
  html #guide-content-inner .gd-sectionbar { display:flex; justify-content:space-between; align-items:center; gap:8px; border-block:1px solid var(--ui-line); padding:6px 0; }
  html #guide-content-inner .gd-sections { display:flex; gap:2px; min-width:0; }
  html #guide-content-inner .gd-sections button { white-space:nowrap; border-color:transparent; }
  html #guide-content-inner .gd-sections button[aria-pressed=true] { background:var(--ui-fill); font-weight:600; }
  html #guide-content-inner .gd-window-actions { display:flex; gap:5px; flex-shrink:0; }
  html #guide-content-inner .gd-window-actions button { font-size:11px; }
  html #guide-content-inner .gd-phone-section { display:none; }
  html #guide-content-inner .gd-disclosure { font-size:11px; color:var(--ui-text-2); margin:7px 0 10px; }
  html #guide-content-inner .gd-group { margin:0 0 16px; }
  html #guide-content-inner .gd-group>h3 { margin:0; padding:6px 8px; font-size:11px; font-weight:500; color:var(--ui-text-2); border-bottom:1px solid var(--ui-line); background:var(--ui-surface-alt); }
  html #guide-content-inner .gd-group>h3 span { margin-left:8px; font-weight:400; }
  html #guide-content-inner .gd-record { box-shadow:inset 0 -1px var(--ui-line); }
  html #guide-content-inner .gd-record-row { width:100%; height:32px; min-height:32px; display:flex; align-items:center; gap:8px; border:0; border-radius:0; padding:0 8px; background:transparent; text-align:left; }
  html #guide-content-inner .gd-chevron { width:10px; flex:none; color:var(--ui-text-2); font-size:17px; }
  html #guide-content-inner .gd-type { font-size:11px; color:var(--ui-text-2); width:38px; flex:none; }
  html #guide-content-inner .gd-title { font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
  html #guide-content-inner .gd-detail { padding:10px 16px 12px 64px; background:var(--ui-surface-alt); }
  html #guide-content-inner .gd-full-title,
  html #stage-side-panel .gd-full-title { font-size:13px; font-weight:600; margin:0 0 8px; overflow-wrap:anywhere; white-space:pre-wrap; }
  html #guide-content-inner .gd-content,
  html #gd-hist-modal .gd-history-content,
  html #stage-checklist-popup .gd-content,
  html #stage-side-panel .gd-content { font:13px/1.65 var(--ui-font); white-space:pre-wrap; overflow-wrap:anywhere; color:var(--ui-text-1); }
  html #guide-content-inner .gd-caption,
  html #stage-side-panel .gd-caption { font-size:11px; color:var(--ui-text-2); margin-bottom:4px; }
  html #guide-content-inner .gd-file,
  html #stage-side-panel .gd-file { display:grid; grid-template-columns:54px minmax(0,1fr); gap:8px; margin:8px 0; font-size:12px; }
  html #guide-content-inner .gd-file dt,
  html #stage-side-panel .gd-file dt { color:var(--ui-text-2); }
  html #guide-content-inner .gd-file dd,
  html #stage-side-panel .gd-file dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }
  html #guide-content-inner .gd-record-actions { display:flex; gap:6px; margin-top:12px; }
  html #guide-content-inner .gd-success,
  html #gd-modal .text-emerald-600,
  html #stage-side-panel .gd-success { color:var(--ui-success)!important; }
  html #guide-content-inner .gd-danger,
  html #gd-modal .text-red-600,
  html #stage-side-panel .gd-danger { color:var(--ui-danger)!important; }
  html #guide-content-inner .gd-empty,
  html #stage-checklist-popup .gd-empty,
  html #stage-side-panel .gd-empty { font:12px/1.5 var(--ui-font); padding:18px 8px; color:var(--ui-text-2); }

  html #gd-modal,
  html #gd-hist-modal,
  html #stage-checklist-popup { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; background:var(--ui-scrim); overflow:hidden; }
  html #gd-modal { z-index:10000; }
  html #gd-hist-modal { z-index:10001; }
  html #stage-checklist-popup { z-index:9999; }
  html #gd-modal .gd-window,
  html #gd-hist-modal .gd-window,
  html #stage-checklist-popup .gd-window,
  html #stage-side-panel .gd-window { display:flex; flex-direction:column; max-height:88dvh; width:560px; max-width:100%; border:1px solid var(--ui-line-control); border-radius:12px; overflow:hidden; background:var(--ui-bg); box-shadow:var(--ui-elev-sheet); min-height:0; }
  html #gd-modal .gd-window-header,
  html #gd-hist-modal .gd-window-header,
  html #stage-checklist-popup .gd-window-header,
  html #stage-side-panel .gd-window-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--ui-line); background:var(--ui-surface-alt); flex-shrink:0; }
  html #gd-modal .gd-window-header h3,
  html #gd-hist-modal .gd-window-header h3,
  html #stage-checklist-popup .gd-window-header h3,
  html #stage-side-panel .gd-window-header h3 { margin:0!important; color:var(--ui-text-1)!important; font:600 15px/1.4 var(--ui-font)!important; overflow-wrap:anywhere; }
  html #gd-modal .gd-window-header i,
  html #gd-hist-modal .gd-window-header i { display:none!important; }
  html #gd-modal .gd-window-header .gd-close,
  html #gd-hist-modal .gd-window-header .gd-close,
  html #stage-checklist-popup .gd-window-header .gd-close,
  html #stage-side-panel .gd-window-header .gd-close { width:28px; height:28px; flex-shrink:0; padding:0; border:0; background:var(--ui-fill); font-size:21px; }
  html #gd-modal .gd-window-scroll,
  html #gd-hist-modal .gd-window-scroll,
  html #stage-checklist-popup .gd-window-scroll,
  html #stage-side-panel .gd-window-scroll { min-height:0; overflow-y:auto; scrollbar-gutter:stable; overscroll-behavior:contain; padding:12px 16px 16px; flex:1; }
  html #gd-modal .gd-window-footer,
  html #gd-hist-modal .gd-window-footer,
  html #stage-checklist-popup .gd-window-footer,
  html #stage-side-panel .gd-window-footer { display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:10px 16px; border-top:1px solid var(--ui-line); background:var(--ui-surface-alt); flex-shrink:0; color:var(--ui-text-2); font-size:11px; }
  html #gd-modal .gd-window-footer button,
  html #stage-checklist-popup .gd-window-footer button,
  html #stage-side-panel .gd-window-footer button { min-height:28px; }
  html #gd-modal .gd-window-scroll label { font-size:11px!important; color:var(--ui-text-2)!important; font-weight:500!important; }
  html #gd-modal .gd-window-scroll input:not([type=checkbox]):not([type=radio]),
  html #gd-modal .gd-window-scroll textarea,
  html #gd-modal .gd-window-scroll select { box-sizing:border-box; width:100%; min-width:0; border:1px solid var(--ui-line-control)!important; border-radius:5px!important; box-shadow:var(--ui-elev-field); background:var(--ui-surface)!important; color:var(--ui-text-1)!important; padding:0 7px!important; font:12px/1.4 var(--ui-font)!important; margin-top:4px!important; }
  html #gd-modal .gd-window-scroll input:not([type=checkbox]):not([type=radio]),
  html #gd-modal .gd-window-scroll select { height:28px; }
  html #gd-modal .gd-window-scroll textarea { height:80px; min-height:54px; resize:vertical; padding:6px 7px!important; }
  html #gd-modal .gd-window-scroll input[type=file] { height:auto!important; min-height:32px; }
  html #gd-modal .gd-window-scroll input[type=radio],
  html #gd-modal .gd-window-scroll input[type=checkbox],
  html #stage-checklist-popup input[type=checkbox] { width:16px; height:16px; accent-color:var(--ui-accent-text); flex:none; }
  html #gd-modal .gd-window-scroll label:has(input[type=radio]),
  html #gd-modal .gd-window-scroll label:has(input[type=checkbox]) { min-height:28px; }
  html #gd-modal input::placeholder,
  html #gd-modal textarea::placeholder { color:var(--ui-text-2); opacity:1; }
  html #gd-hist-modal .gd-window-scroll [class*='text-'],
  html #gd-hist-modal .gd-window-scroll time { font-size:11px; color:var(--ui-text-2); }
  html #gd-hist-modal .gd-window-scroll [class*='border-gray'] { border-color:var(--ui-line); border-radius:5px; background:var(--ui-surface); }
  html #gd-hist-modal .gd-window-scroll [class*='max-h-'] { max-height:none!important; overflow:visible!important; }
  html #gd-hist-modal .gd-window-scroll button { color:var(--ui-accent-text); }
  html #gd-hist-modal .gd-window-scroll [class*='justify-between'] { flex-wrap:wrap; gap:6px; }
  html #stage-checklist-popup .gd-checklist-item { display:flex; align-items:flex-start; gap:10px; padding:8px 0; border-bottom:1px solid var(--ui-line); cursor:pointer; }
  html #stage-checklist-popup .gd-checklist-item input { margin-top:3px; }
  html #stage-checklist-popup .gd-checklist-item>span { min-width:0; }
  html #stage-checklist-popup .gd-checklist-title { display:block; font-size:13px; overflow-wrap:anywhere; white-space:pre-wrap; }
  html #stage-checklist-popup .gd-checklist-item .gd-content { display:block; font-size:11px; color:var(--ui-text-2); margin-top:2px; }
  html #stage-side-panel { position:fixed; z-index:9998; top:0; right:0; bottom:0; width:380px; max-width:100vw; background:var(--ui-bg); box-shadow:var(--ui-elev-sheet); }
  html #stage-side-panel .gd-window { width:100%; height:100%; max-height:100%; border-radius:0; box-shadow:none; border-block:0; border-right:0; }
  html #stage-side-panel .gd-panel-group { margin-bottom:18px; }
  html #stage-side-panel .gd-panel-group h3 { font-size:11px; color:var(--ui-text-2); border-bottom:1px solid var(--ui-line); padding-bottom:5px; margin:0; }
  html #stage-side-panel .gd-panel-group details { border-bottom:1px solid var(--ui-line); padding:7px 0; }
  html #stage-side-panel .gd-panel-group summary { cursor:pointer; overflow-wrap:anywhere; }
  html #stage-side-panel .gd-panel-group details>.gd-full-title { padding-top:8px; }
}
@media screen and (hover:hover) {
  html #guide-content-inner .gd-record-row:hover { background:var(--ui-fill-subtle); }
  html #stage-side-panel .gd-panel-group summary:hover { color:var(--ui-accent-text); }
}
@media screen and (max-width:1000px) {
  html #guide-content-inner .gd-sectionbar { flex-wrap:wrap; }
  html #guide-content-inner .gd-window-actions { margin-left:auto; }
}
@media screen and (max-width:640px) {
  html #guide-content-inner { padding:10px 8px!important; }
  html #guide-content-inner .gd-heading { gap:6px; margin-bottom:6px; }
  html #guide-content-inner .gd-heading>button { min-height:28px; }
  html #guide-content-inner .gd-stages { padding-bottom:6px; margin:0 -8px; padding-inline:8px; }
  html #guide-content-inner .gd-stages button { min-height:28px; font-size:11px; }
  html #guide-content-inner .gd-sections { display:none; }
  html #guide-content-inner .gd-sectionbar { flex-wrap:nowrap; gap:4px; padding:6px 0; }
  html #guide-content-inner .gd-phone-section { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--ui-text-2); min-width:0; }
  html #guide-content-inner .gd-phone-section select { height:28px; max-width:124px; width:124px; border:1px solid var(--ui-line-control); border-radius:5px; background:var(--ui-surface); font:12px var(--ui-font); color:var(--ui-text-1); }
  html #guide-content-inner .gd-window-actions { gap:3px; }
  html #guide-content-inner .gd-window-actions button { min-height:28px; font-size:11px; padding:0 5px; }
  html #guide-content-inner .gd-disclosure { line-height:1.5; margin:6px 0 8px; }
  html #guide-content-inner .gd-group { margin-bottom:12px; }
  html #guide-content-inner .gd-group>h3 { padding:5px 6px; }
  html #guide-content-inner .gd-record-row { height:44px; min-height:44px; padding:0 6px; gap:5px; }
  html #guide-content-inner .gd-type { width:34px; }
  html #guide-content-inner .gd-detail { padding:10px 10px 12px 20px; }
  html #guide-content-inner .gd-content,
  html #guide-content-inner .gd-full-title,
  html #stage-side-panel .gd-content,
  html #stage-side-panel .gd-full-title { font-size:14px; }
  html #guide-content-inner .gd-record-actions { flex-wrap:wrap; }
  html #guide-content-inner .gd-record-actions button { min-height:32px; }
  html #guide-content-inner .gd-file,
  html #stage-side-panel .gd-file { grid-template-columns:44px minmax(0,1fr); }
  html #gd-modal,
  html #gd-hist-modal,
  html #stage-checklist-popup { padding:0; align-items:flex-end; }
  html #gd-modal .gd-window,
  html #gd-hist-modal .gd-window,
  html #stage-checklist-popup .gd-window,
  html #stage-side-panel .gd-window { width:100%; max-height:88dvh; border-radius:14px 14px 0 0; border-bottom:0; }
  html #gd-modal .gd-window-header,
  html #gd-hist-modal .gd-window-header,
  html #stage-checklist-popup .gd-window-header,
  html #stage-side-panel .gd-window-header { padding:10px 12px; }
  html #gd-modal .gd-window-header .gd-close,
  html #gd-hist-modal .gd-window-header .gd-close,
  html #stage-checklist-popup .gd-window-header .gd-close,
  html #stage-side-panel .gd-window-header .gd-close { width:44px; height:44px; }
  html #gd-modal .gd-window-scroll,
  html #gd-hist-modal .gd-window-scroll,
  html #stage-checklist-popup .gd-window-scroll,
  html #stage-side-panel .gd-window-scroll { padding:10px 12px 16px; }
  html #gd-modal .gd-window-footer,
  html #stage-checklist-popup .gd-window-footer,
  html #stage-side-panel .gd-window-footer { padding:8px 12px max(8px,env(safe-area-inset-bottom)); }
  html #gd-modal .gd-window-footer button,
  html #stage-checklist-popup .gd-window-footer button,
  html #stage-side-panel .gd-window-footer button { min-height:44px; flex:1; }
  html #gd-modal .gd-window-scroll input:not([type=radio]):not([type=checkbox]),
  html #gd-modal .gd-window-scroll select { height:40px; font-size:16px!important; }
  html #gd-modal .gd-window-scroll textarea { font-size:16px!important; height:100px; }
  html #gd-modal .gd-window-scroll label:has(input[type=radio]),
  html #gd-modal .gd-window-scroll label:has(input[type=checkbox]) { min-height:44px; }
  html #stage-side-panel { top:auto; left:0; width:100%; height:88dvh; border-radius:14px 14px 0 0; }
  html #stage-checklist-popup .gd-checklist-item { min-height:44px; }
}
@media screen and (max-width:370px) {
  html #guide-content-inner .gd-phone-section { gap:3px; }
  html #guide-content-inner .gd-phone-section select { width:104px; }
  html #guide-content-inner .gd-window-actions button { padding-inline:4px; }
}
