/* Teamazo · Couche d’origine (Codex), 3/3 : base sans Tailwind, mise en page, téléphone, Salon Live, Grand écran. */

/* Base indépendante de Tailwind. */
*,
::before,
::after {
  box-sizing: border-box;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: inherit;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
button {
  border-style: solid;
}
a {
  color: inherit;
}
img,
svg {
  vertical-align: middle;
}
summary {
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}
textarea {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}
dialog {
  color: var(--white);
}
.app {
  max-width: 1500px;
  padding-top: 20px;
}
.app-header {
  height: 68px;
  padding: 0 28px;
}
.intro {
  margin-bottom: 14px;
  padding-bottom: 0;
  border: 0;
}
.intro h1 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}
.main-view-tabs {
  margin: 0 0 18px;
  padding: 3px;
  background: transparent;
  width: max-content;
  border: 1px solid var(--line);
}
.main-view-tabs button {
  padding: 8px 17px;
}

.main-view-tabs .icon {
  width: 16px;
  height: 16px;
}
.workspace {
  grid-template-columns: 275px minmax(0, 1fr);
  gap: 16px;
}
.field-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.locker-panel {
  grid-column: 1;
  grid-row: 1;
}
.teams-panel {
  grid-column: 1;
  grid-row: 2;
}
.panel-heading {
  padding: 14px;
}
.panel-heading h2 {
  font-size: 15px;
}
.balance-area > p,
.share-note,
.teams-panel > .panel-heading {
  display: none;
}
.locker-dock {
  padding: 7px 12px;
  gap: 4px;
}
.locker-dock button {
  font-size: 10px;
  padding: 5px;
}
.list-heading {
  padding: 9px 13px;
  font-size: 11px;
}
.players-list {
  max-height: 470px;
}
.player-row.grouped-row {
  padding: 7px 10px;
  min-height: 0;
}
.player-row-top {
  gap: 5px;
}
.player-row input[type='checkbox'] {
  width: 15px;
  height: 15px;
}
.player-info {
  min-width: 0;
}
.player-name {
  font-size: 12px;
}
.player-position {
  font-size: 10px;
}
.player-info button.player-name {
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  color: var(--white);
  max-width: 100%;
  cursor: pointer;
}
.rating-edit {
  font-size: 12px;
  width: 34px !important;
}
.locker-grip {
  min-width: 18px;
}
.assignment-pills {
  display: flex;
  margin-top: 6px;
}
.assign-pill {
  font-size: 10px;
  padding: 4px;
  flex: 1;
}
.locker-group-header {
  padding: 7px 11px;
  font-size: 11px;
}
.compo-bar {
  padding: 10px 12px;
  margin-bottom: 12px;
}
.compo-bar-top {
  gap: 8px;
}
.compo-bar-top .section-label {
  font-size: 10px;
  letter-spacing: 0.6px;
}
.compo-tabs {
  margin-top: 7px;
  flex-wrap: nowrap;
  overflow: auto;
  max-width: 100%;
  padding-bottom: 2px;
}
.compo-tab {
  flex-shrink: 0;
}
.compo-tab > button {
  font-size: 11px;
  padding: 7px 8px;
}
.compo-tab:not(.active) .compo-edit {
  display: none;
}
.compo-tools button {
  font-size: 10px;
  padding: 6px 8px;
}
.compo-tools .icon {
  width: 12px;
  height: 12px;
}
.match-options {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.match-options > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  font-size: 12px;
}
.match-options > summary > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.match-options .format-bar {
  padding: 10px 12px 0;
  margin: 0;
  flex-wrap: wrap;
}
.match-options .format-label {
  display: none;
}
.match-options .format {
  padding: 8px 10px;
  font-size: 12px;
}
.match-options .format-options {
  max-width: 100%;
}
.match-options .formation-controls {
  padding: 12px;
  margin: 0;
  border-top: 0;
}
.match-options .formation-label {
  font-size: 10px;
}
.field-toolbar {
  margin-bottom: 10px;
  align-items: center;
}
.field-toolbar .section-label {
  font-size: 11px;
}
.field-toolbar #balance {
  width: auto;
  font-size: 12px;
  padding: 9px 13px;
}
.match-header {
  padding: 14px 17px;
}
.board-wrap {
  padding: 12px 17px 15px;
}
.match-capture {
  border-radius: 9px;
}
.secondary-tools {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.secondary-tools > summary {
  padding: 11px 13px;
  font-size: 12px;
  color: var(--muted);
}
.secondary-tools[open] > summary {
  color: var(--white);
  border-bottom: 1px solid var(--line);
}
.secondary-tools .field-actions,
.secondary-tools .share-actions {
  margin: 12px;
}
.field-actions .primary-btn {
  font-size: 12px;
}
.team-details > summary {
  padding: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}
.team-details > summary small {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
.team-details .team-block {
  padding: 12px;
}
.team-details .fairness {
  margin: 0 12px 12px;
}
.teams-mobile-balance {
  display: none;
}
.bottom-note {
  margin-top: 22px;
  padding-top: 14px;
  gap: 14px;
  flex-wrap: wrap;
}
.bottom-note > span {
  font-size: 11px;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a,
.footer-links button {
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: none;
}
.footer-links button:hover,
.footer-links a:hover {
  color: var(--white);
}
.online-room-info {
  padding: 14px;
}
.online-room-info h3 {
  font-size: 19px;
}
.online-members {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}
.live-person {
  display: flex;
  gap: 9px;
  align-items: center;
  background: var(--raised);
  border-radius: 7px;
  padding: 10px;
  min-width: 0;
}
.live-avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.live-person > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}
.live-person strong {
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-person small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.presence-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}
.privacy-content {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.privacy-content h3 {
  font-size: 14px;
  color: var(--white);
  margin: 18px 0 6px;
}
.privacy-content a {
  color: var(--lime);
}
.privacy-content ul {
  padding-left: 18px;
}
.privacy-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.privacy-actions button {
  font-size: 12px;
}
.mobile-tabs {
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.compact-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 16px;
}
.compact-heading small {
  font-size: 11px;
  color: var(--muted);
}
@media (max-width: 1100px) and (min-width: 761px) {
  .workspace {
    grid-template-columns: 240px minmax(0, 1fr);
  }
  .app {
    padding: 20px;
  }
  .header-end #save-status {
    display: none;
  }
  .app-header {
    padding: 0 20px;
  }
  .player-name {
    font-size: 11px;
  }
}
@media (max-width: 760px) {
  .app-header {
    height: auto;
    min-height: 64px;
    padding: 11px 15px;
    gap: 10px;
  }
  .header-end {
    gap: 6px;
  }
  .header-end #save-status {
    display: none;
  }
  .brand-word {
    font-size: 25px;
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .theme-picker select {
    width: 105px;
    font-size: 10px;
    padding: 7px;
  }
  .theme-picker > .theme-icon {
    display: none;
  }
  .mode-launcher {
    font-size: 10px;
    padding: 7px;
  }
  .mode-launcher .icon {
    width: 12px;
  }
  .app {
    padding: 16px 12px 96px;
  }
  .intro {
    gap: 10px;
    margin-bottom: 12px;
  }
  .intro h1 {
    font-size: 15px;
  }
  .intro #main-export {
    font-size: 11px;
    padding: 8px 10px;
  }
  .main-view-tabs {
    width: 100%;
    margin-bottom: 14px;
  }
  .main-view-tabs button {
    padding: 9px;
    justify-content: center;
  }
  .main-view-tabs button strong {
    font-size: 12px;
  }
  .workspace {
    display: block;
  }
  .field-panel,
  .teams-panel,
  .locker-panel {
    grid-column: auto;
    grid-row: auto;
  }
  .compo-tools {
    gap: 5px;
  }
  .compo-bar {
    padding: 9px;
  }
  .compo-bar-top .section-label {
    display: none;
  }
  .compo-tools {
    margin: 0;
    width: 100%;
    justify-content: space-between;
  }
  .compo-tools button {
    font-size: 11px;
  }
  .match-options > summary {
    font-size: 11px;
  }
  .match-options > summary > span {
    font-size: 10px;
  }
  .match-options .format {
    font-size: 11px;
  }
  .match-options .formation-controls {
    flex-wrap: wrap;
  }
  .field-toolbar {
    gap: 8px;
  }
  .field-toolbar #balance {
    font-size: 12px;
    padding: 9px 11px;
  }
  .board-wrap {
    padding: 10px 12px 13px;
  }
  .match-header {
    padding: 11px;
  }
  .match-side strong {
    font-size: 12px;
  }
  .match-side small {
    font-size: 10px;
  }
  .players-list {
    max-height: none;
  }
  .player-row.grouped-row {
    padding: 9px 12px;
  }
  .player-name {
    font-size: 14px;
  }
  .player-position {
    font-size: 11px;
  }
  .rating-edit {
    font-size: 13px;
  }
  .locker-dock button {
    font-size: 12px;
    padding: 7px;
  }
  .locker-group-header {
    font-size: 12px;
    padding: 10px 12px;
  }
  .assign-pill {
    font-size: 12px;
    padding: 6px;
  }
  .teams-mobile-balance {
    display: flex;
    margin: 12px;
    width: calc(100% - 24px);
  }
  .team-details > summary {
    font-size: 14px;
  }
  .secondary-tools .field-actions {
    flex-wrap: wrap;
  }
  .secondary-tools .field-actions > button {
    flex: 1;
  }
  .secondary-tools .share-actions {
    flex-wrap: wrap;
  }
  .bottom-note {
    gap: 12px;
  }
  .footer-links {
    gap: 12px;
  }
  .online-dialog {
    padding: 17px;
  }
  .online-dialog .dialog-heading h2 {
    font-size: 20px;
  }
  .online-entry-grid {
    gap: 10px;
  }
  .online-choice {
    padding: 13px;
  }
  .online-choice p {
    display: none;
  }
  .online-mode-summary {
    font-size: 11px;
  }
  .online-members {
    grid-template-columns: 1fr;
  }
  .online-actions {
    gap: 8px;
  }
  .online-actions button {
    padding: 10px;
  }
  .online-dialog #online-share-link {
    min-height: 68px;
  }
  .host-controls small {
    font-size: 10px;
  }
  .privacy-actions button {
    white-space: normal;
    flex: 1;
  }
}
.sidebar {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.field-panel {
  grid-row: 1;
}

.intro > #main-export {
  display: inline-flex;
}
.player-name {
  font-size: 13px;
}
@media (min-width: 761px) {
  .compo-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .compo-bar-top {
    order: 2;
    margin-left: auto;
  }
  .compo-bar-top .section-label {
    display: none;
  }
  .compo-tabs {
    margin-top: 0;
    flex: 1;
  }
  .pitch {
    aspect-ratio: 1.7;
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: contents;
  }
  .workspace [data-view] {
    display: none;
  }
  .workspace [data-view].mobile-active {
    display: block;
  }
  .intro > #main-export {
    display: inline-flex !important;
    font-size: 10px;
    white-space: normal;
    max-width: 130px;
  }
  .intro h1 {
    font-size: 13px;
    max-width: 190px;
  }
  .player-name {
    font-size: 14px;
  }
}
button.icon-btn[data-close]:empty::before {
  content: '×';
  font-size: 20px;
}
button[data-close]:not(:has(svg)) i {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Navigation, affectations et terrain agrandi. */
@media (max-width: 760px) {
  .app-header .brand {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
  }
  .app-header .brand > div {
    min-width: 0;
  }
  .app-header .brand-word {
    max-width: calc(100vw - 80px);
  }
  .app-header .header-end {
    flex: 0 0 100%;
  }
}
.app {
  max-width: 1860px;
}
.workspace {
  grid-template-columns: 248px minmax(0, 1fr) 258px;
  gap: 16px;
  align-items: start;
}
.locker-panel {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.field-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}
.teams-panel {
  grid-column: 3;
  grid-row: 1;
  display: block;
  min-width: 0;
}
.player-info .player-name {
  cursor: default;
}
.assignment-pills {
  display: flex;
  margin-top: 7px;
  gap: 4px;
}
.player-row.grouped-row {
  padding: 9px 10px;
}
.assign-pill {
  min-height: 29px;
  font-size: 11px;
  padding: 5px 4px;
}
.players-list {
  max-height: clamp(280px, calc(100dvh - 370px), 670px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.teams-mobile-balance {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 14px 12px 8px;
  width: calc(100% - 24px);
  font-size: 13px;
  padding: 13px 7px;
}
.teams-panel .balance-area {
  display: none;
}
.team-details {
  display: block;
}
.team-details .fairness {
  margin: 0 12px 12px;
}
.teams-scroll {
  max-height: clamp(240px, calc(100dvh - 405px), 610px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.team-details .team-block {
  padding: 12px;
}
.team-details .team-block + .team-block {
  border-left: 0;
  border-top: 1px solid var(--line);
}
.team-details .team-title {
  gap: 6px;
}
.team-details .team-title .team-edit-btn {
  font-size: 13px;
  min-width: 0;
  flex: 1;
  text-align: left;
}
.team-details .team-title .team-edit-btn span {
  white-space: normal;
  overflow-wrap: anywhere;
}
.team-details .average {
  font-size: 24px;
  white-space: nowrap;
}
.team-row {
  padding: 7px 0;
}
.team-row .icon-btn {
  min-width: 26px;
  min-height: 29px;
}
.teams-panel .team-block {
  grid-column: auto;
  grid-row: auto;
}
.team-details > summary {
  justify-content: flex-start;
  gap: 8px;
}
.team-details > summary small {
  margin-left: auto;
}
.field-toolbar {
  flex-wrap: wrap;
  gap: 8px;
}
.field-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-left: auto;
}
.field-toolbar #balance {
  padding: 10px 13px;
}
.field-toolbar .outline-btn {
  font-size: 12px;
  padding: 10px 12px;
  gap: 7px;
}
.field-toolbar .icon {
  width: 16px;
  height: 16px;
}
.field-expanded #grand-field {
  color: var(--lime);
  border-color: var(--lime);
  background: var(--soft);
}
summary {
  display: flex;
  align-items: center;
  gap: 9px;
  transition:
    background 0.16s,
    color 0.16s;
  user-select: none;
}
summary:hover {
  background: var(--soft);
  color: var(--white);
}
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: -3px;
}
.summary-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex: 0 0 18px;
  color: var(--muted);
  transition: transform 0.2s;
  stroke: currentColor;
}
.match-options > summary > span {
  margin-left: auto;
}
.match-options > summary .summary-chevron,
.team-details > summary .summary-chevron {
  margin-left: 3px;
}
details[open] > summary > .summary-chevron {
  transform: rotate(180deg);
  color: var(--lime);
}
.players-list,
.teams-scroll,
.compo-tabs,
.comparison-cards,
.format-options {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--soft);
}
.players-list::-webkit-scrollbar,
.teams-scroll::-webkit-scrollbar,
.compo-tabs::-webkit-scrollbar,
.comparison-cards::-webkit-scrollbar,
.format-options::-webkit-scrollbar {
  width: 10px;
  height: 9px;
}
.players-list::-webkit-scrollbar-track,
.teams-scroll::-webkit-scrollbar-track,
.compo-tabs::-webkit-scrollbar-track,
.comparison-cards::-webkit-scrollbar-track,
.format-options::-webkit-scrollbar-track {
  background: var(--soft);
  border-radius: 8px;
}
.players-list::-webkit-scrollbar-thumb,
.teams-scroll::-webkit-scrollbar-thumb,
.compo-tabs::-webkit-scrollbar-thumb,
.comparison-cards::-webkit-scrollbar-thumb,
.format-options::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 8px;
  border: 2px solid var(--soft);
}
.compo-tabs {
  padding-bottom: 6px;
}
.format-options {
  scrollbar-width: thin !important;
  padding-bottom: 7px !important;
}
#online-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--lime) 60%, var(--line));
  background: var(--soft);
  color: var(--white);
  padding: 10px 13px;
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--lime) 5%, transparent);
  font-size: 12px;
  font-weight: 700;
  min-height: 40px;
}
#online-launcher:hover {
  border-color: var(--lime);
  background: var(--raised);
}
#online-launcher .icon {
  width: 17px;
  height: 17px;
  color: var(--lime);
}
.live-signal {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow:
    0 0 0 4px #4ade8014,
    0 0 12px #4ade8077;
  flex-shrink: 0;
}
/* Salon ouvert : rôle et connectés dans le bouton de l’en-tête (le bandeau du salon a été retiré le
   9 octobre 2026 ; le reste est dans la fenêtre Salon Live). */
