:root {
  --green: #004411;
  --green-2: #0a5a24;
  --away: #4f5b57;
  --practice: #1f6f8b;
  --gold: #d7b84b;
  --ink: #182018;
  --muted: #617062;
  --line: #d9dfd7;
  --paper: #ffffff;
  --wash: #f4f6f1;
  --bad: #9d2f24;
  --good: #116a33;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Roboto, Arial, sans-serif;
}

.wrap {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  background: var(--green);
  color: white;
  font-size: 13px;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  min-height: 36px;
  align-items: center;
  padding: 8px 0;
}

.topbar-link {
  color: white;
}

.topbar-inner .topbar-link[hidden] {
  display: none !important;
}

.topbar-link.current {
  font-weight: 700;
  text-decoration: none;
}

.masthead {
  color: white;
  background:
    linear-gradient(90deg, rgba(0, 68, 17, .96), rgba(0, 68, 17, .78)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 2px, transparent 2px 14px);
  border-bottom: 5px solid var(--gold);
}

.masthead-inner {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1, h2 {
  margin: 0;
  font-family: Oswald, Arial, sans-serif;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1;
}

h2 { font-size: 24px; }

.source {
  display: grid;
  gap: 6px;
  justify-items: end;
  font-size: 14px;
  text-align: right;
}

.source a { color: white; }

.link-button {
  min-height: 0;
  padding: 0;
  color: white;
  background: transparent;
  text-decoration: underline;
}

.app-shell { padding: 22px 0 34px; }

.login-shell {
  display: grid;
  min-height: calc(100vh - 173px);
  align-items: start;
  padding: 42px 0;
}

.login-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 22px;
  width: min(860px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 28px;
  box-shadow: 0 12px 28px rgba(0, 68, 17, 0.08);
}

.login-intro {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.login-intro p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-grid.compact {
  grid-template-columns: 1fr;
  margin: 0;
}

.login-message {
  min-height: 20px;
  margin: 0;
  color: var(--bad);
  font-weight: 700;
}

.login-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-actions button {
  min-width: 150px;
}

.login-actions span {
  color: var(--muted);
  font-size: 14px;
}

.login-status {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(0, 68, 17, 0.04), rgba(215, 184, 75, 0.08));
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
}

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

.login-status-head strong {
  color: var(--green);
  font: 600 20px Oswald, Arial, sans-serif;
}

.login-status-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.login-status-detail {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.titans-loader {
  position: relative;
  overflow: hidden;
  height: 14px;
  background: #dde5da;
  border: 1px solid #c8d3c4;
}

.titans-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.22) 0 10px,
      transparent 10px 20px
    );
  pointer-events: none;
}

.titans-loader-bar {
  height: 100%;
  width: 6%;
  background: linear-gradient(90deg, var(--green), var(--green-2) 60%, var(--gold));
  transition: width 0.35s ease;
}

.titans-loader-bar.complete {
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.coach-panel,
.status-strip,
.schedule-section,
.requests-section {
  background: var(--paper);
  border: 1px solid var(--line);
}

.coach-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  padding: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.grow { flex: 1; }

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

label {
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
}

input, select, textarea {
  min-height: 40px;
  border: 1px solid #bec8bc;
  background: #fff;
  padding: 9px 10px;
  font: inherit;
}

.filter-select {
  position: relative;
  display: grid;
  gap: 6px;
}

.filter-select.is-selected input {
  border-color: var(--green);
  background: #eef6ee;
  box-shadow: inset 0 0 0 1px rgba(29, 82, 36, 0.12);
}

.filter-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 216px;
  overflow-y: auto;
  border: 1px solid #bec8bc;
  background: #fff;
  box-shadow: 0 14px 26px rgba(20, 28, 20, 0.14);
}

.filter-select-item {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid rgba(24, 32, 24, 0.08);
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-weight: 400;
  text-align: left;
}

.filter-select-item:last-child {
  border-bottom: 0;
}

.filter-select-item:hover,
.filter-select-item:focus-visible {
  background: #eef6ee;
  outline: none;
}

select:disabled {
  color: var(--ink);
  background: #eef1eb;
}

textarea { resize: vertical; }

button {
  min-height: 40px;
  border: 0;
  padding: 0 15px;
  font-weight: 700;
  cursor: pointer;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(94px, 1fr));
  border: 1px solid #cbd3c8;
  background: #e6e9e3;
}

.view-tab {
  min-height: 40px;
  padding: 0 14px;
  color: var(--green);
  background: transparent;
  border-right: 1px solid #cbd3c8;
}

.view-tab:last-child {
  border-right: 0;
}

