:root {
  color-scheme: only light;
  --ink: #17211c;
  --muted: #607269;
  --line: #d8e1dc;
  --surface: #ffffff;
  --surface-soft: #f6f8f6;
  --court: #1f7a55;
  --court-dark: #12533a;
  --lime: #b8d8c2;
  --sky: #dff2ff;
  --beginner: #eadcff;
  --app-max-width: 760px;
  --page-gutter: 18px;
  --date-token-width: 48px;
  --header-control-size: 42px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  color-scheme: only light;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255,255,255,.86), rgba(255,255,255,.78)),
    repeating-linear-gradient(0deg, transparent 0 48px, rgba(31,122,85,.08) 48px 50px),
    linear-gradient(135deg, #f7fbf8, #eef6ff);
}

.staging-banner {
  background: #6b4f00;
  color: #fff8dc;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

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

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  min-height: 40px;
  padding: 0 8px;
  cursor: pointer;
}

button:hover {
  border-color: var(--court);
}

button:disabled,
button:disabled:hover {
  border-color: var(--line);
  background: #eef2ef;
  color: #9aa8a1;
  cursor: not-allowed;
}

button.is-loading {
  position: relative;
  color: transparent !important;
}

button.is-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #607269;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
  animation: button-spin .72s linear infinite;
}

@keyframes button-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.primary {
  border-color: var(--court-dark);
  background: var(--court);
  color: #fff;
  font-weight: 700;
}

.secondary {
  border-color: var(--court);
  background: #fff;
  color: var(--court-dark);
  font-weight: 700;
}

.system-admin-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--header-control-size);
  height: var(--header-control-size);
  min-height: var(--header-control-size);
  padding: 0;
  border: 1px solid var(--court);
  border-radius: 50%;
  text-decoration: none;
}

.system-admin-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

.danger {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
  font-weight: 800;
}

.ghost {
  min-height: 30px;
  padding: 0 8px;
  color: var(--muted);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(207, 220, 213, 0.9);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: grid;
  gap: 6px;
  width: min(var(--app-max-width), calc(100vw - var(--page-gutter) * 2));
  margin: 0 auto;
  padding: 16px 0;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.eyebrow.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-bottom: 0;
}

.brand-wordmark-sport {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}

.brand-wordmark-name {
  color: var(--court-dark);
  font-weight: 900;
  letter-spacing: 0;
}

.brand-wordmark-divider {
  color: var(--muted);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-1px);
}

.brand-wordmark-up {
  color: var(--court);
}

.auth-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.auth-login-button {
  min-height: 32px;
}

.header-account-button {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  font-weight: 900;
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 24px rgba(20,58,42,.08);
  padding: 6px 8px 6px 6px;
}

.auth-user img {
  width: var(--header-control-size);
  height: var(--header-control-size);
  border-radius: 50%;
  background: var(--line);
  object-fit: cover;
}

.auth-user div {
  display: grid;
  min-width: 0;
}

.auth-user strong,
.auth-user span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user strong {
  font-size: 15px;
  line-height: 1.1;
}

.auth-user span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-user .ghost {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}

.profile-icon-button,
.logout-icon-button {
  display: inline-grid;
  position: relative;
  place-items: center;
  width: var(--header-control-size);
  height: var(--header-control-size);
  min-height: var(--header-control-size);
  border-radius: 50%;
  padding: 0;
}

.profile-icon-button svg {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.logout-icon-button svg {
  width: 24px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  transform: translateX(-1px);
}

.title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.title-row h1 {
  min-width: 0;
}

.topbar-actions-shell {
  width: min(var(--app-max-width), calc(100vw - var(--page-gutter) * 2));
  margin: 0 auto;
}

.topbar-actions-shell:not(:has(.title-actions > :not(.hidden))) .title-actions {
  display: none;
}

.topbar-actions-shell:not(:has(.title-actions > :not(.hidden))) + .shell .landing-view {
  padding-top: 16px;
}

.title-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 16px 0;
}

.title-actions .top-create-button,
.title-actions .system-admin-button,
.title-actions .member-manage-button,
.title-actions .preview-role-button,
.title-row .profile-icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.02;
}

.top-create-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--header-control-size);
  height: var(--header-control-size);
  min-height: var(--header-control-size);
  border-radius: 50%;
  padding: 0;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.member-manage-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: var(--header-control-size);
  height: var(--header-control-size);
  min-height: var(--header-control-size);
  border-radius: 50%;
  padding: 0;
}

.member-manage-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.preview-role-control {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.preview-role-button {
  display: inline-grid;
  place-items: center;
  width: var(--header-control-size);
  height: var(--header-control-size);
  min-height: var(--header-control-size);
  border-radius: 50%;
  padding: 0;
}

.preview-role-button.is-active {
  background: #eef8f2;
  border-color: var(--court);
  color: var(--court);
}

.preview-role-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.preview-role-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 126px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(18, 42, 31, 0.14);
}