#online-launcher .launcher-role,
#online-launcher .launcher-count {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--raised);
  color: var(--muted);
  font: 800 italic 11px/1 var(--display);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
#online-launcher[data-role='host'] .launcher-role {
  background: var(--lime);
  color: var(--accent-ink, #15200e);
}
#online-launcher.offline .live-signal {
  background: #f59e0b;
  box-shadow: 0 0 0 4px #f59e0b1f;
}
.online-room-info .activity-latest {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 420px) {
  #online-launcher .launcher-count {
    display: none;
  }
}
.live-welcome {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--lime) 33%, var(--line));
  border-radius: 9px;
  padding: 13px 16px;
  margin-bottom: 15px;
}
.live-welcome-copy {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.live-welcome-copy strong {
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
  color: var(--lime);
}

.live-welcome-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.live-welcome-actions button {
  font-size: 12px;
  padding: 9px 12px;
}
.live-welcome[hidden] {
  display: none;
}
.live-resume-message {
  display: block;
  color: var(--gold);
  font-size: 11px;
}
#online-leave,
#online-cancel-resume {
  white-space: normal;
}
.field-expanded .app {
  max-width: none;
  padding-top: 12px;
}
.field-expanded .intro,
.field-expanded .main-view-tabs {
  display: none;
}
.field-expanded .workspace {
  display: block;
}
.field-expanded .workspace > .locker-panel,
.field-expanded .workspace > .teams-panel {
  display: none;
}
.field-expanded .field-panel {
  display: block !important;
}
.field-expanded .field-toolbar {
  position: sticky;
  top: 8px;
  z-index: 25;
  padding: 9px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 4px 20px #0002;
}
.field-expanded .pitch {
  height: clamp(340px, calc(100dvh - 380px), 1050px);
  aspect-ratio: auto;
}
.field-expanded .compo-bar {
  margin-bottom: 8px;
}
.field-expanded .match-options {
  margin-bottom: 8px;
}
.field-expanded .match-header {
  padding: 11px 16px;
}
.field-expanded .board-wrap {
  padding: 12px 18px 15px;
}
.field-expanded .bottom-note {
  margin-top: 14px;
}
.field-expanded .mobile-tabs {
  display: none;
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: 280px minmax(0, 1fr) 280px;
    gap: 20px;
  }
}
@media (min-width: 761px) and (max-width: 1200px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr) 222px;
    gap: 12px;
  }
  .app {
    padding-left: 16px;
    padding-right: 16px;
  }
  .teams-panel {
    display: block;
    grid-column: 3;
    grid-row: 1;
  }
  .player-row.grouped-row {
    padding: 8px 7px;
  }
  .player-row-top {
    gap: 3px;
  }
  .player-name {
    font-size: 12px;
  }
  .player-position {
    font-size: 9px;
  }
  .assign-pill {
    font-size: 10px;
    padding: 4px 2px;
  }
  .team-details .team-block {
    padding: 10px;
  }
  .team-row .role {
    width: 20px;
  }
  .team-row {
    font-size: 12px;
    gap: 4px;
  }
  .team-row .icon-btn {
    min-width: 23px;
  }
  .field-toolbar .section-label {
    font-size: 10px;
  }
  .field-toolbar-actions {
    gap: 5px;
  }
  .field-toolbar #balance,
  .field-toolbar .outline-btn {
    font-size: 11px;
    padding: 9px;
  }
  .live-welcome-copy {
    align-items: flex-start;
  }

  .header-end #save-status {
    display: none;
  }
}
@media (max-width: 760px) {
  .app-header {
    flex-wrap: wrap;
    padding: 11px 12px;
    gap: 10px;
  }
  .brand {
    flex: 1;
  }

  .header-end {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .theme-picker select {
    width: 106px;
    min-height: 39px;
  }
  .header-end .theme-picker {
    flex-shrink: 0;
  }
  #online-launcher {
    font-size: 10px;
    padding: 9px 10px;
    min-height: 39px;
    flex: 1;
    justify-content: center;
    gap: 6px;
  }
  #online-launcher .icon {
    width: 15px;
    height: 15px;
  }
  #online-launcher .live-signal {
    width: 6px;
    height: 6px;
  }
  .workspace {
    display: block;
  }
  .workspace > [data-view] {
    display: none;
  }
  .workspace > [data-view].mobile-active {
    display: block;
  }
  .locker-panel,
  .field-panel,
  .teams-panel {
    grid-column: auto;
    grid-row: auto;
  }
  .players-list {
    max-height: clamp(260px, calc(100dvh - 385px), 650px);
  }
  .teams-scroll {
    max-height: clamp(270px, calc(100dvh - 350px), 680px);
  }
  .player-row.grouped-row {
    padding: 10px 12px;
  }
  .assign-pill {
    min-height: 33px;
    font-size: 12px;
  }
  .assignment-pills {
    margin-top: 8px;
  }
  .teams-mobile-balance {
    font-size: 14px;
    padding: 14px 10px;
  }
  .team-details .team-block {
    padding: 14px;
  }
  .team-row {
    font-size: 14px;
    padding: 8px 0;
  }
  .team-details .team-title .team-edit-btn {
    font-size: 15px;
  }
  .live-welcome {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .live-welcome-copy {
    flex-wrap: wrap;
    gap: 7px;
  }

  .live-welcome-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .live-welcome-actions button {
    flex: 1;
    font-size: 11px;
    padding: 10px 8px;
  }
  .field-toolbar {
    gap: 8px;
  }
  .field-toolbar .section-label {
    font-size: 10px;
  }
  .field-toolbar-actions {
    gap: 5px;
  }
  .field-toolbar #balance,
  .field-toolbar .outline-btn {
    padding: 9px 10px;
    font-size: 11px;
  }
  .field-expanded .app {
    padding-bottom: 20px;
  }
  .field-expanded .field-toolbar {
    top: 4px;
    padding: 8px;
  }
  .field-expanded .field-toolbar .section-label {
    display: none;
  }
  .field-expanded .field-toolbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .field-expanded .pitch {
    height: clamp(410px, calc(100dvh - 365px), 850px);
  }
  .field-expanded .board-wrap {
    padding: 10px 12px 13px;
  }
  .field-expanded .field-panel.mobile-active {
    display: block;
  }
  .summary-chevron {
    width: 19px;
    height: 19px;
  }
}

