/* Scope every rule to the Journey view; retain native chat nodes and handlers. */
#j33-toolbar,#j35-desk{display:none}
.j33{--j33-bg:#0d1119;--j33-panel:#151c28;--j33-line:#303d53;--j33-text:#edf2ff;--j33-muted:#adb9d1;color:var(--j33-text);font:14px/1.6 system-ui,sans-serif;box-sizing:border-box}
.j33 *{box-sizing:border-box}.j33 h2{font-size:21px;line-height:1.4;margin:4px 0 10px}.j33 h3{font-size:17px;line-height:1.5;margin:0 0 8px}.j33 p{margin:7px 0;overflow-wrap:anywhere}.j33 label{display:block;color:#c8d7f2;font-size:13px}.j33 button,.j33 a{touch-action:manipulation}.j33 button{font:inherit;font-weight:550;min-height:40px;padding:8px 13px;border:1px solid var(--j33-line);border-radius:14px;background:#202b40;color:var(--j33-text);cursor:pointer;line-height:1.5}.j33 button:hover,.j33 button[aria-pressed=true]{background:#354e78;border-color:#9ab8ef}.j33 button:disabled{opacity:.5;cursor:wait}.j33 button:focus-visible,.j33 a:focus-visible,.j33 summary:focus-visible{outline:3px solid #b4ccff;outline-offset:3px}.j33 .j33-primary,.j33 [data-j33-action=send],.j33 [data-j33-action=download]{color:#10213d;background:#b7ccff}.j33 a{color:#b3d2ff;text-underline-offset:3px}.j33 input:not([type=checkbox]),.j33 select,.j33 textarea{width:100%;font:inherit;font-size:16px;color:var(--j33-text);background:#0a101b;border:1px solid #485a76;border-radius:10px;padding:10px;min-height:44px;margin:5px 0 10px;color-scheme:dark}.j33 textarea{resize:vertical;max-height:240px}.j33 input[type=checkbox]{width:20px;height:20px;accent-color:#b7ccff}.j33 .j33-row{display:flex;justify-content:space-between;align-items:center;gap:10px}.j33 .j33-buttons{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}.j33 .j33-muted{font-size:12px;color:var(--j33-muted)}.j33 .j33-warning,.j33 .j33-form-error,.j33 [data-state=unsaved]{color:#ffcb88}.j33 .j33-notice:empty{display:none}.j33 .j33-notice{font-size:13px;color:#c8dbff}.j33 .j33-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.j33 [hidden]{display:none!important}.j33 .j33-done{display:flex;gap:6px;align-items:center}.j33 summary{cursor:pointer;font-weight:650}.j33 summary span{font-size:12px;color:var(--j33-muted);font-weight:400;margin-left:8px}.j33 .j33-preview{border-top:1px solid var(--j33-line);padding-top:10px;margin-top:10px}.j33 .j33-preview textarea{font-size:13px;line-height:1.5;min-height:84px}.j33 .j33-preview button{width:100%}
.j33-budget{border:1px solid #35445c;background:linear-gradient(130deg,#19253a,#121923);border-radius:18px;padding:14px;margin:12px 0 18px}.j33-budget dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.j33-budget dt{font-size:12px;color:#b7c8e5}.j33-budget dd{margin:4px 0;font-size:23px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}.j33-place{border:1px solid var(--j33-line);border-radius:16px;overflow:hidden;background:#151c28;margin:14px 0}.j33-place img{display:block;width:100%;height:180px;object-fit:cover}.j33-place-body{padding:14px}.j33-place-body>p{font-size:13px}.j33-place .j33-eyebrow{font-size:11px;letter-spacing:.03em;color:#a8c9ff}.j33-empty{border:1px dashed #465777;border-radius:16px;padding:30px 20px;text-align:center;color:#b8c8e1;margin:18px 0}.j33-trip-list{display:flex;flex-direction:column;gap:10px;max-height:45vh;overflow:auto}.j33-trip-list button{text-align:left}
#j33-modal{padding:22px;max-width:min(640px,calc(100vw - 24px));width:640px;max-height:85dvh;overflow:auto;border:1px solid #586984;border-radius:22px;background:#121a28;color:#edf2ff;margin:auto}#j33-modal::backdrop{background:#000b;backdrop-filter:blur(4px)}#j33-modal form>button[type=submit]{width:100%;margin-top:16px}

/* V56: one itinerary header; its native conversation keeps only messages and input. */
html[data-imo-black] body.journey33-open{overflow:hidden!important}
html[data-imo-black] body.journey33-open>.bp-top{display:none!important}
html[data-imo-black] body.journey33-open #bpLayout{position:fixed!important;inset:0!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;height:var(--j33-viewport,100dvh)!important;min-height:0!important;margin:0!important;padding:env(safe-area-inset-top,0px) 0 0!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:44px minmax(0,1fr)!important;gap:0!important;overflow:hidden!important;z-index:80;background:#090c12!important;border:0!important;border-radius:0!important}
html[data-imo-black] body.journey33-open #bpLayout>.bp-left,html[data-imo-black] body.journey33-open #bpLayout>.bp-right{display:none!important}
html[data-imo-black] body.journey33-open #bpLayout>#app{grid-column:1!important;grid-row:2!important;position:relative!important;inset:auto!important;display:block!important;box-sizing:border-box!important;width:100%!important;max-width:none!important;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;transform:none!important;scroll-margin-top:44px}
html[data-imo-black] body.journey33-open #bpLayout #app .phone{width:100%!important;max-width:none!important;height:calc(100% - 52px)!important;min-height:0!important;border-radius:0!important;grid-template-rows:minmax(0,1fr) auto!important}
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#imo-nav-state-r26:checked){grid-template-rows:minmax(0,1fr) auto!important}
html[data-imo-black] body.journey33-open #bpLayout #app #chat{grid-row:1!important;display:flex!important;flex-direction:column!important;height:100%!important;min-width:0!important;min-height:0!important;overflow:hidden!important}
html[data-imo-black] body.journey33-open #bpLayout #app #feed{flex:1 1 0!important;height:auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior-y:auto!important}
html[data-imo-black] body.journey33-open #bpLayout #app #composer{grid-row:2!important;position:relative!important;inset:auto!important;z-index:5!important}
html[data-imo-black] body.journey33-open #imo-journey-entry-r34{display:none!important}
html[data-imo-black] body.journey33-open #j33-toolbar{grid-row:1;grid-column:1/-1;display:flex!important;align-items:center;gap:6px;padding:0 6px;background:#0e1521;border-bottom:1px solid #303b50;min-width:0;z-index:12}
#j33-toolbar strong{font-size:14px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#j33-toolbar nav{display:flex;gap:2px;flex:0 0 auto}#j33-toolbar button{min-width:44px;min-height:42px;max-height:42px;padding:3px 8px;font-size:14px;border-radius:9px;background:transparent;border-color:transparent}
html[data-imo-black] body.journey33-open #j35-desk{display:block!important;grid-column:2;grid-row:2;min-width:0;min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:auto;background:#101724;border-left:1px solid #36445e;scroll-padding-top:12px}
html[data-imo-black] body.journey33-open #j33-guide{display:block!important;max-height:none;overflow:visible;margin:0;padding:12px;border-bottom:1px solid #36445e;background:#16243a;width:100%}
#j33-guide h2{font-size:17px;margin:6px 0}#j33-guide .j33-origin-row{display:flex;align-items:center;gap:6px;min-width:0}#j33-guide .j33-origin-row button{min-height:40px;text-align:left;font-size:12px;overflow-wrap:anywhere}#j33-guide .j33-origin-row button:first-child{flex:1}#j33-guide .j33-buttons{gap:6px;margin:8px 0}#j33-guide .j33-buttons button{min-height:44px;font-size:13px;padding:6px 10px}#j33-guide .j33-preview textarea{max-height:130px;min-height:66px}
html[data-imo-black] body.journey33-open #j33-plan{display:block!important;min-width:0;min-height:0;overflow:visible;padding:12px 12px 24px;background:#0c1018}
#j33-plan>.j33-row h2{font-size:18px;margin:0}#j33-plan>.j33-row button{white-space:nowrap}.j33-place{scroll-margin-top:56px}
@media(max-width:760px){
 /* Do not depend on document/body scrolling: the native PWA locks both. */
 html[data-imo-black] body.journey33-open #bpLayout{display:block!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:contain!important;touch-action:pan-x pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch;scroll-padding-block:12px}
 html[data-imo-black] body.journey33-open #j33-toolbar{position:sticky;top:0;height:44px;min-height:44px}
 html[data-imo-black] body.journey33-open #bpLayout>#app{height:auto!important;max-height:none!important;overflow:visible!important;scroll-margin-top:12px}
 html[data-imo-black] body.journey33-open #bpLayout #app .phone,
 html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#imo-nav-state-r26){height:auto!important;max-height:none!important;overflow:visible!important;grid-template-rows:auto auto!important}
 html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#imo-nav-state-r26:checked){grid-template-rows:auto auto!important}
 html[data-imo-black] body.journey33-open #bpLayout #app #chat{height:auto!important;max-height:none!important;overflow:visible!important}
 /* Both axes must be visible; hidden X would turn visible Y back into auto. */
 html[data-imo-black] body.journey33-open #bpLayout #app #feed{flex:none!important;height:auto!important;min-height:180px!important;max-height:none!important;overflow:visible!important;overscroll-behavior:auto!important}
 html[data-imo-black] body.journey33-open #j35-desk{width:100%;height:auto;max-height:none;overflow:visible;border-left:0;border-top:2px solid #6079a1}
 html[data-imo-black] body.journey33-open #j33-guide{padding:12px}
 html[data-imo-black] body.journey33-open #j33-plan{padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 .j33 .j33-fields{grid-template-columns:1fr}#j33-modal{padding:16px}.j33-budget dd{font-size:20px}
}
/* Keep horizontal card gestures available inside the vertically scrollable phone page. */
html[data-imo-black] body.journey33-open #bpLayout #app #feed{touch-action:pan-x pan-y pinch-zoom!important}

/* One selected trip base in the itinerary guide. */
.j33-origin-row{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;min-width:0}.j33-origin-row button{min-height:44px;text-align:left;white-space:normal;overflow-wrap:anywhere}.j33-origin-row button:first-child{flex:1 1 180px}

/* The native entry replaces the desktop shortcut too; leave all other main tools intact. */
html[data-imo-black] body:not(.journey33-open) #bpLayout #app #chat #imo-journey-entry-r34{display:flex!important;width:auto;max-width:min(46%,180px);height:44px;min-height:44px;font-size:12px}
html[data-imo-black] body #bpLayout #app #chat #imo-journey-entry-r34 span{max-width:none}
.j33-chat-caption{display:none}
html[data-imo-black] body.journey33-open #bpLayout #app .j33-chat-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;height:52px;padding:4px 12px;background:#16243a;border-bottom:1px solid #36445e}
.j33-chat-caption h2{font-size:14px;margin:0}
html[data-imo-black] body:not(.journey33-open) #bpLayout #app .phone:has(#chat) #feed{padding-bottom:54px!important}
/* Higher specificity than native :has(:checked) menu rules, only while Journey is open. */
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat){grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) auto!important}
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat) #chat,
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat) #composer{grid-column:1/-1!important}
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat) #chat{grid-row:1!important}
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat) #composer{grid-row:2!important}
html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat) :is(.topbar,#rightRail,.bp-action-dock,.r26-rail-control,.r26-nav-handle,#op-entry-v44,#op-panel-v44,#imo-visitor-context-v19,#imo-travel-origin,#imo-together-entry-r29,#bpWelcome){display:none!important}
html[data-imo-black] body.journey33-open #bpLayout #app #feed[data-op-hidden]{display:block!important}
@media(max-width:760px){
 html[data-imo-black] body.journey33-open #bpLayout #app .phone:has(#chat){grid-template-rows:auto auto!important}
 .journey33-open #j33-guide .j33-buttons{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;padding:3px 0 8px;scrollbar-width:thin}
 .journey33-open #j33-guide .j33-buttons>button{flex:0 0 auto;white-space:nowrap}
 .journey33-open #j33-modal[data-return-to=conditions]{margin:calc(env(safe-area-inset-top,0px) + 12px) auto auto;max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px));}
}