.preview-role-menu button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
  text-align: left;
  font-size: 14px;
  font-weight: 900;
}

.preview-role-menu button:hover,
.preview-role-menu button.is-active {
  background: #edf7f1;
  color: var(--court-dark);
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--court-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.shell {
  display: grid;
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: min(var(--app-max-width), calc(100vw - var(--page-gutter) * 2));
  margin: 0 auto 48px;
}

.line-browser-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  border: 1px solid #b7d7c8;
  border-radius: 8px;
  background: #edf7f2;
  box-shadow: 0 8px 22px rgba(18,83,58,.08);
  padding: 10px 12px;
}

.line-browser-notice-copy {
  min-width: 0;
}

.line-browser-notice-copy strong {
  color: var(--court-dark);
  font-size: 14px;
  line-height: 1.3;
}

.line-browser-notice-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.line-browser-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 2px solid var(--court);
  border-radius: 8px;
  background: var(--court);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  padding: 0 12px;
}

.line-browser-dismiss-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-color: #b7d7c8;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  padding: 0;
}

.line-browser-dismiss-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.panel,
.event-summary,
.signup-bar,
.login-callout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 28px rgba(18,83,58,.08);
}

.panel {
  padding: 22px;
}

.landing-view {
  display: grid;
  align-content: start;
  gap: 16px;
}

.landing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.event-filter {
  display: flex;
  gap: 4px;
  border: 1px solid #bad4c7;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  padding: 4px;
}

.event-filter button {
  flex: 1 1 0;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.event-filter button.active {
  border-color: var(--court-dark);
  background: var(--court);
  color: #fff;
}

.event-status-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: -2px;
}

.status-help-link {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #cfe0d8;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--court-dark);
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
}

.status-help-link:hover {
  border-color: var(--court);
  background: #edf7f2;
}

