/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a5c8a;
  --primary-dark: #134570;
  --accent: #e8a020;
  --text: #1a1a2e;
  --text-light: #555;
  --bg: #fff;
  --bg-gray: #f5f7fa;
  --border: #e0e6ee;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.09);
}

html { scroll-behavior: smooth; }
body { font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif; color: var(--text); background: var(--bg); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ===== Header ===== */
header {
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(0,0,0,.25);
  flex-shrink: 0;
}
.logo-area h1 {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
.logo-area h1 span { font-size: 0.75rem; opacity: 0.85; }

header nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
header nav a {
  color: rgba(255,255,255,0.85);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
header nav a:hover,
header nav a.active {
  background: rgba(255,255,255,0.18);
  color: #fff;
  text-decoration: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--primary-dark);
  padding: 8px 0;
}
.mobile-nav a {
  color: rgba(255,255,255,0.9);
  padding: 12px 24px;
  font-size: 0.95rem;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.mobile-nav.open { display: flex; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3d60 100%);
  color: #fff;
  padding: 80px 20px;
  text-align: center;
}
.hero-content { max-width: 640px; margin: 0 auto; }
.hero-sub { font-size: 0.95rem; opacity: 0.8; margin-bottom: 8px; }
.hero h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.hero-desc { font-size: 1rem; opacity: 0.85; margin-bottom: 32px; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-sm {
  display: inline-block;
  padding: 5px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-sm:hover { background: var(--primary-dark); text-decoration: none; }

/* ===== Sections ===== */
.section { padding: 64px 20px; }
.section-gray { background: var(--bg-gray); }
.container { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* ===== News ===== */
.news-list { list-style: none; }
.news-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.news-date { color: var(--text-light); font-size: 0.85rem; white-space: nowrap; }
.news-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.news-badge.new { background: #e74c3c; color: #fff; }
.news-badge.info { background: var(--primary); color: #fff; }

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
  color: var(--text);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); text-decoration: none; }
.card-icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.card p { font-size: 0.83rem; color: var(--text-light); }

/* ===== Tournament Card ===== */
.tournament-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.t-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.t-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.t-label { font-size: 0.78rem; color: var(--text-light); }
.t-status { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.t-status.done { background: #d4edda; color: #155724; }
.t-status.upcoming { background: #fff3cd; color: #856404; }
.t-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.t-date { font-size: 0.85rem; color: var(--text-light); margin-bottom: 14px; }
.t-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== Page Header ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3d60 100%);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}
.page-header h2 { font-size: 1.8rem; font-weight: 800; }
.page-header p { opacity: 0.8; margin-top: 6px; }

/* ===== Downloads ===== */
.dl-section { margin-bottom: 40px; }
.dl-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}
.dl-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.dl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s;
}
.dl-item:hover { box-shadow: var(--shadow); }
.dl-icon { font-size: 1.4rem; flex-shrink: 0; }
.dl-info { flex: 1; }
.dl-name { font-weight: 600; font-size: 0.95rem; }
.dl-meta { font-size: 0.78rem; color: var(--text-light); margin-top: 2px; }
.dl-btns { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  transition: background 0.15s;
  white-space: nowrap;
}
.dl-btn:hover { background: var(--primary-dark); text-decoration: none; }
.dl-btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.dl-btn-outline:hover { background: #eaf2fb; }

/* ===== Results Table ===== */
.results-table-wrap { overflow-x: auto; }
.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.results-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.results-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.results-table tr:nth-child(even) td { background: var(--bg-gray); }
.results-table tr:hover td { background: #eaf2fb; }
.medal { font-size: 1.1rem; }

/* ===== Tournament Bracket ===== */
.bracket-wrap { overflow-x: auto; padding-bottom: 12px; }
.bracket {
  display: flex;
  gap: 0;
  min-width: 700px;
  align-items: center;
}
.bracket-round { display: flex; flex-direction: column; justify-content: space-around; }
.round-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  padding: 6px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.match-group { display: flex; flex-direction: column; align-items: center; }
.match {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0;
}
.team {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 12px;
  min-width: 160px;
  font-size: 0.85rem;
  gap: 8px;
  transition: box-shadow 0.15s;
}
.team.winner { background: #eaf2fb; border-color: var(--primary); font-weight: 700; }
.team-score {
  margin-left: auto;
  font-weight: 700;
  color: var(--primary);
  min-width: 24px;
  text-align: right;
}
.connector {
  display: flex;
  align-items: center;
  width: 30px;
}
.connector-line {
  width: 100%;
  height: 2px;
  background: var(--border);
}

/* ===== Schedule ===== */
.schedule-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.schedule-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.schedule-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.schedule-table tr:nth-child(even) td { background: var(--bg-gray); }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.73rem;
  font-weight: 700;
}
.tag-inter { background: #fef3c7; color: #92400e; }
.tag-pref { background: #dbeafe; color: #1e40af; }
.tag-reg { background: #d1fae5; color: #065f46; }

/* ===== Footer ===== */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 28px 20px;
  font-size: 0.85rem;
}
.footer-title { color: #fff; font-weight: 600; margin-bottom: 4px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  header nav { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 50px 20px; }
  .section { padding: 40px 16px; }
  .dl-item { flex-wrap: wrap; }
  .dl-btn { width: 100%; justify-content: center; }
}

/* ===== Results Table ===== */
.results-subsection { margin-bottom: 24px; padding: 16px; background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border); }
.results-table-wrap { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.results-table th { background: var(--bg-gray); padding: 8px 10px; text-align: left; font-size:.8rem; font-weight:700; color:var(--text-light); border-bottom:2px solid var(--border); }
.results-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.results-table tr:last-child td { border-bottom: none; }

/* ===== Schedule Table ===== */
.schedule-table-wrap { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.schedule-table th { background: var(--bg-gray); padding: 10px 12px; text-align: left; font-size:.8rem; font-weight:700; color:var(--text-light); border-bottom:2px solid var(--border); white-space:nowrap; }
.schedule-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.schedule-table tr:hover td { background: var(--bg-gray); }
.tag { display:inline-block; padding:2px 8px; border-radius:4px; font-size:.75rem; font-weight:700; }
.tag-pref { background:#e0f0ff; color:#0066cc; }
.tag-shikoku { background:#fff0d0; color:#cc7700; }
.tag-national { background:#ffe0e0; color:#cc0000; }
