:root{
  --bg: #0A0E14;
  --panel: #141922;
  --panel-raised: #1B222D;
  --line: #262E3B;
  --accent: #37E17E;
  --accent-dim: #1C6B45;
  --accent-soft: rgba(55,225,126,0.12);
  --gold: #FFB74D;
  --danger: #FF5C5C;
  --chalk: #F3F5F8;
  --chalk-dim: #8891A1;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  font-size: 16px;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--chalk);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  padding-bottom: 70px;
}
.hidden{ display:none !important; }
a{ color: var(--accent); }

/* ---------- Header ---------- */
.scoreboard{
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top:0; z-index: 20;
}
.scoreboard-inner{
  max-width: 1180px; margin: 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  gap: 18px; padding: 14px 20px;
  flex-wrap: wrap;
}
.brand{ display:flex; align-items:center; gap: 10px; line-height:1; }
.brand-mark{ display:flex; align-items:center; text-decoration:none; }
.brand-logo{ height: 125px; width: auto; display:block; }
.brand-sub{
  font-weight: 600; font-size: 0.82rem; color: var(--chalk-dim);
  padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line);
}
.version-tag{
  font-weight: 400; font-size: 0.72rem; color: var(--chalk-dim); margin-left: auto;
}

.clock-block{
  text-align:center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 22px;
  background: var(--panel-raised);
  min-width: 210px;
}
.clock-label{ font-size: 0.65rem; font-weight:700; color: var(--chalk-dim); }
.clock-name{ font-weight: 700; font-size: 0.98rem; color: var(--accent); margin-top: 2px; min-height: 1.2em; }
.clock-time{
  font-weight:800; font-size: 1.9rem; letter-spacing: 0.02em; color: var(--chalk);
  font-variant-numeric: tabular-nums;
}
.clock-time.low{ color: var(--danger); }

.round-block{ text-align:right; line-height:1.1; }
.round-label{ font-size:0.65rem; font-weight:700; color: var(--chalk-dim); }
.round-value{ font-weight:800; font-size:1.6rem; color:var(--chalk); }
.pick-value{ font-size:0.78rem; color: var(--accent); font-weight: 600; }

.identity-block{ display:flex; align-items:center; }

/* ---------- V34.10: shared hero header (pages without a league) ---------- */
.hero-home, .brand-logo-hero{ display:none; }
.hero-mode .scoreboard{
  position: relative; border-bottom: none;
  background:
    radial-gradient(ellipse 60% 70% at 50% 38%, rgba(55,225,126,0.33), transparent 70%),
    linear-gradient(180deg, #1E7A47 0%, #10492B 38%, #07201A 72%, var(--bg) 100%);
}
.hero-mode .scoreboard-inner{
  display:block; max-width: none; text-align:center;
  padding: calc(18px + env(safe-area-inset-top)) 64px 16px;
}
.hero-mode .brand{ display:block; }
.hero-mode .brand-mark{ display:inline-block; }
.hero-mode .brand-logo{ display:none; }
.hero-mode .brand-logo-hero{
  display:block; width: 196px; height:auto; margin: 0 auto;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45));
}
.hero-mode .brand-sub{
  display:block; border-left: none; padding: 0; margin: 8px 0 0;
  font-weight: 700; color: rgba(243,245,248,0.8); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-mode .brand-sub:empty{ display:none; }
.icon-btn{
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  align-items:center; justify-content:center;
  background: rgba(10,14,20,0.45); border: 1px solid rgba(255,255,255,0.14);
  color: var(--chalk); text-decoration: none;
}
.icon-btn:hover{ border-color: var(--accent); }
.icon-btn svg{ width: 18px; height: 18px; }
.hero-mode .hero-home{
  display:flex; position:absolute; z-index: 2;
  top: calc(14px + env(safe-area-inset-top)); left: calc(14px + env(safe-area-inset-left));
}
.hero-mode .identity-block{
  position:absolute; top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right));
}
.hero-mode #whoamiLabel{ display:none; }
.hero-mode #logoutBtn{
  background: rgba(10,14,20,0.45); border: 1px solid rgba(255,255,255,0.14); color: var(--chalk);
}
@media (min-width: 900px){ .hero-mode .brand-logo-hero{ width: 240px; } }
@media (max-width: 640px){ .hero-mode .brand-logo-hero{ width: 176px; } }

.auth-panel{ max-width: 400px; margin: 40px auto; }
.auth-panel .text-input{ width: 100%; margin-bottom: 4px; }
.auth-switch{ margin-top: 16px; font-size: 0.85rem; color: var(--chalk-dim); }
.auth-switch a{ color: var(--accent); text-decoration: underline; cursor: pointer; }

/* ---------- Layout shells ---------- */
main{ max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }

/* ---------- Hero (home page) ---------- */
.hero-band{
  position: relative;
  margin: -24px calc(-50vw + 50%) 36px;
  padding: 48px 20px 84px;
  width: 100vw;
  background:
    radial-gradient(ellipse 620px 380px at 50% -60px, rgba(55,225,126,0.16), transparent 70%),
    linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 34px), 52% 100%, 0 calc(100% - 34px));
  text-align: center;
  overflow: hidden;
}
.hero-inner{ max-width: 640px; margin: 0 auto; }
.hero-logo{
  width: min(78%, 420px); height: auto; display: block; margin: 0 auto 22px;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,0.55));
}
.hero-headline{
  font-family: "Anton", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 4.6vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: 0.01em;
  color: var(--chalk);
  margin: 0 0 14px;
}
.hero-sub{
  color: var(--chalk-dim);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 460px;
  margin: 0 auto;
}
@media (max-width: 560px){
  .hero-band{ padding: 36px 16px 64px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), 52% 100%, 0 calc(100% - 22px)); }
}

.panel{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  max-width: 560px;
  margin: 20px auto;
}
.panel-title{ font-weight: 800; font-size: 1.5rem; margin: 0 0 6px; letter-spacing: -0.01em; }
.panel-sub{ color: var(--chalk-dim); margin: 0 0 22px; line-height:1.5; font-size:0.94rem; }

.league-list{ display:flex; flex-direction:column; gap: 6px; margin: 8px 0 0; }
.league-row{
  display:flex; align-items:center; justify-content:space-between; gap: 10px;
  padding: 10px 14px; background: var(--panel-raised); border: 1px solid var(--line);
  border-radius: var(--radius-sm); text-decoration:none; color: inherit;
}
.league-row:hover{ border-color: var(--accent); }
.league-row-name{ font-weight: 700; font-size: 0.92rem; }
.league-row-role{ font-size: 0.72rem; color: var(--chalk-dim); text-transform: capitalize; }
/* V34.41: Delete beside your leagues in My Drafts, the note after it,
   and the page the "confirm deleting" email opens */
.league-row-wrap{ display: flex; gap: 8px; align-items: stretch; }
.league-row-wrap .league-row{ flex: 1; min-width: 0; }
.btn.league-delete-btn{ border-radius: var(--radius-sm); padding: 0 14px; }
.drafts-notice{ border-radius: var(--radius-sm); padding: 12px 14px; margin: 6px 0 14px; font-size: 0.9rem; line-height: 1.4; }
.drafts-notice.warn{ border: 1px solid rgba(255,183,77,0.5); background: rgba(255,183,77,0.08); }
.drafts-notice.ok{ border: 1px solid rgba(55,225,126,0.45); background: var(--accent-soft); }
.confirm-delete-warning{ color: var(--danger); font-weight: 700; margin: 14px 0; }
.confirm-delete-go{ width: 100%; }
.confirm-delete-keep{ display: block; width: 100%; margin-top: 10px; padding: 14px; font-size: 1rem; text-align: center; text-decoration: none; box-sizing: border-box; }