.event-status-filter button {
  min-height: 34px;
  border-color: #cfe0d8;
  background: rgba(255,255,255,.9);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.event-status-filter button.active {
  border-color: var(--court);
  background: #edf7f2;
  color: var(--court-dark);
}

.mini-calendar {
  display: grid;
  gap: 8px;
  border: 1px solid #bad4c7;
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  padding: 12px;
  box-shadow: 0 10px 28px rgba(18,83,58,.06);
}

.mini-calendar-header {
  display: grid;
  grid-template-columns: 36px 1fr auto 36px;
  align-items: center;
  gap: 8px;
}

.mini-calendar-header strong {
  text-align: center;
  color: var(--court-dark);
  font-size: 16px;
  font-weight: 950;
}

.mini-calendar-nav {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
}

.mini-calendar-today {
  min-height: 34px;
  padding: 0 8px;
  border-color: #cfe0d8;
  background: rgba(255,255,255,.9);
  color: var(--muted);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.mini-calendar-weekdays,
.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.mini-calendar-weekdays span {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mini-calendar-day {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 50px;
  border-color: #abcdbb;
  border-radius: 8px;
  background: #dff0e7;
  padding: 6px 2px;
  color: var(--ink);
}

.mini-calendar.month-mode .mini-calendar-day {
  min-height: 44px;
}

.mini-calendar-day.empty {
  background: #f7faf8;
  color: #8a9991;
}

.mini-calendar-day.muted {
  border-color: #edf3ef;
  background: #fbfdfb;
  color: #9caaa3;
}

.mini-calendar-day.muted .mini-calendar-count {
  background: #dfe8e2;
  color: #7d8d85;
}

.mini-calendar-day.archived-only .mini-calendar-count {
  background: #6f7c75;
  color: #fff;
}

.mini-calendar-day.pending .mini-calendar-count {
  background: #b42318;
  color: #fff;
}

.mini-calendar-day.active {
  border-color: var(--court-dark);
  background: var(--court);
  color: #fff;
}

.mini-calendar-date {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
}

.mini-calendar-count {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--court);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.mini-calendar-day.empty .mini-calendar-count {
  background: #edf2ef;
  color: #91a098;
}

.mini-calendar-day.active .mini-calendar-count {
  background: #fff;
  color: var(--court-dark);
}

.mini-calendar-day.active.archived-only .mini-calendar-count {
  background: #dfe3df;
  color: #59645e;
}

.mini-calendar-day.active.pending .mini-calendar-count {
  background: #fee4e2;
  color: #b42318;
}

.event-list {
  display: grid;
  gap: 12px;
}

.help-shell {
  gap: 18px;
}

.help-view {
  display: grid;
  gap: 18px;
}

.help-summary {
  margin-top: 0;
}

.help-section {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 28px rgba(18,83,58,.08);
  padding: 18px;
}

.status-flow {
  display: grid;
  justify-items: center;
  gap: 0;
}

.status-flow.short {
  max-width: 520px;
  margin-inline: auto;
  width: 100%;
}

.status-node {
  width: min(100%, 520px);
  display: grid;
  gap: 6px;
  border: 1px solid var(--court);
  border-radius: 8px;
  background: #eaf6ef;
  padding: 14px 16px;
  text-align: center;
}

.status-node strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
}

.status-node span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.status-node.compact strong {
  font-size: 19px;
}

.status-node.warning {
  border-color: #c49a34;
  background: #fff7df;
}

.status-node.done {
  border-color: #6f7c75;
  background: #e5e9e6;
}

.status-node.canceled {
  border-color: #b43b3b;
  background: #ffe9e9;
}

.status-node.neutral {
  border-color: #aab6b0;
  background: #f6f8f6;
}

.status-node.deleted {
  border-color: #999;
  background: #f5f5f5;
  border-style: dashed;
}

.status-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 52px;
  padding: 0 10px;
  color: var(--court-dark);
  font-size: 14px;
  font-weight: 950;
  text-align: center;
}

.status-action::before {
  display: block;
  width: 2px;
  height: 18px;
  margin: 0 auto 4px;
  background: #abcdbb;
  content: "";
}

.status-action::after {
  display: block;
  width: 0;
  height: 0;
  margin: 4px auto 0;
  border-top: 8px solid #abcdbb;
  border-inline: 6px solid transparent;
  content: "";
}

.status-action span {
  display: inline-block;
  max-width: min(420px, calc(100vw - 72px));
  border: 1px solid #dbe8e1;
  border-radius: 999px;
  background: #fff;
  padding: 3px 10px;
  line-height: 1.35;
}

.status-action.important {
  color: var(--court-dark);
}

.status-action.important::before,
.status-action.important::after {
  border-top-color: var(--court);
  background: var(--court);
}

.status-action.secondary {
  color: #59645e;
}

.status-action.secondary::before,
.status-action.secondary::after {
  border-top-color: #9fa9a3;
  background: #9fa9a3;
}

.status-action.danger {
  background: #fff;
  color: #8d1f1f;
}

.status-action.danger::before,
.status-action.danger::after {
  border-top-color: #d79090;
  background: #d79090;
}

.status-action.danger span {
  border-color: #f0c7c7;
  background: #fff;
}

.status-action.deleted {
  color: #666;
}

.status-action.deleted::before,
.status-action.deleted::after {
  border-top-color: #aaa;
  background: #aaa;
}

.scenario-list {
  display: grid;
  gap: 10px;
}

.scenario-list div {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe6e0;
  border-radius: 8px;
  background: #fbfdfb;
  padding: 12px;
}

.scenario-list strong {
  color: var(--court-dark);
  font-size: 16px;
  font-weight: 950;
}

.scenario-list span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.event-list-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 28px rgba(18,83,58,.08);
  padding: 14px;
}

.event-date-block {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-height: 104px;
  border-radius: 8px;
  background: var(--court-dark);
  color: #fff;
}

.event-list-card.ended .event-date-block,
.event-list-card.canceled .event-date-block,
.event-list-card.archived .event-date-block {
  background: #6f7c75;
}

.event-list-card.ended .event-weekday,
.event-list-card.canceled .event-weekday,
.event-list-card.archived .event-weekday {
  color: #4d5a53;
}

.event-list-card.canceled {
  border-color: #dac7a3;
  background: rgba(255,250,239,.94);
}

.event-list-card.archived {
  border-color: #ccd6d1;
  background: rgba(246,248,246,.94);
}

