:root {
  --navy: #0d1b2a;
  --navy-light: #1b2f47;
  --gold-dark: #412402;
  --orange: #BA7517;
  --orange-light: #d9a54b;
  --bg: #f5f6f8;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --premier: #BA7517;
  --one: #2563eb;
  --next: #16a34a;
  --leave: #9ca3af;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

header.site-header {
  background: linear-gradient(120deg, var(--navy), var(--navy-light));
  color: #fff;
  padding: 18px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-title .accent { color: var(--orange-light); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand .logo-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--orange-light);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.last-updated {
  font-size: 0.8rem;
  color: #cbd5e1;
}

.layout {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
}

.sidebar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  position: sticky;
  top: 84px;
}

@media (max-width: 800px) {
  .sidebar { position: static; }
}

.sidebar h2 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}

.filter-group { margin-bottom: 20px; }

.league-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.league-pill:hover { background: var(--bg); }

.league-pill.active {
  background: var(--bg);
  border-color: var(--border);
  font-weight: 700;
}

.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.PREMIER { background: var(--premier); }
.dot.ONE { background: var(--one); }
.dot.NEXT { background: var(--next); }
.dot.ALL { background: linear-gradient(135deg, var(--premier), var(--one)); }

select#club-select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.92rem;
  background: #fff;
  color: var(--text);
}

.type-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  margin-bottom: 6px;
  cursor: pointer;
}

.reset-btn {
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.reset-btn:hover { background: #eceef1; }

main.content { min-width: 0; }

.search-box {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.search-box:focus {
  outline: none;
  border-color: var(--orange-light);
  box-shadow: 0 0 0 3px rgba(186, 117, 23, 0.12);
}

.result-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 14px 4px;
}

.favorite-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.favorite-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff4ec;
  color: var(--orange);
  border: 1px solid var(--orange-light);
  border-radius: 999px;
  padding: 3px 6px 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.favorite-chip button {
  border: none;
  background: none;
  color: var(--orange);
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 2px;
}

.favorite-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.favorite-add-row {
  display: flex;
  gap: 6px;
}

.favorite-add-row select {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  background: #fff;
  color: var(--text);
}

.favorite-add-row button {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--orange-light);
  background: #fff;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.favorite-add-row button:hover { background: #fff4ec; }

.notify-btn {
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--orange-light);
  background: #fff4ec;
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.notify-btn:hover { background: #ffe8d4; }
.notify-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.notify-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.entry-card.is-favorite {
  border-color: var(--orange-light);
  background: #fffaf3;
  box-shadow: 0 0 0 1px var(--orange-light) inset;
}

.favorite-star {
  color: var(--orange);
  margin-right: 2px;
}

.date-group { margin-bottom: 22px; }

.date-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  border-left: 4px solid var(--orange);
  padding-left: 10px;
  margin-bottom: 10px;
}

.entry-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  transition: box-shadow 0.15s ease;
}

.entry-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.league-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.league-badge.PREMIER { background: var(--premier); }
.league-badge.ONE { background: var(--one); }
.league-badge.NEXT { background: var(--next); }

.type-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}
.type-badge.leave { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.type-badge.join { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.type-badge.loan { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.type-badge.retire { color: #52525b; border-color: #d4d4d8; background: #fafafa; }

.status-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}
.status-tag.agreed { color: #92400e; background: #fef3c7; }
.status-tag.signed { color: #3730a3; background: #e0e7ff; }

.entry-main {
  flex: 1;
  min-width: 220px;
}

.player-name {
  font-weight: 700;
  font-size: 1rem;
}

.move-line {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.club-tag {
  color: var(--text);
}

.arrow { color: var(--orange); font-weight: 700; }

.source-link {
  font-size: 0.8rem;
  color: var(--orange);
  border: 1px solid var(--orange-light);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.source-link:hover { background: #fff4ec; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

footer.site-footer {
  max-width: 1100px;
  margin: 30px auto 60px;
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

footer.site-footer a { color: var(--orange); }
