:root {
  --bg: #f3f5f2;
  --panel: #fff;
  --ink: #182b25;
  --muted: #718078;
  --line: #e4e9e3;
  --green: #235c43;
  --deep: #162e29;
  --lime: #d5ef88;
  --orange: #bd692c;
  --red: #b63e3e;
  --shadow: 0 14px 40px #172c2410;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: var(--green);
}
button,
input,
select,
textarea {
  border-radius: 10px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active {
  transform: translateY(1px);
}
.demo-bar {
  min-height: 38px;
  background: var(--deep);
  color: #dbe8df;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px 18px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.demo-bar button {
  color: var(--lime);
  background: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.8rem;
}
.shell {
  max-width: 1480px;
  min-height: calc(100vh - 38px);
  margin: auto;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
}
.sidebar {
  padding: 36px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 38px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
  font-weight: 800;
}
.brand-mark {
  background: var(--green);
  color: var(--lime);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}
.brand small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  margin-top: 5px;
  color: var(--muted);
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  background: none;
  text-align: left;
  padding: 13px 15px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.94rem;
}
.nav button.active {
  background: #e5eddf;
  color: var(--green);
  font-weight: 650;
}
.nav button:hover {
  background: #e9eee7;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: middle;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.8;
}
.main {
  min-width: 0;
  padding: 28px 42px 50px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--muted);
}
.identity {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 0.88rem;
}
.identity small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 3px;
}
.avatar {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.86rem;
  font-weight: 700;
  background: #e9eedf;
  color: var(--green);
  flex: none;
}
.avatar.orange {
  background: #fff0df;
  color: #a5632e;
}
.avatar.blue {
  background: #e9eff8;
  color: #45688d;
}
.avatar.purple {
  background: #eee9fa;
  color: #765ca1;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
}
h1 {
  font-size: 2rem;
  letter-spacing: -0.05em;
  line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 650;
}
h2 {
  font-size: 1.15rem;
  letter-spacing: -0.025em;
  margin: 0;
}
h3 {
  font-size: 1rem;
  margin: 0;
}
.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.pill {
  border-radius: 30px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: #eaf1e5;
  color: var(--green);
}
.pill.orange {
  background: #fff0dd;
  color: #995916;
}
.pill.gray {
  background: #edf0ed;
  color: #65746b;
}
.pill.red {
  background: #fae8e7;
  color: #a43b36;
}
.hero {
  background: var(--deep);
  color: white;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 22px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero .eyebrow {
  color: #b0c4b6;
}
.hero h2 {
  font-size: 2.7rem;
  font-weight: 550;
  letter-spacing: -0.06em;
  margin: 17px 0 8px;
  position: relative;
}
.hero h2 span {
  color: var(--lime);
}
.hero .hero-time {
  font-size: 1.3rem;
  color: #dce9df;
  position: relative;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #c7d5ca;
  font-size: 0.85rem;
  margin-top: 22px;
  position: relative;
}
.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.hero-badge {
  background: #d5ef8820;
  color: var(--lime);
  border: 1px solid #d5ef8838;
}
.pitch {
  position: absolute;
  right: -50px;
  top: -35px;
  width: 410px;
  height: 330px;
  opacity: 0.16;
  transform: rotate(-16deg);
  border: 1px solid #d5ef88;
}
.pitch:before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid #d5ef88;
}
.pitch:after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  border: 1px solid #d5ef88;
  border-radius: 50%;
  top: calc(50% - 55px);
  left: calc(50% - 55px);
}
.pitch .goal {
  border: 1px solid #d5ef88;
  position: absolute;
  width: 65px;
  height: 140px;
  top: 95px;
}
.pitch .goal:last-child {
  right: 0;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 20px;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr);
  gap: 22px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  min-width: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.card-head .text-button {
  font-size: 0.8rem;
}
.text-button {
  background: none;
  color: var(--green);
  padding: 3px 0;
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.82rem;
  line-height: 1.5;
}
.tiny {
  font-size: 0.75rem;
}
.progress {
  height: 7px;
  background: #e9eee7;
  border-radius: 20px;
  overflow: hidden;
  margin: 18px 0 9px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 20px;
}
.capacity {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
.capacity strong {
  color: var(--ink);
}
.status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}
.status-icon {
  height: 43px;
  width: 43px;
  display: grid;
  place-items: center;
  background: #eaf2e2;
  border-radius: 12px;
  color: var(--green);
  flex: none;
}
.status-row strong {
  display: block;
  margin-bottom: 4px;
}
.btn {
  padding: 12px 17px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #edf2e9;
  color: var(--green);
  min-height: 44px;
}
.btn.primary {
  background: var(--green);
  color: #fff;
}
.btn.primary:hover {
  background: #174b34;
}
.btn.lime {
  background: var(--lime);
  color: var(--deep);
}
.btn.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.btn.danger {
  background: #fae8e7;
  color: var(--red);
}
.btn.full {
  width: 100%;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.actions > * {
  flex: 1;
}
.people {
  display: flex;
  align-items: center;
  padding: 0 0 16px;
}
.people .avatar {
  border: 3px solid white;
  margin-right: -10px;
  width: 39px;
  height: 39px;
  font-size: 0.75rem;
}
.people .more {
  margin-left: 18px;
  font-size: 0.83rem;
  color: var(--muted);
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row .grow {
  flex: 1;
  min-width: 0;
}
.row strong {
  font-size: 0.88rem;
}
.row .muted {
  font-size: 0.78rem;
  margin-top: 4px;
}
.row button.name {
  background: none;
  text-align: left;
  padding: 0;
  color: var(--ink);
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.metric {
  text-align: center;
  background: #f6f8f3;
  border-radius: 12px;
  padding: 18px 8px;
}
.metric b {
  display: block;
  font-size: 1.75rem;
  letter-spacing: -0.06em;
  font-weight: 600;
}
.metric span {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.score {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
}
.score .team {
  font-size: 0.85rem;
  flex: 1;
}
.score .team:last-child {
  text-align: right;
}
.score b {
  font-size: 1.65rem;
  font-weight: 650;
  white-space: nowrap;
  letter-spacing: 0.04em;
}
.note {
  background: #f0f4e9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #52664b;
  line-height: 1.55;
}
.notice {
  background: #fff3df;
  color: #8b5b25;
}
.empty {
  padding: 35px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 12px;
  min-height: 45px;
  width: 100%;
  font-size: 0.9rem;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366756a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar select {
  width: auto;
  max-width: 100%;
}
.players-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.player-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 23px;
  text-align: left;
  color: var(--ink);
}
.player-card:hover {
  box-shadow: var(--shadow);
  border-color: #c5d5bf;
}
.player-card .avatar {
  width: 58px;
  height: 58px;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.player-card h3 {
  margin-bottom: 5px;
}
.player-card .numbers {
  display: flex;
  gap: 24px;
  margin-top: 24px;
}
.numbers b {
  display: block;
  font-size: 1.25rem;
}
.numbers span {
  font-size: 0.75rem;
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tabs button {
  padding: 10px 14px;
  background: none;
  color: var(--muted);
  font-size: 0.85rem;
}
.tabs button.active {
  background: var(--green);
  color: white;
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.admin-metrics .card {
  padding: 20px;
}
.admin-metrics b {
  font-size: 2rem;
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
.admin-metrics span {
  font-size: 0.8rem;
  color: var(--muted);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: left;
}
th {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
}
td .btn {
  min-height: 33px;
  padding: 7px 11px;
  font-size: 0.75rem;
}
td select {
  min-width: 135px;
  padding: 8px 28px 8px 10px;
  font-size: 0.8rem;
  min-height: 35px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 7px;
}
.field.full {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  margin: 16px 0;
}
.check input {
  width: 19px;
  min-height: 19px;
  accent-color: var(--green);
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.team-box {
  border-radius: 14px;
  background: #f5f8f2;
  padding: 18px;
  min-width: 0;
}
.team-box.orange {
  background: #fff5e9;
}
.team-box.blue {
  background: #eef3fa;
}
.team-box h3 {
  margin-bottom: 16px;
}
.team-box .row {
  font-size: 0.8rem;
}
.team-box select {
  width: 95px;
  font-size: 0.75rem;
  padding: 7px 24px 7px 8px;
  min-height: 32px;
}
.profile-cover {
  background: var(--deep);
  border-radius: 18px;
  padding: 32px;
  color: white;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
}
.profile-cover .avatar {
  width: 80px;
  height: 80px;
  font-size: 1.7rem;
  background: var(--lime);
  color: var(--deep);
}
.profile-cover h1 {
  font-size: 1.9rem;
}
.profile-cover .muted {
  color: #b2c6b7;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.profile-stats .metric {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 25px 10px;
}
.history-item {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 12px;
}
.date-box {
  background: #eff3e9;
  border-radius: 11px;
  padding: 10px 15px;
  text-align: center;
  min-width: 66px;
}
.date-box b {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
}
.date-box span {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--muted);
}
.history-item h3 {
  margin-bottom: 6px;
}
.history-item .grow {
  flex: 1;
}
.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.photo {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.photo img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.photo .btn {
  width: 100%;
  border-radius: 0;
  font-size: 0.78rem;
}
.chat-scene {
  background: #e6ece5;
  border: 1px solid #d7dfd5;
  min-height: 580px;
  border-radius: 20px;
  padding: 30px;
  max-width: 640px;
  margin: auto;
}
.chat-header {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #ccd6c8;
  padding-bottom: 18px;
  margin-bottom: 24px;
}
.bubble {
  background: white;
  border-radius: 16px 16px 16px 4px;
  padding: 22px;
  max-width: 390px;
  box-shadow: 0 4px 14px #1b322510;
}
.bubble .hero {
  min-height: auto;
  padding: 18px;
  border-radius: 11px;
  margin-top: 14px;
}
.bubble .hero h2 {
  font-size: 1.9rem;
}
.bubble .hero-time {
  font-size: 1rem;
}
.bubble .btn {
  font-size: 0.8rem;
}
.bubble .progress {
  margin-top: 20px;
}
.bubble-footer {
  text-align: right;
  color: var(--muted);
  font-size: 0.7rem;
  margin-top: 14px;
}
.chat-caption {
  margin: 20px 0 0;
  font-size: 0.8rem;
  color: #60735e;
  line-height: 1.6;
}
.footer-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 30px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.loading {
  display: grid;
  place-content: center;
  text-align: center;
  height: 80vh;
  color: var(--green);
  gap: 16px;
  line-height: 2;
}
.error-page {
  max-width: 520px;
  margin: 12vh auto;
  padding: 32px;
}
.error-page h1 {
  font-size: 1.8rem;
}
.error-page p {
  color: var(--muted);
  line-height: 1.65;
}
dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(620px, calc(100% - 28px));
  max-height: 90vh;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 20px 90px #0003;
}
dialog::backdrop {
  background: #10271d70;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 24px 26px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 1.2rem;
}
.close {
  font-size: 1.5rem;
  background: var(--bg);
  color: var(--muted);
  width: 33px;
  height: 33px;
  padding: 0;
  line-height: 1;
}
.dialog-content {
  padding: 24px 26px;
}
.reason-options {
  display: grid;
  gap: 10px;
}
.reason-options button {
  padding: 16px;
  text-align: left;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
}
.reason-options button:hover {
  border-color: var(--green);
  background: #edf4e7;
}
.reason-options small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 0.78rem;
}
.goals-grid {
  max-height: 260px;
  overflow: auto;
  margin-top: 16px;
}
.goal-input {
  width: 70px;
  min-height: 35px;
  padding: 7px 10px;
}
.image-view {
  width: 100%;
  border-radius: 12px;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--deep);
  color: white;
  padding: 13px 21px;
  border-radius: 12px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  max-width: calc(100% - 28px);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.mobile-brand {
  display: none;
}
.info-list {
  display: grid;
  gap: 15px;
}
.info-list > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 0.83rem;
}
.info-list > div span:first-child {
  color: var(--muted);
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.attendance-options {
  display: flex;
  gap: 5px;
}
.attendance-options button {
  border-radius: 7px;
  padding: 7px 10px;
  background: #eef1ed;
  color: var(--muted);
  font-size: 0.75rem;
}
.attendance-options button.selected {
  background: #d9eacb;
  color: var(--green);
}
.attendance-options button.absent.selected {
  background: #fae8e7;
  color: var(--red);
}
.approval {
  margin-top: 10px;
}
.checkbox-list {
  display: grid;
  gap: 10px;
}
.date-picker {
  max-width: 270px;
}
body.busy {
  cursor: progress;
}
body.busy button {
  pointer-events: none;
  opacity: 0.65;
}
.sort-caption {
  font-size: 0.8rem;
  color: var(--muted);
  align-self: center;
}
.mobile-nav-label {
  display: none;
}
@media (min-width: 1500px) {
  .main {
    padding: 32px 54px 50px;
  }
  .hero {
    min-height: 300px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 16px;
  }
  .main {
    padding: 26px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .players-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stack.side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--panel);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
  }
  .sidebar .brand,
  .sidebar-foot {
    display: none;
  }
  .nav {
    display: flex;
    justify-content: space-around;
    gap: 2px;
  }
  .nav button {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.63rem;
    padding: 7px 9px;
    border-radius: 10px;
    flex: 1;
    text-align: center;
    align-items: center;
  }
  .nav .icon {
    width: 21px;
    height: 21px;
  }
  .main {
    padding: 20px 16px 110px;
  }
  .topbar {
    margin-bottom: 26px;
  }
  .topbar > .eyebrow {
    display: none;
  }
  .mobile-brand {
    display: flex;
  }
  .mobile-brand .brand-mark {
    height: 32px;
    width: 32px;
    font-size: 1.1rem;
  }
  .mobile-brand .brand {
    font-size: 0.68rem;
    gap: 8px;
  }
  .mobile-brand .brand small {
    font-size: 0.5rem;
  }
  .identity > div:last-child {
    display: none;
  }
  .identity .avatar {
    width: 35px;
    height: 35px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 1.7rem;
  }
  .subtitle {
    font-size: 0.83rem;
  }
  .hero {
    padding: 24px;
    min-height: 245px;
    border-radius: 16px;
  }
  .hero h2 {
    font-size: 2.3rem;
  }
  .hero-meta {
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.78rem;
  }
  .pitch {
    right: -180px;
  }
  .card {
    padding: 20px;
  }
  .content-grid,
  .stack {
    gap: 16px;
  }
  .stack.side {
    display: flex;
  }
  .players-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .player-card {
    padding: 17px;
  }
  .player-card .numbers {
    gap: 15px;
  }
  .player-card h3 {
    font-size: 0.88rem;
  }
  .player-card .avatar {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }
  .admin-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .admin-metrics .card {
    padding: 17px;
  }
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .profile-cover {
    padding: 24px 20px;
    gap: 15px;
  }
  .profile-cover h1 {
    font-size: 1.5rem;
  }
  .profile-cover .avatar {
    height: 62px;
    width: 62px;
    font-size: 1.3rem;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 3px;
  }
  .tabs button {
    padding: 9px 11px;
    font-size: 0.78rem;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .history-item {
    padding: 17px;
    gap: 14px;
  }
  .history-item .pill {
    font-size: 0.65rem;
    padding: 6px 8px;
  }
  .chat-scene {
    padding: 18px;
    min-height: 550px;
  }
  .bubble {
    padding: 18px;
  }
  .demo-bar {
    font-size: 0.7rem;
    gap: 9px;
    padding: 7px 10px;
  }
  .demo-bar button {
    font-size: 0.7rem;
  }
  .dialog-content {
    padding: 20px;
  }
  .photos {
    grid-template-columns: repeat(2, 1fr);
  }
  #toast {
    bottom: 95px;
  }
  .footer-note {
    line-height: 1.5;
  }
  .table-wrap {
    margin: 0 -5px;
  }
  .toolbar select {
    flex: 1;
    min-width: 130px;
  }
  .hero-top .pill {
    font-size: 0.66rem;
  }
  .date-picker {
    max-width: 100%;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14211d;
    --panel: #1c2b24;
    --ink: #e6eee7;
    --muted: #a4b3a7;
    --line: #314137;
    --green: #94cba0;
    --deep: #10231c;
    --lime: #d5ef88;
    color-scheme: dark;
  }
  .nav button.active {
    background: #2c4230;
    color: var(--lime);
  }
  .nav button:hover {
    background: #26392b;
  }
  .btn.primary {
    background: #b8db94;
    color: #14211d;
  }
  .btn.primary:hover {
    background: #cceaaa;
  }
  .metric,
  .team-box,
  .date-box {
    background: #23372a;
  }
  .team-box.orange {
    background: #3c2d20;
  }
  .team-box.blue {
    background: #223244;
  }
  .note {
    background: #2a3a24;
    color: #c0d2b0;
  }
  .notice {
    background: #3b301d;
    color: #e8c68f;
  }
  .pill {
    background: #30432b;
    color: #c1dfa6;
  }
  .pill.gray {
    background: #2b382f;
    color: #bec9bf;
  }
  .pill.orange {
    background: #45331d;
    color: #e7c384;
  }
  .pill.red {
    background: #452828;
    color: #eda5a1;
  }
  .status-icon {
    background: #30432b;
    color: #c1dfa6;
  }
  .progress {
    background: #344236;
  }
  .people .avatar {
    border-color: var(--panel);
  }
  .player-card:hover {
    border-color: #638066;
  }
  .btn {
    background: #2a3e2d;
    color: #bfdbaf;
  }
  .avatar {
    background: #35432b;
    color: #d3e8be;
  }
  .chat-scene {
    background: #1a3025;
    border-color: var(--line);
  }
  .bubble {
    background: var(--panel);
  }
  .chat-caption {
    color: #acc0aa;
  }
  .reason-options button:hover {
    background: #2c4230;
  }
  .attendance-options button {
    background: #2b3b30;
    color: #b3c4b7;
  }
}

.avatar {
  overflow: hidden;
}
.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#connection-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: #fff0d6;
  color: #663e16;
  z-index: 200;
  font-size: 14px;
  line-height: 1.5;
}
#connection-warning[hidden] {
  display: none;
}