.event-weekday {
  display: inline-grid;
  place-items: center;
  min-width: var(--date-token-width);
  min-height: 28px;
  border-radius: 5px;
  background: #fff;
  color: var(--court-dark);
  padding: 0 8px;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.event-month {
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.event-day {
  display: inline-grid;
  place-items: center;
  width: var(--date-token-width);
  margin-top: 1px;
  margin-bottom: 2px;
  font-size: 30px;
  font-weight: 950;
  line-height: .95;
}

.event-list-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.event-list-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.event-list-topline h3 {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.event-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.event-title-line h3 {
  margin-bottom: 0;
}

.event-ended-chip,
.event-canceled-chip,
.event-archived-chip,
.event-unopened-chip {
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 900;
}

.event-ended-chip {
  background: #e8eee9;
  color: var(--muted);
}

.event-canceled-chip {
  background: #fff0d5;
  color: #865c0b;
}

.event-archived-chip {
  background: #edf0ee;
  color: #65756d;
}

.event-unopened-chip {
  background: #eef4ef;
  color: #607269;
}

.event-list-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.my-registration-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.my-registration-chip {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.my-registration-chip[data-color-slot="a"] {
  background: #dff6e9;
  color: #12533a;
}

.my-registration-chip[data-color-slot="b"] {
  background: var(--sky);
}

.my-registration-chip[data-color-slot="c"] {
  background: var(--beginner);
}

.my-registration-chip[data-color-slot="d"] {
  background: #ffe1e1;
}

.my-registration-chip[data-color-slot="other"] {
  background: #dfe5e1;
  color: #34443c;
}

.my-registration-chip.waitlisted {
  border-color: rgba(116,83,21,.22);
}

.event-open-link {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 58px;
  min-height: 36px;
  border: 1px solid var(--court);
  border-radius: 8px;
  color: var(--court-dark);
  font-weight: 900;
  padding: 0 8px;
  text-decoration: none;
}

.event-progress {
  position: relative;
  overflow: hidden;
  min-height: 30px;
  border: 1px solid #c7ded2;
  border-radius: 8px;
  background: #eef7f1;
}

.event-progress::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  background: var(--lime);
  content: "";
}

.event-progress::after {
  position: absolute;
  inset: 0 auto 0 var(--progress);
  width: var(--deduction, 0%);
  background: #f4b2b2;
  content: "";
}

.event-progress.has-deduction span {
  color: #8d1f1f;
}

.event-progress span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--court-dark);
  font-size: 13px;
  font-weight: 900;
}

.event-list-divisions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-list-divisions span {
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.event-list-divisions span[data-color-slot="a"] {
  background: #dcf4e9;
}

.event-list-divisions span[data-color-slot="b"] {
  background: var(--sky);
}

.event-list-divisions span[data-color-slot="c"] {
  background: var(--beginner);
}

.event-list-divisions span[data-color-slot="d"] {
  background: #ffe1e1;
}

.event-list-divisions span[data-color-slot="other"] {
  background: #dfe5e1;
  color: #34443c;
}

.empty-state {
  display: grid;
  gap: 5px;
  border: 1px dashed #b9c9c0;
  border-radius: 8px;
  background: rgba(255,255,255,.7);
  color: var(--muted);
  padding: 22px;
}

.empty-state strong {
  color: var(--ink);
}

.section-heading,
.division-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.event-form {
  display: grid;
  gap: 18px;
}

.event-form button {
  height: 36px;
  min-height: 36px;
}

.helper-text {
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.member-panel {
  display: grid;
  gap: 14px;
}

.member-overview-panel .helper-text {
  margin-bottom: 0;
}

.member-content-panel {
  display: grid;
  gap: 16px;
}

.profile-required-note {
  color: #b42318;
  margin-bottom: 0;
}

.member-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.member-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid #cfe0d8;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--muted);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: none;
}

.member-tabs button.active {
  border-color: var(--court);
  background: #edf7f2;
  color: var(--court-dark);
}

.member-tabs button:hover {
  border-color: var(--court);
  background: #edf7f2;
}

.member-tab-panel {
  display: grid;
  gap: 16px;
}

.member-search {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.member-total-count {
  color: var(--muted);
  font-size: 13px;
}

.member-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  padding: 11px 12px;
}

.member-list {
  display: grid;
  gap: 10px;
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.member-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.member-identity img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.member-identity div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.member-identity strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-identity .member-name-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: inherit;
  font-family: inherit;
}

.member-identity span {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-role-select {
  width: auto;
  min-width: 112px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--court-dark);
  padding: 8px 10px;
  font-weight: 900;
}

.attendance-settings-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.attendance-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-heading.compact h3,
.attendance-settings-head h3,
.attendance-summary-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
}

.attendance-toggle-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 5px 10px;
  font-size: 14px;
  font-weight: 900;
}

.attendance-toggle-control.active {
  border-color: rgba(31, 122, 85, .35);
  color: var(--court-dark);
}

.attendance-toggle-control.active .toggle-switch {
  border-color: var(--court);
  background: var(--court);
}

.attendance-toggle-control.active .toggle-switch::after {
  transform: translateX(20px);
}

.attendance-rule-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.attendance-rule-summary div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.attendance-rule-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.attendance-rule-summary strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attendance-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.refresh-attendance-button {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  padding: 0;
}

.refresh-attendance-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.attendance-summary-list {
  display: grid;
  gap: 10px;
}

.attendance-summary-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.attendance-summary-row img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--line);
  object-fit: cover;
}

