.team-rally{--team-ink:var(--ink,#14211b);--team-muted:var(--muted,#69746d);--team-line:var(--line,#dedfd8);--team-panel:var(--panel,#fffdf8);--team-field:var(--field,#ecefe8);--team-forest:var(--forest,#10251f);--team-moss:var(--moss,#3f7659);--team-orange:var(--orange,#e58a31);width:100%;max-width:900px;margin:0 auto;padding:10px 2px 118px;box-sizing:border-box;color:var(--team-ink)}
.team-rally *{box-sizing:border-box}
.team-rally h1{margin:6px 0 4px;color:var(--team-forest);font-size:24px;line-height:1.12;letter-spacing:0}
.team-rally h2{margin:0;color:var(--team-forest);font-size:18px;line-height:1.2}
.team-rally h3{margin:18px 0 10px;color:var(--team-forest);font-size:16px}
.team-rally p{line-height:1.55}
.team-heading,.team-card>div,.team-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.team-heading{align-items:flex-start;margin:4px 0 18px}
.team-heading>div{min-width:0}
.team-heading .team-muted{max-width:270px;margin:6px 0 0}
.team-rally button,.team-dialog button{display:inline-flex;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:0 13px;border:1px solid var(--team-line);border-radius:var(--radius,8px);font-size:13px;font-weight:900;line-height:1.2;white-space:normal;text-align:center;cursor:pointer;transition:background-color .16s ease,border-color .16s ease,transform .16s ease}
.team-rally button:active,.team-dialog button:active{transform:translateY(1px)}
.team-rally .primary-button,.team-dialog .primary-button{color:#fff;background:var(--team-forest);border-color:var(--team-forest)}
.team-rally .secondary-button,.team-dialog .secondary-button{color:var(--team-forest);background:var(--team-panel);border-color:var(--team-line)}
.team-rally button:disabled,.team-dialog button:disabled{opacity:.55;cursor:default;transform:none}
.team-actions,.team-tabs,.team-map-tools{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.team-actions button{flex:1 1 140px}
.team-rally>header + .team-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 20px}
.team-rally>header + .team-actions button{min-width:0}
.team-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:14px 0 10px}
.team-tabs button{width:100%;min-height:42px;padding:0 8px}
.team-tabs button[aria-pressed="true"]{color:#fff;background:var(--team-forest);border-color:var(--team-forest)}
.team-card,.team-overview,.team-member{margin:0 0 10px;padding:13px;border:1px solid var(--team-line);border-radius:var(--radius,8px);background:var(--team-panel);box-shadow:0 4px 14px rgba(16,37,31,.05)}
.team-card>div{align-items:flex-start}
.team-card>div>strong{min-width:0;overflow-wrap:anywhere;color:var(--team-forest);font-size:15px}
.team-card p{margin:7px 0;line-height:1.5}
.team-card .team-actions{margin-top:10px;margin-bottom:0}
.team-muted,.team-member small{color:var(--team-muted);font-size:12px;line-height:1.55}
.team-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:26px;padding:0 8px;color:var(--team-forest);background:var(--team-field);border:1px solid var(--team-line);border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap}
.team-empty{margin:0;padding:22px 14px;color:var(--team-muted);line-height:1.65;background:var(--team-field);border:1px dashed var(--team-line);border-radius:var(--radius,8px)}
.team-error{margin:10px 0;padding:10px;color:#9b2d27;font-size:12px;line-height:1.5;background:#fff1ed;border:1px solid #edc1ba;border-radius:var(--radius,8px)}
.team-detail-head{margin-bottom:10px}
.team-detail-head .team-badge{margin-inline:auto}
.team-title-block{margin:0 0 12px;padding:0 2px}
.team-title-block .team-muted{margin:0}
.team-overview{padding:12px}
.team-overview-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.team-overview-grid>div{min-width:0}
.team-overview-label{display:block;margin-bottom:5px;color:var(--team-muted);font-size:11px;font-weight:900}
.team-overview-grid strong{display:block;overflow-wrap:anywhere;color:var(--team-forest);font-size:14px;line-height:1.35}
.team-overview-grid p{margin:4px 0 0;color:var(--team-muted);font-size:12px}
.team-note{margin:12px 0 0}
.team-primary-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 14px}
.team-primary-actions button{flex:1 1 150px}
.team-state-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.team-state-actions button{flex:1 1 130px}
.team-map-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 8px}
.team-map-tools button{min-height:40px;padding:0 8px;font-size:12px}
.team-drive-layout{display:grid;grid-template-rows:minmax(260px,54%) minmax(230px,46%);height:clamp(560px,calc(100dvh - 300px),780px);min-height:560px;gap:10px;overflow:hidden}
.team-map-section,.team-communication-section{min-height:0;display:grid;overflow:hidden}
.team-map-section{grid-template-rows:auto minmax(0,1fr) auto}
.team-map{height:auto;min-height:0;overflow:hidden;background:#e4eadd;border:1px solid var(--team-line);border-radius:var(--radius,8px);z-index:0}
.team-map-section>.team-muted{margin:7px 2px 0}
.team-communication-section{grid-template-rows:auto minmax(0,1fr);padding:11px 12px 12px;background:var(--team-panel);border:1px solid var(--team-line);border-radius:var(--radius,8px);box-shadow:0 4px 14px rgba(16,37,31,.05)}
.team-communication-section>header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--team-line)}
.team-communication-section>header strong{color:var(--team-forest);font-size:15px}
.team-communication-section>header .team-muted{max-width:70%;margin:0;text-align:right}
.team-chat-wrap,.team-member-panel{min-height:0;overflow:auto}
.team-chat-wrap{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px}
.team-member-panel{padding-right:2px}
.team-map-pin span{display:flex;width:32px;height:32px;align-items:center;justify-content:center;color:#fff;font-weight:900;background:var(--team-moss);border:2px solid #fff;border-radius:50%;box-shadow:0 2px 5px #0005}
.team-live-position{display:flex;align-items:center;justify-content:center;background:transparent;border:0}
.team-live-position span{display:block;width:18px;height:18px;border-radius:50%;background:var(--team-live-color,#1677cc);border:3px solid #fff;box-shadow:0 0 0 3px color-mix(in srgb,var(--team-live-color,#1677cc) 30%,transparent),0 2px 6px #0005}
.team-map-pin .stale,.team-avatar.stale{background:#78837d}
.team-member{display:flex;align-items:center;gap:10px}
.team-member>div{flex:1;min-width:0;overflow-wrap:anywhere}
.team-member p{margin:3px 0;font-size:12px}
.team-member button{flex:0 0 auto;min-height:36px;padding:0 9px;font-size:12px}
.team-avatar{display:grid;place-items:center;flex:0 0 34px;height:34px;color:#fff;background:var(--team-moss);border-radius:50%;font-weight:900}
.team-communication{margin-top:16px;padding-top:14px;border-top:1px solid var(--team-line)}
.team-communication-head{align-items:flex-start;margin-bottom:8px}
.team-communication-head .team-muted{margin:0;text-align:right}
.team-bottom-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
.team-bottom-actions button{width:100%;min-height:42px}
.team-bottom-actions .team-ptt{grid-column:1/-1;min-height:48px}
.team-ptt,.team-danger{touch-action:none;user-select:none;-webkit-user-select:none}
.team-danger{color:#a8322d!important;background:#fff4f2!important;border-color:#e6b5ad!important}
.team-rescue{margin-top:12px;padding:12px;color:#942323;background:#ffebea;border:1px solid #e8abab;border-radius:var(--radius,8px)}
.team-rescue p{margin:6px 0;font-size:12px}
.team-modal{position:fixed;inset:0;z-index:12000;display:flex;align-items:flex-end;justify-content:center;isolation:isolate}
.team-modal-shade{position:absolute;inset:0;background:rgba(16,37,31,.68);backdrop-filter:blur(3px)}
.team-dialog{position:relative;z-index:1;width:min(100%,620px);max-height:92dvh;overflow:auto;overscroll-behavior:contain;padding:16px 16px calc(18px + env(safe-area-inset-bottom));color:var(--team-ink);background:#fffdf8!important;background-color:#fffdf8!important;opacity:1!important;border:1px solid var(--team-line);border-bottom:0;border-radius:var(--radius,8px) var(--radius,8px) 0 0;box-shadow:0 -8px 30px rgba(16,37,31,.16)}
.team-dialog>*{position:relative;z-index:1}
.team-dialog>header{position:sticky;top:-16px;z-index:2;margin:0 -16px 12px;padding:12px 16px;background:rgba(255,253,248,.96);border-bottom:1px solid var(--team-line);backdrop-filter:blur(12px)}
.team-dialog h2{margin:0;color:var(--team-forest);font-size:20px;line-height:1.2}
.team-dialog>header button{width:40px;min-width:40px;height:40px;min-height:40px;padding:0;font-size:18px}
.team-dialog p{line-height:1.6}
.team-form label{display:grid;gap:7px;margin:14px 0;color:var(--team-ink);font-size:13px;font-weight:700}
.team-form input,.team-form select,.team-form textarea,.team-input,.team-composer textarea{width:100%;min-height:44px;padding:10px;box-sizing:border-box;color:var(--team-ink);font:inherit;background:#fffdf8!important;background-color:#fffdf8!important;border:1px solid #ccd9ce;border-radius:var(--radius,8px)}
.team-form textarea,.team-composer textarea{resize:vertical}
.team-form small{color:var(--team-muted);font-size:11px;font-weight:400}
.team-check{display:flex!important;align-items:center;gap:8px;margin:12px 0!important;font-size:13px!important;font-weight:500!important}
.team-check input{width:20px;height:20px;min-height:20px}
.team-code{margin:12px 0;font:700 32px/1.2 monospace;letter-spacing:6px;text-align:center;color:var(--team-forest)}
.team-pick-map{height:220px;margin-top:10px;overflow:hidden;background:#e4eadd;border:1px solid var(--team-line);border-radius:var(--radius,8px)}
.team-settings{display:grid;gap:8px;margin:16px 0}
.team-settings button{width:100%}
.team-chat{min-height:180px;max-height:48dvh;overflow:auto;padding:8px;background:var(--team-field);border:1px solid var(--team-line);border-radius:var(--radius,8px)}
.team-message{max-width:88%;margin:8px 0;padding:9px 11px;overflow-wrap:anywhere;white-space:pre-wrap;background:var(--team-panel);border:1px solid var(--team-line);border-radius:var(--radius,8px)}
.team-message.mine{margin-left:auto;background:#e5f0e5;border-color:#c7ddc8}
.team-message small{display:block;margin-bottom:5px;color:var(--team-muted);font-size:11px}
.team-message-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;color:var(--team-muted);font-size:11px;line-height:1.3}
.team-message-meta strong{overflow:hidden;color:#294a3d;font-size:12px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.team-message-meta time{flex:none;font-size:10px}
.team-message img,.team-message video{max-width:100%;max-height:270px;border-radius:6px}
.team-message audio{max-width:100%;height:40px}
.team-message audio[data-team-voice]{display:none}
.team-voice-message{display:flex;align-items:center;gap:8px;min-width:150px;max-width:100%;min-height:38px;padding:7px 11px;color:#244b3c;background:#edf4ed;border:1px solid #bfd1c3;border-radius:18px;box-shadow:none}
.team-voice-message span{font-size:12px}.team-voice-message b{font-size:13px;font-weight:650}.team-voice-message em{margin-left:auto;color:#617267;font-size:12px;font-style:normal}
.team-message.mine .team-voice-message{background:#d6e8d9;border-color:#afc9b5}
.team-composer{margin-top:10px}
.team-rally-badge{position:fixed;left:14px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:800;max-width:calc(100vw - 100px);min-height:40px;padding:9px 13px;color:#fff;background:var(--team-forest);border:1px solid #8dac9a;border-radius:999px;font-size:12px;box-shadow:0 2px 8px #0002}
@media(max-width:380px){.team-rally{padding-inline:0}.team-rally h1{font-size:22px}.team-heading{gap:8px}.team-heading .team-muted{max-width:205px}.team-rally>header + .team-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.team-rally>header + .team-actions button:last-child{grid-column:1/-1}.team-overview-grid{gap:8px}.team-tabs{gap:5px}.team-tabs button{padding-inline:4px;font-size:12px}.team-bottom-actions{gap:6px}.team-rally button,.team-dialog button{padding-inline:9px}.team-drive-layout{height:620px;min-height:620px}.team-communication-section{padding-inline:8px}.team-communication-section>header .team-muted{max-width:62%;font-size:11px}}
@media(orientation:landscape) and (max-height:560px){.team-rally{padding-bottom:24px}.team-map{height:240px}.team-dialog{max-height:96dvh}.team-bottom-actions .team-ptt{min-height:44px}}

/* v299: one clear path through the team flow. */
.team-rally button,.team-dialog button{min-height:40px;border-radius:8px}
.team-heading{margin-bottom:14px}
.team-heading .team-muted{margin-top:7px}
.team-entry-actions{display:grid;grid-template-columns:minmax(0,1fr);margin:0 0 22px}
.team-entry-actions button{width:100%;min-height:46px}
.team-list-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px}
.team-list-heading h2{margin:0}
.team-list-section{margin-top:2px}
.team-list-toggle{display:flex!important;width:100%;min-height:58px!important;align-items:center;justify-content:space-between!important;gap:12px;padding:9px 12px!important;color:var(--team-forest)!important;background:var(--team-panel)!important;border-color:var(--team-line)!important;text-align:left!important}
.team-list-toggle>span{display:grid;min-width:0;gap:3px}
.team-list-toggle strong{font-size:17px;line-height:1.2}
.team-list-toggle small{overflow:hidden;color:var(--team-muted);font-size:11px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.team-list-toggle b{flex:0 0 auto;color:var(--team-moss);font-size:12px}
.team-list-section:not(.is-collapsed) .team-list-toggle{margin-bottom:10px;background:var(--team-field)!important}
.team-card-action{margin-top:10px}
.team-card-action button{width:100%}
.team-detail-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin:0 0 12px}
.team-detail-heading>button{min-width:40px;padding-inline:9px}
.team-detail-title{min-width:0;text-align:center}
.team-detail-title h1{margin:0 0 5px;font-size:20px;overflow-wrap:anywhere}
.team-detail-title .team-badge{max-width:100%;}
.team-workflow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 0 10px;padding:7px;background:#f3f6f2;border:1px solid var(--team-line);border-radius:8px}
.team-workflow span{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;color:var(--team-muted);font-size:11px;white-space:nowrap}
.team-workflow b{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1px solid #cfd8d0;border-radius:50%;background:#fffdf8;color:var(--team-muted);font-size:10px}
.team-workflow span.done{color:#3d6a55}.team-workflow span.done b{color:#fff;background:#5f8d72;border-color:#5f8d72}
.team-workflow span.active{color:var(--team-forest);font-weight:800}.team-workflow span.active b{color:#fff;background:var(--team-forest);border-color:var(--team-forest)}
.team-primary-actions{margin:10px 0 12px}
.team-primary-actions button{min-height:42px}
.team-overview{margin-bottom:10px}
.team-communication-section{grid-template-rows:auto minmax(0,1fr) auto}
.team-communication-section>header{align-items:center}
.team-communication-section>header>div{min-width:0}
.team-communication-section>header .team-muted{display:block;max-width:none;margin-top:2px;text-align:left}
.team-communication-section .team-tabs{display:flex;flex:0 0 auto;gap:5px;margin:0}
.team-communication-section .team-tabs button{min-height:34px;padding:0 12px;font-size:12px}
.team-communication-tools{padding-top:9px;border-top:1px solid var(--team-line)}
.team-communication-primary,.team-communication-secondary{display:grid;gap:7px}
.team-communication-primary{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.team-communication-secondary{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:7px}
.team-communication-tools button{min-height:38px;padding-inline:8px;font-size:12px}
.team-communication-primary .team-ptt{min-height:44px}
.team-communication-tools>[data-team-audio-status]{display:block;margin-top:6px;text-align:center}
.team-form-section{margin:0 0 16px;padding:0 0 14px;border-bottom:1px solid var(--team-line)}
.team-form-section h3{margin:0 0 8px;font-size:15px}
.team-form-section label{margin:10px 0}
.team-form-label{font-size:12px;font-weight:700}
.team-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.team-form-submit{margin-top:4px}
.team-form-submit button{width:100%;min-height:46px}
.team-state-actions{margin-top:10px}
.team-state-actions button{min-height:38px}
.team-composer .team-actions{gap:6px}
.team-composer .team-actions button{min-height:36px;padding-inline:9px;font-size:12px}
@media(max-width:520px){.team-detail-heading{grid-template-columns:40px minmax(0,1fr) 40px}.team-detail-heading>button{width:40px;padding:0;font-size:0}.team-detail-heading>button:first-child::before{content:'‹';font-size:24px;line-height:1}.team-detail-heading>button:last-child::before{content:'⋯';font-size:22px;line-height:1}.team-primary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.team-primary-actions button{min-width:0;padding-inline:7px;font-size:12px}.team-drive-layout{height:clamp(600px,calc(100dvh - 275px),780px);min-height:600px}.team-communication-section>header{align-items:flex-start}.team-communication-section .team-tabs{margin-top:1px}.team-communication-section .team-tabs button{padding-inline:9px}.team-communication-secondary button{font-size:11px;padding-inline:4px}}

.team-gathering-map{display:grid;grid-template-rows:auto 230px auto;gap:8px;margin:0 0 12px}
.team-gathering-map>header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.team-gathering-map>header strong{font-size:14px;color:var(--team-forest)}
.team-gathering-map .team-map{height:230px;min-height:230px}
.team-proximity-list{display:grid;gap:6px}
.team-proximity-member{display:flex;align-items:center;gap:8px;min-width:0;padding:7px 8px;background:var(--team-panel);border-bottom:1px solid var(--team-line)}
.team-proximity-member>div{flex:1;min-width:0}
.team-proximity-member>div strong,.team-proximity-member>div small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-proximity-member>div strong{font-size:13px;color:var(--team-forest)}
.team-proximity-member>div small{margin-top:2px;color:var(--team-muted);font-size:11px}
.team-proximity-member .team-avatar{flex-basis:30px;height:30px}
.team-proximity-member .team-badge{min-height:24px;font-size:10px}
.team-proximity-member>button{min-height:32px;padding:0 8px;font-size:11px}
.team-proximity-empty{margin:0;padding:8px}
.team-driving-mode{padding:4px 0 0}
.team-driving-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;margin:0 0 6px}
.team-driving-heading>strong{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;color:var(--team-forest);font-size:15px}
.team-driving-heading>button{min-height:36px;padding:0 9px;font-size:12px}
.team-driving-mode .team-drive-layout{grid-template-rows:minmax(0,1fr) minmax(0,1fr);height:clamp(620px,calc(100dvh - 250px),880px);min-height:620px;gap:6px}
.team-driving-mode .team-map-section{grid-template-rows:minmax(0,1fr)}
.team-driving-mode .team-map-tools{margin-bottom:0}
.team-driving-mode .team-chat{min-height:0;max-height:none}
.team-driving-mode .team-composer{margin-top:5px}
.team-driving-mode .team-composer textarea{min-height:38px;max-height:64px;padding:7px}
.team-driving-mode .team-composer .team-actions{margin:5px 0 0}
.team-driving-mode .team-communication-section{padding:8px}
@media(max-width:520px){.team-driving-mode .team-drive-layout{height:clamp(600px,calc(100dvh - 236px),820px);min-height:600px}.team-gathering-map{grid-template-rows:auto 205px auto}.team-gathering-map .team-map{height:205px;min-height:205px}.team-proximity-member{gap:6px;padding-inline:4px}.team-proximity-member .team-badge{padding-inline:5px}.team-proximity-member>button{padding-inline:6px}}

/* Navigation is a separate full-screen surface; each pane owns half the space. */
.team-rally.team-driving-mode{position:fixed;inset:0;z-index:1100;max-width:none;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:#fffdf8}
.team-driving-mode>.team-driving-heading{flex:0 0 auto;margin:0;padding:5px 8px;min-height:44px}
.team-driving-mode>[data-team-panel]{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.team-driving-mode .team-drive-layout{flex:1;height:auto;min-height:0;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:0}
.team-route-navigation-bar{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;background:#eef4ef;border-top:1px solid #d5e0d6;border-bottom:1px solid #d5e0d6}
.team-route-navigation-bar>div:first-child{min-width:0;flex:1}.team-route-navigation-bar strong,.team-route-navigation-bar small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.team-route-navigation-bar strong{color:var(--team-forest);font-size:13px}.team-route-navigation-bar small{margin-top:2px;color:var(--team-muted);font-size:10px}
.team-route-navigation-bar>div:last-child{display:flex;flex:0 0 auto;gap:5px}.team-route-navigation-bar button{min-height:34px;height:34px;padding:0 9px;font-size:11px;white-space:nowrap}
.team-driving-mode .team-map-section{position:relative;display:grid;grid-template-rows:minmax(0,1fr);min-height:0}
.team-driving-mode .team-map{width:100%;height:100%;min-height:0;border-radius:0}
.team-navigation-overlay{position:absolute;inset:0;z-index:3;pointer-events:none}
.team-navigation-overlay:empty{display:none}
.team-navigation-overlay .native-navigation-overlay{top:0;right:6px;bottom:0;left:6px;gap:5px}
.team-navigation-overlay .navigation-top-panel,.team-navigation-overlay .navigation-bottom-panel{gap:4px;width:100%;padding:6px;border-radius:9px}
.team-navigation-overlay .navigation-top-panel{max-height:55%;overflow:auto;overscroll-behavior:contain}
.team-navigation-overlay .nav-road-sign{grid-template-columns:38px minmax(0,1fr);padding:6px;border-radius:8px}
.team-navigation-overlay .nav-turn-icon{width:36px;height:36px;border-radius:7px}.team-navigation-overlay .nav-turn-icon svg{width:23px;height:23px}
.team-navigation-overlay .nav-road-sign strong{font-size:15px}.team-navigation-overlay .nav-road-sign.imminent strong{font-size:17px}
.team-navigation-overlay .nav-guidance-note{font-size:10px}.team-navigation-overlay .nav-event-card{min-height:32px;padding:4px 6px}.team-navigation-overlay .nav-event-card strong{font-size:11px}
.team-navigation-overlay .nav-progress-card div{padding:3px 5px}.team-navigation-overlay .nav-progress-card strong{font-size:14px}
.team-navigation-overlay .nav-control-row{gap:4px}.team-navigation-overlay .nav-control-row button{min-height:31px;padding:3px 5px;font-size:9px}
.team-navigation-overlay .navigation-deviation{padding:5px;gap:4px}.team-navigation-overlay .navigation-deviation button{min-height:31px;padding:3px 5px;font-size:9px}
.team-driving-mode .team-map-tools{position:static;z-index:2;display:flex;justify-content:flex-end;gap:5px;margin:0;padding:4px 8px;background:rgba(255,253,248,.96);border-bottom:1px solid #dfe5dd;overflow-x:auto;scrollbar-width:none}
.team-driving-mode .team-map-tools::-webkit-scrollbar{display:none}
.team-driving-mode .team-map-tools button{flex:0 0 auto;min-height:32px;height:32px;padding:0 9px;border:1px solid #d5ded6;border-radius:7px;background:#fffdf8;box-shadow:none;color:#183b2d;font-size:11px;line-height:1;white-space:nowrap}
.team-driving-mode .team-communication-section{grid-template-rows:auto minmax(0,1fr) auto;border-radius:0;padding:6px 8px;gap:4px}
.team-driving-mode .team-communication-section>header{margin:0;padding:0;border:0;align-items:center;gap:6px}
.team-driving-mode .team-communication-section>header>button{margin-left:auto;min-height:36px;padding:0 10px}
.team-driving-mode .team-chat-wrap{display:flex;flex-direction:column;overflow:hidden;gap:3px}
.team-driving-mode .team-chat-wrap>[data-team-action="older"]{align-self:center;min-height:24px;padding:1px 8px;font-size:11px;flex:0 0 auto;border:0}
.team-driving-mode .team-chat{flex:1;min-height:0;max-height:none;padding:4px;overflow:auto;overscroll-behavior:contain}
.team-driving-mode .team-composer{display:grid;grid-template-columns:minmax(0,1fr) 40px 52px;gap:6px;margin:0;flex:0 0 auto}
.team-driving-mode .team-composer textarea{height:40px;min-height:40px;max-height:40px;resize:none}
.team-driving-mode .team-composer button{min-height:40px;padding:0 8px}
.team-driving-mode .team-communication-tools{padding-top:4px}
.team-driving-mode .team-communication-primary{grid-template-columns:minmax(0,1fr) 88px}
.team-driving-mode .team-communication-primary button{min-height:44px}
.team-driving-mode .team-communication-tools>[data-team-audio-status]{margin:2px 0 0;font-size:11px;line-height:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.team-driving-mode>.team-error{flex:0 0 auto;max-height:48px;overflow:auto;margin:0;padding:5px 8px}
.team-navigation-entry{grid-column:1/-1;min-height:48px!important}
.team-gathering-map .team-proximity-list{max-height:300px;overflow:auto}
.team-driving-alert{margin:0;padding:4px 8px;background:#fff1ed;color:#9b2d27;font-size:12px}
@media(orientation:landscape) and (max-height:560px){.team-driving-mode>.team-driving-heading{min-height:36px;padding:1px 8px}.team-driving-mode .team-chat-wrap>[data-team-action="older"]{display:none}.team-driving-mode .team-communication-tools>[data-team-audio-status]{display:none}.team-driving-mode .team-communication-section{gap:2px;padding-block:2px}.team-driving-mode .team-composer textarea{height:36px;min-height:36px}.team-driving-mode .team-composer button{min-height:36px}}

.team-rally.team-driving-mode{z-index:10000}
.team-driving-mode .team-tabs{flex-wrap:nowrap!important}
.team-driving-mode .team-tabs button{width:auto;min-width:50px;flex:0 0 auto}
.team-driving-alert[hidden]{display:none}
.team-safety{flex:0 0 auto;padding:5px 8px;background:#fff3de;color:#754815;font-size:12px;max-height:92px;overflow:auto}
.team-safety[hidden]{display:none}
.team-journey{flex:0 0 auto;padding:9px 10px;margin:8px 0;background:#eef4ef;border:1px solid #d5e0d6;border-radius:8px;color:#163d2b}
.team-journey>strong,.team-journey>small{display:block;overflow-wrap:anywhere}
.team-journey>small{font-size:12px;margin-top:3px}
.team-journey-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.team-journey-actions button{flex:1 1 100px;min-height:40px;padding:5px 8px}
.team-driving-mode>.team-journey{margin:0;border-radius:0;padding:5px 8px;max-height:132px;overflow:auto}
.team-driving-mode .team-journey-actions button{min-height:36px;font-size:12px}
@media(orientation:landscape) and (max-height:560px){.team-driving-mode>.team-journey{max-height:90px}.team-driving-mode .team-journey-actions{margin-top:3px}}
.team-safety p{margin:2px 0}
.team-driving-mode .team-safety{max-height:52px}
.team-safety button{min-height:32px;font-size:12px}
.team-guidance{flex:0 0 auto;padding:6px 10px;background:#fff5eb;border-bottom:1px solid #ead6c5;font-size:13px}
.team-guidance strong,.team-guidance small{display:block;overflow-wrap:anywhere}
.team-guidance small{margin-top:3px;font-size:11px;color:#754815}
.team-rescue-pin{background:#b83333;border:2px solid white;border-radius:6px;color:white;font-weight:bold;text-align:center;line-height:24px}
.team-map .leaflet-overlay-pane svg,.team-pick-map .leaflet-overlay-pane svg{width:auto;height:auto;max-width:none;max-height:none}

/* Team route navigation follows the main map: the vehicle and remaining route
   stay at the bottom of the screen while the road direction faces upward. */
.team-driving-mode .team-map.navigation-heading-up{position:absolute;inset:-78%;width:auto;height:auto;transform:translateZ(0) rotate(var(--nav-map-bearing,0deg));transform-origin:50% 50%;transition:transform var(--nav-heading-transition,.28s) cubic-bezier(.22,.61,.36,1);will-change:transform;backface-visibility:hidden}

/* Search and meeting pickers are scoped to the trip form. */
.team-dialog{--team-ink:#14211b;--team-muted:#69746d;--team-line:#dedfd8;--team-panel:#fffdf8;--team-forest:#10251f;box-sizing:border-box}
.team-trip-dialog *{box-sizing:border-box}
.team-trip-dialog .team-meeting-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.team-trip-dialog .team-meeting-actions button{height:44px;min-height:44px;padding:0 5px;font-size:13px}
.team-trip-dialog .team-route-picked{display:flex;align-items:center;gap:8px;font-size:13px}
.team-trip-dialog .team-route-picked>span{flex:1;min-width:0;overflow-wrap:anywhere}
.team-trip-dialog [hidden]{display:none!important}
.team-trip-dialog .team-picker-results{max-height:230px;overflow:auto;overscroll-behavior:contain;margin-top:8px}
.team-trip-dialog .team-picker-results:empty{display:none}
.team-trip-dialog .team-picker-results button{display:flex;flex-direction:column;align-items:flex-start;width:100%;min-height:48px;margin:0 0 5px;padding:8px 10px;text-align:left;overflow-wrap:anywhere}
.team-trip-dialog .team-picker-results strong{font-size:13px}
.team-trip-dialog .team-picker-results small{margin-top:4px;font-weight:400;color:var(--team-muted)}
.team-trip-dialog [data-team-pick-status]:empty{display:none}
.team-trip-dialog .team-pick-map:focus{outline:2px solid #3f7659;outline-offset:2px}

/* The meeting picker owns a separate full-screen surface, keeping the form intact. */
.team-location-picker.team-dialog{position:fixed;inset:0;z-index:13000;width:100%;max-width:none;height:100vh;height:100dvh;max-height:none;display:flex;flex-direction:column;overflow:hidden;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);border:0;border-radius:0}
.team-location-picker.team-dialog>header{position:relative;top:0;flex:0 0 auto;display:grid;grid-template-columns:64px minmax(0,1fr) 88px;gap:6px;margin:0;padding:8px;border-bottom:1px solid var(--team-line);background:#fffdf8}
.team-location-picker.team-dialog>header h2{text-align:center;font-size:17px}
.team-location-picker.team-dialog>header button{width:auto;min-width:0;height:44px;min-height:44px;font-size:13px;padding:0 6px}
.team-location-picker .team-full-search{display:grid;grid-template-columns:minmax(0,1fr) 48px 76px;gap:6px;flex:0 0 auto;padding:8px}
.team-location-picker label{display:block;min-width:0;font-size:12px}
.team-location-picker input{width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid #ccd9ce;border-radius:8px;background:#fffdf8;color:var(--team-ink);font:inherit}
.team-location-picker .team-full-search button{min-height:44px;padding:0 4px}
.team-location-picker .team-picker-results{flex:0 1 auto;max-height:22dvh;margin:0 8px}
.team-location-picker [data-team-pick-status]{flex:0 0 auto;margin:0;padding:0 10px 6px;font-size:12px}
.team-location-picker .team-pick-map{flex:1 1 auto;width:100%;height:auto;min-height:100px;margin:0;border-radius:0;border:0;z-index:0}
.team-location-picker footer{flex:0 0 auto;padding:8px 10px;background:#fffdf8;border-top:1px solid var(--team-line)}
.team-location-picker footer label{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:6px}
.team-location-picker footer p{font-size:12px;margin:5px 0;overflow-wrap:anywhere}
.team-location-picker footer button{width:100%;min-height:46px}
.team-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-height:500px){.team-location-picker.team-dialog>header{padding-block:3px}.team-location-picker .team-full-search{padding-block:4px}.team-location-picker footer{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:4px 8px;padding-block:4px}.team-location-picker footer label{grid-column:1}.team-location-picker footer p{grid-column:1;margin:0;font-size:11px}.team-location-picker footer button{grid-column:2;grid-row:1/3}.team-location-picker [data-team-pick-status]{display:none}.team-location-picker .team-picker-results{max-height:18dvh}}

/* Active route navigation keeps the top map readable while communication stays available below. */
.team-driving-mode .team-drive-layout{grid-template-rows:minmax(0,1.18fr) minmax(0,.82fr)}
.team-navigation-guidance{position:absolute;top:8px;left:8px;right:8px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;color:#123a2f;background:rgba(255,253,248,.94);border:1px solid #bcd6c5;border-radius:8px;box-shadow:0 2px 8px #0002;pointer-events:none}
.team-navigation-guidance[hidden]{display:none}
.team-navigation-guidance strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.team-navigation-guidance span{flex:0 0 auto;font-size:12px;color:#4f665b}
.team-driving-mode .team-map-section{position:relative}
.team-driving-mode .team-map-tools{z-index:4;max-width:100%;}
.team-driving-mode .team-map-tools button{white-space:nowrap}
.team-driving-mode.team-map-fullscreen>.team-driving-heading,
.team-driving-mode.team-map-fullscreen>[data-team-rescue-alert],
.team-driving-mode.team-map-fullscreen>[data-team-error],
.team-driving-mode.team-map-fullscreen>.team-safety,
.team-driving-mode.team-map-fullscreen>.team-journey,
.team-driving-mode.team-map-fullscreen .team-route-navigation-bar{display:none}
.team-driving-mode.team-map-fullscreen>[data-team-panel]{position:fixed;inset:0;z-index:3;background:#fffdf8}
.team-driving-mode.team-map-fullscreen .team-drive-layout{display:block;height:100%;min-height:0}
.team-driving-mode.team-map-fullscreen .team-map-section{position:fixed;inset:0;height:100%;z-index:4;background:#fffdf8}
.team-driving-mode.team-map-fullscreen .team-map{height:100%;min-height:0;border-radius:0}
.team-driving-mode.team-map-fullscreen .team-navigation-overlay{inset:0}
.team-driving-mode.team-map-fullscreen .team-navigation-overlay .native-navigation-overlay{top:calc(52px + env(safe-area-inset-top));right:10px;bottom:max(10px,env(safe-area-inset-bottom));left:10px;gap:10px}
.team-driving-mode.team-map-fullscreen .team-navigation-overlay .navigation-top-panel,.team-driving-mode.team-map-fullscreen .team-navigation-overlay .navigation-bottom-panel{width:min(100%,520px);padding:9px;border-radius:14px}
.team-driving-mode.team-map-fullscreen .team-navigation-overlay .navigation-top-panel{max-height:44vh}
.team-driving-mode.team-map-fullscreen .team-map-tools{position:absolute;top:calc(8px + env(safe-area-inset-top));bottom:auto;left:8px;right:8px;z-index:5;max-width:none;display:flex;flex-wrap:wrap}
.team-driving-mode.team-map-fullscreen .team-map-tools{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding:4px;background:rgba(255,253,248,.9);border:1px solid rgba(213,222,214,.92);border-radius:10px;box-shadow:0 2px 8px #0002;backdrop-filter:blur(6px);scrollbar-width:none}
.team-driving-mode.team-map-fullscreen .team-map-tools::-webkit-scrollbar{display:none}
.team-driving-mode.team-map-fullscreen .team-map-tools button{min-height:32px;height:32px;background:#fffdf8;box-shadow:none}
.team-driving-mode.team-map-fullscreen .team-navigation-guidance{top:calc(58px + env(safe-area-inset-top))}
.team-driving-mode.team-map-fullscreen .team-communication-section{display:none}
@media(max-width:520px){
  .team-workflow{padding-inline:4px}.team-workflow span{gap:2px;font-size:10px}.team-workflow b{width:18px;height:18px}
  .team-route-navigation-bar{padding:5px 6px}.team-route-navigation-bar>div:last-child{gap:4px}.team-route-navigation-bar button{height:32px;min-height:32px;padding-inline:7px;font-size:10px}
  .team-navigation-guidance{top:6px;left:6px;right:6px;padding:7px 8px}
  .team-navigation-guidance strong{font-size:12px}
  .team-navigation-guidance span{font-size:11px}
  .team-driving-mode .team-drive-layout{grid-template-rows:minmax(0,1.12fr) minmax(0,.88fr)}
  .team-driving-mode .team-map-tools{gap:4px;padding-inline:6px}
  .team-driving-mode .team-map-tools button{min-height:30px;height:30px;padding-inline:8px;font-size:10px}
}

/* The journey card already carries the live instruction in split mode. */
.team-driving-mode:not(.team-map-fullscreen) .team-navigation-guidance{display:none}

/* Keep split and full-screen navigation controls visually identical and compact. */
.team-driving-mode .team-map-tools button{border-radius:8px;border-color:#cfdad1;font-weight:600;letter-spacing:0}
.team-driving-mode .team-map-tools button[data-team-action="sos"]{color:#a33b36;border-color:#e5c5c0;background:#fff7f5}

/* Compact forest palette for the split navigation surface. */
.team-rally.team-driving-mode{--team-nav-deep:#173d31;--team-nav-mid:#356b55;--team-nav-soft:#dce9df;--team-nav-pale:#edf3ed;background:#f1f4ef}
.team-driving-mode>.team-driving-heading{min-height:40px;padding:3px 7px;background:#f1f4ef;border-bottom:1px solid #d4ded5}
.team-driving-mode>.team-driving-heading>strong{font-size:14px}
.team-driving-mode>.team-driving-heading>button{min-height:32px;height:32px;padding:0 8px;color:var(--team-nav-deep);background:var(--team-nav-soft);border-color:#c8d7cb;border-radius:7px;font-size:11px}
.team-driving-mode>.team-driving-heading .team-badge{min-height:27px;padding:3px 9px;color:var(--team-nav-deep);background:#dfe8df;border-color:#cbd8cd;font-size:10px}
.team-route-navigation-bar{padding:5px 7px;background:#e7f0e9;border-color:#cad9ce}
.team-route-navigation-bar strong{font-size:12px}.team-route-navigation-bar small{font-size:9px;color:#5c7064}
.team-route-navigation-bar button{height:30px;min-height:30px;padding:0 8px;border-radius:7px;font-size:10px}
.team-route-navigation-bar button[data-team-action="team-offline"],.team-route-navigation-bar button[data-team-action="toggle-navigation-map"]{color:var(--team-nav-deep);background:#d4e3d7;border-color:#bfd1c4}
.team-route-navigation-bar button[data-team-action="route-nav"]{color:#fff;background:var(--team-nav-deep);border-color:var(--team-nav-deep)}
.team-driving-mode .team-map-tools{gap:4px;padding:3px 6px;background:#dfe9e1;border-color:#cbd8ce}
.team-driving-mode .team-map-tools button{height:28px;min-height:28px;padding:0 7px;color:#244d3c;background:#cfded2;border-color:#b9cdbd;border-radius:7px;font-size:10px;font-weight:700}
.team-driving-mode .team-map-tools button[data-team-action="fit"],.team-driving-mode .team-map-tools button[data-team-action="toggle-navigation-map"]{color:#fff;background:var(--team-nav-mid);border-color:var(--team-nav-mid)}
.team-driving-mode .team-communication-section{background:#edf2eb;border-color:#d1dbd2}
.team-driving-mode .team-communication-section>header{padding:1px 0 4px;border-bottom:1px solid #d2ddd3}
.team-driving-mode .team-communication-section>header strong{font-size:14px}
.team-driving-mode .team-communication-section>header>button,.team-driving-mode .team-communication-section .team-tabs button{height:31px;min-height:31px;padding:0 9px;border-radius:7px;font-size:10px}
.team-driving-mode .team-communication-section>header>button,.team-driving-mode .team-communication-section .team-tabs .secondary-button{color:#294f3e;background:#dbe7dd;border-color:#c4d4c7}
.team-driving-mode .team-communication-section .team-tabs .primary-button{color:#fff;background:var(--team-nav-deep);border-color:var(--team-nav-deep)}
.team-driving-mode .team-chat{background:#e4ece3;border-color:#ccd8cd}
.team-driving-mode .team-message{background:#f4f5ef;border-color:#d6ddd3}.team-driving-mode .team-message.mine{background:#d9e9dc;border-color:#bed2c2}
.team-driving-mode .team-chat-wrap>[data-team-action="older"]{color:#315844;background:#dbe7dd;border-color:#c4d4c7}
.team-driving-mode .team-composer textarea{background:#f7f6ef;border-color:#cbd7cc}
.team-driving-mode .team-composer button[data-team-action="attachments"]{color:#244d3c;background:#d7e4da;border-color:#bfd0c2}
.team-driving-mode .team-composer button[data-team-action="send"]{color:#fff;background:var(--team-nav-deep);border-color:var(--team-nav-deep)}
.team-navigation-overlay .nav-control-row button{min-height:28px;border-color:rgba(226,239,230,.72);font-size:9px}
.team-navigation-overlay .nav-control-row button[data-action="continue-live-navigation"]{background:#2f6f55}
.team-navigation-overlay .nav-control-row button[data-action="toggle-navigation-direction"]{background:#3d7661}
.team-navigation-overlay .nav-control-row button[data-action="cycle-navigation-voice"]{background:#405a4e}
.team-navigation-overlay .nav-control-row button[data-action="stop-native-navigation"]{background:#b84036}
.team-navigation-overlay .nav-progress-card{gap:5px}.team-navigation-overlay .nav-progress-card div{background:rgba(225,237,228,.12)}
.team-driving-mode.team-map-fullscreen .team-map-tools{background:rgba(27,61,49,.88);border-color:rgba(213,230,218,.6)}
.team-driving-mode.team-map-fullscreen .team-map-tools button{color:#eef6f0;background:#315d4c;border-color:#668677}

/* Keep every split-navigation shortcut in one compact rail and leave the freed row to the map. */
.team-route-navigation-bar{min-width:0}
.team-route-navigation-summary{min-width:72px;flex:1 1 auto}
.team-route-navigation-actions{display:flex;flex:0 1 auto;min-width:0;gap:4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
.team-route-navigation-actions::-webkit-scrollbar{display:none}
.team-route-navigation-actions button{flex:0 0 auto;height:28px;min-height:28px;padding-inline:6px}
.team-route-navigation-actions button[data-team-action="fit"]{color:#fff;background:var(--team-nav-mid);border-color:var(--team-nav-mid)}
.team-driving-mode:not(.team-map-fullscreen) .team-route-navigation-bar+.team-drive-layout{min-height:0}

/* Pin both navigation cards to the map edges so the center remains readable. */
.team-driving-mode:not(.team-map-fullscreen) .team-navigation-overlay{top:0!important;right:0!important;bottom:0!important;left:0!important}
.team-driving-mode:not(.team-map-fullscreen) .team-navigation-overlay .native-navigation-overlay{position:absolute!important;top:0!important;right:6px!important;bottom:0!important;left:6px!important;display:block!important;transform:none!important}
.team-driving-mode:not(.team-map-fullscreen) .team-navigation-overlay .navigation-top-panel{position:absolute!important;top:0!important;right:0!important;bottom:auto!important;left:0!important;margin:0 auto!important;transform:none!important}
.team-driving-mode:not(.team-map-fullscreen) .team-navigation-overlay .navigation-bottom-panel{position:absolute!important;top:auto!important;right:0!important;bottom:0!important;left:0!important;margin:0 auto!important;transform:none!important}

@media(max-width:520px){
  .team-route-navigation-summary{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .team-route-navigation-actions{width:100%;flex:1 1 100%;justify-content:space-between;overflow:visible}
  .team-route-navigation-actions button{height:28px;min-height:28px;padding-inline:4px;font-size:9px}
}
/* v309: keep the Leaflet host in the split viewport; rotating it must not move the map off-screen. */
.team-driving-mode .team-map.navigation-heading-up{
  position:relative;
  inset:0;
  width:100%;
  height:100%;
  transform:translateZ(0) rotate(var(--nav-map-bearing,0deg));
  transform-origin:50% 50%;
}