.bye-weeks-table{ width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 6px; }
.bye-weeks-table th{
  text-align: left; padding: 8px 10px; background: var(--panel-raised); color: var(--chalk-dim);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid var(--line);
}
.bye-weeks-table td{ padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bye-weeks-table tr:last-child td{ border-bottom: none; }
.bye-week-num{ font-weight: 700; }
.bye-team-chips{ display:flex; flex-wrap:wrap; gap: 6px; }
.bye-team-chip{
  display:inline-block; padding: 3px 10px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  font-size: 0.75rem; font-weight:700; background: var(--panel-raised);
}

.slot-editor{ display:flex; flex-direction:column; gap: 8px; margin-top: 6px; }
.slot-editor-row{ display:flex; align-items:center; gap: 8px; }
.slot-editor-row input.slot-name{ width: 90px; }
.slot-editor-row input.slot-count{ width: 60px; }
.scoring-editor{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; margin-top: 6px;
}
.scoring-editor-row{ display:flex; align-items:center; gap: 8px; font-size: 0.82rem; }
.scoring-editor-row label{ flex:1; color: var(--chalk-dim); }
.scoring-editor-row input{ width: 70px; }

.field-label{
  display:block; font-size:0.78rem; font-weight: 600; color: var(--chalk-dim); margin: 16px 0 7px;
}
.field-hint{ font-size: 0.8rem; color: var(--chalk-dim); margin: 4px 0 0; line-height:1.4; }

.text-input{
  width: 100%;
  background: #0D1219;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--chalk);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}
.text-input:focus{ outline: 2px solid var(--accent); outline-offset: 1px; }
.text-input.small{ padding: 7px 11px; font-size: 0.85rem; }
/* V34.30: an iPhone zooms the page in when you tap a text box whose text is
   smaller than 16px, and stays zoomed after you leave it. */
@media (pointer: coarse){
  .text-input, .text-input.small{ font-size: 16px; }
}

.format-toggle{ display:flex; gap: 8px; margin-top: 4px; }
.format-toggle-btn{
  flex: 1; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #0D1219; color: var(--chalk-dim); font-weight: 700; font-size: 0.9rem; cursor: pointer;
}
.format-toggle-btn.active{ border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.previous-managers-list{ display:flex; flex-direction:column; gap: 6px; margin-top: 6px; }
.previous-manager-row{ display:flex; align-items:center; gap: 8px; font-size: 0.88rem; cursor:pointer; }

.manager-inputs{ display:flex; flex-direction:column; gap:8px; }
.manager-row{ display:flex; align-items:center; gap:8px; flex-wrap: wrap; }
.manager-row .num{ color: var(--chalk-dim); width: 22px; text-align:right; font-size:0.85rem; font-variant-numeric: tabular-nums; }
.manager-row .manager-name-input{ flex: 1 1 140px; min-width: 100px; }
.manager-row .manager-email-input{ flex: 1 1 160px; min-width: 120px; }
.manager-row button{ background:none; border:none; color: var(--chalk-dim); cursor:pointer; font-size: 1rem; padding: 4px 8px; }
.manager-row button:hover{ color: var(--danger); }

.row-actions{ display:flex; gap:10px; margin-top:10px; }

.toggle-row{ display:flex; flex-direction:column; gap:10px; margin: 20px 0; }
.toggle{ display:flex; align-items:center; gap:10px; font-size: 0.92rem; color: var(--chalk-dim); cursor:pointer; }
.toggle input{ width:16px; height:16px; accent-color: var(--accent); }

.btn{
  font-family:'Inter', sans-serif;
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.06s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:active{ transform: scale(0.97); }
.btn.primary{ background: var(--accent); color: #06150D; }
.btn.primary:hover{ background: #4FEB92; }
.btn.primary.big{ width:100%; padding: 14px; font-size: 1rem; margin-top: 8px; }
.btn.ghost{ background: var(--panel-raised); border: 1px solid var(--line); color: var(--chalk); }
.btn.ghost:hover{ border-color: var(--accent); color: var(--accent); }
.btn.ghost.small{ padding: 6px 14px; font-size: 0.8rem; }
.btn.ghost.danger{ color: var(--danger); border-color: rgba(255,92,92,0.45); } /* V34.37, V34.41 My Drafts */
.btn.primary.danger{ background: var(--danger); color: #fff; }
.btn.text{ background:none; color: var(--chalk-dim); font-weight:600; text-decoration: underline; padding: 4px; }
.btn:disabled{ opacity: 0.4; cursor: not-allowed; }

.setup-result{ margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.url-preview{ font-size: 0.8rem; color: var(--accent); margin-top: 6px; }

.key-warning{
  background: rgba(255,92,92,0.1); border: 1px solid var(--danger);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 12px; font-size: 0.85rem; color: var(--chalk);
}
.key-value{ font-size: 1rem; color: var(--accent); word-break: break-all; margin: 6px 0; font-weight: 700; }

/* ---------- Lobby ---------- */
.lobby-order{ display:flex; flex-direction:column; gap:10px; margin-bottom: 20px; }
.lobby-row{
  display:flex; align-items:center; justify-content:space-between;
  background: var(--panel-raised); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.lobby-row .who{ display:flex; align-items:center; gap:10px; }
.lobby-row .seed{ color: var(--accent); font-size:0.85rem; width: 26px; font-weight: 700; }
.lobby-row .link{ font-size: 0.78rem; color: var(--chalk-dim); word-break: break-all; }
.copy-btn{ background: var(--panel); border:1px solid var(--line); color: var(--chalk); border-radius: var(--radius-pill); padding:6px 12px; font-size:0.75rem; cursor:pointer; }
.copy-btn:hover{ border-color: var(--accent); color: var(--accent); }

/* ---------- Draft room ---------- */
.room-grid{ display:grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items:start; }
@media (max-width: 880px){ .room-grid{ grid-template-columns: 1fr; } }

.col-title{ font-weight:700; font-size:1.1rem; margin: 6px 0 12px; letter-spacing: -0.01em; }

.board{
  display:flex; flex-direction:column; gap: 14px;
  background: var(--panel); border:1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.board-round-label{ font-size:0.68rem; font-weight: 700; color: var(--accent); margin-bottom:6px; }
.board-slots{ display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; }
@media (max-width:640px){ .board-slots{ grid-template-columns: repeat(2,1fr);} }

.slot{
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 9px;
  min-height: 58px;
  position: relative;
  background: var(--panel-raised);
}
.slot.filled{ border-color: transparent; }
.slot.on-clock{
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 0 14px rgba(55,225,126,0.3);
}
.slot .mgr{ font-size: 0.68rem; color: var(--chalk-dim); font-weight: 600; }
.slot .team{ font-weight: 700; font-size: 0.95rem; margin-top: 3px; }
.slot .pickno{ position:absolute; top:6px; right:8px; font-size:0.62rem; color: var(--chalk-dim); font-variant-numeric: tabular-nums; }
.slot .auto-tag{ font-size:0.6rem; color: var(--accent); margin-top:2px; }
.slot .tag-short{ display: none; } /* V34.22: short tags on phones */

.turn-banner{
  background: var(--panel-raised); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 12px; font-size: 0.88rem;
}
.turn-banner.mine{ border-color: var(--accent); color: var(--accent); font-weight:700; background: var(--accent-soft); }
.turn-banner.paused{ border-color: var(--danger); color: var(--danger); font-weight:700; }

.pick-confirm{
  display:flex; align-items:center; justify-content:space-between; gap: 12px;
  flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 12px;
  animation: pickConfirmIn 0.15s ease-out;
}
@keyframes pickConfirmIn{ from{ opacity:0; transform: translateY(-4px);} to{ opacity:1; transform:none; } }
.pick-confirm span{ font-weight:700; font-size:0.92rem; }
.pick-confirm-actions{ display:flex; gap:8px; flex: none; }

.confirm-overlay{
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4,8,6,0.72);
  display:flex; align-items:center; justify-content:center;
  padding: 20px;
}
.confirm-box{
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; max-width: 380px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: pickConfirmIn 0.15s ease-out;
}
.confirm-message{ font-size: 0.98rem; line-height:1.5; margin: 0 0 18px; color: var(--chalk); white-space: pre-line; }
.confirm-actions{ display:flex; gap:10px; justify-content:flex-end; flex-wrap: wrap; }
/* V34.14: phones — confirm buttons full width, main action on top */
@media (max-width: 480px){
  .confirm-actions{ flex-direction: column-reverse; align-items: stretch; }
  .confirm-actions .btn{ width: 100%; }
}

.history-box{ max-width: 640px; max-height: 80vh; display:flex; flex-direction:column; }
.history-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.history-list{ overflow-y:auto; display:flex; flex-direction:column; gap:10px; }
.history-entry{
  background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.history-entry summary{
  cursor:pointer; font-weight:700; font-size:0.94rem; list-style: none;
  display:flex; align-items:center; gap:10px;
}
.history-entry summary::-webkit-details-marker{ display:none; }
.history-entry summary::before{ content: "▸"; color: var(--accent); }
.history-entry[open] summary::before{ content: "▾"; }
.history-time{ color: var(--chalk-dim); font-weight:400; font-size:0.82rem; }
.history-entry .results{ margin-top: 12px; }

.pool-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pool-head .text-input{ max-width: 180px; }

.pool{ display:flex; flex-direction:column; gap: 14px; margin-top: 12px; max-height: 640px; overflow-y:auto; padding-right: 4px; }
.pool-group-label{ font-size:0.68rem; font-weight: 700; color: var(--chalk-dim); margin-bottom:6px; }
/* V34.23: minmax(0,1fr) + min-width:0 so a long city name can't push the page wider than a small phone */
.pool-grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:8px; }
.pool-grid .team-btn{ min-width: 0; }

.team-btn{
  display:flex; align-items:center; gap:10px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  padding: 8px 10px; cursor:pointer; text-align:left;
  background: var(--panel-raised); color: var(--chalk);
  font-family:'Inter', sans-serif; font-size: 0.84rem; font-weight:600;
}
.team-btn .swatch{ width:26px; height:26px; border-radius: 50%; flex:none; }
.team-btn:hover:not(:disabled){ border-color: var(--accent); }
.team-btn.selected{
  border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft);
}
.team-btn:disabled{ opacity: 0.28; cursor: default; }
.team-btn.drafted{ text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; opacity: 0.45; }

/* ---------- Results ---------- */
.results{ display:flex; flex-direction:column; gap:14px; }
.result-row{ background: var(--panel-raised); border:1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.result-row .rname{ font-weight:700; font-size:1.02rem; margin-bottom:6px; }
.result-teams{ display:flex; flex-wrap:wrap; gap:6px; }
.result-teams span{ font-size:0.78rem; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--panel); border:1px solid var(--line); }

/* ---------- Misc ---------- */
.you-badge{
  position: fixed; bottom: 60px; right: 16px;
  background: var(--accent); color:#06150D; font-weight:700; font-size:0.8rem;
  padding: 8px 16px; border-radius: var(--radius-pill); box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 30;
}

.foot{
  position: fixed; bottom:0; left:0; right:0;
  background: var(--panel); border-top: 1px solid var(--line);
  padding: 8px 20px; display:flex; align-items:center; gap: 14px; z-index: 25;
}
.admin-panel{ display:flex; gap:8px; align-items:center; }

.links-panel{
  position: fixed; bottom: 46px; left: 0; right: 0;
  max-height: 220px; overflow-y: auto;
  background: var(--panel); border-top: 1px solid var(--line);
  padding: 10px 20px; z-index: 24;
}
.link-row{ padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.link-row b{ color: var(--accent); margin-right: 10px; }
.link-row span{ color: var(--chalk-dim); word-break: break-all; }
/* V34.16: Team managers — change a manager's email */
.tm-line{ display:flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tm-line .tm-btns{ margin-left: auto; display:flex; gap: 4px; }
.tm-line .tm-change, .tm-line .tm-remove{ padding: 2px 4px; font-size: 0.76rem; }
.tm-line .tm-remove{ color: var(--danger); }
.tm-email-addr{ overflow-wrap: anywhere; }
.tm-pending{ font-style: normal; color: var(--gold); font-size: 0.8rem; }
.tm-joined{ font-style: normal; color: var(--accent); font-size: 0.8rem; }
.tm-count{ margin: 0 0 6px; font-size: 0.85rem; }
.tm-form{ display:flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.tm-form .tm-email{ flex: 1 1 180px; min-width: 0; }
.tm-form .tm-err{ flex-basis: 100%; color: var(--danger); margin: 2px 0 0; }
.tm-note{ margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--chalk); font-size: 0.82rem; }

.forgot-key-inline{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* ---------- Live draft room entry (lobby) ---------- */
.live-room-cta{ margin-top: 18px; text-align: center; }
.live-room-cta .btn{ width: 100%; max-width: 360px; }
.live-room-cta .btn:disabled{ background: var(--panel-raised); color: var(--chalk-dim); border: 1px solid var(--line); box-shadow: none; opacity: 1; cursor: not-allowed; }
.live-room-cta .field-hint{ margin-top: 8px; }
.room-error{ color: var(--danger); }
.lobby-commish{
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display:flex; gap: 10px; align-items:center; justify-content:center; flex-wrap: wrap;
}
.turn-banner.countdown{ border-color: var(--accent); }

/* ---------- Presence (who's online / in the live draft room) ---------- */
.presence-pill{
  display:inline-flex; align-items:center; gap:6px; font-size: 0.72rem; font-weight: 600;
  color: var(--chalk-dim); white-space: nowrap;
}
.presence-dot{ width: 9px; height: 9px; border-radius: 50%; background: #55606e; flex: none; }
.presence-pill.room{ color: var(--accent); }
.presence-pill.room .presence-dot{ background: var(--accent); box-shadow: 0 0 0 3px rgba(55,225,126,0.18); }
.presence-pill.online{ color: #f5c542; }
.presence-pill.online .presence-dot{ background: #f5c542; }
.presence-strip{
  display:flex; flex-wrap:wrap; gap: 8px 16px; align-items:center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 16px;
}
.presence-strip .presence-title{ font-size: 0.7rem; font-weight: 800; color: var(--chalk-dim); letter-spacing: 0.04em; margin-right: 4px; }
.presence-strip .presence-person{ display:inline-flex; align-items:center; gap:6px; font-size: 0.85rem; font-weight: 600; }
.presence-strip .presence-person.commish{ padding-left: 14px; border-left: 1px solid var(--line); }
.turn-banner.waiting{ border-color: var(--danger); color: var(--chalk); }
.presence-legend{ margin-left: auto; display:inline-flex; gap: 10px; opacity: 0.85; }
.presence-legend .presence-pill{ font-size: 0.66rem; font-weight: 500; }
@media (max-width: 560px){ .presence-legend{ margin-left: 0; width: 100%; } .presence-strip .presence-person.commish{ border-left: none; padding-left: 0; } }

/* ---------- Final rosters actions ---------- */
.results-actions{ display:flex; flex-wrap: wrap; gap: 12px; align-items:center; margin-top: 18px; }
.results-actions a.btn{ text-decoration: none; display:inline-flex; align-items:center; justify-content:center; }
@media (max-width: 560px){ .results-actions > *{ width: 100%; } }

/* ---------- "Just picked" banner with AI team outlook (v34) ---------- */
.pick-banner{
  display:flex; gap: 12px; align-items:stretch;
  background: linear-gradient(90deg, rgba(55,225,126,0.10), var(--panel) 60%);
  border: 1px solid var(--line); border-left: none;
  border-radius: var(--radius-sm); padding: 12px 14px 12px 0; margin-bottom: 16px;
  overflow: hidden;
}
.pick-banner-swatch{ width: 5px; flex: none; border-radius: 0 3px 3px 0; }
.pick-banner-body{ display:flex; flex-direction:column; gap: 4px; min-width: 0; }
.pick-banner-lead{ font-weight: 800; font-size: 0.98rem; color: var(--chalk); }
.pick-banner-outlook{ font-size: 0.86rem; line-height: 1.45; color: var(--chalk-dim); }
.pick-banner-tag{
  display:inline-block; margin-right: 8px; padding: 1px 7px; border-radius: var(--radius-pill);
  background: var(--accent-soft, rgba(55,225,126,0.14)); color: var(--accent);
  font-size: 0.64rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 1px;
}
.pick-banner.fresh{ animation: pickBannerIn 0.5s ease-out; }
@keyframes pickBannerIn{
  from{ opacity: 0; transform: translateY(-6px); box-shadow: 0 0 0 2px var(--accent); }
  to{ opacity: 1; transform: none; box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce){ .pick-banner.fresh{ animation: none; } }
#resultsPickBanner{ margin: 8px 0 14px; }

/* Read-only account email on the reset form */
#resetEmail[readonly]{ opacity: 0.7; cursor: default; }

/* V34.6: non-affiliation disclaimer (sits above the fixed footer) */
.legal-note{
  max-width: 640px; margin: 24px auto 70px; padding: 0 20px; text-align: center;
  font-size: 0.68rem; line-height: 1.45; color: var(--chalk-dim); opacity: 0.8;
}

/* PWA login code */
.mfa-code-input{ font-size: 1.3rem; letter-spacing: 0.35em; font-variant-numeric: tabular-nums; text-align: center; max-width: 220px; }

/* ======================= V34.12 ======================= */
/* ---------- Draft format + pick clock pickers ---------- */
.fmt-cards{ display:flex; flex-direction:column; gap: 8px; }
.fmt-card{
  display:grid; grid-template-columns: 20px 1fr; gap: 10px; align-items:start; text-align:left;
  background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; color: var(--chalk); cursor: pointer; font-family: 'Inter', sans-serif;
}
.fmt-card:hover{ border-color: var(--accent-dim); }
.fmt-card.on{ border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: rgba(55,225,126,0.06); }
.fmt-radio{ width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--chalk-dim); margin-top: 1px; }
.fmt-card.on .fmt-radio{ border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.fmt-body{ display:flex; flex-direction:column; gap: 3px; min-width: 0; }
.fmt-name{ font-weight: 800; font-size: 0.92rem; }
.fmt-default{ display:inline-block; margin-left: 6px; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.05em; color: #06150D; background: var(--accent); border-radius: 99px; padding: 2px 6px; vertical-align: 2px; }
.fmt-text{ font-size: 0.74rem; color: var(--chalk-dim); line-height: 1.4; }
.fmt-order{ display:grid; grid-template-columns: 22px auto; gap: 2px 6px; margin-top: 5px; font-size: 0.62rem; font-weight: 700; justify-content: start; }
.fo-r{ color: var(--chalk-dim); }
.fo-seq{ display:flex; gap: 2px; align-items:center; }
.fo-seq i{ font-style: normal; width: 16px; height: 14px; border-radius: 3px; background: #2a3342; color: #cfd5de; display:flex; align-items:center; justify-content:center; font-size: 0.55rem; }
.fo-seq i.first{ background: var(--accent-dim); color: #fff; }
.fo-seq b{ color: var(--chalk-dim); font-weight: 700; margin-left: 3px; }
.fmt-chips, .clock-chips{ display:flex; gap: 6px; flex-wrap: wrap; }
.fmt-chip, .clock-chip{
  flex: 1 1 0; min-width: 64px; text-align:center; cursor:pointer;
  background: var(--panel-raised); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 6px; color: var(--chalk); font: 800 0.85rem 'Inter', sans-serif;
}
.clock-chip small{ display:block; font-size: 0.58rem; color: var(--chalk-dim); font-weight: 700; margin-top: 1px; }
.fmt-chip.on, .clock-chip.on{ border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.fmt-chip:disabled, .clock-chip:disabled{ opacity: 0.5; cursor: default; }
.fmt-desc{ font-size: 0.74rem; color: var(--chalk-dim); margin: 6px 2px 0; }
.lobby-draft-info{ font-size: 0.85rem; color: var(--chalk); font-weight: 600; margin: 0 0 12px; }
.lobby-format-edit{ background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.lobby-format-edit .clock-chips{ margin-top: 8px; }
.lobby-format-edit .field-hint{ margin: 8px 0 0; }

/* ---------- Commissioner = one identity ---------- */
.commish-tag{
  display:inline-block; margin-left: 5px; font-size: 0.55rem; font-weight: 900; letter-spacing: 0.04em;
  color: #1d1300; background: var(--gold); border-radius: 4px; padding: 1px 4px; vertical-align: 2px;
}
.manager-row.me-row{ border-left: 3px solid var(--gold); padding-left: 6px; border-radius: 4px; }
.label-note{ font-weight: 400; }
/* V34.14: phones — each manager is one line (# · name · email · ✕), and
   row 1 (you) lines up with the others. */
@media (max-width: 640px){
  .setup-panel{ padding: 22px 16px; }
  #managerInputs .manager-row{
    display: grid; grid-template-columns: 14px minmax(0, 2fr) minmax(0, 3fr) 26px;
    column-gap: 6px; row-gap: 3px;
    border-left: 3px solid transparent; padding-left: 4px; border-radius: 4px;
  }
  #managerInputs .manager-row.me-row{ border-left-color: var(--gold); }
  #managerInputs .manager-row .num{ width: auto; font-size: 0.78rem; }
  #managerInputs .manager-row .text-input{ min-width: 0; padding: 9px 9px; }
  #managerInputs .manager-row button{ padding: 4px 0; }
  #managerInputs .me-tag{ grid-column: 2 / -1; margin-left: 0; }
}
.me-tag{ flex-basis: 100%; margin-left: 30px; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.04em; color: var(--gold); }

/* ---------- Commissioner picking for someone ---------- */
.btn.gold{ background: var(--gold); color: #1d1300; }
.btn.gold.small, .btn.primary.small{ padding: 6px 14px; font-size: 0.8rem; }
.admin-panel{ flex-wrap: wrap; }
.admin-hint{ font-size: 0.72rem; flex-basis: 100%; }
.turn-banner.commish{
  display:flex; align-items:center; justify-content: space-between; gap: 10px;
  border-color: var(--gold); color: var(--gold); font-weight: 700; background: rgba(255,183,77,0.1);
}
.turn-banner.warn{ border-color: var(--gold); background: rgba(255,183,77,0.12); font-weight: 700; }
.turn-banner .warn-secs{ font-size: 1.4rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.pick-confirm.commish{ background: rgba(255,183,77,0.14); border-color: var(--gold); }
.pick-confirm.commish .btn.primary{ background: var(--gold); color: #1d1300; }
.slot .auto-tag.commish{ color: var(--gold); }

/* ---------- Results with AI outlook ---------- */
.result-card{ background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.result-card .rname{ font-weight: 800; font-size: 1.02rem; margin-bottom: 4px; }
.res-pick{ display:grid; grid-template-columns: 30px 1fr; gap: 3px 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.res-pick:first-of-type{ border-top: none; }
.res-shield{ width: 28px; height: 32px; grid-row: span 3; }
.res-team{ font-weight: 800; font-size: 0.9rem; }
.res-team small{ color: var(--chalk-dim); font-weight: 600; margin-left: 6px; font-size: 0.72rem; }
.res-outlook{
  font-size: 0.8rem; line-height: 1.45; color: #c5ccd6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-outlook.open{ display: block; -webkit-line-clamp: unset; }
.res-ai{ display:inline-block; font-size: 0.56rem; font-weight: 900; letter-spacing: 0.04em; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 1px 5px; margin-right: 5px; vertical-align: 1px; }
.res-more{ justify-self: start; background: none; border: none; color: var(--accent); font: 700 0.74rem 'Inter', sans-serif; padding: 0; cursor: pointer; }

/* V34.29: position strength on the results page */
.strength-card{ background: var(--panel-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 12px 6px; margin-bottom: 12px; }
.strength-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.strength-title{ margin: 0; font-size: 1.02rem; font-weight: 800; }
.strength-sub{ color: var(--chalk-dim); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.strength-note{ margin: 3px 0 6px; color: var(--chalk-dim); font-size: 0.76rem; line-height: 1.4; }
.st-row{ padding: 9px 6px 10px; border-top: 1px solid var(--line); }
.st-row.mine{ background: var(--accent-soft); border-radius: 10px; border-top-color: transparent; }
.st-row.mine + .st-row{ border-top-color: transparent; }
.st-top{ display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; min-width: 0; }
.st-place{ font-weight: 900; font-size: 0.95rem; font-variant-numeric: tabular-nums; min-width: 30px; }
.st-name{ font-weight: 800; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-you{ color: var(--accent); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.08em; }
.pos-oval.static{ cursor: default; }
@media (max-width: 360px){
  .strength-card{ padding: 10px 8px 4px; }
  .strength-card .pos-ovals{ gap: 4px; }
  .strength-card .pos-oval b{ font-size: 0.8rem; }
}

/* ---------- Kickoff countdown (Stadium Pop) ---------- */
.sound-btn{
  width: 34px; height: 34px; border-radius: 50%; flex: none; cursor: pointer;
  background: var(--panel-raised); border: 1px solid var(--line); font-size: 0.95rem; line-height: 1;
}
.kickoff{
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  display:flex; align-items:center; justify-content:center; flex-direction: column;
  background: radial-gradient(circle at 50% 46%, rgba(55,225,126,0.30), transparent 60%), rgba(4,8,6,0.9);
  animation: koIn 0.25s ease-out;
}
.kickoff.out{ animation: koOut 0.35s ease-in forwards; }
@keyframes koIn{ from{ opacity: 0; } to{ opacity: 1; } }
@keyframes koOut{ to{ opacity: 0; } }
.ko-ring{ position: absolute; width: min(250px, 70vw); height: min(250px, 70vw); }
.ko-ring circle{ fill: none; stroke-width: 6; }
.ko-bg{ stroke: rgba(255,255,255,0.08); }
.ko-fg{ stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s linear; }
.ko-n{ position: absolute; top: calc(50% - min(158px, 45vw)); font-size: 0.95rem; font-weight: 900; color: var(--chalk-dim); letter-spacing: 0.2em; }
.ko-w{ position: relative; font-size: clamp(52px, 17vw, 96px); font-weight: 900; font-style: italic; letter-spacing: -0.02em; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,0.6); }
.ko-w.pop{ animation: koSlam 0.55s cubic-bezier(.2,1.4,.4,1) both; }
.ko-w.g{ color: var(--accent); text-shadow: 0 0 30px rgba(55,225,126,0.7); }
.ko-w.y{ color: var(--gold); }
.ko-w.go{ font-size: clamp(66px, 23vw, 128px); color: var(--accent); text-shadow: 0 0 36px rgba(55,225,126,0.9), 0 0 90px rgba(55,225,126,0.5); }
.ko-w.go.pop{ animation: koSlamGo 0.6s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes koSlam{ 0%{ transform: scale(3.2); opacity: 0; filter: blur(10px); } 55%{ transform: scale(.9); opacity: 1; filter: blur(0); } 75%{ transform: scale(1.06); } 100%{ transform: scale(1); } }
@keyframes koSlamGo{ 0%{ transform: scale(4) rotate(-8deg); opacity: 0; filter: blur(14px); } 50%{ transform: scale(.88) rotate(0); opacity: 1; filter: blur(0); } 70%{ transform: scale(1.1); } 85%{ transform: scale(.97); } 100%{ transform: scale(1); } }
.ko-conf{ position: absolute; left: 50%; top: 48%; width: 9px; height: 14px; border-radius: 2px; animation: koBurst 1.3s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes koBurst{ 0%{ transform: translate(-50%,-50%) rotate(0); opacity: 1; } 100%{ transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; } }
.ko-flash{ position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 201; }
.ko-flash.go{ animation: koFlash 0.45s ease-out; }
@keyframes koFlash{ 0%{ opacity: 0.85; } 100%{ opacity: 0; } }
@media (prefers-reduced-motion: reduce){
  .ko-w.pop, .ko-w.go.pop{ animation: none; }
  .ko-conf{ display: none; }
  .ko-flash.go{ animation: none; }
}

/* V34.12: Commissioner tools open → the tools get their own full-width row
   in the footer (they were squeezed into a narrow column on phones), and
   the "You are" badge steps aside so it doesn't cover them. */
.foot{ flex-wrap: wrap; row-gap: 8px; }
.foot .admin-panel{ flex-basis: 100%; order: 10; padding: 2px 0 4px; }
.foot .admin-panel:not(.hidden) ~ .version-tag{ margin-left: auto; }
body.admin-open .you-badge{ display: none; }
.admin-panel .admin-hint{ order: 99; }

/* ======================= V34.13: live draft room on phones ======================= */
/* Confirm bar pinned just above the footer on every screen size, so the
   "Draft this team" button is always visible once a team is selected. */
.pick-confirm{
  position: fixed; z-index: 45; left: 10px; right: 10px;
  bottom: calc(var(--foot-h, 46px) + 10px);
  max-width: 560px; margin: 0 auto;
  background: #10261a; box-shadow: 0 12px 34px rgba(0,0,0,0.6);
}
.pick-confirm.commish{ background: #2b220f; }
body.confirming .you-badge{ display: none; }
body.confirming main{ padding-bottom: 150px; }

/* Board: current round only on phones, with a toggle for the rest */
.board-toggle{ display: none; }
.board-round-of{ color: var(--chalk-dim); font-weight: 600; }
@media (max-width: 640px){
  .board{ padding: 12px; gap: 10px; }
  .board:not(.expanded) .board-round:not(.current){ display: none; }
  .board-toggle{
    display: block; width: 100%; background: var(--panel-raised); border: 1px solid var(--line);
    border-radius: 10px; color: var(--chalk-dim); font: 700 0.78rem 'Inter', sans-serif; padding: 8px; cursor: pointer;
  }
  .slot{ min-height: 50px; padding: 7px 8px; }
  .slot .team{ font-size: 0.86rem; }

  /* Compact header in the live room: no logo, one row — clock on the
     left, round/pick on the right. (Logo, league name and Log out are
     still on every other page.) */
  body.in-room .scoreboard-inner{ flex-wrap: nowrap; gap: 8px; padding: 8px 10px; }
  body.in-room .brand, body.in-room .identity-block{ display: none; }
  body.in-room .clock-block{
    flex: 1 1 auto; min-width: 0; padding: 5px 12px; text-align: left;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label time" "name time";
    align-items: center; column-gap: 10px;
  }
  body.in-room .clock-label{ grid-area: label; font-size: 0.58rem; }
  body.in-room .clock-name{ grid-area: name; margin-top: 0; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.in-room .clock-time{ grid-area: time; font-size: 1.6rem; }
  body.in-room .round-block{ flex: none; }
  body.in-room .round-value{ font-size: 1.3rem; }
  body.in-room .pick-value{ font-size: 0.7rem; }
  body.in-room main{ padding-top: 12px; }
  body.in-room .col-title{ margin: 4px 0 8px; font-size: 1rem; }

  /* The AI outlook in the "just picked" banner: 2 lines, tap for all */
  #pickBanner .pick-banner-outlook{ display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #pickBanner.open .pick-banner-outlook{ display: block; }
}

/* ---------- V34.17: season plan card + planner sheet ---------- */
.season-card{
  margin: 14px 0 4px; border: 1px solid var(--accent); background: var(--accent-soft);
  border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 8px;
}
.season-card.bad{ border-color: var(--danger); background: rgba(255,92,92,0.08); }
.season-card .sc-head{ display:flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 10px; font-weight: 800; font-size: 0.95rem; }
.season-card .sc-head small{ font-weight: 600; color: var(--chalk-dim); font-size: 0.78rem; }
.season-card ul{ margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 0.88rem; }
.season-card .sc-bad{ color: var(--danger); font-size: 0.9rem; }
.sc-cal{ display: grid; grid-template-columns: repeat(17, minmax(0, 1fr)); gap: 2px; }
.sc-cal i{ font-style: normal; text-align: center; font-size: 0.66rem; padding: 4px 0; border-radius: 4px; background: var(--panel-raised); color: var(--chalk-dim); font-weight: 700; min-width: 0; letter-spacing: -0.03em; overflow: hidden; }
@media (max-width: 520px){ .sc-cal i{ font-size: 0.56rem; padding: 4px 0 3px; } }
.sc-cal i.r{ background: rgba(55,225,126,0.28); color: var(--chalk); }
.sc-cal i.p{ background: rgba(255,183,77,0.32); color: var(--chalk); }
.sc-cal i.f{ box-shadow: inset 0 0 0 1px var(--gold); }
.sc-legend{ display:flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.74rem; color: var(--chalk-dim); }
.sc-legend span::before{ content:""; display:inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.sc-legend .lr::before{ background: rgba(55,225,126,0.5); }
.sc-legend .lp::before{ background: rgba(255,183,77,0.6); }
.season-card .btn.sc-open{ justify-self: start; margin-top: 2px; }
.format-toggle-btn.off{ opacity: 0.4; text-decoration: line-through; cursor: not-allowed; }

.planner-sheet{ position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; justify-content: flex-end; }
.planner-sheet .ps-dim{ position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.planner-sheet .ps-body{
  position: relative; background: var(--panel); border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0; height: 92vh; height: 92dvh; display: flex; flex-direction: column;
  width: 100%; max-width: 980px; margin: 0 auto; overflow: hidden;
}
.planner-sheet .ps-head{ display:flex; align-items:center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.planner-sheet .ps-head button{ background: var(--panel-raised); color: var(--chalk); border: 1px solid var(--line); border-radius: 999px; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; }
.planner-sheet iframe{ flex: 1; width: 100%; border: 0; background: var(--panel); }

/* ======================= V34.20: live draft room — Option B ======================= */
/* Team tiles: colour stripe, abbreviation disc, city, abbreviation + bye week. */
.pool-left{ font-size: 0.8rem; font-weight: 600; color: var(--chalk-dim); }
.team-btn{ border-left: 4px solid var(--line); padding: 8px 9px; min-height: 56px; gap: 9px; }
.team-btn.selected{ border-left-width: 4px; }
.team-disc{
  width: 32px; height: 32px; border-radius: 50%; flex: none; border: 2px solid;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font: 800 0.62rem 'Inter', sans-serif; letter-spacing: -0.02em; text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.team-disc.big{ width: 44px; height: 44px; font-size: 0.8rem; }
.team-btn-text{ display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.team-btn-name{ font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-btn-sub{ font-size: 0.74rem; font-weight: 600; color: var(--chalk-dim); white-space: nowrap; }
.team-bye{ color: #cfe3ff; }
.team-bye.clash{ color: var(--gold); }
.team-btn.drafted .team-btn-sub{ text-decoration: none; }
/* V34.24: team rankings on the tiles and in the pick bar */
.team-rank{ color: var(--chalk); }
.team-fit{ font-size: 0.68rem; font-weight: 800; color: var(--accent); letter-spacing: 0.02em; white-space: nowrap; }
.pick-bar-rank{ font-size: 0.74rem; color: var(--chalk-dim); margin: -3px 0 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-bar-rank b{ color: var(--chalk); font-weight: 700; }
.pick-bar-rank .rank-up{ color: var(--accent); }
.pick-bar-rank .rank-down{ color: var(--gold); }
.pick-bar-rank a, .pick-bar-rank .link-btn{ font-weight: 700; text-decoration: none; }
.pick-bar-rank .link-btn{ font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
/* Draft Helper / Draft Helper Pro switch (until Pro is sold) */
.helper-switch{ display: inline-flex; max-width: 100%; padding: 3px; gap: 2px; margin: 2px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.helper-switch button{ font: inherit; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--chalk-dim); cursor: pointer; white-space: nowrap; }
.helper-switch button.on{ background: var(--panel-raised); color: var(--chalk); }
.helper-switch button.on[data-helper-mode="pro"]{ background: var(--accent); color: #062012; }
/* The lobby card: Draft Helper / Pro before the draft */
.helper-card{ background: linear-gradient(160deg, #13261C 0%, var(--panel-raised) 65%); border: 1px solid var(--accent-dim); border-radius: 12px; padding: 14px; margin: 0 0 20px; display: grid; gap: 8px; }
.helper-card-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.helper-card-title{ margin: 0; font-size: 1rem; color: var(--accent); }
.helper-card-text{ margin: 0; font-size: 0.86rem; line-height: 1.45; color: var(--chalk); }
.helper-card .helper-switch{ margin: 4px 0 0; }
.helper-card .field-hint{ margin: 0; }
.helper-buy{ display: grid; gap: 6px; }
.helper-buy .btn{ width: fit-content; }

/* Pick bar: pinned above the footer while the draft is live. */
.pick-bar{
  position: fixed; left: 0; right: 0; bottom: var(--foot-h, 46px); z-index: 40;
  background: var(--panel); border-top: 1px solid var(--line);
  padding: 8px 12px 10px; box-shadow: 0 -10px 24px rgba(0,0,0,0.45);
}
.pick-bar > *{ max-width: 560px; margin-left: auto; margin-right: auto; }
.pick-bar-mine{ font-size: 0.76rem; color: var(--chalk-dim); margin-bottom: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-bar-mine b{ color: var(--chalk); font-weight: 700; }
.pick-bar-bye{ color: var(--chalk-dim); }
.pick-bar-btn{ display: block; width: 100%; padding: 13px; font-size: 1.02rem; font-weight: 800; border-radius: 12px; }
/* V34.22: :hover too, or a phone keeps the green hover after the tap that made the pick */
.pick-bar-btn:disabled, .pick-bar-btn:disabled:hover{ background: var(--panel-raised); color: var(--chalk-dim); border: 1px solid var(--line); cursor: default; }
.pick-bar-btn.commish:not(:disabled){ background: var(--gold); color: #1d1300; }
body.pickbar main{ padding-bottom: 112px; }
body.pickbar .you-badge{ display: none; }


/* Phones: one page that scrolls (no small scroll box for the teams).
   V34.22 order once the draft is live: the board's current round right
   under the header, then last pick, status, teams, in the room.
   Before it starts, "In the room" stays on top. */
@media (max-width: 640px){
  body.in-room .room-grid{ display: flex; flex-direction: column; gap: 12px; align-items: stretch; } /* V34.23: stretch, or a 2-manager board is narrow */
  body.in-room .board-col{ display: contents; }
  body.in-room #roomPresence{ order: 0; }
  body.in-room .board-col > .col-title{ display: none; } /* the board's own "Round 2 of 4" label heads it */
  body.in-room #board{ order: 1; }
  body.in-room #pickBanner{ order: 2; }
  body.in-room .pool-col{ order: 3; }
  body.in-room.draft-live #roomPresence{ order: 5; }
  body.in-room.my-turn #board{ order: 4; } /* V34.22: below the teams while it's your pick */
  body.in-room .pool{ max-height: none; overflow: visible; padding-right: 0; margin-top: 4px; gap: 12px; }
  body.in-room .turn-banner{ margin-bottom: 8px; }
  body.in-room .pool-head .col-title{ margin: 2px 0 0; }
  body.in-room .pool-grid{ gap: 7px; }

  /* V34.22: a compact board on phones. Four small tiles per row (pick
     number, manager, team abbreviation), short tags, and the "All rounds"
     toggle moved up beside the round label. */
  .board{ position: relative; padding: 10px 10px 10px; gap: 8px; }
  .board-round-label{ margin-bottom: 6px; font-size: 0.72rem; }
  .board-slots{ grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .slot{ min-height: 0; padding: 5px 6px 6px; min-width: 0; }
  .slot .mgr{ font-size: 0.64rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 13px; }
  .slot .pickno{ top: 5px; right: 5px; font-size: 0.58rem; }
  .slot .team{ font-size: 0.84rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .slot .team-city{ display: none; }
  .slot .auto-tag{ font-size: 0.56rem; margin-top: 0; line-height: 1.2; }
  .slot .tag-long{ display: none; }
  .slot .tag-short{ display: inline; }
  .board-toggle{
    position: absolute; top: 6px; right: 8px; width: auto;
    background: none; border: none; padding: 4px 4px; font-size: 0.72rem; color: var(--chalk-dim);
  }
}

/* V34.21 / v44.23: "Account not created" after declining the Terms of Use */
.terms-declined-note{ display:flex; gap:12px; align-items:flex-start; background: rgba(255,183,77,0.1); border: 1px solid rgba(255,183,77,0.35); border-radius: 12px; padding: 14px; margin: 4px 0 10px; }
.terms-declined-note span{ color: var(--gold); font-weight: 900; font-size: 1.2rem; line-height: 1; }
.terms-declined-note p{ margin: 0; font-size: 0.92rem; line-height: 1.5; }
.terms-declined-actions{ display:flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.terms-declined-actions .btn{ width: 100%; padding: 13px; font-size: 1rem; }

/* ---------- V34.28: Team Rankings button and overlay ---------- */
.rankings-btn{ display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); border: 1.5px solid var(--accent); color: var(--accent); padding: 9px 16px; font-size: 0.9rem; font-weight: 800; white-space: nowrap; }
.rankings-btn:hover{ background: rgba(55,225,126,0.2); }
.rankings-icon{ width: 18px; height: 18px; flex: none; }
.rankings-btn.big{ width: 100%; justify-content: flex-start; gap: 14px; padding: 14px 18px; border-radius: 14px; font-size: 1.12rem; text-align: left; }
.rankings-btn.big .rankings-icon{ width: 28px; height: 28px; padding: 6px; box-sizing: content-box; border-radius: 10px; background: var(--accent); color: #06150D; }
.rankings-btn.big small{ display: block; font-size: 0.78rem; font-weight: 600; color: var(--chalk); opacity: 0.8; margin-top: 2px; white-space: normal; }
.rankings-btn.big::after{ content: "›"; margin-left: auto; font-size: 1.6rem; line-height: 1; }
.rankings-overlay{ position: fixed; inset: 0; z-index: 48; background: rgba(4,7,11,0.72); display: flex; align-items: stretch; justify-content: center; }
.rankings-sheet{ width: 100%; max-width: 1120px; display: flex; flex-direction: column; background: var(--bg); padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
.rankings-head{ display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.rankings-title{ margin: 0; font-size: 1.05rem; font-weight: 800; flex: 1; white-space: nowrap; }
.rankings-clock{ font-size: 0.78rem; font-weight: 700; color: var(--chalk-dim); background: var(--panel-raised); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.rankings-clock b{ color: var(--chalk); font-variant-numeric: tabular-nums; margin-left: 4px; }
.rankings-clock.mine{ background: var(--accent); border-color: var(--accent); color: #06150D; }
.rankings-clock.mine b{ color: #06150D; }
.rankings-close{ padding: 8px 18px !important; font-size: 0.9rem !important; }
.rankings-body{ flex: 1; min-height: 0; }
.rankings-frame{ display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
body.rankings-open{ overflow: hidden; }
/* V34.30: a framed window only where it fits with room to spare (not on a
   phone turned sideways), and never taller than the space it's centered in,
   so its top edge and Close can't sit off the screen. */
@media (min-width: 700px) and (min-height: 560px){
  .rankings-overlay{ align-items: center; padding: 24px; }
  .rankings-sheet{ height: min(100%, 1000px); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding: 0; }
}

/* ---------- V34.28: your lineup at each position + recommended picks ---------- */
.lineup-card{ background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 14px; display: grid; gap: 10px; }
.lineup-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lineup-title{ margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--chalk-dim); }
.lineup-sub{ font-size: 0.74rem; color: var(--chalk-dim); }
.pos-ovals{ display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pos-oval{ font: inherit; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 5px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel-raised); color: var(--chalk-dim); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; cursor: pointer; min-width: 0; }
.pos-oval b{ font-size: 0.95rem; color: var(--chalk); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pos-oval.strong{ background: rgba(55,225,126,0.16); border-color: var(--accent); color: var(--accent); }
.pos-oval.ok{ background: rgba(255,183,77,0.13); border-color: var(--gold); color: var(--gold); }
.pos-oval.weak{ background: rgba(255,92,92,0.15); border-color: var(--danger); color: var(--danger); }
.pos-oval.open{ box-shadow: 0 0 0 2px var(--chalk); }
.pos-oval.locked{ cursor: default; opacity: 0.6; }
.pos-oval.locked svg{ width: 13px; height: 13px; margin-top: 2px; }
.pos-detail{ font-size: 0.8rem; line-height: 1.45; color: var(--chalk-dim); background: var(--panel-raised); border-radius: 10px; padding: 8px 10px; display: grid; gap: 3px; }
.pos-detail b{ color: var(--chalk); }
.pos-detail .link-btn, .lineup-pro-note .link-btn{ font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.lineup-pro-note{ margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--chalk-dim); }
.lineup-recs{ display: grid; gap: 6px; }
.lineup-recs:empty{ display: none; }
.lineup-recs-title{ font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.rec-row{ font: inherit; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-raised); color: var(--chalk); cursor: pointer; }
.rec-row.selected{ border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.rec-row .team-disc{ width: 30px; height: 30px; font-size: 0.6rem; flex: none; }
.rec-n{ font-size: 0.8rem; font-weight: 800; color: var(--chalk-dim); width: 10px; text-align: center; }
.rec-text{ display: flex; flex-direction: column; min-width: 0; }
.rec-name{ font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-id{ font-size: 0.74rem; font-weight: 600; color: var(--chalk-dim); }
.rec-why{ font-size: 0.74rem; color: var(--accent); font-weight: 700; }

/* V34.23: small phones / Display Zoom (about 320px): tighter team tiles so more city names fit */
@media (max-width: 345px){
  .team-btn{ padding: 7px 7px; gap: 7px; }
  .team-btn .team-disc{ width: 28px; height: 28px; font-size: 0.56rem; }
  .team-btn-name{ font-size: 0.82rem; }
}

/* ---------- V34.31: recommendations fold away; the tapped team's details on your turn ---------- */
.lineup-recs-head{ font: inherit; display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 2px 0; color: inherit; cursor: pointer; text-align: left; }
.lineup-recs-peek{ flex: 1; min-width: 0; text-align: right; font-size: 0.74rem; font-weight: 700; color: var(--chalk-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineup-recs-chev{ width: 18px; height: 18px; flex: none; color: var(--accent); transition: transform 0.15s ease; }
.lineup-recs-head[aria-expanded="false"] .lineup-recs-chev{ transform: rotate(-90deg); }
.td-card{ grid-column: 1 / -1; display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--accent); border-left: 5px solid var(--team, var(--accent)); }
.td-head{ display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.td-rank{ font-family: "Anton", "Inter", sans-serif; font-size: 1.35rem; line-height: 1; color: var(--chalk-dim); }
.td-name{ flex: 1; min-width: 0; font-size: 1.08rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-name small{ font-size: 0.74rem; font-weight: 600; color: var(--chalk-dim); margin-left: 6px; }
.td-ovr{ font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-ovr small{ font-size: 0.68rem; font-weight: 600; color: var(--chalk-dim); }
.td-grid{ display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.td-pos-head{ font-size: 0.86rem; font-weight: 800; }
.td-pos-head span{ margin-left: 6px; font-size: 0.7rem; font-weight: 700; color: var(--chalk-dim); }
.td-pos.up .td-pos-head span{ color: var(--accent); }
.td-pos.down .td-pos-head span{ color: var(--gold); }
.td-pos ul{ list-style: none; margin: 2px 0 0; padding: 0; font-size: 0.8rem; }
.td-pos li{ display: flex; justify-content: space-between; gap: 8px; }
.td-pos li span{ min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-pos li b{ font-variant-numeric: tabular-nums; }
.td-summary{ margin: 0; font-size: 0.8rem; line-height: 1.4; color: var(--chalk-dim); }
.lineup-recs .td-card{ margin-top: 2px; }
@media (max-width: 360px){
  .td-name{ white-space: normal; }
  .td-name small{ display: block; margin: 2px 0 0; }
}

/* V34.36: Fantasy Play Enhanced Stats (Set the field) */
.plof-opt{ margin-top: 18px; border: 1px solid rgba(255,210,63,0.5); border-radius: 12px; padding: 14px;
  background: linear-gradient(160deg, rgba(255,210,63,0.12), rgba(255,210,63,0.02) 60%), #10151d; }
.plof-opt-head{ display:flex; align-items:center; gap: 10px; cursor: pointer; }
.plof-opt-head b{ flex: 1; font-size: 0.98rem; }
.plof-flag{ width: 26px; height: 26px; flex: none; }
.plof-switch{ appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.plof-switch::after{ content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.plof-switch:checked{ background: var(--accent); }
.plof-switch:checked::after{ left: 23px; }
.plof-switch:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.plof-opt .field-hint{ margin-top: 8px; }
.plof-opt .field-label{ margin: 12px 0 0; }
.plof-soon{ font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; color: var(--bg); background: var(--chalk-dim); border-radius: 99px; padding: 2px 7px; margin-left: 6px; vertical-align: middle; }
.plof-seg{ display:flex; gap: 6px; margin-top: 8px; }
.plof-seg span{ flex: 1; text-align: center; font-size: 0.8rem; font-weight: 700; padding: 8px 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--chalk-dim); background: #0D1219; opacity: 0.45; }
.plof-seg span.on{ border-color: #FFD23F; color: #FFD23F; background: rgba(255,210,63,0.08); opacity: 1; }
.plof-opt .plof-name{ color: var(--chalk); }

/* ---------- V34.41: "My teams" under Your lineup; team details while you wait ---------- */
.my-teams-card{ background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; margin: 0 0 14px; }
.mine-btn{ font: inherit; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--chalk); cursor: pointer; text-align: left; }
.mine-label{ font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-dim); white-space: nowrap; }
.mine-count{ font-size: 0.72rem; font-weight: 800; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: #062012; text-align: center; }
.mine-peek{ flex: 1; min-width: 0; text-align: right; font-size: 0.78rem; font-weight: 700; color: var(--chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-chev{ width: 18px; height: 18px; flex: none; color: var(--accent); transition: transform 0.15s ease; }
.mine-btn[aria-expanded="true"] .mine-chev{ transform: rotate(180deg); }
.mine-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease; }
.mine-list.open{ max-height: 640px; opacity: 1; padding: 2px 0 10px; }
.mine-list li{ display: flex; align-items: center; gap: 9px; min-height: 36px; font-size: 0.88rem; }
.mine-list .team-disc{ width: 30px; height: 30px; font-size: 0.58rem; }
.mine-name{ flex: 1; min-width: 0; font-weight: 700; color: var(--chalk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-name small{ font-size: 0.74rem; font-weight: 600; color: var(--chalk-dim); margin-left: 4px; }
.mine-bye{ font-size: 0.76rem; font-weight: 600; color: #cfe3ff; white-space: nowrap; }
.mine-bye.clash{ color: var(--gold); }
.mine-n{ font-size: 0.7rem; font-weight: 600; color: var(--chalk-dim); white-space: nowrap; min-width: 44px; text-align: right; }
.mine-list .mine-none{ font-size: 0.8rem; color: var(--chalk-dim); min-height: 0; }
.pool-peek-hint{ margin: 0 0 4px; font-size: 0.78rem; color: var(--chalk-dim); }
.team-btn.peek.selected{ border-color: var(--chalk-dim); box-shadow: 0 0 0 1px var(--chalk-dim) inset; background: var(--panel-raised); }
/* Phones: the room's sections in one column. While you wait: board, last
   pick, status, Your lineup, My teams, In the room, then the team tiles.
   On your turn the tiles come right after My teams, with the board and
   In the room below them (as in V34.22). Either way the "Teams" row with
   the Team Rankings button is at the very bottom. The Draft Helper /
   Pro switch sits right under the "On the clock" line. */
@media (max-width: 640px){
  body.in-room .pool-col{ display: contents; }
  body.in-room .pool-col > *{ order: 3; }
  body.in-room .pool-col > .turn-banner, body.in-room .lineup-card, body.in-room .my-teams-card, body.in-room #roomStartNowBtn{ margin-top: 0; margin-bottom: 0; }
  body.in-room.draft-live #roomPresence{ order: 6; }
  body.in-room .pool-section{ display: contents; }
  body.in-room .pool-section > *{ order: 7; }
  body.in-room.my-turn .pool-section > *{ order: 4; }
  body.in-room.my-turn #board{ order: 8; }
  body.in-room.my-turn.draft-live #roomPresence{ order: 9; }
  /* Dave: the "Teams · N left" row with the Team Rankings button is the
     last thing on the page, below everything else. */
  body.in-room .pool-section > .pool-head, body.in-room.my-turn .pool-section > .pool-head{ order: 10; }
  body.in-room .pool-col > .helper-switch{ margin: 0; align-self: flex-start; }
  body.in-room .pool-section > .pool-peek-hint{ margin: 0; }
  body.in-room .pool-section > .pool{ margin-top: 0; }
}