.attendance-summary-row-body {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.attendance-summary-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attendance-summary-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.attendance-summary-row h4 {
  overflow: hidden;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-line-name {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.attendance-summary-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.attendance-records-button,
.attendance-release-button {
  min-height: 36px;
}

.attendance-records-list,
.attendance-summary-records {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.attendance-records-dialog .confirm-dialog-card {
  gap: 12px;
}

.attendance-records-section {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.attendance-records-section h4 {
  margin: 0;
  color: var(--court-dark);
  font-size: 15px;
  font-weight: 900;
}

.muted-line {
  color: var(--muted);
}

.attendance-penalty-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fee4e2;
  color: #b42318;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.attendance-release-button {
  justify-self: end;
  height: 36px;
  min-height: 36px;
}

.grid {
  display: grid;
  gap: 14px;
}

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

.grid.compact {
  gap: 10px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--court-dark);
  font-size: 15px;
  font-weight: 900;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--court);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--court-dark);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  border: 1px solid #c8d7d0;
  border-radius: 999px;
  background: #dce5e0;
  transition: background-color .16s ease, border-color .16s ease;
}

.toggle-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 34, 27, .24);
  content: "";
  transition: transform .16s ease;
}

.toggle-row input:checked + .toggle-switch {
  border-color: var(--court);
  background: var(--court);
}

.toggle-row input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.toggle-row input:focus-visible + .toggle-switch {
  outline: 2px solid rgba(31, 122, 85, .28);
  outline-offset: 2px;
}

.option-list {
  display: grid;
  gap: 16px;
}

.event-toggle-row {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  gap: 14px 28px;
}

.event-rule-grid {
  display: grid;
  grid-template-columns: minmax(180px, .85fr) minmax(300px, 1.4fr) minmax(190px, .9fr);
  align-items: start;
  gap: 14px 18px;
}

.event-rule-group {
  display: grid;
  gap: 7px;
}

.event-opening-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
}

input[readonly] {
  background: #eef2ef;
  color: var(--muted);
  cursor: default;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

textarea {
  min-height: 180px;
  line-height: 1.55;
  resize: vertical;
}

.division-editor {
  display: grid;
  gap: 10px;
}

.division-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.division-editor-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.division-editor-list {
  display: grid;
  gap: 10px;
}

.division-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-soft);
}

.division-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.division-row strong {
  font-size: 18px;
}

.division-row[data-color-slot="a"] strong {
  color: var(--court-dark);
}

.division-row[data-color-slot="b"] strong {
  color: #2b73b9;
}

.division-row[data-color-slot="c"] strong {
  color: #7b4bc4;
}

.division-row[data-color-slot="d"] strong {
  color: #b43f3f;
}

.division-row[data-color-slot="other"] strong {
  color: #6f7f77;
}

.division-fields {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.division-fields input {
  min-height: 38px;
  padding: 8px 10px;
}

.event-rule-grid input[name="previewOpensTime"],
.event-rule-grid input[name="registrationOpensTime"],
.event-rule-grid select[name="cancellationCutoffHours"] {
  height: 40px;
  min-height: 40px;
  padding: 8px 10px;
}

.event-rule-grid select[name="cancellationCutoffHours"] {
  width: 100%;
}

.division-remove-button {
  padding: 0 8px;
}

.division-remove-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.division-total {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.division-total output {
  display: grid;
  place-items: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2ef;
  color: var(--court-dark);
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 900;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.actions button {
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
}

.form-message {
  order: 2;
  flex-basis: 100%;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.form-message.error {
  color: #b42318;
}

.event-opening-warning {
  grid-column: 1 / -1;
  margin: 0;
  color: #9a6700;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.45;
}

.name-dialog,
.profile-dialog,
.confirm-dialog,
.attendance-settings-dialog,
.repeat-register-dialog,
.proxy-register-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(18,83,58,.22);
  overflow: hidden;
}

.name-dialog::backdrop,
.profile-dialog::backdrop,
.confirm-dialog::backdrop,
.attendance-settings-dialog::backdrop,
.repeat-register-dialog::backdrop,
.proxy-register-dialog::backdrop {
  background: rgba(23,33,28,.38);
}

.name-dialog-card,
.profile-dialog-card,
.confirm-dialog-card,
.attendance-settings-dialog-card,
.repeat-register-card,
.proxy-register-card {
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
}

.name-dialog-card .form-message,
.profile-dialog-card .form-message,
.confirm-dialog-card .form-message,
.attendance-settings-dialog-card .form-message,
.repeat-register-card .form-message,
.proxy-register-card .form-message {
  margin: 0;
  text-align: left;
}

.profile-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.profile-dialog-head img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--line);
  object-fit: cover;
}

.profile-dialog-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-dialog-head strong {
  color: var(--court-dark);
  font-weight: 900;
}

.profile-dialog-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-logout-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin-left: auto;
  border: 1px solid var(--court);
  background: #fff;
  color: var(--court-dark);
}