.view-tab.active {
  color: white;
  background: var(--green);
}

.primary {
  background: var(--green);
  color: white;
}

.warn-btn {
  background: #7f2a16;
  color: white;
}

.secondary {
  background: #e6e9e3;
  color: var(--green);
  border: 1px solid #cbd3c8;
}

.toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  border-left: 5px solid var(--gold);
}

.status-strip div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.status-strip strong {
  display: block;
  color: var(--green);
  font: 600 26px Oswald, Arial, sans-serif;
}

.status-strip span { color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.schedule-section,
.requests-section { min-width: 0; }

.contact-section {
  padding-bottom: 18px;
}

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

.contact-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
}

.contact-card h3 {
  margin: 0;
  color: var(--green);
  font: 600 23px Oswald, Arial, sans-serif;
  letter-spacing: 0;
}

.contact-card a {
  color: var(--green-2);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.diamond-status-list {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.diamond-status-group {
  display: grid;
  gap: 12px;
}

.diamond-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.diamond-status-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
}

.diamond-status-card.open { border-left-color: var(--good); }
.diamond-status-card.closed { border-left-color: var(--bad); }
.diamond-status-card.unknown { border-left-color: var(--gold); }

.diamond-status-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.diamond-status-head strong {
  color: var(--green);
  font: 600 23px Oswald, Arial, sans-serif;
}

.diamond-status-head span {
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.diamond-status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-editor-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.status-editor-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
}

.status-editor-card.open {
  border-left-color: var(--good);
}

.status-editor-card.closed {
  border-left-color: var(--bad);
}

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

.status-editor-head strong {
  display: block;
  color: var(--green);
  font: 600 23px Oswald, Arial, sans-serif;
}

.status-editor-head p,
.status-editor-meta {
  margin: 0;
  color: var(--muted);
}

.status-editor-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.status-editor-pill.open {
  border-color: #9dcaac;
  color: var(--good);
  background: #eff8f1;
}

.status-editor-pill.closed {
  border-color: #dca9a3;
  color: var(--bad);
  background: #fff1ef;
}

.status-editor-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

.status-editor-notes {
  min-height: 92px;
  resize: vertical;
}

.status-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.section-head span {
  color: var(--muted);
  font-size: 14px;
}

.subsection-head {
  border-top: 1px solid var(--line);
}

.schedule-list,
.request-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.request-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  background: #fffdf5;
}

.request-card.approved {
  border-left-color: var(--good);
  background: #f3fbf5;
}

.request-card.rejected {
  border-left-color: var(--bad);
  background: #fff3f1;
}

.request-card span,
.request-card strong {
  overflow-wrap: anywhere;
}

.request-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 0;
  padding: 0;
  width: 22px;
  height: 22px;
  border: 0;
  color: #889387;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.request-dismiss:hover {
  color: var(--ink);
  background: #eef1eb;
}

.request-meta {
  color: var(--muted);
  font-size: 13px;
}

.request-note {
  margin-top: 2px;
  padding-top: 8px;
  color: var(--ink);
  border-top: 1px solid rgba(24, 32, 24, 0.12);
}

.month-group {
  display: grid;
  gap: 10px;
}

.month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 6px;
  border-bottom: 2px solid var(--green);
}

.month-head h3 {
  margin: 0;
  color: var(--green);
  font: 600 22px Oswald, Arial, sans-serif;
}

.month-head span {
  color: var(--muted);
  font-size: 14px;
}

.month-events {
  display: grid;
  gap: 10px;
}

.calendar-view {
  display: grid;
  gap: 18px;
  padding: 14px;
}

.calendar-shell,
.calendar-detail {
  display: grid;
  gap: 12px;
}

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

.calendar-head h3 {
  margin: 0;
  color: var(--green);
  font: 600 22px Oswald, Arial, sans-serif;
}

.calendar-head span {
  color: var(--muted);
  font-size: 14px;
}

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

.calendar-weekday {
  padding: 10px 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 152px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-top: 4px solid transparent;
  background: #fff;
}

