@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Space+Grotesk:wght@300;500;700&display=swap');

:root {
  --ink: #0b0d0f;
  --canvas: #f4f1ec;
  --cloud: #ffffff;
  --amber: #f4a261;
  --mint: #2a9d8f;
  --violet: #5b4b8a;
  --slate: #1f2a44;
  --rose: #e76f51;
  --shadow: rgba(15, 20, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fdf1d6 0%, transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(94, 165, 239, 0.18) 0%, transparent 38%),
    linear-gradient(135deg, #f4f1ec 0%, #f7f4f0 50%, #f2efe9 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 8vw;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--violet));
  box-shadow: 0 10px 20px rgba(91, 75, 138, 0.35);
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav a,
nav button {
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  background: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

nav a:hover,
nav button:hover {
  background: rgba(15, 20, 34, 0.08);
}

nav a.active {
  background: linear-gradient(135deg, rgba(31, 42, 68, 0.16), rgba(91, 75, 138, 0.16));
}

.page {
  padding: 10px 8vw 80px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
  padding: 40px 0 80px;
}

.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 480px;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.button.primary {
  background: var(--slate);
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.2);
}

.button.primary:hover {
  transform: translateY(-1px);
}

.button.ghost {
  border-color: var(--slate);
  color: var(--slate);
}

.button.danger {
  background: rgba(231, 111, 81, 0.15);
  color: #8f2f1a;
  border-color: rgba(231, 111, 81, 0.35);
}

.button.danger:hover {
  background: rgba(231, 111, 81, 0.24);
}

.hero-card {
  background: var(--cloud);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 40px var(--shadow);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: var(--cloud);
  padding: 20px 22px;
  border-radius: 20px;
  box-shadow: 0 18px 32px var(--shadow);
  animation: fadeUp 0.6s ease both;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }

.section-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.notice {
  background: rgba(244, 162, 97, 0.18);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.error {
  background: rgba(231, 111, 81, 0.2);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.form-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--cloud);
  padding: 28px;
  border-radius: 20px;
  box-shadow: 0 20px 36px var(--shadow);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 20, 34, 0.15);
  margin-bottom: 14px;
  font-family: inherit;
}

input:focus, select:focus {
  outline: 2px solid rgba(42, 157, 143, 0.4);
  border-color: rgba(42, 157, 143, 0.5);
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.stat-pill.strength {
  background: rgba(42, 157, 143, 0.18);
  color: var(--mint);
}

.stat-pill.needs-work {
  background: rgba(231, 111, 81, 0.18);
  color: var(--rose);
}

.stat-pill.balanced {
  background: rgba(91, 75, 138, 0.16);
  color: var(--violet);
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 42, 68, 0.12);
  overflow: hidden;
  margin-top: 6px;
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--amber));
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.table-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table-grid th,
.table-grid td {
  text-align: left;
  border-bottom: 1px solid rgba(15, 20, 34, 0.1);
  padding: 8px 6px;
  vertical-align: top;
}

.table-grid th {
  color: rgba(15, 20, 34, 0.72);
  font-weight: 700;
}