.profile-logout-button svg {
  transform: none;
}

.profile-field-label {
  margin: 0 0 -8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

#profileDuprSection {
  display: grid;
  gap: 16px;
}

#profileNotificationSection:not([hidden]) {
  display: grid;
  gap: 16px;
}

.profile-attendance-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.profile-dupr-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
}

.profile-dupr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-dupr-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-dupr-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.profile-dupr-head span,
.profile-dupr-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.profile-dupr-action {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
}

.profile-dupr-ratings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-dupr-ratings[hidden],
.profile-dupr-secondary-actions[hidden] {
  display: none;
}

.profile-dupr-ratings > span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 10px;
}

.profile-dupr-ratings small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-dupr-ratings strong {
  color: var(--court-dark);
  font-size: 22px;
  font-weight: 900;
}

.profile-dupr-secondary-actions {
  display: flex;
  gap: 8px;
}

.profile-dupr-secondary-actions button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 13px;
}

.danger-text {
  color: #b42318;
}

.dupr-sso-dialog {
  width: min(94vw, 520px);
  border: 0;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(23,33,28,.24);
}

.dupr-sso-dialog::backdrop {
  background: rgba(23,33,28,.5);
}

.dupr-sso-dialog-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.dupr-sso-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dupr-sso-dialog-head h3,
.dupr-sso-dialog-head p {
  margin: 0;
}

.dupr-sso-dialog iframe {
  width: 100%;
  height: min(620px, 68dvh);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.profile-line-friend-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
}

.profile-line-friend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-line-friend-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.profile-line-friend-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.profile-line-friend-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.line-notification-bell.profile-line-friend-bell {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: #9aa9a2;
}

.line-notification-bell.profile-line-friend-bell .bell-motion {
  stroke: #9aa9a2;
}

.line-notification-bell.profile-line-friend-bell[data-active="true"] {
  fill: var(--court);
}

.line-notification-bell.profile-line-friend-bell[data-active="true"] .bell-motion {
  stroke: var(--court);
}

.profile-line-friend-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-line-friend-status[data-status="blocked"] .profile-line-friend-bell {
  fill: #b42318;
}

.profile-line-friend-status[data-status="blocked"] .profile-line-friend-bell .bell-motion {
  stroke: #b42318;
}

.profile-line-add-friend {
  display: block;
  flex: 0 0 auto;
  justify-self: start;
  height: 36px;
  line-height: 0;
}

.profile-line-add-friend[hidden] {
  display: none;
}

.profile-line-add-friend img {
  display: block;
  width: auto;
  height: 36px;
  border: 0;
}

.profile-line-friend-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.profile-attendance-summary {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.6;
}

.profile-attendance-summary.warning {
  color: #b42318;
}

.profile-attendance-records {
  display: grid;
  justify-items: start;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.profile-attendance-toggle {
  border: 1px solid var(--court);
  border-radius: 8px;
  background: var(--surface);
  color: var(--court-dark);
  min-height: 36px;
  padding: 0 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.profile-attendance-toggle:disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.confirm-dialog-text {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
}

.dialog-actions {
  justify-content: flex-end;
}

.repeat-limit-field {
  min-width: min(280px, 100%);
}

.repeat-limit-field input {
  width: 60px;
  height: 40px;
  min-height: 40px;
  padding: 8px 10px;
}

.event-rule-grid input[name="previewOpensDaysBefore"],
.event-rule-grid input[name="registrationOpensDaysBefore"] {
  width: 100%;
  height: 40px;
  min-height: 40px;
}

.repeat-register-card h3,
.proxy-register-card h3 {
  margin: 0;
  font-size: 24px;
}

.repeat-signup-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.repeat-signup-summary h4 {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--court-dark);
  font-size: 14px;
  font-weight: 900;
}

.repeat-signup-summary label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.repeat-signup-summary .checkbox-row {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--court-dark);
  font-size: 14px;
  font-weight: 900;
}

.repeat-signup-summary input {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.repeat-paddle {
  grid-column: 1 / -1;
  margin-top: -8px;
  margin-bottom: -8px;
}

.repeat-count-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.repeat-count-option {
  display: inline-flex;
  cursor: pointer;
}

.repeat-count-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.repeat-count-option span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #c8ddd2;
  border-radius: 50%;
  background: #eef7f2;
  color: var(--court-dark);
  font-size: 16px;
  font-weight: 900;
}

.repeat-count-option input:checked + span {
  border-color: var(--court-dark);
  background: var(--court);
  color: #fff;
}

.repeat-count-option.disabled {
  cursor: not-allowed;
}

.repeat-count-option.disabled span {
  border-color: var(--line);
  background: #eef2ee;
  color: var(--muted);
}

