/* Campaign tree. This file replaces the accumulated V5-V10 overrides.
 * One scroll container; chapter sections never shrink to fit the viewport.
 * Retain this filename so the existing source-linked and standalone builds agree.
 */
:root{--sans:'Manrope',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;--serif:'Fraunces',Georgia,'Times New Roman',serif}
body[data-screen=map] #screen{
 display:block;overflow:hidden;animation:none;
 padding:max(64px,calc(env(safe-area-inset-top) + 52px)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
 background:radial-gradient(ellipse at 50% 0,#18352655,transparent 65%),#07130ef2;
}
body[data-screen=map] #screen>.back{top:max(12px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));min-height:40px;padding:8px 12px;font-size:13px}
.journey-wrap{
 width:min(1160px,100%);height:100%;min-height:0;margin:0 auto;
 display:flex;flex-direction:column;gap:0;overflow:hidden;
 background:#0c1b15cc;border:1px solid #b9d5c020;border-radius:24px;
 color:#eaf1df;font-family:var(--sans);
}
.journey-wrap *, .journey-wrap *::before, .journey-wrap *::after{box-sizing:border-box}
.journey-head,.journey-banner{
 flex:none;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;
 align-items:center;gap:14px 24px;padding:22px 26px;border-bottom:1px solid #b9d5c018;
}
.journey-head>div,.journey-banner>div{min-width:0}
.journey-head .eyebrow,.journey-banner .eyebrow{font:600 10px/1.4 var(--sans);letter-spacing:1.6px;color:#a1bba4}
#screen .journey-head h2,#screen .journey-banner h2{font:750 30px/1.12 var(--sans);letter-spacing:-.9px;margin:6px 0 0;color:#f1f7e9}
.journey-head p,.journey-banner p{display:none}
.journey-summary{display:flex;gap:10px;min-width:0}
.journey-pill{display:flex;flex-direction:column;gap:5px;min-width:0;padding:0 14px;border-left:1px solid #b9d5c024}
.journey-pill strong{font:700 22px/1.1 var(--sans);font-variant-numeric:tabular-nums;letter-spacing:-.5px;color:#e3edcf}
.journey-pill span{font:500 10px/1.3 var(--sans);color:#97af9b}
.stackline{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.stackline .primary,.stackline .secondary{min-width:0;min-height:44px;padding:11px 16px;font-size:13px;gap:10px;white-space:normal;text-align:center}
.stackline svg{flex:none;width:17px;height:17px}
/* This is the ONLY scrolling element in the tree screen. */
.journey-tree{
 flex:1 1 0;min-width:0;min-height:0;width:100%;margin:0;padding:12px 26px 28px;
 display:block;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
 scrollbar-width:thin;scrollbar-color:#708b615c transparent;scroll-padding:16px;touch-action:pan-y;
}
.tree-chapter{
 position:relative;display:grid;grid-template-columns:minmax(0,1fr) 182px minmax(0,1fr);
 grid-template-areas:'left core right';align-items:center;column-gap:32px;
 height:auto;min-height:0;flex:none;isolation:isolate;padding:28px 0;
 border-bottom:1px solid #b9d5c012;
}
.tree-chapter:last-child{border-bottom:0}
.tree-chapter::before{content:'';position:absolute;z-index:-1;width:3px;top:0;bottom:0;left:calc(50% - 1.5px);background:#557b4f4d;border-radius:4px;pointer-events:none}
.tree-side{display:flex;flex-direction:column;gap:14px;min-width:0;min-height:0;width:100%}
.tree-side.left{grid-area:left}.tree-side.right{grid-area:right}
.chapter-core{
 grid-area:core;min-width:0;width:100%;display:flex;flex-direction:column;align-items:center;gap:9px;
 padding:16px 5px;text-align:center;background:#0c1b15;border-radius:16px;z-index:1;
}
.chapter-emblem{width:46px;height:46px;flex:none;border-radius:50%;background:#1c3524;border:1px solid #bbd79a3d;display:grid;place-items:center;color:#d9edbc;font:700 18px/1 var(--sans)}
.chapter-core .eyebrow{font:600 10px/1.3 var(--sans);letter-spacing:1.4px;color:#94ae93}
.chapter-core h3{font:700 18px/1.3 var(--sans);letter-spacing:-.35px;margin:0;color:#dce9d1;overflow-wrap:anywhere}
.chapter-core p{display:none}
.chapter-badges{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;min-width:0}
.chapter-badges span{font:500 11px/1.4 var(--sans);color:#9cb49a;padding:4px 8px;border:1px solid #b9d5c018;border-radius:16px;background:#0c1b15}
.chapter-badges span+span{display:none}
.blossom{
 position:relative;display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:14px;
 width:100%;min-width:0;max-width:none;min-height:124px;height:auto;
 padding:16px;text-align:left;isolation:isolate;border:0;border-radius:18px;
 background:none;color:inherit;touch-action:pan-y;
}
.blossom-shell{position:absolute;inset:0;z-index:-1;pointer-events:none;border-radius:18px;background:#13281d;border:1px solid #b8d29e24;transition:border-color .18s,background .18s}
.blossom:not(:disabled):hover .blossom-shell{background:#1a3223;border-color:#c7e3a74d}
.blossom.done .blossom-shell{background:#182d1f;border-color:#afd39140}
.blossom.current .blossom-shell,.blossom.highlight:not(.locked) .blossom-shell{border-color:#cee69c9c;box-shadow:0 0 18px #c7e5910a}
.blossom.optional .blossom-shell{background:#232333;border-color:#b9a0db40}
.blossom.locked:disabled{opacity:1;cursor:default}
.blossom.locked .blossom-shell{background:#102219;border-color:#bbd7b21c}
.blossom.locked .blossom-name{color:#95aa98}
.blossom:focus-visible{outline:2px solid #dceeb5;outline-offset:3px}
.blossom-flower{
 position:relative;inset:auto;transform:none;display:grid;place-items:center;width:52px;height:52px;flex:none;
 border-radius:50%;background:#304b2f;border:1px solid #d2e9a655;color:#e4f3ca;font:750 19px/1 var(--sans);
}
.blossom.done .blossom-flower{background:#c6df9f;border-color:#dfefc1;color:#2e4c27}
.blossom.optional .blossom-flower{background:#433858;border-color:#c2abe264;color:#e2d4f6}
.blossom.optional.done .blossom-flower{background:#c4afe2;color:#3e3052}
.blossom.locked .blossom-flower{background:#1d3226;border-color:#829b7240;color:#90a78b}
.blossom-flower>svg{width:28px;height:28px;stroke-width:1.5}
.blossom-mark{position:absolute;right:-4px;top:-4px;width:18px;height:18px;border-radius:50%;background:#173221;color:#def2b6;border:1px solid #c2d99c55;display:grid;place-items:center}
.blossom-mark svg{width:12px;height:12px}
.blossom-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.blossom-kicker{font:600 10px/1.4 var(--sans);letter-spacing:1px;color:#a5bd98}
.blossom.optional .blossom-kicker{color:#b9a5d1}
.blossom-name{font:700 17px/1.3 var(--sans);letter-spacing:-.3px;color:#e7efdf;overflow-wrap:anywhere}
.blossom-sub{font:400 12px/1.5 var(--sans);color:#96ae97;overflow-wrap:anywhere}
.blossom-status{font:500 11px/1.4 var(--sans);color:#b6cfa5;margin-top:3px}
.blossom.locked .blossom-status{color:#879e8d}
.tree-branch{position:absolute;z-index:-2;top:50%;width:32px;height:2px;background:#6b90575c;pointer-events:none}
.tree-branch.left{right:-32px}.tree-branch.right{left:-32px}
.tree-branch.done{background:#a2c477a1}.tree-branch.current{background:#c8e399}
.tree-leaf{position:absolute;width:8px;height:5px;top:-4px;left:40%;border-radius:8px 0 8px 0;background:#78955b}
.journey-foot{display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px;padding:10px 26px;border-top:1px solid #b9d5c018}
.journey-note{font:400 12px/1.5 var(--sans);color:#a0b69d;max-width:680px}
.journey-foot .text-btn{font-size:13px;min-height:40px;padding:8px 12px;gap:8px;flex:none}
/* A chapter heading always precedes its four nodes on narrow screens.
 * No desktop columns, fixed label width, or shrinking flex sections survive here.
 */
@media(max-width:959px){
 .journey-head,.journey-banner{padding:18px 20px;gap:12px}
 .journey-summary{gap:0}.journey-pill{padding:0 10px}
 .journey-tree{padding:8px 20px 24px}
 .tree-chapter{grid-template-columns:minmax(0,1fr);grid-template-areas:'core' 'left' 'right';gap:12px;padding:20px 0}
 .tree-chapter::before{left:21px;top:32px;bottom:0;width:2px}
 .chapter-core{display:grid;grid-template-columns:44px minmax(0,1fr) auto;grid-template-rows:auto auto;gap:5px 14px;padding:0 0 6px;background:transparent;text-align:left;border-radius:0}
 .chapter-emblem{grid-column:1;grid-row:1/3;width:44px;height:44px;background:#19311f}
 .chapter-core .eyebrow{grid-column:2;grid-row:1}
 .chapter-core h3{grid-column:2;grid-row:2;font-size:18px}
 .chapter-badges{grid-column:3;grid-row:1/3;align-self:center}
 .tree-side{padding-left:44px;gap:12px}
 .blossom{min-height:104px;grid-template-columns:48px minmax(0,1fr);gap:14px;padding:14px}
 .blossom-flower{width:48px;height:48px}
 .tree-branch.left,.tree-branch.right{left:-22px;right:auto;width:22px}
 .journey-foot{padding:8px 20px}.journey-note{max-width:500px}
}
@media(max-width:599px){
 body[data-screen=map] #screen{padding: max(58px,calc(env(safe-area-inset-top) + 48px)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
 .journey-wrap{border-radius:20px}
 .journey-head,.journey-banner{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}
 #screen .journey-head h2,#screen .journey-banner h2{font-size:26px;letter-spacing:-.6px}
 .journey-summary{justify-content:space-between}
 .journey-pill{flex:1;padding:0 10px}.journey-pill:first-child{padding-left:0;border-left:0}
 .journey-pill strong{font-size:18px}.journey-pill span{font-size:10px;line-height:1.4}
 .journey-banner .journey-summary{display:none}
 .stackline{display:grid;grid-template-columns:minmax(0,1fr);margin-top:10px;gap:6px}
 .stackline .primary,.stackline .secondary{width:100%;min-height:42px;padding:10px 12px}
 .journey-tree{padding:0 12px 24px}
 .tree-chapter{gap:10px;padding:20px 0}
 .tree-chapter::before{left:17px;top:30px}
 .chapter-core{grid-template-columns:36px minmax(0,1fr);gap:4px 10px;align-items:start;padding-bottom:4px}
 .chapter-emblem{width:36px;height:36px;font-size:15px;grid-row:1/3}
 .chapter-core h3{font-size:18px;line-height:1.35}
 .chapter-badges{grid-column:2;grid-row:3;justify-content:flex-start}
 .chapter-badges span{border:0;background:none;padding:0;color:#8da58e;font-size:11px}
 .tree-side{padding-left:32px;gap:10px}
 .blossom{grid-template-columns:42px minmax(0,1fr);min-height:104px;gap:10px;padding:13px 12px;border-radius:16px}
 .blossom-shell{border-radius:16px}.blossom-flower{width:42px;height:42px;font-size:17px}
 .blossom-flower>svg{width:24px;height:24px}.blossom-name{font-size:16px;line-height:1.35}
 .blossom-sub{font-size:12px;line-height:1.5}.blossom-kicker{font-size:10px;letter-spacing:.6px}
 .tree-branch.left,.tree-branch.right{left:-14px;right:auto;width:14px}
 .tree-leaf{display:none}.journey-foot{padding:4px 12px;justify-content:flex-end}
 .journey-note{display:none}.journey-foot .text-btn{min-height:40px}
}
@media(max-height:520px){
 body[data-screen=map] #screen{padding-top:max(48px,calc(env(safe-area-inset-top) + 44px));padding-bottom:max(6px,env(safe-area-inset-bottom))}
 .journey-head,.journey-banner{padding:10px 16px;gap:6px 12px;grid-template-columns:minmax(0,1fr) auto}
 #screen .journey-head h2,#screen .journey-banner h2{font-size:23px;margin-top:3px}
 .journey-head .eyebrow,.journey-banner .eyebrow{display:none}
 .journey-pill strong{font-size:17px}.journey-pill span{font-size:9px}
 .journey-banner .journey-summary{display:none}
 .journey-banner>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
 .journey-banner .stackline{margin:0;display:flex;flex-wrap:nowrap}
 .journey-foot{padding-top:2px;padding-bottom:2px}.journey-foot .text-btn{min-height:34px}
}
@media(prefers-reduced-motion:reduce){.blossom-shell{transition:none}}
