/* PCB X-League Team Chat (2026-09-30) */
.bottom-nav{grid-template-columns:repeat(9,1fr) !important}
.bottom-nav button{font-size:7.5px}

.chat-loading{padding:26px 4px;color:var(--muted);font-size:13px}
.chat-card{position:relative;overflow:hidden;padding:20px;margin-bottom:14px;background:linear-gradient(135deg,#18181c,#202024);border:1px solid var(--line);border-radius:19px}
.chat-card:before{content:"";position:absolute;top:0;bottom:0;left:0;width:4px;background:var(--red-bright)}
.chat-card h3{margin:6px 0 6px;font-size:22px;font-weight:950;letter-spacing:-.5px}
.chat-card .muted{font-size:13px;line-height:1.5;margin:0 0 14px}
.chat-input{display:block;width:100%;box-sizing:border-box;margin:0 0 10px;padding:13px 14px;background:#111114;color:#fff;border:1px solid #2d2d33;border-radius:12px;font-size:16px}
.chat-input:focus{outline:none;border-color:var(--red-bright)}
.chat-code{text-align:center;font-size:26px;font-weight:900;letter-spacing:.35em}
.chat-msg{min-height:16px;margin:10px 0 0;color:var(--red-soft);font-size:12.5px}
.chat-links{display:flex;justify-content:space-between;gap:10px;margin-top:8px}
.chat-link{background:transparent;border:0;padding:0;color:var(--muted);font-size:12.5px;font-weight:700;text-decoration:underline;cursor:pointer}
.chat-link.danger{color:var(--red-soft)}
.chat-link.tiny{font-size:10.5px;font-weight:600}
.chat-btn{padding:10px 16px;border-radius:10px;border:1px solid #2d2d33;background:#1b1b1f;color:#fff;font-weight:800}
.chat-note{padding:14px 16px;background:var(--panel);border:1px solid var(--line);border-radius:14px}
.chat-note strong{display:block;font-size:13px;margin-bottom:4px}
.chat-note span{color:var(--muted);font-size:12.5px;line-height:1.45}

.chat-me{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;margin-bottom:6px;background:var(--panel);border:1px solid var(--line);border-radius:14px}
.chat-me strong{display:block;font-size:14px;margin-top:2px}
.chat-me small{display:block;color:var(--muted2);font-size:11px;word-break:break-all}
.chat-div{color:var(--muted2);font-size:11px;font-weight:700}
.chat-admin-bar{margin:14px 2px 6px}
.chat-admin-bar .muted{font-size:12.5px;margin:4px 0 0}

.chat-row{display:flex;align-items:center;gap:12px;width:100%;margin-bottom:8px;padding:12px 13px;text-align:left;color:var(--text);background:linear-gradient(145deg,var(--panel),#17171b);border:1px solid var(--line);border-radius:15px;cursor:pointer}
.chat-row:active{transform:scale(.99)}
.chat-row.has-unread{border-color:rgba(239,27,36,.55)}
.chat-avatar{flex:0 0 40px;width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--red-bright);color:#fff;font-size:13px;font-weight:950;text-transform:uppercase}
.chat-avatar.alt{background:#2a2a30;color:#e4e4e7}
.chat-row-main{flex:1;min-width:0}
.chat-row-top{display:flex;justify-content:space-between;gap:8px}
.chat-row-top strong{font-size:14px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-row-top small{flex:0 0 auto;color:var(--muted2);font-size:11px}
.chat-row-sub{display:block;margin-top:3px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-row.has-unread .chat-row-sub{color:#fff;font-weight:700}
.chat-badge{flex:0 0 auto;min-width:20px;height:20px;padding:0 6px;box-sizing:border-box;border-radius:999px;background:var(--red-bright);color:#fff;font-size:11px;font-weight:900;display:flex;align-items:center;justify-content:center}
.chat-foot{color:var(--muted2);font-size:11px;line-height:1.5;margin:16px 2px 0}

.chat-staff{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;margin-bottom:8px;background:var(--panel);border:1px solid var(--line);border-radius:13px}
.chat-staff strong{display:block;font-size:14px}
.chat-staff small{display:block;color:var(--muted);font-size:11.5px;margin-top:2px;word-break:break-all}
.chat-add{margin-top:10px}
.chat-add .eyebrow{display:block;margin-bottom:10px}

/* thread: a full-height chat screen above the bottom nav */
body.chat-in-thread #chatView{display:flex;flex-direction:column;height:calc(100dvh - 150px - env(safe-area-inset-bottom));min-height:360px}
body.chat-in-thread #chatView > .page-head{display:none}
body.chat-in-thread #chatContent{display:flex;flex-direction:column;flex:1;min-height:0}
.chat-thread-head{display:flex;align-items:center;gap:10px;padding:4px 0 10px;border-bottom:1px solid var(--line)}
.chat-thread-head .back-btn{margin:0;padding:6px 10px;font-size:16px}
.chat-thread-title{flex:1;min-width:0}
.chat-thread-title strong{display:block;font-size:15px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-thread-title small{display:block;color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-msgs{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:10px 2px 6px}
.chat-day{text-align:center;color:var(--muted2);font-size:10.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;margin:14px 0 8px}
.chat-bubble-wrap{display:flex;flex-direction:column;align-items:flex-start;margin:3px 0 7px;max-width:84%}
.chat-bubble-wrap.mine{align-items:flex-end;margin-left:auto}
.chat-bubble-wrap.is-hidden{opacity:.45}
.chat-sender{display:flex;align-items:center;gap:6px;margin:0 0 3px 4px;font-size:11.5px}
.chat-sender strong{font-weight:800}
.chat-detail{color:var(--muted2);font-size:10.5px}
.chat-tag{padding:1px 7px;border-radius:999px;background:rgba(239,27,36,.16);color:#ff8a90;font-size:9.5px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.chat-tag.pcb{background:#fff;color:#000}
.chat-bubble{padding:10px 13px;border-radius:17px 17px 17px 5px;background:#1f1f24;border:1px solid #2b2b31;color:#f4f4f5;font-size:14.5px;line-height:1.4;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.chat-bubble.coach{border-color:rgba(239,27,36,.45)}
.mine .chat-bubble{border-radius:17px 17px 5px 17px;background:var(--red-bright);border-color:var(--red-bright);color:#fff}
.chat-time{margin:3px 6px 0;color:var(--muted2);font-size:10px}
.chat-empty{margin:40px 10px;text-align:center}
.chat-empty strong{display:block;font-size:15px}
.chat-empty span{display:block;color:var(--muted);font-size:12.5px;margin-top:4px}
.chat-error{margin:8px auto;padding:8px 12px;border-radius:10px;background:rgba(239,27,36,.14);color:var(--red-soft);font-size:12px;text-align:center}
.chat-compose{display:flex;align-items:flex-end;gap:8px;padding:8px 0 4px;border-top:1px solid var(--line)}
.chat-compose textarea{flex:1;resize:none;max-height:120px;padding:11px 14px;background:#111114;color:#fff;border:1px solid #2d2d33;border-radius:20px;font:inherit;font-size:16px;line-height:1.3}
.chat-compose textarea:focus{outline:none;border-color:var(--red-bright)}
.chat-compose button{flex:0 0 44px;width:44px;height:44px;border-radius:50%;border:0;background:var(--red-bright);color:#fff;font-size:17px;cursor:pointer}
.chat-compose button:disabled{opacity:.5}
/* when the keyboard is up, pcb-native hides the bottom nav: give the thread the room */
body.pcb-kb.chat-in-thread #chatView{height:calc(100dvh - 90px)}
/* announcements (2026-09-30) */
.chat-announce{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 2px 2px;font-size:12.5px;font-weight:800;color:#fff;cursor:pointer}
.chat-announce input{width:18px;height:18px;accent-color:#EF1B24;margin:0}
.chat-announce small{color:var(--muted2);font-weight:600;font-size:11px}
.chat-ann-tag{display:block;margin-bottom:4px;font-size:9.5px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#ff8a90}
.mine .chat-bubble.announce .chat-ann-tag{color:#fff;opacity:.85}
.chat-bubble.announce{border:2px solid var(--red-bright)}
.chat-pinned{margin:8px 0 2px;padding:10px 12px;border-radius:12px;background:rgba(239,27,36,.10);border:1px solid rgba(239,27,36,.45)}
.chat-pinned-body{font-size:13px;line-height:1.4;color:#fff;white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.chat-pinned small{display:block;margin-top:4px;font-size:10.5px;color:var(--muted)}
/* Game Day + Opening Day message (2026-09-30) */
.chat-avatar.gd{background:#202025;color:#FF8A90;font-size:12px}
.chat-gd-strip,.chat-ko-bar{display:flex;align-items:center;gap:10px;width:100%;margin:10px 0 0;padding:11px 14px;border-radius:14px;background:#181A20;border:1px solid var(--line);color:#fff;text-align:left;cursor:pointer;font:inherit}
.chat-ko-bar{border-color:#FACC15;background:rgba(250,204,21,.12)}
.chat-ko-bar .chat-gd-eyebrow{color:#FACC15}
.chat-ko-go{flex:none;padding:8px 12px;border-radius:10px;background:#FACC15;color:#111;font-size:12px;font-weight:900;white-space:nowrap}
.chat-ko-flag{display:block;width:100%;margin:14px 0 4px;padding:16px;border-radius:16px;border:2px solid #FACC15;background:rgba(250,204,21,.12);color:#fff;text-align:left;cursor:pointer;font:inherit}
.chat-ko-flag-eyebrow{display:block;font-size:10.5px;font-weight:900;letter-spacing:.12em;color:#FACC15}
.chat-ko-flag strong{display:block;font-size:18px;font-weight:900;margin-top:6px;line-height:1.25}
.chat-ko-flag small{display:block;font-size:13px;color:#E4E4E7;margin-top:6px;line-height:1.45}
.chat-ko-flag-btn{display:block;margin-top:12px;padding:12px;border-radius:12px;background:#FACC15;color:#111;font-size:15px;font-weight:900;text-align:center}
.chat-gd-strip > span:first-child,.chat-ko-bar > span:first-child{flex:1;min-width:0}
.chat-gd-eyebrow{display:block;font-size:10px;font-weight:900;letter-spacing:.12em;color:#FF6B72}
.chat-gd-sum{display:block;font-size:13px;font-weight:800;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-ko-bar .chat-gd-sum{white-space:normal;font-weight:700;color:#E4E4E7}
.chat-gd-chev{font-size:20px;color:#6F6F78}
.chat-gd-actions{display:flex;flex-direction:column;gap:8px;width:100%;max-width:330px;margin-top:8px}
.chat-gd-btn{width:100%;min-height:46px;border-radius:12px;border:0;background:var(--red-bright);color:#fff;font-weight:900;font-size:13.5px;cursor:pointer;font-family:inherit}
.chat-gd-btn.alt{background:#1B1B1F;border:1px solid var(--line);font-weight:800}
.chat-gd-btn:disabled{opacity:.5}
.chat-gd-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:12px 0 4px}
.chat-gd-tab{min-height:52px;border-radius:12px;border:1px solid var(--line);background:#181A20;color:#C9C9CF;font-weight:800;font-size:12px;line-height:1.25;cursor:pointer;font-family:inherit}
.chat-gd-tab small{display:block;font-weight:600;font-size:10.5px}
.chat-gd-tab.on{background:var(--red-bright);border-color:var(--red-bright);color:#fff}
.chat-gd-label{margin:18px 2px 8px;font-size:10px;font-weight:900;letter-spacing:.14em;color:#8B8B93}
.chat-gd-card{margin-bottom:10px;padding:14px;border-radius:16px;background:#181A20;border:1px solid var(--line)}
.chat-gd-card.open{border-color:#5A3A12}
.chat-gd-kid strong{display:block;font-size:16px;font-weight:900}
.chat-gd-kid small{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.chat-gd-seg{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.chat-gd-seg button{min-height:46px;border-radius:12px;border:1px solid var(--line);background:#1B1B1F;color:#C9C9CF;font-weight:800;font-size:13.5px;cursor:pointer;font-family:inherit}
.chat-gd-seg button.on.ok{border:2px solid #22C55E;background:rgba(34,197,94,.12);color:#fff;font-weight:900}
.chat-gd-seg button.on.bad{border:2px solid var(--red-bright);background:rgba(239,27,36,.12);color:#fff;font-weight:900}
.chat-gd-note{font-size:12px;line-height:1.5;color:#8B8B93;margin:8px 2px 10px}
.chat-gd-game{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.chat-gd-game strong{font-size:15px;font-weight:900}
.chat-gd-game small{font-size:12px;color:var(--muted)}
.chat-gd-status{display:flex;align-items:center;gap:10px;margin:10px 0 0;font-size:13px}
.chat-gd-status span{flex:1}
.chat-gd-status i{width:8px;height:8px;border-radius:50%;background:#F59E0B;flex:0 0 8px}
.chat-gd-status.ok i{background:#22C55E}
.chat-gd-status.warn{color:#FCD9A0}
.chat-gd-card .chat-gd-btn{margin-top:10px}
.chat-gd-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
.chat-gd-tile{padding:12px;border-radius:14px;background:#181A20;border:1px solid var(--line)}
.chat-gd-tile.warn{border-color:#5A3A12}
.chat-gd-tile b{display:block;font-size:24px;font-weight:900}
.chat-gd-tile b i{font-style:normal;font-size:14px;color:#8B8B93}
.chat-gd-tile span{display:block;font-size:10.5px;font-weight:800;letter-spacing:.06em;color:var(--muted);margin-top:4px}
.chat-gd-roster{border-radius:16px;background:#181A20;border:1px solid var(--line);overflow:hidden}
.chat-gd-player{display:flex;align-items:center;gap:12px;padding:11px 14px;border-bottom:1px solid var(--line)}
.chat-gd-player:last-child{border-bottom:0}
.chat-gd-player > div{flex:1;min-width:0}
.chat-gd-player strong{display:block;font-size:14px;font-weight:700}
.chat-gd-player small{display:block;font-size:11.5px;color:var(--muted)}
.chat-gd-player.out{background:rgba(239,27,36,.06)}
.chat-gd-pill{min-height:32px;padding:0 10px;border-radius:999px;border:0;font-size:10.5px;font-weight:900;cursor:pointer;font-family:inherit}
.chat-gd-pill.ok{background:rgba(34,197,94,.14);color:#4ADE80}
.chat-gd-pill.bad{background:rgba(239,27,36,.18);color:#FF8A90}
.chat-gd-msg{min-height:16px;color:var(--red-soft);font-size:12.5px;margin:10px 2px}
.chat-ko-top{display:flex;justify-content:space-between;align-items:center}
.chat-ko-pill{font-size:10px;font-weight:800;padding:4px 8px;border-radius:999px;background:rgba(239,27,36,.16);color:#FF8A90}
.chat-ko-label{display:block;font-size:10.5px;font-weight:800;letter-spacing:.08em;color:#8B8B93;margin:4px 0 6px}
.chat-ko-text{font-size:14px;line-height:1.55;min-height:420px;resize:vertical;font-family:inherit}
.chat-ko-row{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px}
.btn-primary.chat-confirm{background:#F59E0B;color:#111}
/* Call for Trainer + Report incorrect score + PCB alerts (2026-09-30) */
.chat-trainer{display:flex;align-items:center;gap:12px;width:100%;margin:12px 0 4px;padding:14px;border-radius:16px;border:2px solid #EF1B24;background:rgba(239,27,36,.14);color:#fff;text-align:left;cursor:pointer;font:inherit;box-sizing:border-box}
.chat-trainer:disabled{opacity:.8}
.chat-trainer-x{flex:none;width:40px;height:40px;border-radius:11px;background:#EF1B24;color:#fff;display:grid;place-items:center;font-weight:900;font-size:26px;line-height:1}
.chat-trainer strong{display:block;font-size:16px;font-weight:900}
.chat-trainer small{display:block;font-size:12px;color:#E4E4E7;margin-top:2px}
.chat-trainer.done{border-color:#22C55E;background:rgba(34,197,94,.12);cursor:default}
.chat-trainer.done .chat-trainer-x{background:#22C55E;font-size:20px}
.chat-trainer-911{margin:4px 2px 10px;font-size:12px;font-weight:700;color:#FCA5A5}
.chat-gd-final{margin-top:10px;font-size:13.5px;font-weight:800}
.chat-rep-link{display:inline-block;margin-top:6px;padding:0;border:0;background:none;color:#FACC15;font:inherit;font-size:12.5px;font-weight:800;text-decoration:underline;cursor:pointer}
.chat-rep{margin-top:10px;padding:12px;border-radius:12px;border:1px solid #FACC15;background:rgba(250,204,21,.06)}
.chat-rep[hidden]{display:none}
.chat-rep-posted{padding:9px 11px;border-radius:10px;border:1px dashed #3a3a41;background:#0E0F12;font-size:13px;margin-bottom:10px}
.chat-rep-row{display:grid;grid-template-columns:1fr 78px;gap:8px;align-items:center;margin-top:8px;font-size:13.5px;font-weight:700}
.chat-rep-row input{width:100%;box-sizing:border-box;text-align:center;font-weight:900;font-size:16px;padding:10px;border-radius:10px;border:1px solid var(--line);background:#0E0F12;color:#fff;font-family:inherit}
.chat-rep .btn-primary{margin-top:12px}
.chat-rep-sent{color:#FACC15}
.chat-alerts{margin:14px 0 8px;padding:14px;border-radius:16px;background:#16181D;border:1px solid var(--line)}
.chat-alerts-row{display:flex;justify-content:space-between;align-items:center;gap:10px}
.chat-alerts-btns{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chat-al{margin-top:10px;padding:11px 12px;border-radius:12px;background:#1b1d23;border-left:4px solid #EF1B24}
.chat-al.y{border-left-color:#FACC15}
.chat-al.done{opacity:.55}
.chat-al strong{font-size:13.5px}
.chat-al small{display:block;font-size:12px;color:#AEB3BE;margin-top:3px;line-height:1.4}
.chat-al .chat-link{margin-top:6px}
.chat-pill{flex:none;font-size:10px;font-weight:900;padding:3px 8px;border-radius:999px;background:rgba(239,27,36,.18);color:#FF8A90}
.chat-pill.g{background:rgba(34,197,94,.14);color:#4ADE80}
.chat-pill.y{background:rgba(250,204,21,.16);color:#FACC15}
.chat-pill.n{background:#24262d;color:#AEB3BE}
/* Family alerts opt-in + PCB emergency message (2026-09-30) */
.chat-push{margin:12px 0 4px;padding:15px;border-radius:16px;border:1px solid #3a3a41;background:linear-gradient(180deg,#1b1d24,#14161b)}
.chat-push .eyebrow{color:#FF6B72}
.chat-push strong{display:block;font-size:17px;font-weight:900;margin-top:6px;line-height:1.25}
.chat-push ul{margin:8px 0 0;padding-left:18px;font-size:13px;color:#E4E4E7;line-height:1.6}
.chat-push .btn-primary{margin-top:12px}
.chat-push-ios{margin:10px 0 0;padding:10px 11px;border-radius:10px;background:#0E0F12;border:1px dashed #3a3a41;font-size:12.5px;color:#C9C9CF;line-height:1.45}
.chat-push-later{display:block;margin:9px auto 0;padding:4px 8px;border:0;background:none;color:#8B8B93;font:inherit;font-size:12.5px;text-decoration:underline;cursor:pointer}
.chat-push-on{display:flex;align-items:center;gap:8px;margin:12px 0 4px;padding:10px 12px;border-radius:12px;background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.35);font-size:12.5px;font-weight:700;color:#BBF7D0}
.chat-push-on i{flex:none;width:8px;height:8px;border-radius:50%;background:#22C55E}
.chat-push-on .chat-link{margin-left:auto;font-size:12px}
.chat-bcast textarea{margin-top:10px;resize:vertical;font-family:inherit}
.chat-bcast .btn-primary{margin-top:8px}
/* Team switcher for people on more than one team (2026-10-01) */
.chat-chips-label{margin:16px 2px 8px;font-size:10px;font-weight:900;letter-spacing:.12em;color:#8B8B93}
.chat-chips{display:flex;gap:8px;overflow-x:auto;padding:6px 6px 4px 4px;margin:0 -4px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.chat-chips::-webkit-scrollbar{display:none}
.chat-chip{flex:none;position:relative;padding:9px 14px;border-radius:12px;border:1px solid var(--line);background:#181A20;color:#C9C9CF;font:inherit;font-size:13px;font-weight:800;text-align:left;line-height:1.2;cursor:pointer}
.chat-chip small{display:block;font-size:10px;font-weight:700;color:#8B8B93;margin-top:2px}
.chat-chip.on{background:#EF1B24;border-color:#EF1B24;color:#fff}
.chat-chip.on small{color:#ffd6d8}
.chat-chip-n{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#fff;color:#EF1B24;border:2px solid #08090B;font-size:10.5px;font-weight:900;line-height:14px;text-align:center}
.chat-chip-y{position:absolute;top:-4px;left:-4px;width:12px;height:12px;border-radius:50%;background:#FACC15;border:2px solid #08090B}