.repeat-count-empty {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.share-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#copyShareButton {
  height: 36px;
  min-height: 36px;
}

.share-actions span {
  color: var(--court-dark);
  font-size: 13px;
  font-weight: 800;
  min-width: 42px;
  text-align: right;
}

.share-layout {
  display: block;
}

.line-preview {
  overflow: hidden;
  border: 1px solid #bad4c7;
  border-radius: 8px;
  background: #e8f6ee;
}

.line-preview-header {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  background: #06c755;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.line-preview pre {
  width: auto;
  margin: 16px;
  border-radius: 8px;
  background: #fff;
  color: #1d2a24;
  box-shadow: 0 8px 18px rgba(18,83,58,.12);
  font: 14px/1.58 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  padding: 16px;
}

.event-view {
  display: grid;
  gap: 18px;
}

.event-summary {
  padding: 22px;
}

.event-summary-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.event-summary-topline > div:first-child {
  min-width: 0;
}

.event-summary h2 {
  font-size: 24px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.event-action-button {
  flex: 0 0 auto;
  min-height: 36px;
  border-color: #b7d7c8;
  background: #edf7f2;
  color: var(--court-dark);
  font-weight: 900;
}

.event-action-button.danger {
  border-color: #d0b5ad;
  background: #fff5f2;
  color: #9a3412;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button.refresh-attendance-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.event-summary-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.header-event-actions {
  margin-right: auto;
}

.member-header-actions {
  margin-right: auto;
}

.header-event-actions .back-home-button {
  order: 1;
}

.header-event-actions #shareEventLinkButton {
  order: 2;
}

.header-event-actions .event-management-menu {
  order: 3;
}

.header-event-actions .event-management-options {
  right: auto;
  left: 0;
}

.event-management-menu {
  position: relative;
}

.event-management-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 136px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 42px rgba(18,83,58,.16);
  padding: 6px;
}

.event-menu-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--court-dark);
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.event-menu-item:hover {
  border-color: #cfe0d8;
  background: #edf7f2;
}

.event-menu-item.danger {
  color: #9a3412;
}

.event-menu-item.danger:hover {
  border-color: #edd0c7;
  background: #fff5f2;
}

.meta {
  color: var(--muted);
  font-weight: 700;
}

#eventNotes {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.event-ended-banner {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  border: 1px solid #d8c28c;
  border-radius: 8px;
  background: #fff6da;
  color: #6b4b08;
  padding: 10px 12px;
  font-weight: 900;
}

.signup-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.signup-heading {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--court-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.login-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
  font-weight: 800;
}

.login-callout button {
  flex: 0 0 auto;
}

.signup-paddle {
  grid-column: 1 / -1;
}

.signup-bar.disabled {
  opacity: .62;
}

.division-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.register-button:disabled {
  border-color: #b9c9c0;
  background: #dfe7e3;
  color: #607269;
  cursor: not-allowed;
}

.divisions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.division-card {
  border: 1px solid var(--line);
  border-top: 6px solid #9aa8a1;
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  min-width: 0;
}

.division-card[data-color-slot="a"] {
  border-top: 6px solid var(--court);
}

.division-card[data-color-slot="b"] {
  border-top: 6px solid #2b73b9;
}

.division-card[data-color-slot="c"] {
  border-top: 6px solid #9a6be8;
}

.division-card[data-color-slot="d"] {
  border-top: 6px solid #d85b5b;
}

.division-card[data-color-slot="other"] {
  border-top: 6px solid #9aa8a1;
}

