/* Pass D — base */

:root {
  /* Responsive foundation: shared values for the future container-based system. */
  --layout-max: 1180px;
  --page-inline: 1rem;
  --bottom-nav-space: 84px;
  --touch-target: 44px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --radius-control: 10px;
  --radius-card: 18px;
  --radius-panel: 22px;
  --radius-glass: 32px;
  --ink: #11291d;
  --muted: #65766b;
  --line: #d1d8ca;
  --paper: #e1e3d7;
  --card: #ece9df;
  --green: #08713d;
  --deep: #064d2a;
  --soft: #dff5e7;
  --red: #af3933;
  --redsoft: #ffe8e6;
  --amber: #986000;
  --ambersoft: #fff1d8;
  --blue: #1d629f;
  --bluesoft: #e6f1fc;
  --event-match-surface: #1e4640;
  --event-match-surface-deep: #183b35;
  --event-match-ink: #f1f5f2;
  --event-match-muted: #b8c9c1;
  --event-training-surface: #2D7E92;
  --event-training-ink: #E8F3F1;
  --event-training-muted: #BED9D8;
  --event-disabled: #657175;
  --event-content-primary: #f1f5f2;
  --event-content-secondary: #bed9d8;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #e2e3d7 0%, #d4dfd1 48%, #e9e5d9 100%);
  background-attachment: fixed;
  color: var(--ink);
  padding-bottom: var(--bottom-nav-space);
}

@media (max-width: 699px) {
  body > header {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 43 / 14;
  }

  body > header,
  body > main {
    transition: transform .18s cubic-bezier(.22, .72, .22, 1);
  }

  body.is-pull-refreshing > header,
  body.is-pull-refreshing > main {
    transition: none;
    transform: translate3d(0, var(--pull-refresh-distance, 0px), 0);
  }

  body.is-pull-refreshing::before {
    content: "Tire pour actualiser";
    position: fixed;
    top: max(.6rem, env(safe-area-inset-top, 0px));
    left: 50%;
    z-index: 2000;
    padding: .35rem .7rem;
    border: 1px solid #b9d8c7;
    border-radius: 999px;
    background: #ffffffed;
    color: var(--deep);
    font-size: .68rem;
    font-weight: 800;
    pointer-events: none;
    transform: translate(-50%, var(--pull-refresh-distance, 0px));
  }

  body.is-pull-refreshing.is-pull-refresh-ready::before {
    content: "Relâche pour actualiser";
    background: var(--deep);
    color: #fff;
  }

  body.is-pull-refresh-returning > header,
  body.is-pull-refresh-returning > main {
    transform: translate3d(0, 0, 0);
  }
}

.shell {
  width: min(100%, var(--layout-max));
  margin: auto;
}

button,
      input,
      select,
      textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* Retour tactile discret : confirmer l'appui sans déplacer les cartes. */
button.primary,
button.secondary,
button.text,
.answer-actions button,
.coach-nav button,
.bottom button,
.player-details-toggle,
.coach-card-menu-trigger,
.player-options-toggle,
.action-sheet-content button {
  transition: transform .14s ease, background-color .14s ease, border-color .14s ease, color .14s ease;
  -webkit-tap-highlight-color: transparent;
}

button.primary:active,
button.secondary:active,
button.text:active,
.answer-actions button:active,
.coach-nav button:active,
.bottom button:active,
.player-details-toggle:active,
.coach-card-menu-trigger:active,
.player-options-toggle:active,
.action-sheet-content button:active {
  transform: scale(.97);
}

.bar {
  padding: 0.58rem 1rem;
  background: #15271d;
  color: #e6f7ea;
  text-align: center;
  font-size: 0.78rem;
}

.bar b {
  color: #aaf5c1;
}

header {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  background: url("../assets/images/header-banner.webp") center / cover no-repeat;
  color: #fff;
  padding: .65rem 1rem;
}

header:after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  border: 1px solid #ffffff28;
  border-radius: 50%;
  right: -20rem;
  top: -25rem;
  box-shadow: 0 0 0 35px #ffffff0b,
          0 0 0 72px #ffffff09;
}

.top,
      .hero {
  position: relative;
  z-index: 1;
}

.top {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  align-items: center;
}

.club {
  margin: 0;
  color: #c3eecf;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.account {
  border: 1px solid #ffffff45;
  border-radius: 99px;
  padding: 0.45rem 0.7rem;
  background: #04351f55;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.hero {
  margin-top: 1.55rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.hero p {
  margin: 0.65rem 0 0;
  color: #d7f3df;
  font-size: 0.98rem;
}

main {
  padding: 1.2rem var(--page-inline) 1rem;
}

/* A short, calm acknowledgement when switching application sections. */
#app.view-transition-enter > * {
  animation: view-content-enter .26s cubic-bezier(.22,.72,.22,1) both;
}

