:root {
  color-scheme: dark;
  --bg: #02091c;
  --panel: #061b2d;
  --panel-2: #0a2639;
  --line: rgba(172, 224, 255, 0.2);
  --line-strong: rgba(105, 244, 232, 0.44);
  --text: #f3f7ff;
  --muted: #b8c8d6;
  --cyan: #10f1e7;
  --lime: #ecff00;
  --red: #f3212d;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  background:
    radial-gradient(circle at 78% 16%, rgba(16, 241, 231, 0.09), transparent 28rem),
    linear-gradient(135deg, #021126 0%, #061c32 46%, #071866 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.shooting-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 9, 28, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  gap: 2px;
  width: fit-content;
  line-height: 1;
}

.brand span,
.eyebrow {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.brand strong {
  font-size: 24px;
  font-weight: 900;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: clamp(24px, 2.3vw, 38px);
}

h2 {
  font-size: clamp(20px, 1.5vw, 28px);
}

.header-actions,
.control-panel,
.segmented {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ghost-button,
.segmented button,
.card-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(10, 38, 57, 0.82);
  font-weight: 850;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.ghost-button:hover,
.segmented button:hover,
.card-button:hover {
  background: rgba(16, 241, 231, 0.16);
  border-color: var(--cyan);
}

.segmented button.is-active,
.card-button.primary {
  color: #001529;
  background: var(--cyan);
  border-color: var(--cyan);
}

.ghost-button.danger {
  border-color: rgba(243, 33, 45, 0.48);
}

.shooting-layout {
  max-width: 1720px;
  margin: 0 auto;
  padding: 20px clamp(14px, 2vw, 32px) 48px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.summary-card,
.panel,
.match-card,
.team-card,
.unshot-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 27, 45, 0.88);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
}

.summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.summary-card strong {
  font-size: clamp(26px, 3vw, 46px);
  line-height: 1;
}

.control-panel {
  justify-content: space-between;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(2, 9, 28, 0.42);
}

.field-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 241, 231, 0.34);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(16, 241, 231, 0.08);
  line-height: 1.45;
}

.field-note strong {
  flex: 0 0 auto;
  color: var(--cyan);
  font-weight: 950;
}

.team-overview-panel {
  margin-bottom: 18px;
}

.team-overview-summary {
  display: block;
  margin: -16px -16px 0;
  padding: 16px 16px 0;
  cursor: pointer;
  list-style: none;
}

.team-overview-summary::-webkit-details-marker {
  display: none;
}

.team-overview-summary .section-head {
  margin-bottom: 12px;
}

.toggle-hint {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.toggle-hint::before {
  content: "접기";
}

.team-overview-panel:not([open]) .toggle-hint::before {
  content: "펼치기";
}

.team-overview-content {
  padding-top: 2px;
}

.team-overview-panel .team-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-height: 300px;
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.team-overview-panel .team-card {
  min-height: 82px;
  box-shadow: none;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.section-head > span {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.schedule-list,
.side-stack,
.unshot-list,
.team-grid {
  display: grid;
  gap: 12px;
}

.extra-panel {
  margin: -2px -2px 18px;
  padding: 14px;
  border: 1px solid rgba(236, 255, 0, 0.46);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(236, 255, 0, 0.1), rgba(16, 241, 231, 0.05));
}

.extra-panel .section-head {
  margin-bottom: 12px;
}

.extra-schedule-list .schedule-day-head {
  border-color: rgba(236, 255, 0, 0.36);
  color: var(--lime);
  background: rgba(236, 255, 0, 0.08);
}

.schedule-day {
  display: grid;
  gap: 12px;
}

.schedule-day + .schedule-day {
  margin-top: 18px;
}

.schedule-day-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(16, 241, 231, 0.28);
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(16, 241, 231, 0.08);
}

.schedule-day-head strong {
  font-size: 18px;
  font-weight: 950;
}

.schedule-day-head span {
  color: var(--muted);
  font-weight: 900;
}

.time-slot {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(172, 224, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(2, 9, 28, 0.26);
}

.time-label {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.time-label strong {
  font-size: 24px;
  line-height: 1;
}

.time-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.time-slot-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
}

.match-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  box-shadow: none;
}

.match-card.is-blocked {
  border-color: rgba(243, 33, 45, 0.58);
  background: rgba(43, 12, 27, 0.78);
}

.match-card.is-replacement-card {
  border-color: rgba(236, 255, 0, 0.78);
  background: linear-gradient(135deg, rgba(236, 255, 0, 0.14), rgba(6, 27, 45, 0.94));
  box-shadow: 0 0 0 1px rgba(236, 255, 0, 0.16), 0 16px 44px rgba(0, 0, 0, 0.28);
}

.match-card.is-replacement-card.is-blocked {
  border-color: rgba(243, 33, 45, 0.72);
  background: linear-gradient(135deg, rgba(243, 33, 45, 0.2), rgba(43, 12, 27, 0.84));
}

.match-card.is-extra-card {
  border-color: rgba(236, 255, 0, 0.72);
  background: linear-gradient(135deg, rgba(236, 255, 0, 0.12), rgba(6, 27, 45, 0.94));
}

.match-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 900;
}