.season-view {
  min-width: 0;
}
.season-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.season-heading h2 {
  font: 700 30px var(--display);
  color: var(--white);
}
.season-muted {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.season-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.season-actions button {
  font-size: 12px;
  padding: 10px 13px;
}
.season-full {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
}
.season-spaced {
  margin-top: 20px !important;
}
.season-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.season-form-row > * {
  min-width: 0;
}
.season-form-row select,
.season-form-row input {
  width: 100%;
}
.season-dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 26px;
}
.season-dialog-grid h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.season-checklist {
  max-height: 250px;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--soft);
}
.season-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: var(--raised);
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
}
.season-checklist span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.season-checklist small {
  color: var(--gold);
  font-size: 10px;
}
.season-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 14px 0;
  background: var(--panel);
}
.season-details summary {
  padding: 11px;
  font-size: 12px;
}
.season-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}
.season-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 13px;
  background: var(--panel);
  min-width: 0;
}
.season-card h3,
.season-card strong {
  font-size: 14px;
  color: var(--white);
}
.season-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 5px 0;
}
.season-card .season-actions {
  margin-top: 9px;
}
.season-card button {
  font-size: 11px;
  padding: 8px 10px;
}
.season-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0;
}
.season-empty {
  padding: 40px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  background: var(--panel);
}
.season-empty strong {
  font: 700 27px var(--display);
  display: block;
  margin-bottom: 8px;
}
.season-empty p {
  color: var(--muted);
  font-size: 13px;
}
.season-empty button {
  margin-top: 18px;
}
.season-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
  margin-bottom: 14px;
}
.season-badge {
  color: var(--lime);
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
}
.tournament-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.tournament-team-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--team-accent);
  border-radius: 9px;
  padding: 13px;
  min-width: 0;
}
.tournament-team-card .team-config {
  display: flex;
  gap: 7px;
  align-items: center;
}
.team-config input {
  min-width: 0;
  flex: 1;
  padding: 7px;
  font-weight: 600;
  font-size: 13px;
}
.team-config select {
  width: 75px;
  padding: 7px 4px;
  font-size: 10px;
}
.tournament-team-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0;
}
.tournament-team-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tournament-team-card li {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
  gap: 10px;
}
.tournament-team-card li b {
  font-size: 11px;
  color: var(--gold);
}
.tournament-team-card .season-muted {
  font-size: 10px;
}
.tournament-roster-edit {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 7px;
  max-height: 340px;
  overflow: auto;
}
.tournament-roster-edit label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  min-width: 0;
}
.tournament-roster-edit label span {
  flex: 1;
  min-width: 0;
}
.tournament-roster-edit select {
  max-width: 130px;
  padding: 6px;
  font-size: 11px;
}
.season-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  margin-bottom: 18px;
}
.season-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
.season-table th {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}
.season-table td {
  text-align: right;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.season-table th:nth-child(2),
.season-table td:nth-child(2) {
  text-align: left;
}
.season-table .leader {
  background: var(--soft);
  color: var(--lime);
}
.season-table .name-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
}
.tournament-fixtures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.fixture-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  min-width: 0;
}
.fixture-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 12px;
}
.fixture-side {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0;
  font-size: 12px;
  min-width: 0;
}
.fixture-side span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.fixture-side input {
  width: 52px;
  padding: 7px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
}
.fixture-card .season-actions {
  margin-top: 12px;
}
.fixture-card .season-actions button {
  font-size: 10px;
  padding: 8px;
}
.fixture-card select {
  font-size: 11px;
  width: 100%;
  padding: 8px;
  margin-top: 9px;
}
.fixture-card.played {
  border-color: color-mix(in srgb, var(--lime) 40%, var(--line));
}
.cup-bracket {
  display: flex;
  gap: 16px;
  overflow: auto;
  padding: 3px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--soft);
}
.cup-round {
  flex: 0 0 285px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cup-round h3 {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 2px;
}
.cup-round .fixture-card {
  margin: auto 0;
}
.tournament-winner {
  padding: 22px;
  margin-bottom: 16px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--soft);
  text-align: center;
}
.tournament-winner strong {
  display: block;
  font: 700 32px var(--display);
  color: var(--gold);
}
.tournament-winner small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.team-analysis {
  margin: 0 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.team-analysis > summary {
  padding: 10px;
  font-size: 11px;
}
.analysis-content {
  padding: 0 10px 11px;
}
.analysis-roles {
  display: grid;
  grid-template-columns: 1fr repeat(2, 42px);
  font-size: 10px;
  gap: 6px;
  margin-top: 8px;
}
.analysis-roles strong {
  text-align: center;
  color: var(--white);
}
.analysis-roles span {
  color: var(--muted);
}
.analysis-warning {
  font-size: 10px;
  line-height: 1.5;
  color: var(--gold);
  margin-top: 9px;
}
.analysis-summary {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0;
}
.balance-preference {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.balance-preference select {
  font-size: 10px;
  padding: 5px;
  min-width: 0;
  flex: 1;
}
.activity-latest {
  display: block;
  font-size: 10px !important;
  color: var(--muted);
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}
.activity-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.activity-card .activity-author {
  font-size: 11px;
  color: var(--lime);
}
.activity-card time {
  font-size: 10px;
  color: var(--muted);
}
.activity-card.undone {
  opacity: 0.6;
}
.activity-card button {
  flex-shrink: 0;
}
.intro-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.intro-actions button {
  font-size: 11px;
  padding: 9px 11px;
}
.main-view-tabs {
  max-width: 100%;
  overflow: auto;
}
.share-studio-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 25px;
}
.share-preview {
  background: var(--raised);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 9px;
  max-height: 70dvh;
  overflow: auto;
  text-align: center;
}
.share-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 430px;
  margin: auto;
}
.share-preview .season-muted {
  margin-top: 10px;
}
.share-studio-grid .form-field:first-child {
  margin-top: 0;
}
.season-archive-score {
  font: 700 24px var(--display);
  color: var(--gold);
}
.service-status {
  font-size: 11px;
}
.service-status b {
  color: var(--lime);
}
.season-dialog-grid #plan-list,
.season-dialog-grid #archive-list,
#activity-list {
  max-height: 430px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) var(--soft);
}
@media (max-width: 760px) {
  .season-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }
  .season-heading h2 {
    font-size: 26px;
  }
  .season-dialog-grid,
  .share-studio-grid {
    grid-template-columns: 1fr;
  }
  .season-actions {
    width: 100%;
  }
  .season-heading .season-actions button {
    flex: 1;
  }
  .season-checklist {
    grid-template-columns: 1fr 1fr;
  }
  .season-form-row {
    gap: 8px;
  }
  .season-form-row input,
  .season-form-row select {
    font-size: 13px;
  }
  .season-dialog-grid {
    gap: 22px;
  }
  .tournament-fixtures {
    grid-template-columns: 1fr;
  }
  .tournament-team-grid {
    grid-template-columns: 1fr;
  }
  .tournament-roster-edit {
    grid-template-columns: 1fr;
  }
  .cup-round {
    flex-basis: 260px;
  }
  .season-table td,
  .season-table th {
    padding: 10px 8px;
  }
  .intro-actions {
    gap: 5px;
  }
  .intro-actions button {
    font-size: 10px;
    padding: 8px;
  }
  .intro > #main-export {
    display: none !important;
  }
  .main-view-tabs button {
    flex: 1;
    white-space: nowrap;
    padding: 9px 7px;
  }
  .main-view-tabs button strong {
    font-size: 11px;
  }
  .main-view-tabs .icon {
    width: 14px;
    height: 14px;
  }
  .share-preview {
    max-height: 470px;
  }
  .activity-card {
    flex-wrap: wrap;
  }
  .activity-card button {
    font-size: 10px;
  }
  .mobile-tabs button {
    font-size: 9px;
  }
  .mobile-tabs button .icon {
    width: 19px;
    height: 19px;
  }
  .season-table {
    font-size: 11px;
  }
}
.intro-actions {
  min-width: 0;
}
@media (max-width: 760px) {
  .intro {
    flex-wrap: wrap;
  }
  .intro h1 {
    flex: 1 1 100%;
    max-width: none;
  }
  .intro-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .intro-actions button {
    flex: 1;
    min-width: 0;
    padding: 8px;
    font-size: 11px;
  }
}
.tournament-winner strong,
.season-card strong,
.season-archive-score {
  overflow-wrap: anywhere;
}
.season-archive-score {
  display: block;
}
.season-archive-result {
  display: block;
  margin-top: 2px;
  color: var(--lime);
  font: 800 italic 14px/1.2 var(--display);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