@keyframes view-content-enter {
  from {
    opacity: 0;
    transform: translateY(.4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Make section changes easier to perceive on touch devices without adding
   weight to the desktop transition. */
@media (hover: none) and (pointer: coarse) {
  #app.view-transition-enter > * {
    animation: view-content-enter-touch .34s cubic-bezier(.22,.72,.22,1) both;
  }
}

@keyframes view-content-enter-touch {
  from {
    opacity: 0;
    transform: translateX(.85rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #app.view-transition-enter > * {
    animation: none;
  }
}

.grid {
  display: grid;
  gap: 1rem;
}

.head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 1.35rem 0 0.7rem;
}

.head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.head p,
      .help {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.45;
}

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--card) 0%, #dfe6db 100%);
  box-shadow: 0 4px 18px #0f351e09;
}

.pad,
      .detail {
  padding: 1rem;
}

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #eddda9;
  border-radius: 16px;
  background: #fff9e7;
}

.notice i {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #ffe9a9;
  font-style: normal;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.notice h2 {
  margin: 0.1rem 0 0.3rem;
  font-size: 1rem;
}

.notice p {
  margin: 0;
  color: #4e4d3d;
  font-size: 0.88rem;
}

.answer {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #075d34, #0d8d52);
  color: #fff;
  box-shadow: 0 14px 30px #08713d38;
}

.answer:after {
  content: "";
  position: absolute;
  width: 10rem;
  height: 10rem;
  border: 18px solid #ffffff1c;
  border-radius: 50%;
  right: -2rem;
  bottom: -5rem;
}

.answer > * {
  position: relative;
  z-index: 1;
}

.answer .eyebrow {
  color: #c0f3cf;
}

.answer h2 {
  margin: 0.3rem 0;
  font-size: 1.3rem;
}

.answer p {
  margin: 0;
  color: #d7f3e0;
  font-size: 0.88rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  margin: 0.8rem 0;
  font-size: 0.84rem;
}

.answer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.answer-actions button,
      .primary,
      .secondary {
  min-height: 40px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 800;
}

.answer-actions button {
  border: 1px solid #fff4;
  color: #fff;
  background: #fff2;
}

.answer-actions .present {
  border-color: #fff;
  background: #fff;
  color: var(--deep);
}

.answer-actions[data-answer="present"] .present {
  border-color: #c5f7d5;
  background: #0b713d;
  color: #fff;
}

.answer-actions .absent {
  background: #681a15aa;
}

.answer-actions[data-answer="absent"] .absent {
  border-color: #ffc8c4;
  background: #b2352f;
  color: #fff;
}

.secondary.selected {
  border-color: var(--green);
  background: var(--soft);
  color: var(--deep);
}

.secondary.danger.selected {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.primary {
  border: 0;
  padding: 0 0.9rem;
  background: var(--green);
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
}

.create-event-button {
  height: 32px;
  min-height: 32px;
  width: max-content;
  max-width: 100%;
  justify-self: start;
  border: 1px solid #b9d8c4;
  border-radius: 10px;
  padding: .35rem .5rem;
  background: var(--soft);
  color: var(--deep);
  line-height: 1.2;
  font-size: .72rem;
  font-weight: 600;
}

.secondary {
  border: 1px solid var(--line);
  padding: 0 0.9rem;
  background: #fff;
  color: var(--ink);
}

.danger {
  border-color: #efc7c4;
  background: #fffafa;
  color: var(--red);
}

.text {
  border: 0;
  padding: 0.3rem;
  color: var(--green);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 800;
}

.events,
      .people {
  display: grid;
  gap: 0.62rem;
}

.event {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  padding: 0.84rem;
  text-align: left;
}

.date {
  width: 3rem;
  border-radius: 11px;
  background: var(--soft);
  color: var(--deep);
  text-align: center;
}

.date b {
  display: block;
  padding-top: 0.34rem;
  font-size: 1.1rem;
  line-height: 1;
}

.date span {
  display: block;
  padding: 0.25rem 0.1rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
}

.event h3 {
  margin: 0;
  font-size: 0.93rem;
}

.event p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.arrow {
  color: var(--muted);
  font-size: 1.3rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.27rem;
  width: fit-content;
  padding: 0.31rem 0.52rem;
  border-radius: 99px;
  font-size: 0.71rem;
  font-weight: 800;
}

.present-status {
  background: var(--soft);
  color: #075e32;
}

.absent-status {
  background: var(--redsoft);
  color: #992e29;
}

.pending-status {
  background: var(--ambersoft);
  color: var(--amber);
}

.published {
  background: var(--bluesoft);
  color: var(--blue);
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.95rem;
}

.account-card h2 {
  margin: 0.15rem 0;
  font-size: 1rem;
}

.profile {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.field {
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.field span {
  display: block;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
}

.field b {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.83rem;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  overflow: auto;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  scrollbar-width: none;
}

.tabs button {
  white-space: nowrap;
  border: 0;
  border-radius: 9px;
  padding: 0.6rem 0.75rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.81rem;
  font-weight: 800;
}

.tabs .active {
  background: var(--soft);
  color: var(--deep);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.metric {
  padding: 0.75rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: center;
}

.metric b {
  display: block;
  font-size: 1.3rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.7rem;
}

.title h2 {
  margin: 0.2rem 0 0;
  font-size: 1.22rem;
}

.block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.block h3 {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

.person {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #176a45;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.person-main {
  min-width: 0;
  flex: 1;
}

.person-main b {
  display: block;
  font-size: 0.86rem;
}

.person-main span {
  color: var(--muted);
  font-size: 0.73rem;
}

.toggle {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.toggle.on {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.toggle:disabled {
  border-color: #e2d6d4;
  background: #f5f1f0;
  color: #b4aaa8;
  cursor: not-allowed;
}

.actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.feedback {
  margin: 0.8rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--soft);
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.locked {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border-radius: 11px;
  background: var(--ambersoft);
  color: #714a08;
  font-size: 0.84rem;
}

.empty {
  padding: 1.4rem 1rem;
  border: 1px dashed #c8d6cc;
  border-radius: 15px;
  color: var(--muted);
  background: #fbfdfb;
  text-align: center;
  font-size: 0.88rem;
}

.bottom {
  position: fixed;
  z-index: 10;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-glass);
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .24);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.bottom div {
  display: flex;
  width: min(100%, 520px);
  justify-content: center;
  gap: .35rem;
}

.nav {
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 0.28rem 0.2rem;
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  color: rgba(24, 62, 45, .86);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  text-shadow: 0 1px 1px rgba(255, 255, 255, .28);
}

.nav span {
  display: block;
  font-size: 1.1rem;
}

.bottom .nav.active {
  border-color: rgba(255, 255, 255, .4);
  border-radius: 999px;
  background: rgba(8, 91, 50, .68);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 12px rgba(0, 45, 25, .2);
}

.bottom .nav {
  flex: 0 0 82px;
  border-radius: 18px;
  min-height: 50px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.bottom .nav:active {
  background: var(--soft);
}

@media (max-width: 699px) {
  .bottom {
    right: max(.75rem, env(safe-area-inset-right, 0px));
    bottom: max(.5rem, env(safe-area-inset-bottom, 0px));
    left: max(.75rem, env(safe-area-inset-left, 0px));
    width: auto;
  }

  #nav {
    touch-action: none;
    -webkit-touch-callout: none;
  }

  #nav.is-reordering .nav {
    -webkit-user-select: none;
    user-select: none;
    transition: transform .16s ease, opacity .16s ease;
  }

  #nav.is-reordering .nav.is-reordering {
    position: relative;
    z-index: 1;
    opacity: .62;
    transform: scale(.92);
  }
}

.form-card {
  width: min(calc(100% - 2rem), 460px);
  margin: 1.6rem auto;
  padding: 1.25rem;
}

.form-card h2 {
  margin: 0.15rem 0;
}

.form-grid {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.two {
  grid-template-columns: 1fr 1fr;
}

.control {
  display: grid;
  gap: 0.3rem;
  color: #4e6357;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 700;
}

.control input,
      .control select {
  width: 100%;
  min-height: 45px;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
}

.form-error {
  margin-top: 0.8rem;
  padding: 0.7rem;
  border-radius: 10px;
  background: var(--redsoft);
  color: #992e29;
  font-size: 0.84rem;
  font-weight: 700;
}

.loading {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

.mini {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.mini button {
  min-height: 35px;
  padding: 0.35rem 0.55rem;
  font-size: 0.76rem;
}

.admin-role {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 32px;
  padding: 0.3rem 0.4rem;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
}

.admin-page {
  display: grid;
  gap: .7rem;
}

.admin-section {
  padding: .7rem;
}

.admin-section-head {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .45rem;
}

.admin-section-head h3 {
  margin: 0;
  font-size: .9rem;
}

.admin-requests,
.admin-members {
  display: grid;
  gap: .35rem;
}

.admin-request,
.admin-member {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 34px;
  padding: .2rem .25rem;
  border-bottom: 1px solid var(--line);
}

.admin-request:last-child,
.admin-member:last-child {
  border-bottom: 0;
}

.admin-request-type {
  flex: 0 0 5.2rem;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .06em;
}

.admin-page .person-main b {
  font-size: .76rem;
  font-weight: 600;
}

.admin-page .person-main span {
  font-size: .64rem;
}

.admin-page .mini {
  display: flex;
  gap: .25rem;
  margin-left: auto;
}

.admin-page .password-reset-request {
  display: grid;
  align-items: start;
  gap: .25rem;
}

.admin-page .password-reset-request .admin-request-type,
.admin-page .password-reset-request .mini {
  margin-left: 0;
}

.admin-page .password-reset-request .admin-request-type {
  flex: none;
}

.admin-page .password-reset-request .mini {
  flex-direction: column;
  align-items: flex-start;
}

.admin-page .mini button {
  min-height: 29px;
  padding: .25rem .4rem;
  font-size: .66rem;
}

.admin-page .coach-card-menu {
  position: static;
  flex: 0 0 auto;
}

.admin-page .coach-card-menu-trigger {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

.admin-member.is-inactive {
  opacity: .72;
}

@media (min-width: 700px) {
  header {
    min-height: 150px;
    padding: .75rem 2rem;
    border-radius: 0 0 26px 26px;
  }
  main {
    padding: 1.5rem 2rem 2.5rem;
  }
  .grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(285px, 0.75fr);
    align-items: start;
  }
  .coach-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  }
  .actions {
    grid-template-columns: 1fr 1fr;
  }
  .admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.coach-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
  max-width: none;
  margin: 1rem auto;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.coach-nav button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0.45rem 0.3rem;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.coach-nav button.active {
  background: var(--soft);
  color: var(--deep);
}

.coach-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: .01em;
  white-space: nowrap;
  font-size: .82rem;
}

@media (max-width:720px) {
  .coach-nav {
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: .12rem;
    margin: .7rem auto;
    padding: .2rem;
  }
  .coach-nav button {
    min-height: 42px;
    padding: .25rem .1rem;
    font-size: .58rem;
    line-height: 1;
    white-space: nowrap;
  }
}

.session-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.session-card {
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.session-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.4;
  object-fit: cover;
  background: var(--soft);
}

.session-card div {
  padding: 0.7rem;
}

.session-card h3 {
  margin: 0;
  font-size: 0.88rem;
}

.session-card p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.coach-form input,
.coach-form select,
.coach-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 100px;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  resize: vertical;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
}

.coach-form input,
.coach-form select {
  min-height: 45px;
  resize: none;
}

/* Coach event forms stay inline in the page. Their layout follows the
   available card width instead of the device width. */
.coach-form {
  container-type: inline-size;
  min-width: 0;
  padding: clamp(1rem, 3cqw, 1.25rem);
  margin-bottom: env(safe-area-inset-bottom, 0px);
}

.coach-form > h2 {
  margin: clamp(.25rem, 1.2cqw, .45rem) 0 0;
}

.coach-form .form-grid {
  min-width: 0;
  gap: clamp(.8rem, 2.4cqw, 1.1rem);
  margin-top: clamp(.9rem, 3cqw, 1.25rem);
}

.coach-form .form-grid.two {
  grid-template-columns: minmax(0, 1fr);
}

/* Match forms: keep the two club fields side by side on narrow screens. */
.coach-form #coach-event-form > .form-grid.two:first-of-type {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coach-form .control {
  min-width: 0;
  gap: clamp(.35rem, 1cqw, .5rem);
}

.coach-form .control input,
.coach-form .control select,
.coach-form .control textarea {
  min-width: 0;
  font-size: 1rem;
}

.coach-form .actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.55rem, 1.8cqw, .8rem);
  margin-top: clamp(1rem, 3cqw, 1.35rem);
  padding-bottom: max(.25rem, env(safe-area-inset-bottom, 0px));
}

.coach-form .actions button {
  min-width: 0;
  min-height: var(--touch-target);
}

@container (min-width: 34rem) {
  .coach-form .form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Match clubs stay in two field columns with the switch between them. */
.coach-form #coach-event-form > .coach-match-clubs {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) !important;
  align-items: end;
  gap: clamp(.35rem, 1.4cqw, .7rem);
}

.coach-match-clubs .control {
  min-width: 0;
  width: 100%;
  text-align: center;
}

.coach-match-clubs .control input {
  min-width: 0;
  width: 100%;
}

.coach-match-clubs .control input[readonly] {
  background: #eef1ef;
  color: var(--muted);
  cursor: default;
}

.coach-match-clubs .coach-club-switch {
  align-self: end;
  justify-self: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  margin-bottom: .15rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--deep);
  box-shadow: none;
  font-size: .85rem;
  line-height: 1;
}

.absence-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.absence-form select,
      .absence-form input {
  min-height: 42px;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.info-preview {
  white-space: pre-wrap;
}

.danger-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 700px) {
  .session-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .coach-nav {
    max-width: none;
  }
}

@media (max-width:720px) {
  .lineup-member {
    grid-template-columns: auto auto minmax(0,1fr) auto !important;
    grid-template-rows: auto !important;
  }
  .lineup-member-actions {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  .lineup-member .avatar {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
  .lineup-member-main {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  .lineup-attendance {
    grid-column: 4 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }
}
