/* Golden Trees UI v2 (flag, default off). Every rule is scoped to html.ui2, so this file does nothing unless the flag is on.
   Forest green structure, gold for each screen's one key action, cream background, warm red-orange warnings. */
html.ui2 body{background:var(--bg);-webkit-font-smoothing:antialiased}
html.ui2 body .wrap{padding-bottom:calc(84px + env(safe-area-inset-bottom))}

/* ---- tab bar: four tabs, icons over sentence-case labels ---- */
html.ui2 body .tabs{position:fixed;left:0;right:0;bottom:0;z-index:70;display:flex;border:0;border-top:1px solid var(--line);border-radius:0;
  background:color-mix(in srgb, var(--surface) 94%, transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:4px 6px calc(4px + env(safe-area-inset-bottom))}
html.ui2 body .tabs button{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;border:0!important;background:none!important;color:var(--ink-3)!important;
  font:600 11px/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:0;text-transform:none;padding:6px 0 4px;min-height:50px}
html.ui2 body .tabs button svg{width:24px;height:24px}
html.ui2 body .tabs button[aria-selected="true"]{color:var(--turf)!important;background:none!important}
html.ui2 body .tabs button[hidden]{display:none}
html.ui2 body header.top{position:sticky;top:0;border-bottom:1px solid var(--line)}

/* ---- Game: compact header ---- */
html.ui2 body #lv-game{display:flex;flex-direction:column}
html.ui2 body #lv-top{order:1;display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px 10px;border-radius:16px 16px 0 0;padding:10px 14px;border-bottom:0}
html.ui2 body #lv-top .lv-clock{cursor:pointer;display:flex;align-items:baseline;gap:10px}
html.ui2 body #lv-top .lv-clock .t{font-size:34px;letter-spacing:.01em}
html.ui2 body #lv-top .lv-clock .s{font-size:13px;text-transform:none;letter-spacing:0}
html.ui2 body #lv-run{position:static!important;left:auto;right:auto;bottom:auto;box-shadow:none;min-height:44px;border-radius:22px;padding:0 18px;font-size:15px;text-transform:none;letter-spacing:.01em;width:auto}
html.ui2 body #lv-run.running{background:var(--surface);color:var(--ink)!important;border:1px solid var(--line-strong)}
html.ui2 body #lv-adj{display:none;grid-column:1 / -1}
html.ui2.ui2-adj body #lv-adj:not([hidden]){display:flex}
html.ui2 body #lv-score{order:2;border-radius:0 0 16px 16px;overflow:hidden;margin-bottom:10px}
html.ui2 body #ui2-confirm{order:3}
html.ui2 body #ui2-half{order:4}
html.ui2 body #ui2-rebal{order:5}
html.ui2 body #lv-zone{order:6}
html.ui2 body #gt-mercy{order:7}
html.ui2 body #gt-share-live{order:8}
html.ui2 body #lv-game > .u2-lbl-pitch{order:9}
html.ui2 body #lv-pitch{order:10}
html.ui2 body #lv-str{display:none!important}
html.ui2 body #ui2-meter{order:11}
html.ui2 body #lv-game > .u2-lbl-bench{order:12}
html.ui2 body #lv-bench{order:13}
html.ui2 body .lv-foot{order:14}
html.ui2 body #lv-more{order:15}
html.ui2 body #lv-mins{order:16}
html.ui2 body #lv-log{order:17}
html.ui2 body #gt-season-live{order:18}
html.ui2 body .lv-lbl{text-transform:none;letter-spacing:0;font:600 15px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);margin:14px 2px 8px}
html.ui2 body .lv-lbl span{font-weight:400;color:var(--ink-3)}

/* ---- sub card ---- */
html.ui2 body .zn{border-radius:16px;border:1px solid var(--line);box-shadow:0 1px 2px rgba(20,30,20,.06);overflow:hidden}
html.ui2 body .zn .zh{text-transform:none;letter-spacing:0;font-size:13px}
html.ui2 body .zn .zmv{font-size:19px;line-height:1.3}
html.ui2 body .zb button{border-radius:12px;min-height:46px;text-transform:none;letter-spacing:0;font-size:16px}
html.ui2 body .zn.sug.due .zb button.p,html.ui2 body .zn.sug .zb button.p{background:var(--gold);border-color:var(--gold);color:var(--gold-ink)!important}
html.ui2 body .zn.u2-haschips > .zwhy:not(.warnline){display:none}
html.ui2 body .u2-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 2px}
html.ui2 body .u2-chip{display:inline-block;background:var(--turf-wash);color:var(--turf);border-radius:999px;padding:4px 10px;font-size:13px;line-height:1.3}
html.ui2 body .u2-done{display:flex;align-items:center;gap:10px;background:var(--turf);color:var(--btn-ink);border-radius:16px;padding:12px 14px;margin-bottom:10px}
html.ui2 body .u2-done b{flex:1;font-weight:600}
html.ui2 body .u2-done button{background:transparent;border:1px solid rgba(255,255,255,.6);color:inherit;border-radius:10px;min-height:38px;padding:0 14px;font:inherit}
html.ui2 body .u2-tick{width:26px;height:26px;border-radius:50%;background:var(--gold);color:var(--gold-ink);display:grid;place-items:center;font-weight:700}
html.ui2 body .u2-half,html.ui2 body .u2-rebal{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 14px;margin-bottom:10px}
html.ui2 body .u2-half-h,html.ui2 body .u2-rebal-h{display:flex;justify-content:space-between;font-weight:600}
html.ui2 body .u2-rebal{border-color:var(--gold)}
html.ui2 body .u2-half p,html.ui2 body .u2-rebal p{margin:6px 0 8px;color:var(--ink-2)}