.capacity-pill {
  display: inline-grid;
  place-items: center;
  height: 28px;
  border-radius: 999px;
  background: var(--lime);
  padding: 5px 10px;
  color: var(--court-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.division-head {
  align-items: center;
}

.division-title-block {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.division-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.division-title-line h3 {
  font-size: 22px;
}

.division-court-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.proxy-register-button,
.register-button {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 36px;
  border-radius: 8px;
}

.lists {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.lists h4 {
  margin-bottom: 8px;
  font-size: 14px;
}

.cancelled-block {
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.cancelled-list li {
  color: #77877f;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 0;
}

li {
  min-height: 32px;
  color: var(--muted);
}

li:not(.empty) {
  padding-left: 0;
}

li span {
  color: var(--ink);
  font-weight: 700;
}

.registration-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px 0;
  min-height: 0;
}

.registration-main {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  grid-column: 1 / -1;
  gap: 8px 0;
  min-height: 30px;
}

.registration-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.registration-name {
  margin-right: 0;
}

.registration-line-icon {
  width: 16px;
  height: 16px;
  margin: 0 2px;
  object-fit: contain;
  vertical-align: -3px;
}

.line-notification-bell {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: var(--court);
  stroke: none;
}

.line-notification-bell .bell-motion {
  fill: none;
  stroke: var(--court);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.line-notification-bell.inactive {
  fill: #9aa9a2;
}

.line-notification-bell.inactive .bell-motion {
  stroke: #9aa9a2;
}

.registration-index {
  min-width: 18px;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
}

.registration-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  grid-column: 2;
  gap: 8px;
}

.paddle-badge {
  display: inline-grid;
  place-items: center;
  height: 24px;
  border-radius: 5px;
  background: #fff2c7;
  color: #745315;
  padding: 0 7px;
  font-size: 13px;
  line-height: 1;
}

.proxy-badge {
  display: inline-grid;
  place-items: center;
  height: 24px;
  border-radius: 5px;
  background: #e6f0ea;
  color: #12533a;
  padding: 0 7px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.attendance-badge {
  display: inline-grid;
  place-items: center;
  height: 24px;
  border-radius: 5px;
  padding: 0 7px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.attendance-badge.pending {
  background: #eef2ef;
  color: var(--muted);
}

.attendance-badge.checked-in {
  background: #dff6ea;
  color: var(--court-dark);
}

.attendance-badge.absent {
  background: #ffe1e1;
  color: #9f2f2f;
}

.registration-actions button {
  min-height: 34px;
  padding: 0 8px;
  font-size: 14px;
}

.empty {
  list-style: none;
  margin-left: 0;
}

.hidden {
  display: none !important;
}

.site-footer {
  width: min(var(--app-max-width), calc(100vw - var(--page-gutter) * 2));
  margin: 28px auto 24px;
  color: #9aaaa2;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

@media (max-width: 880px) {
  .grid.two,
  .divisions {
    grid-template-columns: 1fr;
  }

  .login-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-box {
    justify-content: flex-end;
  }

  .auth-login-button {
    width: auto;
  }

  .auth-user {
    width: auto;
    max-width: 100%;
  }

  .division-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-rule-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  :root {
    --page-gutter: 12px;
    --date-token-width: 42px;
    --header-control-size: 38px;
  }

  h1 {
    font-size: 28px;
  }

  .title-row {
    gap: 8px;
  }

  .top-create-button {
    font-size: 24px;
  }

  .auth-user {
    gap: 8px;
    padding: 5px 7px 5px 5px;
  }

  .auth-user strong,
  .auth-user span {
    max-width: 78px;
  }

  .auth-user .ghost {
    min-height: var(--header-control-size);
    padding: 0;
  }

  .member-row {
    align-items: stretch;
    flex-direction: column;
  }

  .member-role-select {
    width: 100%;
  }

  .event-toggle-row,
  .event-rule-grid {
    grid-template-columns: 1fr;
  }

  .event-opening-fields {
    grid-template-columns: 1fr;
  }

  .event-rule-grid input[name="repeatRegistrationLimit"],
  .event-rule-grid input[name="previewOpensDaysBefore"],
  .event-rule-grid input[name="registrationOpensDaysBefore"] {
    width: 100%;
  }

  .grid.three,
  .attendance-rule-summary {
    grid-template-columns: 1fr;
  }

  .attendance-summary-head,
  .attendance-summary-row-head {
    align-items: stretch;
    flex-direction: column;
  }

  .attendance-summary-row {
    grid-template-columns: 1fr;
  }

  .title-actions {
    margin-left: auto;
  }

  .landing-head {
    gap: 10px;
  }

  .landing-head .primary {
    padding: 0 8px;
  }

  .mini-calendar {
    gap: 6px;
    padding: 8px;
  }

  .mini-calendar-weekdays,
  .mini-calendar-grid {
    gap: 3px;
  }

  .mini-calendar-day {
    min-height: 46px;
    gap: 5px;
    padding: 6px 1px;
  }

  .mini-calendar-date {
    font-size: 12px;
  }

  .mini-calendar-count {
    font-size: 10px;
  }

  .event-list-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .event-date-block {
    min-height: 96px;
  }

  .event-weekday {
    font-size: 13px;
  }

  .event-day {
    font-size: 30px;
  }

  .event-open-link {
    min-width: 52px;
    padding: 0 8px;
  }

  .header-account-button {
    min-width: 52px;
  }

  .event-list-meta {
    font-size: 13px;
  }

  .event-list-divisions {
    gap: 6px;
  }

  .event-list-divisions span {
    padding: 6px 8px;
  }

  .event-summary-topline {
    display: grid;
    align-items: stretch;
    justify-content: stretch;
    gap: 12px;
  }

  .event-summary-topline > div:first-child {
    width: 100%;
  }

  .event-summary .event-summary-actions {
    justify-self: stretch;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

}
