/* Mobile product design, translated from the supplied interactive mockup. */
:root {
  --ink: #0a1a3f;
  --blue: #1f5bff;
  --sky: #7cc6ff;
  --pale: #e9f0ff;
  --bg: #f4f7fb;
  --muted: #637090;
  --line: #e6ecf4;
  --green: #0f7a4c;
  --red: #c8322f;
  font-family:
    Onest,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
.score,
.metric strong,
.calendar-period,
.balance-value {
  font-family: "Fira Sans Extra Condensed", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  font-weight: 700;
}
h1 {
  font-size: 42px;
  line-height: 1.03;
  margin: 0;
}
h2 {
  font-size: 25px;
  line-height: 1.1;
}
h3 {
  font-size: 24px;
  line-height: 1.12;
}
p {
  line-height: 1.5;
}
.muted {
  color: var(--muted);
}
button {
  font-weight: 600;
  border-radius: 14px;
  transition:
    background 0.16s,
    transform 0.16s;
}
button:active {
  transform: scale(0.975);
}
.icon {
  stroke-width: 1.8;
}
.primary,
#submit {
  background: var(--blue);
  color: #fff;
  min-height: 54px;
  border-radius: 16px;
  font-size: 16px;
}
.primary:hover,
#submit:hover {
  background: #174bdd;
}
.secondary {
  background: var(--pale);
  color: var(--blue);
  border-radius: 14px;
  min-height: 46px;
}
.danger {
  background: #fff0f0;
  color: var(--red);
}
.text-button {
  font-size: 14px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: none;
}
.card.metric {
  border-radius: 20px;
  text-align: left;
  padding: 18px;
}
.metric strong {
  font-size: 36px;
  letter-spacing: 0;
  margin: 12px 0 6px;
}
.metric .metric-label {
  font-size: 13px;
  font-weight: 500;
}
.metric small {
  font-size: 12px;
  line-height: 1.4;
}
.metric.tint {
  background: var(--pale);
  border-color: #dce6ff;
}
.metrics {
  gap: 12px;
  margin-bottom: 24px;
}
.stack,
.layout {
  gap: 20px;
}
.section-top {
  margin-bottom: 16px;
}
.section-top h2 {
  font-size: 25px;
}
.intro {
  margin-bottom: 22px;
  align-items: flex-end;
}
.intro .eyebrow {
  display: none;
}
.intro p {
  margin: 8px 0 0;
  font-size: 14px;
}
.date-pill {
  font-size: 13px;
}
.grid {
  gap: 14px;
}
.list-row {
  min-height: 70px;
  padding: 15px 0;
  gap: 12px;
  border-color: #eef2f7;
}
.list-row strong {
  font-size: 15px;
  font-weight: 600;
}
.list-row small {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 5px;
}
.list-row .amount {
  font-family: "Fira Sans Extra Condensed", sans-serif;
  font-size: 25px;
  font-weight: 700;
}
.list-row .grow {
  min-width: 0;
}
.tag,
.status-pill {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 99px;
}
.empty {
  font-size: 14px;
  line-height: 1.55;
  padding: 24px 14px;
  color: var(--muted);
}
.note {
  border-radius: 16px;
  font-size: 13px;
  padding: 16px;
  line-height: 1.5;
  background: #fff7e7;
  color: #795111;
}
#header {
  height: 80px;
  border: 0;
  gap: 12px;
  background: var(--bg);
}
.app-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font:
    700 20px/1 "Fira Sans Extra Condensed",
    sans-serif;
  letter-spacing: 0.025em;
  min-width: 0;
}
.app-wordmark small {
  display: block;
  font:
    500 10px/1.4 Onest,
    sans-serif;
  color: var(--muted);
  letter-spacing: 0.07em;
  margin-top: 5px;
}
.wordmark-symbol {
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--ink);
  border-radius: 12px;
  flex: none;
}
.wordmark-symbol .bolt {
  width: 18px;
  height: 26px;
}
.header-actions {
  gap: 6px;
}
.header-actions .person-name {
  display: none;
}
.header-actions button {
  padding: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
}
.header-actions .avatar {
  width: 40px;
  height: 40px;
  border: 2px solid white;
  box-shadow: 0 0 0 1px #dce3ee;
  font-size: 13px;
}
.notification-button .icon {
  width: 25px;
  height: 25px;
}
.avatar {
  background: var(--pale);
  color: var(--blue);
  font-weight: 700;
}
.avatar.big {
  width: 88px;
  height: 88px;
}
.demo-bar {
  border-radius: 14px;
  padding: 10px 12px;
  margin: 4px 0 22px;
  font-size: 11px;
  background: #e9f0ff;
}
.role-switch {
  gap: 3px;
}
.role-switch button {
  font-size: 12px;
  min-height: 34px;
  border-radius: 9px;
}
.demo-bar small {
  display: none;
}
.balance-hero {
  background: #0a1a3f;
  color: #fff;
  border-radius: 26px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  background-image: radial-gradient(
    ellipse at 105% -15%,
    #28569780,
    transparent 65%
  );
}
.balance-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  color: #b9c7e4;
}
.balance-detail {
  color: #b9c7e4;
  font-size: 13px;
  min-height: 30px;
  padding: 0;
}
.balance-value {
  display: block;
  color: #fff;
  padding: 0;
  font-size: 64px;
  line-height: 1.12;
  margin: 14px 0 5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.balance-value:hover {
  background: transparent;
}
.balance-hero > p {
  margin: 0 0 20px;
  color: #b9c7e4;
  font-size: 14px;
}
.balance-hero .payment-shortcut {
  width: 100%;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font:
    700 25px "Fira Sans Extra Condensed",
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 28px -10px #1f5bffe6;
}
.payment-shortcut .bolt {
  width: 20px;
  height: 28px;
  background: white;
}
.balance-explain {
  color: #b9c7e4;
  width: 100%;
  font-size: 13px;
  margin-top: 8px;
}
.balance-pending {
  border-radius: 12px;
  background: #ffffff12;
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 16px;
}
.balance-pending .icon {
  width: 18px;
  height: 18px;
}
.home-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}
.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #e3e9f2;
  border-radius: 18px;
  min-height: 60px;
  text-align: left;
  font-size: 14px;
}
.shortcut .icon {
  color: var(--blue);
}
.event-card h3 {
  font-size: 26px;
  margin: 12px 0;
}
.event-card {
  border-radius: 22px;
}
.event-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  border-radius: 8px;
  padding: 6px 9px;
  background: #e7f6ff;
  color: #0875b7;
}
.event-meta {
  font-size: 14px;
  line-height: 1.5;
  gap: 7px;
}
.event-footer {
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.event-footer .row {
  flex-wrap: wrap;
}
.event-footer button {
  font-size: 13px;
}
.rsvp {
  gap: 8px;
}
.rsvp button {
  border-radius: 14px;
  min-height: 48px;
  font-size: 14px;
  border-color: #dce3ee;
}
.rsvp button.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.mini-avatars .avatar {
  border: 2px solid white;
}
.attention-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.quick-grid button {
  border-radius: 16px;
  min-height: 60px;
}
.progress {
  accent-color: var(--blue);
}
.tabs {
  padding: 4px;
  background: #e8edf5;
  border-radius: 14px;
  gap: 4px;
  margin-bottom: 18px;
}
.tabs button {
  font-size: 14px;
  border-radius: 11px;
  min-height: 40px;
  padding: 8px 12px;
}
.tabs button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 5px #0a1a3f08;
}
.toolbar {
  gap: 12px;
}
.calendar-navigation {
  gap: 10px;
}
.calendar-navigation button {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: white;
  border: 1px solid #e3e9f2;
  color: var(--ink);
  font-size: 25px;
}
.calendar-period {
  font-size: 27px;
  text-align: center;
}
.calendar-tools {
  margin: 14px 0;
}
.calendar-legend {
  font-size: 11px;
}
.month-grid {
  gap: 6px;
}
.calendar-day {
  border-radius: 12px;
  border-color: #e8edf5;
  font:
    600 15px Onest,
    sans-serif;
  min-height: 48px;
}
.calendar-day.has-events {
  color: white;
}
.calendar-day.calendar-training {
  background: #1689c9;
}
.calendar-day.calendar-game {
  background: #e89d37;
}
.calendar-day.calendar-kvl {
  background: #345be0;
}
.calendar-day.today {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.calendar-week-grid .calendar-day {
  min-height: 95px;
}
.calendar-day.blank {
  background: transparent;
}
.collection-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}
.collection-heading h3 {
  font-size: 24px;
}
.collection-summary strong {
  font:
    700 30px "Fira Sans Extra Condensed",
    sans-serif;
}
.collection-summary span,
.collection-share,
.collection-link-note {
  font-size: 13px;
}
.collection-actions {
  gap: 8px;
}
.collection-actions button {
  font-size: 13px;
  min-height: 44px;
  padding: 9px 12px;
}
.finance-head .intro {
  align-items: flex-start;
}
.finance-actions {
  gap: 10px;
}
.finance-actions button {
  font-size: 14px;
}
.finance-tabs {
  display: flex;
  overflow: auto;
  gap: 5px;
  background: #e8edf5;
  padding: 4px;
  border-radius: 14px;
  margin: 0 0 20px;
}
.finance-tabs button {
  white-space: nowrap;
  flex: 1;
  font-size: 13px;
  padding: 10px;
  min-height: 42px;
}
.finance-tabs button.active {
  background: white;
  box-shadow: 0 2px 5px #0a1a3f08;
}
.finance-panel-hidden {
  display: none !important;
}
.profile-head {
  gap: 16px;
}
.profile-head h2 {
  font-size: 30px;
}
.player-card {
  border-radius: 20px;
}
.player-card h3 {
  font-size: 25px;
}
.profile-head p {
  font-size: 14px;
}
.media-grid {
  gap: 10px;
}
.media-tile {
  border-radius: 16px;
  overflow: hidden;
}
.media-preview {
  border-radius: 14px;
}
.scoreboard-card,
.live-board {
  border-radius: 24px;
}
.score {
  font-size: 48px;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea,
.field-select,
.field-date-button,
.field-file-button {
  border-radius: 14px;
  border-color: #dce3ee;
  font-size: 16px;
  min-height: 54px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible,
textarea:focus-visible,
.field-select:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #1f5bff18;
}
label {
  font-size: 14px;
  font-weight: 600;
}
.field-label {
  font-size: 14px;
}
.check-row {
  font-size: 14px;
  min-height: 48px;
  padding: 10px 0;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--blue);
  border-color: var(--blue);
}
#fields {
  line-height: 1.4;
}
#fields .hint {
  font-size: 12px;
}
.field-file-button {
  border-style: dashed;
}
.field-file-name {
  font-size: 12px;
}
dialog {
  border: 0;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 90px #0a1a3f33;
  width: min(540px, 96vw);
}
dialog::backdrop {
  background: #0a1a3f66;
  backdrop-filter: blur(3px);
}
.modal-top {
  top: -24px;
  padding: 6px 0 16px;
  gap: 12px;
}
.modal-top h2 {
  font-size: 30px;
  line-height: 1.08;
}
.modal-top button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  flex: none;
  border-radius: 50%;
  background: #f0f3f8;
  color: var(--ink);
  font-size: 24px;
  padding: 0;
}
#submit {
  width: 100%;
  font-size: 17px;
}
#toast {
  font-size: 14px;
  background: var(--ink);
}
.footer-note {
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
#sidebar {
  background: #fff;
  border-color: var(--line);
}
.brand {
  font-family: "Fira Sans Extra Condensed", sans-serif;
  font-size: 23px;
  letter-spacing: 0.03em;
}
.side-nav button {
  font-size: 14px;
  border-radius: 13px;
}
.side-nav .active {
  color: var(--blue);
  background: var(--pale);
}
@media (min-width: 768px) {
  .balance-hero {
    max-width: 680px;
  }
  .home-shortcuts {
    max-width: 680px;
  }
  .shell {
    padding-top: 8px;
  }
  #app {
    padding-top: 16px;
  }
  .finance-head .intro {
    flex-wrap: wrap;
  }
  .finance-actions {
    display: flex;
  }
}
@media (max-width: 767px) {
  .shell {
    padding: 0 20px calc(94px + env(safe-area-inset-bottom));
    margin: 0;
  }
  #header {
    height: calc(72px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    position: relative;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #app {
    padding-top: 8px;
  }
  .app-wordmark {
    font-size: 18px;
  }
  .app-wordmark small {
    font-size: 9px;
  }
  .wordmark-symbol {
    width: 32px;
    height: 36px;
    border-radius: 10px;
  }
  .header-actions {
    gap: 2px;
  }
  h1 {
    font-size: 40px;
  }
  .intro {
    margin: 6px 0 22px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .intro p {
    font-size: 14px;
    line-height: 1.45;
  }
  .intro .date-pill {
    display: none;
  }
  .intro > div {
    min-width: 0;
  }
  .intro > button {
    min-height: 46px;
  }
  .card {
    padding: 18px;
  }
  .grid.metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .metrics:has(> :nth-child(4)) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card.metric {
    padding: 14px 10px;
    min-height: 130px;
  }
  .metric .metric-label {
    font-size: 11px;
    line-height: 1.3;
  }
  .metric .metric-label .icon {
    display: none;
  }
  .metric strong {
    font-size: 30px;
    overflow-wrap: anywhere;
  }
  .metric small {
    font-size: 11px;
    line-height: 1.35;
  }
  .balance-value {
    font-size: 64px;
  }
  .balance-hero {
    padding: 24px;
    border-radius: 26px;
  }
  .balance-hero .payment-shortcut {
    min-height: 64px;
  }
  .section-top h2 {
    font-size: 24px;
  }
  .section-top .text-button {
    font-size: 12px;
    padding-right: 0;
  }
  .layout {
    gap: 20px;
  }
  .stack {
    gap: 20px;
  }
  .profile-head {
    flex-wrap: wrap;
  }
  .list-row {
    flex-wrap: wrap;
  }
  .list-row .grow {
    flex: 1 1 130px;
  }
  .list-row:has([data-action="permissions"]) {
    padding: 18px 0;
  }
  .list-row:has([data-action="permissions"]) > .grow {
    flex-basis: calc(100% - 64px);
  }
  .list-row:has([data-action="permissions"]) button {
    font-size: 12px;
  }
  .finance-head .intro {
    display: block;
  }
  .finance-actions {
    display: flex;
    margin-top: 18px;
    width: 100%;
  }
  .finance-actions button {
    flex: 1;
    min-height: 54px;
    border-radius: 16px;
  }
  .toolbar .tabs {
    width: 100%;
    margin-bottom: 0;
  }
  .calendar-navigation {
    margin-top: 16px;
  }
  .calendar-period {
    font-size: 26px;
  }
  .calendar-week-grid {
    gap: 5px;
  }
  .calendar-week-grid .calendar-day {
    min-height: 85px;
    padding: 9px 3px;
    font-size: 13px;
  }
  .collection-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .collection-actions button {
    flex: 1 1 auto;
  }
  .card > button.list-row {
    width: 100%;
    text-align: left;
  }
  .payment-quote {
    font-size: 13px;
  }
  #bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    min-height: 72px;
    background: #ffffff;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: 0 -6px 24px #0a1a3f04;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 30;
  }
  #bottom button {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 52px;
    font-size: 10px;
    letter-spacing: 0;
    padding: 5px 2px;
    color: #637090;
    border-radius: 14px;
  }
  #bottom button .icon {
    width: 23px;
    height: 23px;
  }
  #bottom button.active {
    background: #e9f0ff;
    color: var(--blue);
  }
  dialog {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    max-height: calc(100dvh - env(safe-area-inset-top) - 14px);
    width: 100%;
    max-width: none;
    border-radius: 28px 28px 0 0;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  .modal-top {
    top: -24px;
  }
  .modal-top h2 {
    font-size: 30px;
  }
  .modal-top:before {
    content: "";
    position: absolute;
    width: 36px;
    height: 4px;
    border-radius: 3px;
    background: #d3dce8;
    top: -13px;
    left: calc(50% - 18px);
  }
  .event-footer .row {
    gap: 8px;
  }
  .event-footer > button {
    margin-left: auto;
  }
  .field-picker {
    max-width: calc(100vw - 40px);
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
  button:active {
    transform: none;
  }
}
@media (max-width: 767px) {
  .intro h1 {
    font-size: 40px;
    line-height: 1.03;
  }
  .section-top h2 {
    max-width: 68%;
  }
  .modal-top h2 {
    max-width: calc(100% - 50px);
  }
}
@media (max-width: 767px) {
  body[data-route="finance"] .metric strong {
    font-size: 24px;
    white-space: nowrap;
    letter-spacing: -0.02em;
  }
  body[data-route="finance"] .metric {
    padding-left: 9px;
    padding-right: 9px;
  }
}
.calendar-filter-chips {
  display: flex;
  gap: 7px;
  overflow: auto;
  width: 100%;
  padding: 2px 0;
  scrollbar-width: none;
}
.calendar-filter-chips button {
  white-space: nowrap;
  border: 1px solid #dce3ee;
  border-radius: 99px;
  background: #fff;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 13px;
}
.calendar-filter-chips button.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.toolbar:has(.calendar-filter-chips) {
  flex-wrap: wrap;
}
.toolbar [hidden] {
  display: none !important;
}
.profile-overview{max-width:680px;display:grid;gap:16px}.profile-identity .profile-head{flex-wrap:nowrap;align-items:center;margin-bottom:18px}.profile-identity .avatar.big{width:72px;height:72px;font-size:22px}.profile-identity .profile-head h2{font-size:29px;margin:0 0 6px}.profile-identity .profile-head p{font-size:13px;margin:0 0 4px;color:var(--muted)}.profile-identity .profile-head small{color:var(--muted);font-size:12px}.profile-identity .secondary{min-height:44px;font-size:13px}.profile-mini-stats{display:grid;grid-template-columns:repeat(3,1fr);margin-top:18px;border-top:1px solid var(--line);padding-top:14px}.profile-mini-stats button{display:flex;flex-direction:column;gap:5px;align-items:center;padding:0 6px;border-radius:8px;min-height:52px;border-right:1px solid var(--line)}.profile-mini-stats button:last-child{border:0}.profile-mini-stats strong{font:700 26px/1 'Fira Sans Extra Condensed',sans-serif}.profile-mini-stats span{font-size:11px;color:var(--muted)}.profile-mini-stats .icon{height:25px;color:var(--blue)}.profile-menu{padding:0 16px}.profile-menu-row{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:15px 0;border-bottom:1px solid var(--line);border-radius:0;min-height:74px}.profile-menu-row:last-child{border-bottom:0}.profile-menu-row .grow{min-width:0;flex:1}.profile-menu-row strong{display:block;font-size:14px;font-weight:600}.profile-menu-row small{display:block;font-size:12px;color:var(--muted);margin-top:4px;line-height:1.35}.profile-menu-icon{width:36px;height:36px;border-radius:11px;background:var(--pale);color:var(--blue);display:grid;place-items:center;flex:none}.profile-menu-icon .icon{width:20px;height:20px}.profile-menu-row .chevron{font-size:23px;color:#93a0b8}.profile-logout{justify-self:center;font-size:13px;color:var(--red);display:flex;align-items:center;gap:8px;margin-top:0}.profile-logout .icon{width:18px;height:18px}.profile-settings-stack{max-width:680px;display:grid;gap:16px}.profile-setting-actions{display:grid;gap:10px}.profile-setting-status p{font-size:14px}.profile-settings-stack .list-row{width:100%;text-align:left}.profile-settings-stack .row{flex-wrap:wrap}
.profile-developer-mode h2{font-size:22px;margin:0}.profile-developer-mode p{font-size:12px;margin:6px 0 14px}.profile-developer-mode .row{display:flex;gap:6px;background:#e8edf5;border-radius:14px;padding:4px}.profile-developer-mode .row button{flex:1;min-height:42px;font-size:13px;border-radius:11px}.profile-developer-mode .row .primary{background:var(--blue);color:white}.profile-developer-mode .row .secondary{background:transparent;color:var(--muted)}
dialog{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:767px){dialog .modal-top{touch-action:none;user-select:none;-webkit-user-select:none}}

.home-statistics-link { margin: 0 0 24px; }
.home-statistics-link .icon { flex-shrink: 0; }

.player-finance-tabs {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr .9fr;
  width: 100%;
}
.player-finance-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 4px;
  font-size: 12px;
}
@media (max-width: 380px) {
  .player-finance-tabs button {
    padding-inline: 2px;
    font-size: 11px;
  }
}

/* The central destination stays in the DOM's keyboard order. */
#bottom .nav-home-symbol {
  width: 46px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--ink);
}
#bottom .nav-home-symbol .bolt { width: 18px; height: 25px; background: white; }
#bottom button.nav-home { gap: 3px; padding-top: 0; font-weight: 700; }
#bottom button.nav-home.active { background: transparent; }
#bottom .nav-home.active .nav-home-symbol { background: var(--blue); }
#bottom button:focus-visible { outline-offset: -2px; }
.home-overview { min-width: 0; }