/* ---- pitch: a real field, tokens by line ---- */
html.ui2 body #lv-pitch.u2-form{display:flex;flex-direction:column;gap:10px;padding:16px 10px;border-radius:16px;
  background:linear-gradient(transparent 49.6%, rgba(255,255,255,.35) 49.6%, rgba(255,255,255,.35) 50.4%, transparent 50.4%),repeating-linear-gradient(0deg,#2c6b45 0 44px,#2a6542 44px 88px);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
html.ui2 body .u2-row{display:flex;justify-content:center;gap:8px}
html.ui2 body #lv-pitch .tl{flex:0 1 31%;min-width:0;border-radius:14px;border:0;border-left:0!important;background:rgba(255,253,248,.96);color:#1c241e;padding:8px 8px 7px;box-shadow:0 1px 3px rgba(0,0,0,.25);position:relative;text-align:center}
html.ui2 body #lv-pitch .tl b{font-size:15px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.ui2 body #lv-pitch .tl .tm{font-size:12px;color:#4b5249}
html.ui2 body #lv-pitch .tl .mn{font-size:11px;color:#6b7068}
html.ui2 body #lv-pitch .tl.leaving{box-shadow:0 0 0 3px var(--off)}
html.ui2 body #lv-pitch .tl.gk{background:#fbf1d2}
html.ui2 body #lv-pitch .tl.sel{box-shadow:0 0 0 3px var(--gold)}
html.ui2 body #lv-pitch .tl.over{background:var(--off-wash)}
html.ui2 body .u2-pos{position:absolute;top:-7px;left:50%;transform:translateX(-50%);background:var(--turf);color:#fff;border-radius:999px;font:700 10px/1 system-ui,sans-serif;padding:3px 6px}
html.ui2 body .gkrow .u2-pos{background:var(--cone)}

/* ---- balance meter ---- */
html.ui2 body #ui2-meter{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 12px;margin-top:10px}
html.ui2 body .u2-meter-h{display:flex;justify-content:space-between;font-size:14px;font-weight:600;margin-bottom:6px}
html.ui2 body .u2-meter-n{font-weight:400;color:var(--ink-2)}
html.ui2 body .u2-meter-n.light{color:var(--off)}
html.ui2 body .u2-bar{display:grid;grid-template-columns:72px 1fr;align-items:center;gap:8px;font-size:12px;color:var(--ink-2);margin:3px 0}
html.ui2 body .u2-bar i{height:8px;border-radius:4px;background:var(--sunken);overflow:hidden;display:block}
html.ui2 body .u2-bar b{display:block;height:100%;background:var(--turf);border-radius:4px}

/* ---- bench: one swipeable row ---- */
html.ui2 body #lv-bench{display:flex;overflow-x:auto;gap:8px;padding:2px 2px 8px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
html.ui2 body #lv-bench .tl{flex:0 0 116px;scroll-snap-align:start;border-radius:14px;border-left-width:1px}
html.ui2 body #lv-bench .empty{padding:10px;color:var(--ink-3)}
html.ui2 body .lv-foot button{border-radius:12px;text-transform:none;letter-spacing:0}

/* ---- Plan: why this lineup ---- */
html.ui2 body #ui2-why{margin-top:14px}
html.ui2 body .u2-why{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px}
html.ui2 body .u2-why-h{display:flex;align-items:center;gap:8px;font-size:17px}
html.ui2 body .u2-ai{background:var(--turf);color:#fff;border-radius:6px;font:700 11px/1 system-ui,sans-serif;padding:4px 6px;letter-spacing:.04em}
html.ui2 body .u2-why-b{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
html.ui2 body .u2-gold{background:var(--gold);color:var(--gold-ink);border:0;border-radius:12px;min-height:46px;padding:0 18px;font:600 16px system-ui,-apple-system,sans-serif}
html.ui2 body .u2-quiet{background:none;border:1px solid var(--line-strong);color:var(--ink);border-radius:12px;min-height:46px;padding:0 14px;font:500 15px system-ui,-apple-system,sans-serif}
html.ui2 body .u2-diff{margin-top:12px;border-top:1px solid var(--line);padding-top:10px}
html.ui2 body .u2-diff-r{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:6px;padding:6px 0;font-size:14px;border-bottom:1px solid var(--line)}
html.ui2 body .u2-diff-r.hd{font-weight:600;color:var(--ink-2)}
html.ui2 body .u2-diff-r span:last-child{font-weight:600;color:var(--turf)}
html.ui2 body .u2-diff p{color:var(--ink-2);font-size:14px}
html.ui2 body .panel{border-radius:16px}

/* ---- Team list ---- */
html.ui2 body #ui2-team{margin-top:14px}
html.ui2 body .u2-team{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:6px 0}
html.ui2 body .u2-team-h{display:flex;justify-content:space-between;padding:8px 14px;font-size:17px}
html.ui2 body .u2-team-h span{color:var(--ink-3);font-size:14px}
html.ui2 body .u2-note{margin:0 14px 8px;font-size:13px;color:var(--ink-2)}
html.ui2 body .u2-trow{display:flex;align-items:center;gap:8px;padding:10px 6px 10px 14px;border-top:1px solid var(--line);min-height:52px}
html.ui2 body .u2-trow b{flex:1;font-size:16px;font-weight:600}
html.ui2 body .u2-dots{display:inline-flex;gap:3px}
html.ui2 body .u2-dots i{width:8px;height:8px;border-radius:50%;background:var(--sunken);display:block}
html.ui2 body .u2-dots i.on{background:var(--turf)}
html.ui2 body .u2-tier{border:1px dashed var(--line-strong);background:none;color:var(--ink-3);border-radius:999px;padding:5px 10px;font:500 13px system-ui,sans-serif;min-height:32px}
html.ui2 body .u2-tier.t-strong{border:0;background:var(--turf);color:#fff}
html.ui2 body .u2-tier.t-solid{border:0;background:var(--turf-wash);color:var(--turf)}
html.ui2 body .u2-tier.t-dev{border:0;background:var(--cone-wash);color:var(--ink)}
html.ui2 body .u2-poschip{border-radius:999px;background:var(--sunken);padding:4px 9px;font-size:12px;color:var(--ink-2)}
html.ui2 body .u2-glove{border-radius:6px;background:var(--cone-wash);padding:3px 6px;font:700 10px system-ui,sans-serif;color:var(--ink)}
html.ui2 body .u2-chev{background:none;border:0;font-size:26px;line-height:1;color:var(--ink-3);min-width:40px;min-height:44px}

/* ---- first run ---- */
html.ui2 body .u2-steps{background:#1E4D32;color:#fff;border-radius:16px;padding:16px;margin-bottom:12px}
html.ui2 body .u2-steps h2{font:600 22px/1.2 "Oswald",system-ui,sans-serif;margin:0 0 4px}
html.ui2 body .u2-steps p{margin:0 0 10px;opacity:.9}
html.ui2 body .u2-steps ol{display:flex;gap:6px;list-style:none;padding:0;margin:0;counter-reset:s}
html.ui2 body .u2-steps li{flex:1;font-size:12px;border-top:3px solid rgba(255,255,255,.35);padding-top:6px;counter-increment:s}
html.ui2 body .u2-steps li::before{content:counter(s) " ";font-weight:700}
html.ui2 body .u2-steps li.on{border-top-color:var(--gold)}
html.ui2 body .u2-team-f{padding:10px 14px 6px;border-top:1px solid var(--line)}
html.ui2 body #panel-squad .panel:has(#squad){display:none}
/* v88: demo simulator row only on the Game tab; one roster row = Here + name + dots + GK, tap for the kid's settings */
body:has(#tab-live[aria-selected="false"]) #gta-sim{display:none!important}
html.ui2 body .u2-trow[data-u2row]{cursor:pointer}
html.ui2 body .u2-trow .u2-here{width:24px;height:24px;min-width:24px;margin:0 10px 0 0;accent-color:var(--turf,#1E4D32)}
html.ui2 body .u2-team-f:empty{display:none}


html.ui2 body .u2-danger{border:1.5px solid #B3261E}html.ui2 body .u2-danger h2{color:#B3261E}html.ui2 body .u2-danger [data-danger]{border-color:#B3261E;color:#B3261E}
html.gtdark body .u2-danger h2,html.gtdark body .u2-danger [data-danger]{color:#FF8A80;border-color:#FF8A80}
/* v88 More: Share group, game-day card, danger zone last and well apart from Sign in */
html.ui2 body .u2-sharehd{font:600 13px/1.2 system-ui,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);margin:18px 4px 0}
html.ui2 body #gt3-more-b [data-gt="account"],html.ui2 body #gt3-more-b [data-gtref="open"]{display:none!important}
html.ui2 body #gt3-more-b [data-act="theme"]{order:9}
/* v94: New game is a normal button (it already needs a second tap); red is for Danger zone only */
html.ui2 body .u2-danger{margin-top:36px}
html.gt-demo #gt-account,html.gt-demo #gt-referral,html.gt-demo [data-gt="account"],html.gt-demo [data-gtref="open"]{display:none!important}
