:root {
  --bg: #ffffff;
  --panel: #f4f6f8;
  --panel-alt: #eaedf1;
  --text: #1a1d21;
  --muted: #5a6572;
  --accent: #0f9d78;
  --border: #dde2e7;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

h1 { margin: 0; font-size: 1.4rem; }

.search-bar input {
  width: 280px;
  max-width: 60vw;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.95rem;
}

.team-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}

.team-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.team-btn:hover, .team-btn.active {
  background: var(--accent);
  color: #06251c;
  border-color: var(--accent);
}

main {
  padding: 20px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.trade-news {
  margin-bottom: 20px;
}

#tradeNewsBtn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
}

#tradeNewsBtn:hover { background: rgba(127,227,196,0.1); }

#apronInfoBtn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  margin-left: 8px;
}

#apronInfoBtn:hover { background: rgba(255,255,255,0.05); }

.apron-explainer p { margin: 0 0 8px; line-height: 1.6; }
.apron-explainer ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.6; }
.apron-explainer .apron-line { color: var(--muted); font-size: 0.8rem; }

.cap-panel {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.cap-panel.hidden { display: none; }

.cap-panel h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--accent);
}

.cap-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  font-size: 0.85rem;
}

.cap-rows .cap-row {
  background: var(--panel-alt);
  border-radius: 8px;
  padding: 8px 10px;
}

.cap-rows .cap-label { color: var(--muted); font-size: 0.75rem; }
.cap-rows .cap-value { font-size: 0.95rem; margin-top: 2px; }

.cap-status {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.cap-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.trade-news-panel {
  margin-top: 12px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.trade-news-panel.hidden { display: none; }

.trade-news-panel .updated-at {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.trade-news-panel ul { margin: 0; padding-left: 18px; }
.trade-news-panel li { margin-bottom: 6px; }

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

.table-scroll {
  overflow-x: auto;
  border-radius: 10px;
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 10px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.player-name-cell {
  min-width: 160px;
  white-space: nowrap;
}

th {
  background: var(--panel-alt);
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td { border-bottom: none; }

.section-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  color: var(--accent);
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 20px;
}
