.app { padding-top: 22px; padding-bottom: 12px; }

.controls {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; display: grid; gap: 16px;
}
@media (min-width: 900px) { .controls { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.lbl { display: block; font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* single-line controls share one height (fleet rule: selects match inputs) */
input[type="search"], select {
  width: 100%; height: var(--control-h); border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; padding: 0 12px;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
input[type="search"]:focus, select:focus { outline: none; border-color: #4d90fe; box-shadow: 0 0 0 3px rgba(77,144,254,.35); }

.combo { position: relative; }
.results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px;
  list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.35); max-height: 340px; overflow: auto;
}
.results li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.results li[aria-selected="true"], .results li:hover { background: var(--field); }
.results .sw { width: 10px; height: 26px; border-radius: 2px; flex: none; background: var(--team); }
.results .nm { font-weight: 600; flex: 1; min-width: 0; }
.results .lg { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.results .none { cursor: default; color: var(--muted); }

.chips { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 0;
  background: var(--plate); color: var(--plate-ink); border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 0 rgba(0,0,0,.18);
}
.chip .sw { width: 6px; align-self: stretch; background: var(--team); }
.chip .nm { font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.chip .lg { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: #6b727b; text-transform: uppercase; }
.chip button { border: 0; background: none; width: 28px; height: 28px; border-radius: 4px; cursor: pointer; color: #5c636c; font-size: 18px; line-height: 1; }
.chip button:hover { background: #e6e8eb; color: var(--flag); }

.nearby { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.nearby-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.nearby-list { display: contents; }
.add {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 8px; border-radius: 15px;
  border: 1px dashed var(--line); background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
}
.add::before { content: "+"; font-weight: 800; color: var(--muted); }
.add:hover { border-style: solid; border-color: var(--muted); }

.settings { display: grid; gap: 12px; }
@media (min-width: 600px) { .settings { grid-template-columns: repeat(2, 1fr); } }

.status { color: var(--muted); padding: 24px 0; }
.empty { text-align: center; padding: 48px 16px; }
.empty h2 { font-family: var(--display); font-weight: 800; font-size: 34px; text-transform: uppercase; margin: 0 0 6px; letter-spacing: .02em; }
.empty p { color: var(--muted); max-width: 460px; margin: 0 auto 18px; }

.summary { margin: 22px 0 10px; font-size: 15px; color: var(--muted); }
.summary strong { color: var(--ink); }
.list { display: grid; gap: 18px; }
.more { margin: 22px auto 0; display: flex; color: var(--ink); }

.board .aside { margin-top: 12px; padding: 10px 4px 0; border-top: 1px dashed var(--board-line); }
.aside-title { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-board); margin-bottom: 6px; }
.aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.aside li { font-size: 13.5px; color: rgba(255,255,255,.85); display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.aside li .t { font-family: var(--mono); font-size: 12px; color: var(--lamp); white-space: nowrap; }
.aside li .g { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aside li a { color: inherit; }

/* ---- account ---- */
.nav { display: flex; align-items: center; gap: 16px; }
.nav-btn {
  height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid rgba(246,246,241,.35);
  background: transparent; color: var(--plate); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none;
}
.nav-btn:hover { border-color: var(--lamp); color: var(--lamp); }
.acct {
  width: min(420px, calc(100vw - 32px)); border: 0; border-radius: 12px; padding: 0; color: var(--ink); background: var(--surface);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}
.acct::backdrop { background: rgba(10,12,15,.6); }
.acct-head { background: var(--board-deep); color: var(--plate); display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 4px solid var(--lamp); }
.acct-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; letter-spacing: .03em; }
.acct-x { border: 0; background: none; color: inherit; font-size: 26px; width: 36px; height: 36px; border-radius: 6px; cursor: pointer; }
.acct-x:hover { background: rgba(255,255,255,.1); }
#acct-out, #acct-in { padding: 18px 18px 20px; }
.acct-copy { margin: 0 0 16px; color: var(--muted); }
.acct-copy strong { color: var(--ink); overflow-wrap: anywhere; }
.acct-err { color: var(--flag); font-size: 14px; margin: 12px 0 0; }
.acct-fine { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.acct-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.linkish { border: 0; background: none; padding: 0; color: var(--flag); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; }

/* Fleet social sign-in spec (.Process/CONVENTIONS.md): Google rendered by GIS, Apple black, 44px, 8px radius */
.socialwrap { display: grid; gap: 10px; }
.gbtn-wrap { display: flex; justify-content: center; min-height: 44px; }
.gbtn-wrap > div { width: 100%; }
.socbtn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; border-radius: 8px; border: none;
  background: #000; color: #fff; font-family: var(--body); font-size: 15px; font-weight: 600; cursor: pointer; }

/* ---- sign-in gate + email form (fleet login spec) ---- */
.gate {
  margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--lamp); border-radius: 8px; padding: 12px 14px;
}
.gate p { margin: 0; }
.orline { text-align: center; color: var(--muted); font-size: 13px; position: relative; margin: 14px 0 10px; }
.orline::before, .orline::after { content: ""; position: absolute; top: 50%; width: 34%; height: 1px; background: var(--line); }
.orline::before { left: 0; } .orline::after { right: 0; }
.email-form { display: grid; gap: 10px; }
.fld { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.fld input { height: var(--control-h); border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 400; padding: 0 12px; }
.fld input:focus { outline: none; border-color: #4d90fe; box-shadow: 0 0 0 3px rgba(77,144,254,.35); }
.btn.wide { width: 100%; }
.btn.danger { background: var(--flag); color: #fff; }
.forgot { justify-self: end; color: var(--muted); font-size: 13px; }
.swap { margin: 2px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.swap button { color: var(--ink); text-decoration: underline; }
.acct-ok { color: #1d7a3d; font-size: 14px; margin: 12px 0 0; }
.delete-confirm { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.delete-confirm p { margin: 0; color: var(--muted); font-size: 14px; }
.picker.locked input { cursor: pointer; }

/* ---- onboarding: "Who Do You Root For?" ---- */
.onboard { max-width: 720px; margin: 8px auto 0; padding: 8px 0 24px; }
.onboard-kicker { font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.onboard h1 { font-family: var(--display); font-weight: 900; font-size: clamp(40px, 9vw, 64px); line-height: .92; text-transform: uppercase; margin: 0 0 10px; letter-spacing: .01em; }
.onboard-lede { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.onboard .picker { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.onboard .picker > .lbl { display: none; }
.onboard .nearby { margin-top: 18px; display: block; }
.onboard .nearby-label { display: block; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.onboard .nearby-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.onboard .add {
  height: 48px; border-radius: 6px; border: 1px solid var(--line); justify-content: flex-start; padding: 0 12px;
  background: var(--plate); color: var(--plate-ink); font-family: var(--display); font-weight: 800; font-size: 19px; text-transform: uppercase;
  box-shadow: inset 6px 0 0 var(--team, #999), 0 2px 0 rgba(0,0,0,.12); padding-left: 18px;
}
.onboard .add::before { color: #5c636c; }
.onboard .add:hover { border-color: var(--muted); }
.onboard-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; }
.onboard-count { color: var(--muted); font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* ---- bottom tab bar (phones only; the fleet's floating-capsule dock) ---- */
.tabbar { display: none; }
@media (max-width: 767px) {
  body.has-tabbar { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  body.has-tabbar .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
    position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    height: 64px; padding: 6px; border-radius: 24px;
    background: color-mix(in srgb, var(--board-deep) 92%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
    box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 14px 30px -10px rgba(0,0,0,.55);
  }
  body.no-tabbar .tabbar { display: none !important; }
  body.has-tabbar .topbar .nav-btn, body.has-tabbar .topbar nav a { display: none; }
  .tab {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; border-radius: 18px; background: transparent; color: rgba(255,255,255,.62); cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; min-width: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .tab[aria-current="page"] { color: var(--lamp); background: rgba(255,255,255,.1); }
  .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-badge {
    position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--lamp); color: var(--lamp-ink); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
  }
  /* One section per tab. */
  #app-main[data-tab="weekends"] #controls { display: none; }
  #app-main[data-tab="teams"] #out, #app-main[data-tab="teams"] .settings { display: none; }
  #app-main[data-tab="settings"] #out, #app-main[data-tab="settings"] .picker { display: none; }
  #app-main[data-tab="teams"] .controls, #app-main[data-tab="settings"] .controls { margin-bottom: 8px; }
  .foot { padding-bottom: 12px; }
}