.status-chip {
  display: inline-block;
  font-size: 0.78rem;
  line-height: 1;
  border-radius: 999px;
  padding: 6px 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-ok {
  color: #0f7b5f;
  background: rgba(42, 157, 143, 0.18);
}

.status-pending {
  color: #9a5a24;
  background: rgba(244, 162, 97, 0.2);
}

.status-in-progress {
  color: #3550a3;
  background: rgba(91, 75, 138, 0.18);
}

.footer {
  text-align: center;
  padding: 30px 8vw 50px;
  color: rgba(15, 20, 34, 0.65);
  font-size: 0.9rem;
}

.tab-switch {
  display: inline-flex;
  background: rgba(31, 42, 68, 0.1);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.tab-link {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 700;
}

.tab-link.active {
  background: var(--slate);
  color: #fff;
}

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

.coach-tabs-shell {
  margin-top: 26px;
}

.coach-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.coach-tab {
  border: 1px solid rgba(31, 42, 68, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: var(--slate);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.coach-tab:hover {
  border-color: rgba(31, 42, 68, 0.36);
}

.coach-tab.active,
.coach-tab[aria-selected='true'] {
  background: var(--slate);
  color: #fff;
  border-color: var(--slate);
}

.coach-tab:focus-visible {
  outline: 2px solid rgba(42, 157, 143, 0.55);
  outline-offset: 2px;
}

.coach-tab-panel[hidden] {
  display: none;
}

.athlete-tabs-shell {
  margin-top: 24px;
}

.athlete-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.athlete-tab {
  border: 1px solid rgba(31, 42, 68, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: var(--slate);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.athlete-tab:hover {
  border-color: rgba(31, 42, 68, 0.36);
}

.athlete-tab.active,
.athlete-tab[aria-selected='true'] {
  background: var(--slate);
  color: #fff;
  border-color: var(--slate);
}

.athlete-tab:focus-visible {
  outline: 2px solid rgba(42, 157, 143, 0.55);
  outline-offset: 2px;
}

.athlete-tab-panel[hidden] {
  display: none;
}

.note-card {
  border: 1px solid rgba(31, 42, 68, 0.12);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(31, 42, 68, 0.05), rgba(31, 42, 68, 0.02));
}

.note-card + .note-card {
  margin-top: 10px;
}

.note-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.note-target {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(15, 20, 34, 0.74);
}

.note-text {
  margin: 10px 0 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.note-action {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: rgba(15, 20, 34, 0.82);
}

.note-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(15, 20, 34, 0.64);
}

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

.subtle-divider {
  height: 1px;
  background: rgba(31, 42, 68, 0.12);
  margin: 18px 0;
}

.calendar-layout {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
  gap: 20px;
}

.calendar-side {
  display: grid;
  gap: 20px;
}

.team-switch-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.team-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.86rem;
  background: rgba(31, 42, 68, 0.08);
}

.team-chip.active {
  background: rgba(42, 157, 143, 0.18);
  color: #0f7b5f;
  font-weight: 700;
}

.calendar-shell {
  display: grid;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 860px;
  gap: 8px;
  color: rgba(15, 20, 34, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.calendar-day {
  min-height: 124px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 42, 68, 0.05), rgba(31, 42, 68, 0.025));
  border: 1px solid rgba(31, 42, 68, 0.12);
}

.calendar-day.empty {
  background: rgba(31, 42, 68, 0.03);
  border-style: dashed;
}

.calendar-day.today {
  border-color: rgba(42, 157, 143, 0.45);
  box-shadow: inset 0 0 0 1px rgba(42, 157, 143, 0.24);
}

.calendar-day-button {
  width: 100%;
  text-align: left;
  padding: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.calendar-day-button:hover {
  border-color: rgba(42, 157, 143, 0.4);
  transform: translateY(-1px);
}

.calendar-day-button:focus-visible {
  outline: 2px solid rgba(42, 157, 143, 0.45);
  outline-offset: 2px;
}

.calendar-day-button.active {
  border-color: rgba(31, 42, 68, 0.35);
  box-shadow: inset 0 0 0 1px rgba(31, 42, 68, 0.18);
}

.calendar-day-number {
  font-size: 0.84rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: rgba(15, 20, 34, 0.82);
}

.calendar-preview {
  border-radius: 8px;
  padding: 5px 6px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-preview.practice {
  background: rgba(42, 157, 143, 0.14);
  border-left: 3px solid rgba(42, 157, 143, 0.72);
}

.calendar-preview.game {
  background: rgba(244, 162, 97, 0.2);
  border-left: 3px solid rgba(244, 162, 97, 0.78);
}

.calendar-preview-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: rgba(15, 20, 34, 0.84);
  white-space: nowrap;
}

.calendar-preview-title {
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(15, 20, 34, 0.84);
}

.calendar-preview-more {
  margin-top: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(15, 20, 34, 0.62);
}

.calendar-preview-empty {
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(15, 20, 34, 0.58);
}

.day-detail-card {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.day-detail-date {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(15, 20, 34, 0.84);
}

.day-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.day-detail-item {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(31, 42, 68, 0.12);
  background: rgba(31, 42, 68, 0.04);
}

.day-detail-item.practice {
  border-left: 4px solid rgba(42, 157, 143, 0.74);
}

.day-detail-item.game {
  border-left: 4px solid rgba(244, 162, 97, 0.8);
}

.day-detail-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.day-detail-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.day-detail-time {
  font-size: 0.78rem;
  color: rgba(15, 20, 34, 0.7);
}

.day-detail-title {
  margin-top: 4px;
  font-size: 1.02rem;
  font-weight: 700;
}

.day-detail-meta {
  margin-top: 4px;
  font-size: 0.84rem;
  color: rgba(15, 20, 34, 0.72);
}

.timeline-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 20, 34, 0.1);
}

.timeline-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-date {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(15, 20, 34, 0.62);
}

.timeline-title {
  font-weight: 700;
  font-size: 0.88rem;
}

.timeline-meta {
  margin-top: 2px;
  font-size: 0.8rem;
  color: rgba(15, 20, 34, 0.72);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    gap: 16px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays,
  .calendar-grid {
    min-width: 700px;
    gap: 6px;
  }

  .calendar-day {
    min-height: 108px;
  }

  .day-detail-card {
    position: static;
    max-height: none;
  }

  .timeline-row {
    grid-template-columns: 78px 1fr;
    gap: 8px;
  }

  .coach-tablist {
    gap: 6px;
  }

  .coach-tab {
    font-size: 0.84rem;
    padding: 7px 10px;
  }

  .athlete-tablist {
    gap: 6px;
  }

  .athlete-tab {
    font-size: 0.84rem;
    padding: 7px 10px;
  }
}
