:root {
  --bg-1: #ecf8ff;
  --bg-2: #f5fbef;
  --panel: rgba(255, 255, 255, 0.86);
  --line: #d4e2eb;
  --text: #102233;
  --sub: #43627a;
  --accent: #007a64;
  --accent-2: #2c7be5;
  --shadow: 0 14px 30px rgba(8, 38, 56, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, #d6f0ff 0, transparent 34%),
    radial-gradient(circle at 90% 0, #e6f7d3 0, transparent 30%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-size: 125% 125%;
  animation: gradientShift 16s ease-in-out infinite alternate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(32px);
  opacity: 0.33;
}

body::before {
  left: -120px;
  top: 16%;
  background: #8ec7ff;
  animation: floatA 12s ease-in-out infinite;
}

body::after {
  right: -100px;
  top: 55%;
  background: #8de0b0;
  animation: floatB 13s ease-in-out infinite;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 40;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(212, 226, 235, 0.75);
  background: rgba(245, 252, 255, 0.72);
  backdrop-filter: blur(11px);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  min-width: 0;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text span {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #517086;
}

.header-menu {
  position: relative;
  justify-self: end;
}

.header-menu summary {
  list-style: none;
  cursor: pointer;
  width: 56px;
  height: 56px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cce0ef;
  border-radius: 14px;
  background: #fff;
  color: #0d3145;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(8, 38, 56, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.header-menu summary::-webkit-details-marker {
  display: none;
}

.header-menu summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.header-menu[open] summary,
.header-menu summary:hover {
  transform: translateY(-1px);
  border-color: #9ec5e6;
  box-shadow: 0 14px 24px rgba(8, 38, 56, 0.16);
}

.header-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  background: #fff;
  border: 1px solid #cce0ef;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 14px 30px rgba(8, 38, 56, 0.14);
  z-index: 20;
  display: grid;
  gap: 4px;
}

.header-menu-panel a {
  display: block;
  font-size: 14px;
  color: var(--sub);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.header-menu-panel a:hover,
.header-menu-panel a.active {
  border-color: #cce0ef;
  color: #0d3145;
  background: #f8fcff;
}

.page-top-meta {
  max-width: 1120px;
  margin: 8px auto 0;
  padding: 0 18px;
}

.page-top-meta-inner {
  display: flex;
  justify-content: flex-end;
}

.page-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  color: #0a4b5e;
  background: #dcf5ff;
  border: 1px solid #b4e5f7;
  border-radius: 999px;
  padding: 6px 12px;
}

.page-live-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-radius: 50%;
  background: #12b44d;
}

.clock-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.clock-item strong {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.clock-item span {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 56px;
}

.clock-sep {
  opacity: 0.5;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 18px;
  display: grid;
  gap: 16px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(207, 224, 235, 0.9);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.55s ease, opacity 0.55s ease;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.4) 45%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.75s ease;
  pointer-events: none;
}

.panel:hover::after {
  transform: translateX(120%);
}

.panel:hover {
  transform: translateY(-2px);
}

.js .panel {
  opacity: 0;
  transform: translateY(18px) scale(0.99);
}

.js .panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.js .panel.no-reveal {
  opacity: 1;
  transform: none;
}

.panel-hero {
  background:
    radial-gradient(circle at 90% -20%, rgba(44, 123, 229, 0.16), transparent 42%),
    radial-gradient(circle at 0 -10%, rgba(0, 122, 100, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.9);
}

h1, h2, h3 {
  margin: 0 0 10px;
  line-height: 1.4;
}

h1 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

p {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
}

.meta-inline {
  margin-top: 2px;
  font-size: 12px;
  color: #56758d;
}

.result-head-row {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.result-head-row h2 {
  margin-bottom: 0;
}

.sort-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sort-inline select {
  height: 34px;
  border: 1px solid #c9dce8;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  color: #2f4f66;
}

.sort-inline select:focus {
  outline: none;
  border-color: #82b9d8;
  box-shadow: 0 0 0 3px rgba(130, 185, 216, 0.2);
}

.kpi-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-strip {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-pill {
  border: 1px solid #d6e7ef;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.kpi-pill strong {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  font-size: 1.6rem;
  color: #0a3648;
}

.kpi-pill span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #57738a;
}

.kpi-card {
  border: 1px solid #d6e7ef;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.kpi-label {
  font-size: 12px;
  color: #57738a;
}

.kpi-value {
  margin-top: 6px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #0a3648;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-switch-tabs {
  margin-top: 12px;
}

.panel-top-actions {
  padding: 12px 18px;
}

.top-action-tabs {
  margin-top: 0;
}

.quick-switch-tabs a,
.quick-switch-tabs button {
  min-width: 0;
  text-align: center;
}

/* TOPページのタブをスクロール時にヘッダー直下に固定 */
.sticky-tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 28;
  background: rgba(245, 252, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(212, 226, 235, 0.5);
  padding: 10px 0;
}

/* ヘッダーが隠れた後、タブが最上部に固定される */
header.header-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

header {
  transition: transform 0.25s ease;
}

.top-two-tabs,
.top-three-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.top-two-tabs button,
.top-three-tabs button {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-three-tabs button {
  padding: 10px 6px;
  font-size: 13px;
}

.tabs a,
.tabs button {
  border: 1px solid #c9dce7;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: #42617a;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.tabs a:hover,
.tabs button:hover {
  transform: translateY(-1px);
  border-color: #9fc5d9;
}

.tabs a.active,
.tabs button.active {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(0, 122, 100, 0.28);
}

/* 1部/2部トグル */
.division-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  width: fit-content;
}
.division-btn {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: #fff;
  color: var(--sub);
  cursor: pointer;
  transition: all 0.15s ease;
}
.division-btn.active {
  background: var(--accent, #007a64);
  color: #fff;
}

/* ゾーン色分け */
.zone-indicator {
  width: 4px;
  padding: 0 !important;
}
.zone-bar {
  display: block;
  width: 4px;
  height: 100%;
  min-height: 20px;
  border-radius: 2px;
}
.zone-cl { background: #1a73e8; }
.zone-el { background: #f9a825; }
.zone-promotion { background: #1a73e8; }
.zone-playoff { background: #f57c00; }
.zone-relegation { background: #d32f2f; }

/* ゾーン凡例 */
.zone-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--sub);
}
.zone-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.zone-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.form-legend-right {
  display: flex;
  gap: 12px;
  margin-left: auto;
}
.form-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-legend-right .form-chip {
  width: 16px;
  height: 16px;
  font-size: 10px;
  margin: 0;
}

.league-tabs .league-tab {
  min-width: 164px;
  border-radius: 14px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
}

.league-tabs .tab-flag {
  font-size: 16px;
}

.league-tabs .tab-labels {
  display: grid;
  gap: 2px;
}

.league-tabs .tab-ja {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #1c3f58;
  line-height: 1.25;
}

.league-tabs .tab-en {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  font-size: 10px;
  line-height: 1.2;
  opacity: 0.75;
}

.league-tabs .league-tab.active .tab-ja,
.league-tabs .league-tab.active .tab-en {
  color: #fff;
  opacity: 1;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #d7e6ef;
}
.standings-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.standings-table {
  width: 100%;
  table-layout: auto;
}
.standings-table th,
.standings-table td {
  white-space: nowrap;
  padding: 8px 4px;
}
.standings-table .col-zone { display: none; }
.standings-table .col-rank {
  width: 32px; max-width: none; text-align: center;
  position: sticky; left: 0; z-index: 2; background: #fff;
  padding: 8px 4px 8px 10px !important;
}
.standings-table .col-rank::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.standings-table tr.zone-cl-row .col-rank::before { background: #1a73e8; }
.standings-table tr.zone-el-row .col-rank::before { background: #f9a825; }
.standings-table tr.zone-promotion-row .col-rank::before { background: #1a73e8; }
.standings-table tr.zone-playoff-row .col-rank::before { background: #f57c00; }
.standings-table tr.zone-relegation-row .col-rank::before { background: #d32f2f; }
.standings-table .col-club {
  text-align: left;
  position: sticky; left: 32px; z-index: 2; background: #fff;
  box-shadow: 2px 0 4px rgba(0,0,0,0.04);
  min-width: 120px;
}
.standings-table thead .col-rank,
.standings-table thead .col-club { z-index: 3; background: #f5fbff; }
.standings-table tr.has-jp .col-rank,
.standings-table tr.has-jp .col-club { background: #f0f8f6; }
.standings-table .col-num { width: 28px; text-align: center; }
.standings-table .col-pts { font-weight: 700; }
.standings-table .col-form { width: 110px; }
.form-badges {
  display: inline-flex;
  gap: 2px;
  flex-wrap: nowrap;
}
.form-badges .form-chip {
  font-size: 11px;
  width: 20px;
  height: 20px;
  margin: 0;
}
.form-badges .form-empty {
  background: #f0f0f0;
  color: #bbb;
}
.form-badges .form-empty::after {
  content: '-';
}

table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.95);
}

th,
td {
  padding: 8px 6px;
  border-bottom: 1px solid #e5eff5;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

thead th {
  color: #3e5f79;
  background: #f5fbff;
}

/* col1: ゾーンインジケーター */
th:nth-child(1),
td:nth-child(1) {
  width: 1%;
  max-width: 6px;
  padding: 0;
}

/* col2: 順位 */
th:nth-child(2),
td:nth-child(2) {
  width: 5%;
  text-align: center;
}

/* col3: クラブ */
th:nth-child(3),
td:nth-child(3) {
  width: 30%;
}

/* col4-11: 試/勝/分/敗/得/失/得失/勝点 */
th:nth-child(n+4), td:nth-child(n+4) {
  width: auto;
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

th:nth-child(n+4) {
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 12px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.js-sortable th {
  cursor: pointer;
}

.js-sortable th.sortable::after {
  content: "↕";
  font-size: 11px;
  margin-left: 6px;
  opacity: 0.55;
}

.js-sortable th.sort-asc::after {
  content: "↑";
  opacity: 0.95;
}

.js-sortable th.sort-desc::after {
  content: "↓";
  opacity: 0.95;
}

tbody tr {
  transition: background-color 0.18s ease;
}

tbody tr:hover {
  background: #f2fbff;
}

tbody tr.has-jp {
  background:
    linear-gradient(90deg, rgba(0, 122, 100, 0.09), transparent 45%),
    #fff;
}

.sub {
  margin-top: 3px;
  font-size: 11px;
  color: #55738c;
  line-height: 1.55;
}

.jp-members-line {
  margin-top: 4px;
  font-size: 11px;
  color: #55738c;
  line-height: 1.5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.jp-flag {
  font-size: 14px;
  line-height: 1;
}

.jp-sep {
  color: #6f879a;
}

.jp-member-link {
  color: #2b5f85;
}

.sub-inline {
  margin-left: 6px;
  font-size: 11px;
  color: #638299;
}

.club-name-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.club-name-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #123f62;
  min-width: 0;
}

.club-meta-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  color: #55738c;
}

.club-en-inline {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  letter-spacing: 0.01em;
}

.club-nickname-inline {
  color: #365d7b;
}

.club-flag {
  font-size: 14px;
  line-height: 1;
}

.club-name-main:hover {
  text-decoration: underline;
}

.live-match {
  margin-top: 4px;
  font-size: 11px;
  color: #57728a;
  line-height: 1.5;
}

.live-match.is-live {
  color: #a90d0d;
  font-weight: 700;
}

.recent-form {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #3f5e77;
  line-height: 1.5;
}

.recent-form-main {
  min-width: 0;
}

.recent-side-info {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.recent-appearance {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c7d9e8;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  color: #365777;
  background: #edf6fd;
  line-height: 1.3;
}

.recent-goal-assist {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #325378;
  line-height: 1.5;
}

.recent-updated {
  margin-top: 1px;
  font-size: 10px;
  color: #66839a;
  line-height: 1.4;
}

.form-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0;
  font-weight: 700;
  margin: 0 2px;
}

.form-chip::after {
  font-size: 11px;
  line-height: 1;
}

.form-chip.form-w {
  background: #d8f4dc;
  color: #0d7b32;
}

.form-chip.form-w::after {
  content: '○';
}

.form-chip.form-d {
  background: #eef3f8;
  color: #4e6478;
}

.form-chip.form-d::after {
  content: '△';
}

.form-chip.form-l {
  background: #ffe3e3;
  color: #a62626;
}

.form-chip.form-l::after {
  content: '×';
}

.result-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
}

.result-tag.result-w {
  background: #d8f4dc;
  color: #0d7b32;
}

.result-tag.result-d {
  background: #eef3f8;
  color: #4e6478;
}

.result-tag.result-l {
  background: #ffe3e3;
  color: #a62626;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.focus-list {
  margin-top: 10px;
}

.home-news-list {
  gap: 10px;
}

.home-news-item {
  padding: 10px 12px;
}

.focus-item h3 {
  margin: 2px 0 6px;
}

.article-context-line {
  margin-top: 2px;
  font-size: 11px;
  color: #577790;
  line-height: 1.45;
}

.article-title-with-tag {
  margin: 4px 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  line-height: 1.45;
}

.player-name-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #7ea6de;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #0b3f86;
  background: #e4f0ff;
  line-height: 1.2;
  white-space: nowrap;
}

.card {
  border: 1px solid #d7e6ef;
  border-radius: 14px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 6px 14px rgba(8, 37, 57, 0.05);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.js .card,
.js .quick-card,
.js .switch-card,
.js .kpi-card,
.js .faq article {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.24s ease;
}

.js .card.is-visible,
.js .quick-card.is-visible,
.js .switch-card.is-visible,
.js .kpi-card.is-visible,
.js .faq article.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(8, 37, 57, 0.1);
}

.player-name-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.player-name-row > * {
  align-self: center;
}

.player-name-link {
  color: inherit;
  text-decoration: none;
}

.player-name-link:hover {
  text-decoration: underline;
}

.national-team-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #7ea6de;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  color: #0b3f86;
  background: #e4f0ff;
}

.player-age-inline {
  color: #2b466a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.league-flag {
  display: inline-block;
  margin-right: 4px;
}

.search {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.search input {
  height: 42px;
  border: 1px solid #c9dce8;
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search input:focus {
  outline: none;
  border-color: #82b9d8;
  box-shadow: 0 0 0 4px rgba(130, 185, 216, 0.25);
}

.search button {
  height: 42px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  padding: 0 15px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 18px rgba(34, 103, 181, 0.3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c6dbe9;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  color: #426179;
}

.badge-overseas {
  background: #e8f3ff;
  border-color: #bdd8fd;
  color: #225ca6;
}

.badge-domestic {
  background: #e6faef;
  border-color: #bde8cf;
  color: #17754f;
}

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

.quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  border: 1px solid #cfe2ee;
  border-radius: 14px;
  background: linear-gradient(145deg, #f6fcff, #eef7ff);
  padding: 12px;
  font-weight: 700;
  color: #193e63;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(23, 67, 109, 0.15);
}

.switch-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.switch-card {
  display: block;
  border: 1px solid #cfe2ee;
  border-radius: 14px;
  padding: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.switch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(23, 67, 109, 0.15);
}

.switch-card-news {
  background: linear-gradient(145deg, #f6fcff, #eef7ff);
}

.switch-card-results {
  background: linear-gradient(145deg, #f8fffb, #ecf9f1);
}

.switch-label {
  margin: 0;
  font-size: 12px;
  color: #43627a;
}

.switch-value {
  margin: 6px 0 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: #0a3648;
}

.switch-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #577790;
  line-height: 1.6;
}

.section-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #577790;
}

.faq {
  display: grid;
  gap: 10px;
}

.faq article {
  border: 1px solid #d7e6ef;
  border-radius: 12px;
  background: #fbfdff;
  padding: 12px;
}

.mt-12 {
  margin-top: 12px;
}

.article-header h1 {
  margin-top: 8px;
}

.article-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.article-points li {
  color: #36546a;
  line-height: 1.7;
}

.to-top {
  position: fixed;
  right: 72px;
  bottom: 72px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(130deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 20px rgba(11, 66, 98, 0.3);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 28;
}

.to-top.show {
  opacity: 1;
  transform: translateY(0);
}

footer {
  text-align: center;
  color: #4d6d84;
  font-size: 12px;
  padding: 18px 14px 80px;
}

/* ボトムナビゲーション */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 56px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line, #d4e2eb);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--sub, #43627a);
  font-size: 10px;
  font-weight: 500;
  padding: 6px 12px;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
  transition: color 0.15s;
}

.bottom-nav-item.is-active {
  color: var(--accent, #007a64);
}

.bottom-nav-item.is-active svg {
  stroke: var(--accent, #007a64);
}

@media (min-width: 781px) {
  .bottom-nav {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
  }
  footer {
    padding-bottom: 70px;
  }
}

@keyframes gradientShift {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

@keyframes floatA {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(24px) translateX(18px); }
  100% { transform: translateY(0) translateX(0); }
}

@keyframes floatB {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-28px) translateX(-16px); }
  100% { transform: translateY(0) translateX(0); }
}

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

  .quick-links {
    grid-template-columns: 1fr;
  }

  .switch-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .kpi-strip {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 780px) {
  .header-menu summary {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }

  .page-top-meta-inner {
    justify-content: flex-start;
  }

  main {
    padding: 12px;
  }

  .panel {
    padding: 14px;
  }

  .panel-top-actions {
    padding: 8px 10px;
  }

  .top-three-tabs {
    gap: 4px;
  }

  .top-three-tabs button {
    padding: 8px 4px;
    font-size: 12px;
    border-radius: 20px;
  }

  th,
  td {
    padding: 7px 4px;
    font-size: 11px;
  }

  .club-name-main {
    font-size: 12px;
    gap: 4px;
  }

  .club-meta-inline {
    font-size: 10px;
  }

  .club-flag {
    font-size: 12px;
  }

  .result-head-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }

  .sort-inline {
    margin-left: auto;
  }

  .recent-side-info {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .panel {
    opacity: 1;
    transform: none;
  }
}

/* ===== Content Card (白背景カード) ===== */
.content-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1.5px 6px rgba(0, 0, 0, 0.04);
  padding: 2rem 2.2rem 2.5rem;
  margin: 1.5rem auto;
  max-width: 860px;
}

/* ===== Analysis Pages ===== */

.analysis-page {
  max-width: 860px; margin: 2.5rem auto; padding: 2rem 2.2rem 2.5rem;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1.5px 6px rgba(0, 0, 0, 0.04);
}

.analysis-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line, #e5e7eb); }
.analysis-header h1 { font-size: 1.5rem; margin: 0.5rem 0 0.8rem; line-height: 1.4; }
.analysis-meta { color: var(--muted, #666); font-size: 0.9rem; }
.analysis-meta time { margin-left: 0.5em; }

.article-byline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px 8px 8px;
  background: linear-gradient(135deg, rgba(0, 122, 100, 0.06), rgba(44, 123, 229, 0.06));
  border: 1px solid rgba(0, 122, 100, 0.15);
  border-radius: 999px;
  color: var(--text, #222);
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.article-byline:hover {
  background: linear-gradient(135deg, rgba(0, 122, 100, 0.12), rgba(44, 123, 229, 0.12));
  transform: translateY(-1px);
}
.article-byline img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #fff;
}
.article-byline-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.article-byline-label {
  font-size: 0.68rem;
  color: var(--sub, #666);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.article-byline-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #222);
}
.article-byline-role {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--accent, #007a64);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  border-radius: 10px;
  vertical-align: middle;
}

.edition-badge {
  display: inline-block; padding: 2px 10px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 700; color: #fff;
}
.edition-morning { background: #f59e0b; }
.edition-evening { background: #6366f1; }

.analysis-body { line-height: 2; margin-bottom: 2rem; font-size: 0.95rem; padding: 0 0.5rem; }
.analysis-body h3 {
  margin-top: 2.5rem; margin-bottom: 1rem; padding: 0.7rem 1rem;
  background: linear-gradient(135deg, rgba(0,122,100,0.07) 0%, rgba(54,162,235,0.05) 100%);
  border-left: 4px solid var(--accent, #007a64); border-radius: 0 8px 8px 0;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em;
  position: relative;
}
.analysis-body h3::after {
  content: ''; position: absolute; bottom: 0; left: 4px; right: 0;
  height: 1px; background: linear-gradient(90deg, var(--accent, #007a64) 0%, transparent 60%);
  opacity: 0.2;
}
.analysis-body h4 {
  margin-top: 1.8rem; margin-bottom: 0.8rem; padding: 0.5rem 0.8rem;
  background: linear-gradient(90deg, rgba(54,162,235,0.06) 0%, transparent 100%);
  border-left: 3px solid var(--accent-2, #2c7be5); border-radius: 0 6px 6px 0;
  font-size: 1rem; font-weight: 600;
}
.analysis-body p { margin-bottom: 1rem; }
.analysis-body ul, .analysis-body ol {
  margin: 1rem 0 1.2rem 0; padding-left: 1.5rem;
}
.analysis-body li {
  margin-bottom: 0.5rem; line-height: 1.8;
}
.analysis-body ul li::marker { color: var(--accent, #007a64); }
.analysis-body strong { color: var(--fg, #1a1a2e); font-weight: 700; }
.heading-icon { margin-right: 0.35rem; font-size: 0.95em; }

/* 記事全体フェードイン */
.analysis-article { animation: fadeInUp 0.5s ease; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* スクロール連動 見出しアニメーション */
.reveal-heading {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-heading.is-visible {
  opacity: 1; transform: none;
}

/* 評価待ちバッジ */
.edition-badge.edition-pending {
  background: #f59e0b; font-size: 0.75rem;
}

.rating-chart-section,
.user-rating-section,
.bbs-section {
  margin: 2rem 0; padding: 1.5rem; background: #f8f9fa; border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03); transition: box-shadow 0.3s;
}
.rating-chart-section:hover,
.user-rating-section:hover,
.bbs-section:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.rating-chart-section h2,
.user-rating-section h2,
.bbs-section h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.historical-section {
  margin: 2rem 0; padding: 1.5rem; background: #f8f9fa; border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03); transition: box-shadow 0.3s;
}
.historical-section:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.historical-section h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.historical-section h2::before { content: '\1F4C5 '; }
.historical-table { table-layout: auto; }
.historical-table th,
.historical-table td { text-align: center; padding: 8px 10px; font-size: 13px; }
.historical-table th:nth-child(2),
.historical-table td:nth-child(2),
.historical-table th:nth-child(3),
.historical-table td:nth-child(3) { text-align: left; width: auto; }
.historical-table th:nth-child(1),
.historical-table td:nth-child(1) { width: auto; }
.historical-source { margin-top: 0.8rem; font-size: 0.8rem; color: #888; }

/* 要約セクション */
.analysis-summary {
  margin: 0 0 1.2rem;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--fg, #1a1a1a);
}
.analysis-summary p { margin: 0 0 0.3rem; }
.analysis-summary p:last-child { margin-bottom: 0; }
.analysis-summary-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem !important;
}
.analysis-summary-label + p { font-weight: 600; font-size: 1rem; }

/* === 同じ試合の動画記事カード（analysis.php） === */
.matched-video-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0 0 1.4rem;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.matched-video-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.matched-video-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.matched-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.matched-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  padding-left: 4px;
}
.matched-video-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}
.matched-video-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.matched-video-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
.matched-video-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.matched-video-channel {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 640px) {
  .matched-video-card {
    gap: 0.7rem;
    padding: 0.7rem;
  }
  .matched-video-play {
    width: 64px;
    height: 64px;
    font-size: 1.7rem;
  }
  .matched-video-title { font-size: 0.95rem; }
}

/* === 同じ試合の採点記事カード（video.php） === */
.matched-rating-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1rem 0 1.2rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #dbeafe;
  border-left: 4px solid #1a5276;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.matched-rating-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.matched-rating-icon {
  font-size: 1.6rem;
  flex: 0 0 auto;
}
.matched-rating-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.matched-rating-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1a5276;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
}
.matched-rating-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.matched-rating-score {
  flex: 0 0 auto;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a5276;
  background: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  border: 1px solid #dbeafe;
}
@media (max-width: 480px) {
  .matched-rating-card { gap: 0.6rem; padding: 0.6rem 0.75rem; }
  .matched-rating-icon { font-size: 1.4rem; }
  .matched-rating-score { font-size: 1.1rem; padding: 0.25rem 0.55rem; }
}

/* スタッツカード */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 0 0 1.5rem;
}
@media (min-width: 640px) {
  .stats-cards { grid-template-columns: repeat(4, 1fr); gap: 0.7rem; }
}
.stats-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 0.4rem;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stats-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.stats-card-icon { font-size: 1.3rem; line-height: 1; }
.stats-card-value { font-size: 1.15rem; font-weight: 700; color: var(--fg, #111); line-height: 1.2; }
.stats-card-label { font-size: 0.7rem; color: var(--text-muted, #6b7280); text-align: center; line-height: 1.2; }

.rating-chart-section h2::before { content: '\1F4CA '; }
.user-rating-section h2::before { content: '\2B50 '; }
.bbs-section h2::before { content: '\1F4AC '; }

.chart-wrapper { max-width: 600px; margin: 0 auto; }

.rating-sources { list-style: none; padding: 0; margin: 1rem 0 0; }
.rating-sources li {
  padding: 0.4rem 0; border-bottom: 1px solid var(--line, #e5e7eb);
  font-size: 0.9rem;
}
.rating-sources li:last-child { border-bottom: none; }
.rating-sources a { color: #3b82f6; text-decoration: none; font-size: 0.85rem; }
.rating-sources a:hover { text-decoration: underline; }
.rating-stats-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted, #6b7280);
  margin-top: 0.15rem;
  padding-left: 0.2rem;
}

.rating-pending {
  color: #f59e0b; font-weight: 600; font-style: italic;
}
.pending-notice {
  color: var(--sub, #666); font-size: 0.85rem; font-style: italic;
  margin-top: 0.8rem; padding: 0.5rem 0; border-top: 1px dashed var(--line, #d1d5db);
}
.rating-chart-section.pending { border-left: 3px solid #f59e0b; }


/* Rating slider */
.rating-slider-wrapper {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem;
}
.rating-slider { flex: 1; accent-color: #3b82f6; height: 8px; }
.rating-value {
  font-size: 1.5rem; font-weight: 700; min-width: 3em; text-align: center;
  color: #3b82f6;
}
.user-rating-stats { font-size: 0.9rem; color: var(--muted, #666); margin-top: 0.5rem; }

.btn { border: none; padding: 0.6rem 1.5rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-primary:disabled { background: #94a3b8; cursor: default; }

/* BBS */
.bbs-posts { margin-bottom: 1.5rem; }
.bbs-post { padding: 0.8rem 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.bbs-post-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.3rem; }
.bbs-post-header time { color: var(--muted, #999); }
.bbs-post p { margin: 0; line-height: 1.6; }
.bbs-new { animation: bbs-fade-in 0.4s ease; }
@keyframes bbs-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bbs-empty { color: var(--muted, #999); font-style: italic; }

.bbs-form { display: flex; flex-direction: column; gap: 0.5rem; }
.bbs-form input, .bbs-form textarea {
  padding: 0.5rem 0.8rem; border: 1px solid var(--line, #d1d5db); border-radius: 6px;
  font-size: 0.9rem; font-family: inherit;
}
.bbs-form textarea { resize: vertical; min-height: 80px; }
.bbs-error { color: #ef4444; font-size: 0.85rem; margin: 0; }

/* Analysis list */
.analysis-list { display: flex; flex-direction: column; gap: 1rem; max-width: 100%; overflow: hidden; }
.analysis-card {
  display: block; padding: 1rem 1.2rem; background: var(--panel); border-radius: 8px;
  text-decoration: none; color: inherit; transition: box-shadow 0.2s;
  word-break: break-word; overflow-wrap: anywhere; min-width: 0;
  box-sizing: border-box; max-width: 100%; overflow: hidden;
}
.analysis-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.analysis-card h2 { font-size: 1.1rem; margin: 0.3rem 0; overflow-wrap: anywhere; }
.analysis-card-meta { font-size: 0.85rem; color: var(--muted, #666); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }

/* 採点記事一覧: 動画あり時はサムネ付き、なし時は通常block */
.analysis-card.has-video {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.analysis-card-thumb {
  position: relative;
  display: block;
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.analysis-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.analysis-card-thumb-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  font-size: 0.95rem;
  border-radius: 50%;
  padding-left: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.analysis-card.has-video .analysis-card-body {
  flex: 1;
  min-width: 0;
}
.analysis-card:not(.has-video) .analysis-card-body { display: contents; }
@media (max-width: 480px) {
  .analysis-card.has-video {
    gap: 10px;
    padding: 0.6rem;
  }
  .analysis-card-thumb {
    width: 110px;
    flex: 0 0 110px;
  }
  .analysis-card-thumb-play {
    width: 28px; height: 28px; font-size: 0.75rem;
  }
  .analysis-card.has-video h2 {
    font-size: 0.9rem;
  }
}
@media (max-width: 360px) {
  .analysis-card-thumb {
    width: 90px;
    flex: 0 0 90px;
  }
}

.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 2rem 0; }
.pagination a { color: #3b82f6; text-decoration: none; }
.pagination a:hover { text-decoration: underline; }

/* Tab swipe container */
/* --- Media comparison --- */
.media-group-list {
  display: grid;
  gap: 12px;
}

.media-comparison-group {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #c9dce7;
  border-radius: 12px;
  padding: 14px;
}

.media-group-header {
  margin: 0 0 8px;
  font-size: 15px;
}

.media-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.media-article-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  line-height: 1.6;
  padding: 5px 0;
  border-bottom: 1px solid rgba(201, 220, 231, 0.5);
}

.media-article-item:last-child {
  border-bottom: none;
}

.media-source-badge {
  display: inline-block;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #111;
  background: #f0f0f0;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.media-article-item a {
  color: #1a466b;
}

.media-article-item a:hover {
  text-decoration: underline;
}

.rating-sources-inline {
  display: inline;
  border: 1px solid #b8d4a8;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  word-break: break-all;
  font-weight: 700;
  color: #2d5a2f;
  background: #e8f7ea;
  white-space: nowrap;
}

.media-article-time {
  color: #42617a;
  font-size: 12px;
  white-space: nowrap;
  margin-left: auto;
}

/* --- Media comparison link card --- */
a.media-comparison-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

a.media-comparison-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(8, 37, 57, 0.1);
  border-color: #9fc5d9;
}

.media-source-badges {
  margin: 4px 0 6px;
  font-size: 12px;
  color: #43627a;
  line-height: 1.6;
}

.media-latest-title {
  margin: 0;
  font-size: 13px;
  color: #55738c;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Digest page --- */
.digest-page {
  max-width: 860px;
}

.digest-breadcrumb {
  margin: 0 0 16px;
  font-size: 13px;
}

.digest-breadcrumb a {
  color: var(--accent-2);
  text-decoration: none;
}

.digest-breadcrumb a:hover {
  text-decoration: underline;
}

.digest-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.digest-header h1 {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  margin: 0 0 6px;
}

.digest-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--sub);
}

.digest-header-meta-left {
  flex: 1;
  min-width: 0;
}

.digest-player-link {
  color: var(--accent-2, #2c7be5);
  text-decoration: none;
  font-weight: 600;
}

.digest-player-link:hover {
  text-decoration: underline;
}

.digest-empty {
  color: var(--sub);
  font-style: italic;
  padding: 2rem 0;
}

.digest-source-list {
  display: grid;
  gap: 20px;
}

.digest-source-group {
  background: #f8fbff;
  border: 1px solid #d4e5f0;
  border-radius: 12px;
  padding: 16px;
}

.digest-source-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
}

.digest-source-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--sub);
}

.digest-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.digest-article-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(201, 220, 231, 0.6);
  border-radius: 8px;
}

.digest-article-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.digest-article-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a3a52;
  line-height: 1.5;
}

.digest-article-time {
  font-size: 12px;
  color: #42617a;
  white-space: nowrap;
  flex-shrink: 0;
}

.digest-article-summary {
  margin: 6px 0;
  font-size: 13px;
  color: #4a6a82;
  line-height: 1.7;
}

.digest-external-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}

.digest-external-link:hover {
  text-decoration: underline;
}

.digest-ai-article {
  margin-bottom: 2rem;
}
.digest-preparing {
  background: var(--bg-card, #f8f9fa);
  border: 1px dashed var(--border, #dee2e6);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: var(--fg-muted, #6c757d);
}
.digest-section-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent, #007a64);
}
.digest-related-section {
  margin-bottom: 2rem;
}
.digest-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.digest-related-item a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--border, #dee2e6);
  text-decoration: none;
  color: var(--fg, #1a1a2e);
  transition: background 0.15s;
}
.digest-related-item a:hover {
  background: var(--bg-card, #f8f9fa);
}
.digest-related-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  flex: 1;
}
.digest-related-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--fg-muted, #6c757d);
}
.media-source-badge-sm {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-card, #f0f0f0);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.digest-sources-section {
  margin-top: 1rem;
}

.tab-swipe-container {
  overflow: hidden;
}

.tab-swipe-track {
  transition: transform 0.3s ease;
}

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

@media (max-width: 780px) {
  .tab-swipe-track {
    display: flex;
    width: calc(var(--tab-count, 3) * 100%);
  }

  .tab-panel {
    flex: 0 0 calc(100% / var(--tab-count, 3));
    min-width: 0;
  }

  .tab-panel[hidden] {
    display: block;
    visibility: hidden;
    content-visibility: hidden;
    contain-intrinsic-size: 0 500px;
  }

  .analysis-card {
    padding: 0.8rem 1rem;
  }

  /* --- Analysis detail mobile --- */
  .analysis-page {
    padding: 1.2rem 1rem 2rem;
    margin: 0.8rem 8px 1.5rem;
    border-radius: 12px;
  }

  .content-card {
    padding: 1.2rem 1rem 2rem;
    margin: 0.8rem 8px 1.5rem;
    border-radius: 12px;
  }

  .chart-wrapper {
    max-width: 100%;
  }

  .analysis-body {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .analysis-body h3 {
    padding: 0.5rem 0.7rem;
    font-size: 1rem;
    margin-top: 2rem;
  }
  .analysis-body h4 {
    padding: 0.4rem 0.6rem;
    font-size: 0.92rem;
    margin-top: 1.5rem;
  }

  .rating-chart-section,
  .user-rating-section,
  .bbs-section {
    padding: 1rem;
    margin: 1.2rem 0;
  }

  .rating-slider-wrapper {
    gap: 0.5rem;
  }

  .bbs-form input,
  .bbs-form textarea {
    font-size: 16px;
  }
}

/* ===== Digest Engagement (いいね + コメント) ===== */
.digest-engagement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.digest-engagement-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.digest-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c9dce7;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: #43627a;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.digest-like-btn:hover {
  background: #e8f3ff;
  border-color: #7ea6de;
  transform: scale(1.04);
}

.digest-like-btn:active {
  transform: scale(0.96);
}

.digest-like-btn.liked {
  background: #e4f0ff;
  border-color: #4a90d9;
  color: #0b3f86;
  font-weight: 700;
}

.digest-like-btn-sm {
  padding: 2px 10px;
  font-size: 12px;
}

.digest-like-btn-lg {
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 600;
}

.video-card-actions {
  display: flex;
  align-items: center;
  padding: 4px 8px 0 0;
  flex-shrink: 0;
}
.card-actions {
  margin-top: 6px;
}

.digest-comment-badge {
  font-size: 12px;
  color: #43627a;
}

.digest-like-action {
  margin: 0 0 1.5rem;
  text-align: center;
}

.digest-related-engagement {
  font-size: 11px;
  color: #5a7a92;
  white-space: nowrap;
}

/* ===== 動画解説 ===== */

/* 動画埋め込み 16:9 レスポンシブ */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* edition badge */
.edition-video {
  background: #c0392b;
  color: #fff;
}

/* 動画一覧カードリスト */
.video-card-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.video-card {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.video-card:hover {
  background: rgba(255, 255, 255, 0.5);
}

.video-card-thumb {
  width: 180px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.video-card-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.video-card-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #d5e3ef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #8aa8c0;
}

.video-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
}

.video-card-body {
  flex: 1;
  min-width: 0;
}

.video-card-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.5;
}

.video-channel {
  font-weight: 500;
}

/* プレータグ（GOAL / ASSIST） */
.play-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: middle;
  line-height: 1.3;
}
.play-tag-goal {
  background: #d63031;
  color: #fff;
}
.play-tag-assist {
  background: #0984e3;
  color: #fff;
}

/* 選手ゴール/アシストバッジ */
.player-stat-badge {
  display: inline-block;
  font-size: 13px;
  margin-left: 4px;
  vertical-align: middle;
}

/* 日本人選手名ハイライト */
.player-name-highlight {
  color: #0d3145;
  font-weight: 700;
  background: linear-gradient(transparent 60%, rgba(0, 122, 100, 0.15) 60%);
  padding: 0 2px;
}

/* 動画シークボタン */
.video-seek-btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent, #007a64);
  text-decoration: none;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  transition: background 0.15s ease;
}
.video-seek-btn:hover {
  background: rgba(0, 122, 100, 0.1);
  text-decoration: underline;
}

/* モバイル対応 */
@media (max-width: 600px) {
  .video-card {
    gap: 10px;
  }
  .video-card-thumb {
    width: 130px;
  }
  .video-card-title {
    font-size: 13px;
  }
}

/* Player header with video thumbnail */
.player-header-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
}

.player-video-thumb {
  position: relative;
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.player-video-thumb:hover .video-play-icon {
  opacity: 1;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

@media (max-width: 480px) {
  .player-header-row {
    flex-direction: column;
  }

  .player-video-thumb img {
    width: 100% !important;
    height: auto !important;
  }
}

/* Player video icon in player list */
.player-video-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e00;
  color: #fff;
  font-size: 10px;
  text-decoration: none;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 4px;
  transition: opacity 0.15s;
}

.player-video-icon:hover {
  opacity: 0.8;
}

/* Player list thumbnail layout */
.player-card-with-thumb {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.player-list-thumb {
  position: relative;
  display: block;
  flex-shrink: 0;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}

.player-list-thumb img {
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

.player-list-thumb:hover .video-play-icon-sm {
  opacity: 1;
}

.video-play-icon-sm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.player-card-info {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .player-card-with-thumb {
    flex-direction: column;
  }
  .player-list-thumb img {
    width: 100% !important;
    height: auto !important;
  }
}

/* 日本代表ページ */
.nt-section-heading {
  font-size: 1rem; font-weight: 700; margin: 1.2rem 0 0.6rem; padding-left: 0.3rem;
  border-left: 3px solid var(--accent, #007a64);
  padding-left: 0.6rem;
}
.nt-match-list { display: flex; flex-direction: column; gap: 0.5rem; }
.nt-match-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  padding: 0.8rem; background: #fff; border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  position: relative;
}
.nt-match-card.nt-upcoming { border-left: 3px solid #3b82f6; }
.nt-match-comp { font-size: 0.72rem; color: var(--text-muted, #6b7280); font-weight: 500; }
.nt-match-teams { display: flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; font-weight: 600; }
.nt-team.nt-japan { color: var(--accent, #007a64); }
.nt-vs { font-size: 0.8rem; color: #999; font-weight: 400; }
.nt-score { font-size: 1.2rem; font-weight: 700; min-width: 3em; text-align: center; }
.nt-match-date { font-size: 0.8rem; color: var(--text-muted, #6b7280); }
.nt-live-badge {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: #ef4444; color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; animation: nt-pulse 1.5s infinite;
}
@keyframes nt-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-field { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-field label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.contact-optional { font-size: 0.75rem; font-weight: 400; color: var(--sub); margin-left: 0.3em; }
.contact-required { font-size: 0.75rem; font-weight: 600; color: #ef4444; margin-left: 0.3em; }
.contact-field input,
.contact-field select,
.contact-field textarea {
  padding: 0.6rem 0.8rem; border: 1px solid var(--line, #d1d5db); border-radius: 8px;
  font-size: 0.95rem; font-family: inherit; background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 122, 100, 0.12);
}
.contact-field textarea { resize: vertical; min-height: 120px; }
.contact-field select { cursor: pointer; }
.contact-submit { margin-top: 0.5rem; }
.contact-submit .btn-primary {
  width: 100%; padding: 0.75rem; font-size: 1rem; font-weight: 700;
  border: none; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; transition: background 0.2s, transform 0.15s;
}
.contact-submit .btn-primary:hover { background: #005e4d; transform: translateY(-1px); }
.contact-submit .btn-primary:active { transform: translateY(0); }
.contact-success {
  text-align: center; padding: 1.5rem 1rem;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px;
}
.contact-success p { margin: 0.3rem 0; color: #065f46; font-weight: 500; }
.contact-success p:first-child { font-size: 1.15rem; font-weight: 700; }