.calendar-day.filler {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.calendar-day.empty {
  background: #f8faf7;
}

.calendar-day.has-events {
  border-top-color: var(--gold);
}

.calendar-day.active {
  border-color: rgba(0, 68, 17, 0.35);
  border-top-color: var(--green);
  box-shadow: 0 12px 28px rgba(0, 68, 17, 0.12);
}

.calendar-date {
  color: var(--green);
  font: 600 24px Oswald, Arial, sans-serif;
  line-height: 1;
}

.calendar-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calendar-preview {
  display: grid;
  gap: 6px;
  align-content: start;
}

.calendar-pill,
.calendar-more {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.calendar-pill {
  color: white;
  background: var(--green);
}

.calendar-pill.away {
  background: var(--away);
}

.calendar-pill.practice {
  background: var(--practice);
}

.calendar-pill.strike {
  opacity: 0.74;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.calendar-more {
  color: var(--green);
  background: #edf2ea;
}

.availability-section {
  margin-top: 18px;
}

.availability-list {
  display: grid;
  gap: 16px;
  padding: 14px;
}

.availability-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px 0;
  color: var(--muted);
  font-weight: 700;
}

.availability-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border: 1px solid transparent;
}

.legend-dot.available { background: #dff3e4; border-color: #9dcaac; }

.legend-dot.booked { background: #ffe1dd; border-color: #dca9a3; }

.availability-grid-wrap {
  overflow-x: auto;
}

.availability-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(var(--slot-count), minmax(142px, 1fr));
  min-width: 720px;
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.availability-range-grid {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(520px, 1fr);
  min-width: 760px;
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}

.availability-grid-head,
.availability-diamond-name,
.availability-slot {
  background: #fff;
  padding: 10px;
}

.availability-grid-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: white;
  background: var(--green);
  font-weight: 700;
  text-align: center;
}

.availability-grid-head.diamond-title {
  text-align: left;
}

.availability-diamond-name {
  color: var(--green);
  font: 600 18px Oswald, Arial, sans-serif;
}

.availability-slot {
  display: grid;
  min-height: 62px;
  align-content: center;
  gap: 4px;
  border-left: 5px solid transparent;
}

.availability-slot.available {
  border-left-color: var(--good);
  background: #eff8f1;
  color: var(--good);
}

.availability-slot.booked {
  border-left-color: var(--bad);
  background: #fff1ef;
  color: var(--bad);
}

.availability-slot strong,
.availability-slot span {
  overflow-wrap: anywhere;
}

.availability-slot span {
  color: var(--muted);
  font-size: 12px;
}

.availability-timeline {
  display: flex;
  min-height: 70px;
  background: #fff;
}

.availability-segment {
  display: grid;
  min-width: 92px;
  align-content: center;
  gap: 4px;
  border-left: 1px solid rgba(255,255,255,0.7);
  padding: 8px;
}

.availability-segment.available {
  background: #eff8f1;
  color: var(--good);
}

.availability-segment.booked {
  background: #fff1ef;
  color: var(--bad);
}

.availability-segment strong,
.availability-segment span {
  overflow-wrap: anywhere;
}

.availability-segment strong {
  font-size: 13px;
}

.availability-segment span {
  color: var(--muted);
  font-size: 12px;
}

.game-row {
  display: grid;
  grid-template-columns: 88px 106px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
}

.game-row.away {
  border-left-color: var(--away);
  background: #f6f7f6;
}

.game-row.practice {
  border-left-color: var(--practice);
  background: #f2f8fb;
}

.game-row.new {
  border-style: dashed;
  box-shadow: inset 0 0 0 1px rgba(0, 68, 17, 0.08);
}

.game-row.cancelled,
.game-row.replaced {
  opacity: 0.72;
}

.date-box {
  color: var(--green);
  font: 600 20px Oswald, Arial, sans-serif;
}

.time-box {
  font-weight: 700;
}

.tag {
  display: inline-block;
  width: fit-content;
  margin-bottom: 5px;
  padding: 3px 7px;
  color: white;
  background: var(--green-2);
  font-size: 12px;
  font-weight: 700;
}

.tag.away { background: #5b6260; }

.tag.practice { background: var(--practice); }

.game-main strong {
  display: block;
  margin-bottom: 4px;
}

.game-main span {
  display: block;
  color: var(--muted);
}

.game-main .tag {
  display: inline-block;
  color: white;
}

.game-main.strike strong,
.game-main.strike span:not(.tag):not(.pending-badge) {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.pending-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 7px;
  border: 1px solid #d7b84b;
  color: #735b00;
  background: #fff8db;
  font-size: 12px;
  font-weight: 700;
}

.cancel-btn {
  color: white;
  background: var(--bad);
}

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

.replace-btn {
  color: var(--green);
  background: #e8ebdf;
  border: 1px solid #cbd3c8;
}

.button-loading-text::after {
  content: "";
  display: inline-block;
  width: 1.6em;
  text-align: left;
  animation: loading-ellipsis 1.1s steps(4, end) infinite;
}

.static-btn {
  opacity: 0.8;
  cursor: default;
}

.request-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 12px;
  background: #fffdf5;
}

.request-card.approved {
  border-left-color: var(--good);
  background: #f3fbf5;
}

.request-card strong {
  display: block;
  margin-bottom: 6px;
}

.request-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.request-list.empty::before {
  content: "No updates queued yet.";
  display: block;
  color: var(--muted);
  padding: 6px;
}

dialog {
  width: min(680px, calc(100% - 26px));
  border: 0;
  padding: 0;
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}

.admin-panel {
  background: var(--paper);
  border: 1px solid var(--line);
}

.admin-form {
  display: flex;
  gap: 14px;
  align-items: end;
  padding: 16px;
}

.admin-message {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--bad);
}

.admin-request-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.coach-account-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.coach-account-card {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 16px 18px;
  background: var(--wash);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
}

.coach-account-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.coach-account-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.coach-account-password {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.coach-account-email {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.coach-account-password label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.coach-account-email label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.coach-account-password input {
  width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  font: 600 18px Oswald, Arial, sans-serif;
}

.coach-account-email input {
  width: 240px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

.admin-message-neutral {
  color: var(--muted);
}

.admin-request-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  padding: 14px;
  background: #fffdf5;
}

.admin-request-card.approved {
  border-left-color: var(--good);
  background: #f3fbf5;
}

.admin-request-card.rejected {
  border-left-color: var(--bad);
  background: #fff3f1;
}

.admin-request-head,
.admin-request-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-request-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.admin-note-label {
  margin-top: 12px;
}

.admin-note-input {
  min-height: 88px;
}

dialog::backdrop { background: rgba(0,0,0,.45); }

#requestForm { padding: 18px; }
#calendarDayPanel { padding: 18px; }
#requestForm {
  position: relative;
}

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

.icon {
  width: 36px;
  padding: 0;
  color: var(--green);
  background: #e6e9e3;
}

.dialog-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.calendar-day-events {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.span { grid-column: 1 / -1; }

.availability-result {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  padding: 12px;
  background: var(--wash);
  color: var(--muted);
}

.availability-result.good {
  border-color: #9dcaac;
  background: #eff8f1;
  color: var(--good);
}

.availability-result.bad {
  border-color: #dca9a3;
  background: #fff1ef;
  color: var(--bad);
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 32, 24, 0.45);
}

.loading-overlay-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(360px, 100%);
  padding: 24px 22px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  box-shadow: 0 24px 70px rgba(0,0,0,.25);
}

.loading-overlay-card strong {
  color: var(--green);
  font: 600 24px Oswald, Arial, sans-serif;
}

.loading-overlay-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dialog-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 32, 24, 0.45);
}