.crew-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #001529;
  background: var(--cyan);
  font-size: 13px;
}

.crew-badge.pb {
  background: var(--lime);
}

.match-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  font-size: clamp(20px, 1.7vw, 28px);
  font-weight: 900;
}

.match-title span:first-child {
  text-align: left;
}

.match-title span:last-child {
  text-align: right;
}

.match-title em {
  color: var(--cyan);
  font-style: normal;
  font-size: 14px;
}

.match-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.new-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.new-tags span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(16, 241, 231, 0.14);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.status-pill.done {
  background: rgba(236, 255, 0, 0.16);
  color: var(--lime);
}

.status-pill.blocked {
  color: #ffd2d6;
  background: rgba(243, 33, 45, 0.22);
}

.status-pill.replacement,
.replacement-team,
.extra-team {
  color: #061018;
  background: var(--lime);
}

.card-button.is-done {
  border-color: rgba(236, 255, 0, 0.5);
  color: var(--lime);
  background: rgba(236, 255, 0, 0.1);
}

.card-button.danger {
  border-color: rgba(243, 33, 45, 0.5);
}

.card-button.danger:hover,
.card-button.danger.is-active {
  color: #fff;
  background: rgba(243, 33, 45, 0.28);
  border-color: var(--red);
}

.alternative-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(243, 33, 45, 0.36);
  border-radius: var(--radius);
  background: rgba(2, 9, 28, 0.38);
}

.alternative-box > strong {
  color: #ffd2d6;
  font-weight: 950;
}

.alternative-box ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alternative-box li {
  display: grid;
  gap: 2px;
}

.alternative-box li strong {
  color: var(--text);
}

.alternative-box li span,
.alternative-box > span {
  color: var(--muted);
  line-height: 1.45;
}

.match-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.match-actions.extra-actions {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.team-search {
  width: 100%;
  min-height: 44px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--text);
  background: rgba(2, 9, 28, 0.52);
  font-weight: 850;
}

.team-card,
.unshot-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.unshot-card.is-replacement {
  border-color: rgba(236, 255, 0, 0.76);
  background: linear-gradient(135deg, rgba(236, 255, 0, 0.18), rgba(16, 241, 231, 0.08));
  box-shadow: 0 0 0 1px rgba(236, 255, 0, 0.18), 0 18px 60px rgba(0, 0, 0, 0.36);
}

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

.replacement-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: #061018;
  background: var(--lime);
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.replacement-note {
  color: #e9f5b5;
}

.replacement-next {
  color: var(--lime);
  font-weight: 950;
}

.team-card.is-done {
  border-color: rgba(236, 255, 0, 0.42);
  background: rgba(12, 48, 42, 0.72);
}

.team-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  font-weight: 900;
}

.team-check input {
  width: 22px;
  height: 22px;
  accent-color: var(--cyan);
}

.team-card small,
.unshot-card small,
.match-card small {
  color: var(--muted);
  line-height: 1.45;
}

.next-line {
  color: var(--text);
  font-weight: 900;
}

.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(2, 9, 28, 0.34);
  font-weight: 850;
}

@media (max-width: 980px) {
  .shooting-header {
    position: relative;
    grid-template-columns: 1fr;
  }

  .header-actions,
  .control-panel {
    align-items: stretch;
    overflow-x: auto;
  }

  .header-actions > *,
  .segmented > * {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .summary-grid,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .team-overview-panel .team-grid {
    max-height: 360px;
  }

  .control-panel {
    display: grid;
  }

  .field-note {
    align-items: start;
  }

  .segmented {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .shooting-layout {
    padding: 14px 10px 36px;
  }

  .shooting-header {
    padding: 14px;
  }

  .brand strong {
    font-size: 20px;
  }

  .match-title {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .time-slot {
    grid-template-columns: 1fr;
  }

  .time-label {
    position: static;
  }

  .time-slot-list {
    grid-template-columns: 1fr;
  }

  .match-title span:last-child {
    text-align: left;
  }

  .field-note {
    display: grid;
  }

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

  .team-overview-summary {
    margin: -16px -16px 0;
  }

  .team-overview-panel[open] .team-grid {
    max-height: 320px;
  }

  .unshot-head {
    align-items: flex-start;
  }
}