@media (min-width: 768px) {
  :root { --sidebar-width: 224px; }
  #sidebar {
    width: var(--sidebar-width);
    padding: 28px 18px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    gap: 24px;
  }
  .shell {
    max-width: none;
    margin-inline: var(--sidebar-width) 0;
    padding: 0 clamp(24px, 3vw, 52px) 48px;
  }
  #header { height: 88px; border-bottom: 1px solid var(--line); }
  #app { padding-top: 28px; }
  .header-actions .person-name { display: inline; margin: 0 8px; font-size: 13px; }
  .side-nav button { min-height: 48px; color: var(--muted); }
  .side-nav button.active { color: var(--blue); }
  .side-nav button:hover { background: var(--pale); color: var(--blue); }
  .side-nav button[data-go="home"] { font-weight: 750; }
  .side-label { font-size: 10px; letter-spacing: .04em; line-height: 1.6; }
  .side-foot { font-size: 11px; }
  .intro { margin-bottom: 28px; gap: 20px; flex-wrap: wrap; }
  h1 { font-size: 48px; }
  .layout { align-items: start; }
  .grid.metrics { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
  .metric strong { font-size: clamp(28px, 2.5vw, 36px); }
  .player-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .home-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(210px, 1fr);
    gap: 16px 24px;
    margin-bottom: 28px;
  }
  .home-overview .balance-hero { grid-row: span 2; margin: 0; max-width: none; }
  .home-overview .home-shortcuts { margin: 0; max-width: none; grid-template-columns: 1fr; }
  .home-overview .home-statistics-link { margin: 0; align-self: end; }
  .home-overview .home-statistics-link button { min-height: 56px; }
  .home-overview .shortcut { padding: 18px; }
  .profile-settings-stack { max-width: 800px; }
  dialog { max-height: calc(100dvh - 64px); width: min(620px, calc(100vw - 64px)); padding: 28px; }
  dialog .modal-top { top: -28px; padding-top: 8px; }
  #toast { bottom: 28px; }
}
@media (min-width: 1100px) {
  :root { --sidebar-width: 248px; }
  .layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; }
  .profile-overview { max-width: 1080px; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); align-items: start; gap: 24px; }
  .profile-overview .profile-identity { grid-column: 1; grid-row: 1; }
  .profile-overview .profile-menu { grid-column: 2; grid-row: 1 / span 3; }
  .profile-overview .profile-developer-mode, .profile-overview .profile-logout { grid-column: 1; }
}
/* Keep the loading indicator centered within the original button size. */
button.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: progress;
  opacity: .85;
  pointer-events: none;
  transform: none;
}
.busy-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: request-spin .8s linear infinite;
}
.request-status {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid #dce6ff;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px #0a1a3f14;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}
.request-status[hidden] { display: none; }
.request-status.is-slow { background: #fff7e7; border-color: #f0dfbd; color: #795111; }
@keyframes request-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
  .request-status { right: 16px; left: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .busy-spinner { animation: none; }
}

.access-member-link { display:flex; align-items:center; gap:12px; min-width:180px; text-align:left; border:0; background:transparent; border-radius:12px; padding:8px; color:inherit; }
.access-member-link:hover { background:var(--sky-soft, #eaf6ff); }
.access-member-link small { display:block; margin-top:4px; color:var(--muted, #607487); }
.access-member-link:focus-visible { outline:2px solid #168be1; outline-offset:2px; }

/* Compact collection cards with a disclosure for secondary actions. */
#app .collection-card { padding: 16px; position: relative; overflow: visible; }
#app .collection-card:has(.collection-menu[open]) { z-index: 5; }
#app .collection-list { gap: 12px; margin-top: 14px; }
#app .collection-heading { flex-wrap: nowrap; gap: 8px; align-items: flex-start; }
#app .collection-heading h3 { flex: 1; font-size: 21px; line-height: 1.25; padding-top: 6px; }
#app .collection-heading > .tag { margin-top: 9px; font-size: 11px; }
#app .collection-summary { margin: 8px 0 6px; gap: 6px 12px; }
#app .collection-summary > strong { font-size: 28px; }
#app .collection-menu { flex: none; position: relative; }
#app .collection-menu > summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; list-style: none; cursor: pointer; border-radius: 14px; color: var(--ink); background: var(--pale); }
#app .collection-menu > summary::-webkit-details-marker { display: none; }
#app .collection-menu > summary::after { display: none; }
#app .collection-menu > summary .icon { width: 24px; height: 24px; stroke-width: 3.5; stroke-linecap: round; }
#app .collection-menu > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
#app .collection-menu-items { position: absolute; right: 0; top: 48px; width: 208px; max-width: calc(100vw - 64px); padding: 6px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 18px; background: #f6faff; box-shadow: 0 12px 32px #10244726; z-index: 10; }
#app .collection-menu-items button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 10px 12px; margin: 0; border-radius: 12px; text-align: left; font-size: 13px; }
#app .collection-menu-items .icon { width: 20px; height: 20px; flex: none; }

#app .collection-menu.opens-up .collection-menu-items { top: auto; bottom: 48px; }

/* Compact member identity and secondary management actions. */
#app .member-identity { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px 20px; align-items:center; padding:24px; }
.member-identity-main { display:flex; align-items:center; gap:20px; min-width:0; }
#app .member-identity .avatar.big { width:88px; height:88px; flex:none; }
.member-identity-copy { min-width:0; }
#app .member-identity h2 { margin:0 0 8px; font-size:32px; line-height:1.15; overflow-wrap:anywhere; }
.member-identity-role { font-size:14px; color:var(--muted); }
#app .member-identity p { margin:4px 0 0; font-size:14px; }
#app .member-identity [data-member-presence] { margin-top:8px; font-size:12px; }
#app .member-identity-edit button { min-height:44px; padding:10px 16px; font-size:13px; box-shadow:none; }
.member-identity-edit:empty { display:none; }
.member-management { grid-column:1/-1; border-top:1px solid var(--line); padding-top:8px; }
.member-management > summary { display:flex; align-items:center; justify-content:space-between; min-height:44px; cursor:pointer; list-style:none; font-size:13px; color:var(--muted); border-radius:8px; }
.member-management > summary::-webkit-details-marker { display:none; }
.member-management > summary::after { content:'⌄'; font-size:20px; }
.member-management[open] > summary::after { content:'⌃'; }
.member-management > summary:focus-visible { outline:2px solid var(--blue); outline-offset:4px; }
.member-management-actions { display:flex; flex-wrap:wrap; gap:12px; padding-top:8px; }
#app .member-management-actions button { min-height:44px; padding:10px 16px; font-size:13px; box-shadow:none; }
@media(max-width:1100px) { #app .member-identity { grid-template-columns:minmax(0,1fr); } .member-identity-edit { margin-left:108px; } }
@media(max-width:600px) { #app .member-identity { padding:20px; } .member-identity-main { gap:16px; } #app .member-identity .avatar.big { width:64px; height:64px; } #app .member-identity h2 { font-size:26px; } .member-identity-edit { margin-left:0; } #app .member-identity-edit button { width:100%; } .member-management-actions { flex-direction:column; } }

/* Keep data aligned when a member name or a payment explanation wraps. */
#app .player-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: start;
  gap: 4px 8px;
  white-space: normal;
}
#app .player-tile .avatar { grid-area: 1 / 1; }
#app .player-tile .number { grid-area: 1 / 2; color: #586f88; font-variant-numeric: tabular-nums; }
#app .player-tile :is(h3, p, .tag, .member-presence) { grid-column: 1 / -1; }
#app .player-tile h3 { margin: 8px 0 0; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
#app .player-tile p { margin: 0; font-size: 13px; line-height: 1.35; }
#app .player-tile .tag { justify-self: start; margin-top: 4px; }
#app .profile-mini-stats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
#app .profile-mini-stats button { background: transparent; box-shadow: none; }
#app .card .empty { border: 0; border-radius: 0; padding: 12px 0; text-align: start; }
#app .list-row .amount, #app .metric strong { font-variant-numeric: tabular-nums; }
#app .metrics .metric { display: grid; grid-template-rows: auto auto 1fr; align-items: start; align-content: start; }
#app .metrics .metric strong { margin: 8px 0 4px; }
@media (max-width: 767px) {
  #app .section-top h2:only-child { max-width: 100%; }
  #app .metrics .metric { min-height: 0; }
  body:is([data-route="finance"], [data-route="my-finance"]) #app .metrics .metric strong {
    white-space: normal; overflow-wrap: anywhere; line-height: 1.12;
  }
}

.event-detail-heading { margin: 4px 0 14px; }
.event-detail-heading > span {
  display: inline-flex; align-items: center; gap: 7px;
  color: #224597; font-size: 14px; font-weight: 700;
}
.event-detail-heading > span::before {
  content: ""; width: 10px; height: 10px;
  background: #2857d8; transform: skewX(-15deg);
}
.event-detail-heading h1 { margin: 4px 0; overflow-wrap: anywhere; }
#app .card.event-when {
  color: #fff; border-color: #7091bf;
  background:
    linear-gradient(105deg, #112848dc 6%, #17385ba3 58%, #142947d9),
    url("/textures/satin-wave.webp?v=8a9b612b5bcf5adc6ff9b9c6") 50% 37% / cover no-repeat #193553;
  box-shadow: inset 0 1px 1px #ffffff50, 0 6px 14px -10px #153363;
}
.event-when h2, .event-address h2 { margin: 0 0 6px; }
#app .event-when h2 {
  display: flex; align-items: center; gap: 7px;
  color: #bed6ff;
  font-family: inherit; font-size: 14px; font-weight: 650; line-height: 1.3;
  text-transform: none; letter-spacing: normal;
}
.event-when h2 .icon { width: 17px; height: 17px; }
.event-when time { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; }
.event-when time span { color: #fff; font-size: clamp(16px, 3.8vw, 20px); font-weight: 600; }
.event-when strong { color: #fff; font: 700 clamp(32px, 7vw, 44px)/1.08 "Fira Sans Extra Condensed", sans-serif; font-variant-numeric: tabular-nums; }
#app .card.event-address { border-inline-start: 3px solid #3a69d0; }
.event-address { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.event-address p { margin: 0; color: #1c365d; font-weight: 600; overflow-wrap: anywhere; }
#app .event-map-button {
  width: 44px; height: 44px; padding: 0; flex: none; display: grid; place-items: center;
  border-radius: 14px; border: 1px solid #345bd6; background: linear-gradient(150deg, #406eec, #1e44b4); color: #fff;
}
@media (forced-colors: active) {
  #app .card.event-when { background: Canvas; }
  #app .event-when h2, .event-when time span, .event-when strong, .event-address p { color: CanvasText; }
}
.event-map-options { display: grid; }
.event-map-options a { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 8px; font-weight: 650; }
.event-map-options a + a { border-top: 1px solid var(--line); }
@media (max-width: 767px) {
  #app .detail-back:not(:focus-visible) {
    position: absolute; width: 1px; height: 1px; min-height: 0;
    padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%);
  }
  body[data-route="event"] #app { padding-top: 0; }
}