.loading-ellipsis::after {
  content: "";
  display: inline-block;
  width: 1.6em;
  text-align: left;
  animation: loading-ellipsis 1.1s steps(4, end) infinite;
}

.loading-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #d9dfd7;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes loading-ellipsis {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}

@media (max-width: 860px) {
  .masthead-inner,
  .coach-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .login-shell {
    min-height: auto;
    padding: 24px 0 34px;
  }

  .login-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .login-intro {
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .login-actions {
    grid-column: 1;
    flex-direction: column;
    align-items: stretch;
  }

  .login-status-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-status-head span {
    text-align: left;
  }

  .source {
    justify-items: start;
    text-align: left;
  }

  .status-strip,
  .layout,
  .contact-grid,
  .diamond-status-grid,
  .status-editor-list { grid-template-columns: 1fr; }

  .status-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-strip div:last-child {
    border-bottom: 0;
  }

  .game-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .calendar-day {
    min-height: 96px;
    padding: 8px;
  }

  .calendar-date {
    font-size: 20px;
  }

  .calendar-preview {
    display: none;
  }

  .section-head,
  .calendar-head,
  .month-head,
  .dialog-head,
  .dialog-actions,
  .admin-request-head,
  .admin-request-actions,
  .admin-form {
    flex-direction: column;
    align-items: stretch;
  }

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

  .admin-toolbar {
    flex-direction: column;
    width: 100%;
  }

  .admin-toolbar button,
  .admin-toolbar a,
  .coach-panel button,
  .admin-form button,
  .dialog-actions button,
  .view-switch {
    width: 100%;
  }

  .coach-account-card,
  .diamond-status-head,
  .status-editor-head {
    flex-direction: column;
  }

  .coach-account-fields {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .coach-account-password {
    justify-items: start;
    text-align: left;
  }

  .coach-account-email {
    justify-items: start;
    text-align: left;
  }

  .coach-account-password input {
    width: 100%;
  }

  .coach-account-email input {
    width: 100%;
  }

  .row-actions {
    width: 100%;
    flex-direction: column;
  }
}
