/* Auth utilities occupy their own row so the logo never sits behind them. */
:root .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"])>.app-header{
 display:flex;position:relative;inset:auto;width:100%;min-height:52px;height:auto;
 margin:0;padding:4px 12px;flex-wrap:nowrap;align-items:center;justify-content:space-between;
 gap:8px;pointer-events:auto;
}
:root .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"])>.app-header>span{display:none}
:root .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"])>.app-header>.header-utility-actions{
 display:flex;order:0;flex:0 0 auto;width:auto;margin-left:auto;padding:0;border:0;
 align-items:center;justify-content:flex-end;gap:4px;
}
.app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"]) .auth-surface{
 min-height:calc(100vh - 52px);min-height:calc(100dvh - 52px);padding-top:16px;
}

/* Move the welcome content up slightly while retaining usable header controls. */
.app-shell:is([data-screen="S01"],[data-screen="S02"]) .auth-surface{padding-top:0}
.app-shell[data-screen="S02"] .auth-brand-region{margin-bottom:22px}
.app-shell[data-screen="S02"] .auth-body>.page-heading{margin-bottom:14px}
:root .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S04"]) .auth-body>.page-heading h1{
 font-size:var(--cgs-entry-title,calc(22px * var(--cgs-text-scale,1)));line-height:1.3;letter-spacing:-.4px;
 white-space:normal;overflow-wrap:normal;
}

/* Center the complete title, keeping the decorative plant icon beside it. */
.auth-surface .public-plants-entry-title{justify-content:center;text-align:center}
.auth-surface .public-plants-entry-title>h2{min-width:0;text-align:center}


/* Enlarged text can put each authentication footer action on its own row. */
.app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"]) .auth-footer-links{flex-wrap:wrap}
:root .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"]) .auth-footer-links>.btn{
 flex:1 1 auto;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;
}

/* Entry headers have direct utility buttons. Signed-in native toolbars own
   their separate logo and utility rows, including Location and Notifications. */
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar){
 display:grid;grid-template-columns:44px minmax(0,1fr);position:relative;inset:auto;
 width:100%;height:auto;min-height:60px;margin:0;padding:8px 12px;gap:4px;
 align-items:center;justify-content:start;pointer-events:auto;
}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar)>.icon-btn{grid-column:1;grid-row:1}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar)>.header-utility-actions{
 grid-column:2;grid-row:1;display:flex;flex-wrap:nowrap;order:0;align-items:center;
 justify-content:flex-start;width:auto;min-width:0;margin:0;padding:0;border:0;gap:4px;
}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar) :is(.icon-btn,.header-utility-actions>button){
 display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;
 width:44px;height:44px;min-width:44px;min-height:44px;margin:0;padding:9px;
 border:1px solid #cbdac4;border-radius:9px;background:#fff;color:#28531a;box-shadow:none;
}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar) :is(.icon,svg){display:block;width:24px;height:24px;flex:0 0 24px}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar) svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar) svg :is(path,circle,rect,line,polyline,polygon){stroke-width:1.8px;vector-effect:non-scaling-stroke}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"],[data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar) button:is(:hover,:focus-visible,[aria-expanded="true"],[aria-current="page"]){border-color:#86a877;background:#e9f4e4;color:#173b1c}

/* These setup screens use the header logo instead of an auth-surface logo. */
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar)>.header-brand-group{
 display:block;grid-column:1/-1;grid-row:2;justify-self:center;
 width:var(--cgs-native-logo-width,200px);max-width:100%;min-width:0;margin:16px 0 10px;
}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S07"],[data-screen="S08"])>.app-header:not(.native-toolbar) .header-brand{display:block;width:var(--cgs-native-logo-width,200px);max-width:100%;height:auto;max-height:none}
:root:is(.cgs-android,.cgs-ios) .app-shell:is([data-screen="S01"],[data-screen="S02"],[data-screen="S03"],[data-screen="S04"],[data-screen="S05"],[data-screen="S06"]) .auth-surface{min-height:calc(100vh - 60px);min-height:calc(100dvh - 60px)}
:root:is(.cgs-android,.cgs-ios) .auth-brand-region>.auth-logo{width:var(--cgs-native-logo-width,200px);max-width:100%}

/* Two balanced landing-footer rows; every destination has the same link style. */
:root .app-shell .entry-help-links{display:grid;grid-template-columns:minmax(0,1fr);gap:0;width:100%;max-width:100%;margin:0 auto}
:root .app-shell .entry-link-row{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;max-width:100%}
:root .app-shell .entry-link-row>.btn,
:root .app-shell .registration-policy-links>.btn{
 display:inline-flex;align-items:center;justify-content:center;flex:0 1 auto;
 width:auto;min-width:44px;min-height:44px;max-width:100%;margin:0;padding:8px 4px;
 border:0;background:transparent;color:var(--green);font:600 calc(14px * var(--cgs-text-scale,1)) CGS,Poppins,Arial,sans-serif;
 line-height:1.4;text-align:center;text-decoration:none;white-space:normal;overflow-wrap:normal;word-break:normal;
}
:root .app-shell .entry-link-separator{flex:none;font-size:calc(14px * var(--cgs-text-scale,1));color:var(--green)}
:root .app-shell .registration-policy-links{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 20px;margin:0 0 8px;min-width:0}
:root[data-cgs-large-text=true] .app-shell .entry-link-row{flex-wrap:wrap;gap:0 12px}
:root[data-cgs-large-text=true] .app-shell .entry-link-separator{display:none}
