/* シャトルノート — "arena scoreboard" design
   Court-mat green and white lines carry the identity; the scoreboard face
   (Dela Gothic One) is used only for headings and numbers. */

:root {
  --mat: #0f5a45;        /* BWF court mat */
  --mat-deep: #0a3f31;
  --night: #072820;      /* arena, header, scoreboard */
  --paper: #f3f5f2;
  --paper-alt: #e7eee9;
  --surface: #ffffff;
  --ink: #14201b;
  --muted: #56665e;
  --rule: #cbd6cf;
  --amber: #f2c14e;      /* scoreboard digits: numbers only */
  --red: #c8102e;        /* 日本 marker only */
  --link: #0f5a45;

  --display: "Dela Gothic One", "Hiragino Sans", "Yu Gothic", sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;

  --radius: 6px;
  --wrap: 1040px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1a15;
    --paper-alt: #0f221b;
    --surface: #12271f;
    --ink: #e6efea;
    --muted: #9cb1a6;
    --rule: #26392f;
    --link: #8fd1aa;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.35; }
.num, .n, td.rank, .r, .bar-num, .cal .d { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 20; min-height: 56px; padding: 0 20px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px;
  background: var(--night); color: #fff;
  border-bottom: 2px solid #fff;
}
.logo { order: 1; font-family: var(--display); font-size: 17px; letter-spacing: .02em; text-decoration: none; color: #fff; }
.nav { order: 2; margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav a { color: #e5efe9; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: #fff; color: #fff; }
.fs { order: 3; display: inline-flex; gap: 4px; }
.fs button {
  min-width: 34px; height: 30px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 1px solid rgba(255,255,255,.45); border-radius: var(--radius); background: transparent; color: #fff;
}
.fs button:hover { background: rgba(255,255,255,.12); }
@media (max-width: 900px) {
  html { scroll-padding-top: 108px; }
  .header { padding: 8px 16px 0; }
  .logo { flex: 1; }
  .nav {
    order: 4; flex: 0 0 calc(100% + 32px); margin: 6px -16px 0; padding: 0 16px 8px;
    gap: 6px; overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; padding: 4px 12px; font-size: 13px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }
  .nav a:hover { border-color: #fff; }
}

/* ---------- Hero: the court ---------- */
.hero { position: relative; overflow: hidden; background: var(--mat); color: #fff; }
.hero-court { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-court line, .hero-court rect { stroke: rgba(255,255,255,.5); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.hero-court .net { stroke: #fff; stroke-width: 3; stroke-dasharray: 2 5; }
.hero-inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 44px 20px 92px; }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 9vw, 76px); line-height: 1.1; letter-spacing: .02em;
}
.catch { margin: 12px 0 0; max-width: 26em; font-size: clamp(15px, 3.6vw, 18px); color: #dcebe3; }

/* ---------- "Now" scoreboard ---------- */
.now { padding: 0 20px 8px; margin-top: -64px; position: relative; }
.now-grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 2px; background: #000; border: 2px solid #000; border-radius: 10px; overflow: hidden; }
.now-card { background: var(--night); color: #fff; padding: 18px 20px 16px; }
.now-card h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: #b9d3c5; letter-spacing: .04em; }
.now-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.now-events li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.12); }
.now-events li:first-child { border-top: 0; padding-top: 0; }
.now-events div { flex: 1; min-width: 0; }
.now-events strong { display: block; line-height: 1.45; }
.now-events small { color: #a9c4b6; font-size: 12px; }
.now-events .badge { border-color: rgba(255,255,255,.5); color: #fff; }
.now-japan li {
  display: grid; grid-template-columns: 7em 4.2em 1fr; align-items: baseline; gap: 8px;
  padding: 7px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px;
}
.now-japan li:first-child { border-top: 0; padding-top: 0; }
.now-japan .ev { color: #a9c4b6; font-size: 13px; }
.now-japan .r { font-family: var(--display); font-size: 22px; line-height: 1; color: var(--amber); }
.now-japan .who { line-height: 1.45; }
.now-japan .none { grid-column: 2 / -1; color: #a9c4b6; font-size: 13px; }
.more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; color: #fff; }
a.mini {
  flex: none; padding: 4px 12px; font-size: 12px; font-weight: 700; border-radius: 999px;
  background: #fff; color: var(--night); text-decoration: none;
}
@media (max-width: 760px) { .now-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { max-width: var(--wrap); margin: 0 auto; padding: 56px 20px; }
.section.alt { max-width: none; background: var(--paper-alt); }
.section.alt > * { max-width: calc(var(--wrap) - 40px); margin-left: auto; margin-right: auto; }
.section h2 {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 5vw, 36px); letter-spacing: .02em;
  padding-bottom: 12px; border-bottom: 2px solid var(--mat);
}
@media (prefers-color-scheme: dark) { .section h2 { border-bottom-color: #3d7a62; } }
.section h3 { margin: 36px 0 12px; font-size: 19px; font-weight: 700; }
.section-lead { margin: 14px 0 24px; max-width: 40em; color: var(--muted); }
.note { margin: 12px 0 0; font-size: 13px; color: var(--muted); max-width: 52em; }
.note a, .legend a { color: inherit; }
.empty { color: var(--muted); }

.jp-mark {
  display: inline-block; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 1.7;
  color: #fff; background: var(--red); border-radius: 3px; vertical-align: 2px;
}

/* ---------- Switches ---------- */
.seg { display: inline-flex; margin: 0 0 12px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); }
.seg button { padding: 6px 16px; font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--mat); color: #fff; }
.tabs { display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto; margin: 0 0 18px; border-bottom: 1px solid var(--rule); scrollbar-width: thin; }
.tabs button {
  flex: none; padding: 10px 14px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted);
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--mat); }
@media (prefers-color-scheme: dark) { .tabs button[aria-selected="true"] { border-bottom-color: #8fd1aa; } }
.tabs button[hidden] { display: none; }

/* ---------- Ranking table ---------- */
.as-of { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--muted); }
.rank-hint { margin: 0 0 10px; padding: 8px 12px; font-size: 13px; background: var(--surface); border-left: 3px solid var(--mat); }
.rank-hint[hidden] { display: none; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--rule); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--night); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.num { text-align: right; }
td.rank { width: 64px; font-family: var(--display); font-size: 22px; line-height: 1; color: var(--mat); }
@media (prefers-color-scheme: dark) { td.rank { color: #8fd1aa; } }
tr.japan td { background: rgba(200, 16, 46, .06); }
tr.japan td.rank { color: var(--red); }
.rank-table td { vertical-align: middle; }
.rank-table .pname { display: block; font-weight: 700; line-height: 1.5; }
.rank-table .reading { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.rank-table .country { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.rank-table .jp-mark { margin-top: 3px; }
.rank-table td.num { font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) { th, td { padding: 10px 10px; font-size: 14px; } td.rank { width: 46px; font-size: 19px; } }

.jp100 { margin-top: 22px; }
.jp100[hidden] { display: none; }
.section .jp100 h3 { margin: 0 0 6px; font-size: 16px; }
.jp100-list { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 32px; }
.jp100-list li {
  break-inside: avoid; display: grid; grid-template-columns: 4em 1fr auto; gap: 10px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px;
}
.jp100-list .r { font-family: var(--display); color: var(--red); }
.jp100-list .pts { color: var(--muted); font-size: 13px; }
.jp100-list li.top10 .who { font-weight: 700; }
.legend { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

details.about { margin-top: 10px; }
details.about summary { cursor: pointer; padding: 4px 0; font-size: 13px; color: var(--muted); }
details.about p { margin: 4px 0 0; font-size: 12px; color: var(--muted); max-width: 60em; }

/* ---------- Tournaments ---------- */
#schedule .seg { margin-bottom: 18px; }
#events-world[hidden], #events-japan[hidden] { display: none; }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.event {
  display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 16px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
.event[hidden] { display: none; }
.event.live { border-left: 6px solid var(--red); }
.event.highlight { border: 2px solid var(--mat); }
.cal { align-self: start; text-align: center; line-height: 1.15; padding: 8px 4px 10px; background: var(--night); color: #fff; border-radius: var(--radius); }
.cal .m { display: block; font-size: 12px; color: #b9d3c5; }
.cal .d { display: block; font-family: var(--display); font-size: 32px; color: var(--amber); }
.cal .e { display: block; font-size: 12px; color: #b9d3c5; }
.event-body { min-width: 0; }
.event-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.badge { padding: 0 9px; font-size: 12px; font-weight: 700; line-height: 1.8; border: 1px solid var(--rule); border-radius: 3px; white-space: nowrap; }
.badge.live { background: var(--red); border-color: var(--red); color: #fff; }
.grade-chip { padding: 0 9px; font-size: 12px; font-weight: 700; line-height: 1.8; border-radius: 3px; background: var(--paper-alt); }
.grade-chip.strong { background: var(--mat); color: #fff; }
.event-name { display: block; font-size: 19px; line-height: 1.45; }
.event .meta { display: block; font-size: 13px; color: var(--muted); }
.event .meta.en { font-size: 12px; }
.event .desc { display: block; margin-top: 6px; font-size: 14px; }
.event-facts { margin: 12px 0 0; display: grid; font-size: 14px; }
.event-facts div { display: grid; grid-template-columns: 8em 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); }
.event-facts dt { color: var(--muted); font-size: 13px; }
.event-facts dd { margin: 0; line-height: 1.65; }
.event-facts .line { display: block; }
details.stops { margin-top: 10px; border-top: 1px solid var(--rule); }
details.stops summary { cursor: pointer; padding: 8px 0; font-size: 14px; font-weight: 700; }
details.stops ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; font-size: 14px; }
details.stops b { display: inline-block; min-width: 5.5em; font-variant-numeric: tabular-nums; }
.event .pending { display: block; margin-top: 10px; padding: 8px 12px; font-size: 13px; color: var(--muted); background: var(--paper-alt); border-radius: var(--radius); }
.event-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.event-links a {
  padding: 8px 16px; font-size: 14px; font-weight: 700; border-radius: var(--radius); text-decoration: none;
  border: 1.5px solid var(--mat); color: var(--ink);
}
.event-links a.primary { background: var(--mat); color: #fff; }
.event-links a:hover { background: var(--mat-deep); border-color: var(--mat-deep); color: #fff; }
@media (prefers-color-scheme: dark) { .event-links a { border-color: #3d7a62; } .event-links a.primary { background: #2e6b54; } }
.show-more {
  display: block; width: 100%; margin-top: 12px; padding: 12px; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--ink); background: transparent; border: 1.5px dashed var(--mat); border-radius: var(--radius);
}
.howto { display: grid; gap: 4px; margin-top: 18px; padding: 12px 0 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); }
.howto strong, .howto b { color: var(--ink); }
@media (max-width: 480px) {
  .event { grid-template-columns: 1fr; gap: 10px; }
  .cal { display: flex; align-items: baseline; gap: 6px; width: max-content; padding: 4px 12px; }
  .cal .d { font-size: 22px; }
  .event-facts div { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Points ---------- */
.steps3 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; border-top: 1px solid var(--rule); }
.steps3 li { counter-increment: s; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); }
.steps3 li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.steps3 li::before { content: counter(s); display: block; font-family: var(--display); font-size: 34px; line-height: 1; color: var(--mat); }
@media (prefers-color-scheme: dark) { .steps3 li::before { color: #8fd1aa; } }
.steps3 .ico { display: none; }
.steps3 strong { display: block; margin: 8px 0 2px; font-size: 17px; }
.steps3 span:last-child { font-size: 14px; color: var(--muted); }
@media (max-width: 720px) {
  .steps3 { grid-template-columns: 1fr; }
  .steps3 li, .steps3 li + li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; padding: 14px 0; border-left: 0; }
  .steps3 li::before { grid-row: 1 / 3; font-size: 30px; }
  .steps3 strong { margin: 0; }
}
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 14em 1fr 6em; align-items: center; gap: 12px; font-size: 14px; }
.bar-label { font-weight: 700; line-height: 1.3; }
.bar-track { height: 12px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--mat); }
@media (prefers-color-scheme: dark) { .bar-fill { background: #3d9a74; } }
.bar-num { text-align: right; font-weight: 700; }
@media (max-width: 560px) { .bars li { grid-template-columns: 1fr auto; gap: 4px 10px; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
details.table-details { margin-top: 18px; }
details.table-details summary { cursor: pointer; padding: 8px 0; font-weight: 700; color: var(--link); }
.points-table td.grade { min-width: 170px; }
.points-table td.grade strong { display: block; }
.points-table td.grade small { color: var(--muted); font-size: 12px; }
.points-table td.num { white-space: nowrap; }
.points-table td.top { font-weight: 700; color: var(--mat); }
@media (prefers-color-scheme: dark) { .points-table td.top { color: #8fd1aa; } }

/* ---------- Guides (選び方・けが予防): ruled list, no boxes ---------- */
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.points li { padding: 12px 0; border-top: 2px solid var(--mat); }
.points strong { display: block; font-size: 16px; }
.points span { font-size: 14px; color: var(--muted); }
#safety .points { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .points, #safety .points { grid-template-columns: 1fr; } .points li { border-top-width: 1px; } }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: #d6e5dc; padding: 40px 20px; font-size: 14px; }
.footer > * { max-width: calc(var(--wrap) - 40px); margin-left: auto; margin-right: auto; }
.footer h2 { margin-top: 0; margin-bottom: 12px; font-size: 16px; }
.footer ul { list-style: none; padding: 0; margin-top: 0; margin-bottom: 16px; columns: 2 280px; column-gap: 32px; }
.footer li { break-inside: avoid; padding: 2px 0; }
.footer a { color: #fff; }
.disclaimer { font-size: 12px; opacity: .85; }

/* ---------- Utilities ---------- */
.skip { position: absolute; left: -999px; top: 0; z-index: 30; padding: 10px 16px; background: #fff; color: #000; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .header, .skip, .fs, .hero-court { display: none; }
  .hero, .now-card, .cal { background: none; color: #000; }
  .now { margin-top: 0; }
}
.now-japan .r small { margin-left: 1px; font-family: var(--body); font-size: 12px; font-weight: 700; color: #d9c48a; }
.steps3 span:last-child, .points span, .note, .howto, .event .desc { line-height: 1.7; }
.now-japan .r { white-space: nowrap; }

/* ---------- Generated sub pages (ranking / players / tournaments) ---------- */
.page { max-width: var(--wrap); margin: 0 auto; padding: 20px 20px 64px; }
.crumbs ol { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "／"; margin: 0 6px; color: var(--rule); }
.crumbs a { color: var(--muted); }
.page h1 {
  margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 5.5vw, 40px); letter-spacing: .02em;
  padding-bottom: 12px; border-bottom: 2px solid var(--mat);
}
.page .kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.page .en { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.page .lead { margin: 14px 0 22px; max-width: 44em; }
.page .sub-h { margin: 36px 0 12px; font-family: var(--body); font-size: 19px; font-weight: 700; padding: 0; border: 0; }
.page .jp100 h2 { margin: 0 0 6px; font-size: 16px; }
.page .pending { padding: 8px 12px; font-size: 13px; color: var(--muted); background: var(--paper-alt); border-radius: var(--radius); }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.link-list a { display: block; padding: 6px 14px; font-size: 14px; font-weight: 700; text-decoration: none; border: 1.5px solid var(--mat); border-radius: var(--radius); color: var(--ink); }
.event-index, .player-index, .tour-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 28px; border-top: 1px solid var(--rule); }
.event-index a, .player-index a, .tour-index a { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.event-index a:hover strong, .player-index a:hover strong, .tour-index a:hover strong { text-decoration: underline; }
.event-index strong, .player-index strong, .tour-index strong { font-size: 17px; }
.event-index span, .player-index span, .tour-index span { font-size: 13px; color: var(--muted); }
.tour-index .when { font-weight: 700; color: var(--mat); }
@media (prefers-color-scheme: dark) { .tour-index .when { color: #8fd1aa; } }
.tour-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.tour-list li { display: grid; grid-template-columns: minmax(8em, auto) 1fr; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.tour-list span { color: var(--muted); font-size: 14px; }
.page .event-facts { max-width: 760px; }
.page .table-wrap + .jp100 { margin-top: 28px; }
@media (max-width: 560px) { .tour-list li { grid-template-columns: 1fr; } }
.page-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 0; font-size: 14px; font-weight: 700; }
.now-events strong a { color: #fff; text-decoration: none; }
.now-events strong a:hover { text-decoration: underline; }
.event-name a { color: var(--ink); text-decoration: none; }
.event-name a:hover { text-decoration: underline; }
.jp100-list .who a, .rank-table .pname a { color: var(--ink); text-decoration-color: var(--rule); }
.shop-details { margin-top: 24px; }
.shop-details summary { font-size: 14px; font-weight: 700; color: var(--muted); }

/* Players list by event */
.jump ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); border: 1.5px solid var(--mat); border-radius: var(--radius); }
.jump a span { font-size: 12px; font-weight: 400; color: var(--muted); }
.jump a:hover { background: var(--mat); color: #fff; }
.jump a:hover span { color: #d6e5dc; }
.pgroup { scroll-margin-top: 110px; }
.page .pgroup .sub-h { display: flex; align-items: baseline; gap: 10px; margin-top: 40px; padding-bottom: 8px; border-bottom: 2px solid var(--mat); }
.sub-h .count { font-size: 14px; font-weight: 400; color: var(--muted); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: grid; grid-template-columns: 3.4em 1fr auto; gap: 4px 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.plist .r { font-family: var(--display); font-size: 24px; line-height: 1.1; color: var(--mat); white-space: nowrap; }
.plist .r small { font-family: var(--body); font-size: 12px; font-weight: 700; margin-left: 1px; }
.plist li.top10 .r { color: var(--red); }
@media (prefers-color-scheme: dark) { .plist .r { color: #8fd1aa; } }
.pnames { display: block; font-size: 17px; line-height: 1.5; }
.pnames a { color: var(--ink); }
.pmeta { margin: 6px 0 0; display: grid; gap: 2px; font-size: 13px; }
.pmeta div { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; }
.pmeta dt { color: var(--muted); }
.pmeta dd { margin: 0; line-height: 1.6; }
.plist .pts { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 4px; }
.muted { color: var(--muted); }
.more-link { margin: 10px 0 0; font-size: 14px; font-weight: 700; }
.empty-note { color: var(--muted); font-size: 14px; }
.entry-names { line-height: 2; }
@media (max-width: 560px) { .plist li { grid-template-columns: 2.8em 1fr; } .plist .pts { grid-column: 2; padding-top: 0; } .plist .r { font-size: 20px; } }
.page .mini-h { margin: 18px 0 8px; font-size: 15px; font-weight: 700; }

/* Bar widths for generated pages (no inline styles under the CSP) */
.bar-0 { width: 0%; }
.bar-5 { width: 5%; }
.bar-10 { width: 10%; }
.bar-15 { width: 15%; }
.bar-20 { width: 20%; }
.bar-25 { width: 25%; }
.bar-30 { width: 30%; }
.bar-35 { width: 35%; }
.bar-40 { width: 40%; }
.bar-45 { width: 45%; }
.bar-50 { width: 50%; }
.bar-55 { width: 55%; }
.bar-60 { width: 60%; }
.bar-65 { width: 65%; }
.bar-70 { width: 70%; }
.bar-75 { width: 75%; }
.bar-80 { width: 80%; }
.bar-85 { width: 85%; }
.bar-90 { width: 90%; }
.bar-95 { width: 95%; }
.bar-100 { width: 100%; }
.points-switch { margin: 16px 0 4px; }
.points-switch a[aria-current="page"] { background: var(--mat); color: #fff; }
[data-age-block][hidden] { display: none; }
#schedule .seg-age { margin-left: 8px; }
@media (max-width: 480px) { #schedule .seg-age { margin-left: 0; } }
.about-sec p { max-width: 42em; }
.footer-about { margin: 0 0 20px; font-weight: 700; }

/* Results, history, head-to-head */
.trend { display: inline-block; margin-left: 4px; font-family: var(--body); font-size: 11px; font-weight: 700; vertical-align: 2px; }
.trend.up { color: #1a7f4b; }
.trend.down { color: var(--red); }
.trend.same { color: var(--muted); }
@media (prefers-color-scheme: dark) { .trend.up { color: #6fd39c; } }
.hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 28px; }
.hist .mini-h { margin-top: 0; }
.spark { display: block; width: 100%; max-width: 320px; height: 70px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.spark polyline { fill: none; stroke: var(--mat); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
@media (prefers-color-scheme: dark) { .spark polyline { stroke: #8fd1aa; } }
.hist-range { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.season { font-size: 16px; }
.season b, .h2h b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.match-table td { vertical-align: top; font-size: 14px; }
.match-table .mdate { display: block; font-size: 12px; color: var(--muted); }
.match-table td small { display: block; color: var(--muted); font-size: 12px; }
.match-table td.win strong { color: #1a7f4b; }
.match-table td.lose strong { color: var(--red); }
@media (prefers-color-scheme: dark) { .match-table td.win strong { color: #6fd39c; } }
.h2h { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 32px; }
.h2h li { break-inside: avoid; display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.h2h .rec { white-space: nowrap; }
.res-ev { margin-bottom: 14px; }
.res-ev .mini-h { margin-bottom: 4px; }
.champ { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.res-list { list-style: none; margin: 0; padding: 0; }
.res-list li { display: grid; grid-template-columns: 6.5em 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.res-list .fin { font-weight: 700; }
.res-list .fin.gold { color: var(--cork-dark, #8c5a33); }

/* Results page: heading that starts the domestic part */
.part-h { margin: 48px 0 6px; padding-top: 14px; border-top: 3px solid var(--amber); font-size: 22px; }
.part-h + .lead { margin-top: 0; }

/* World top 10 history: years run left to right, the rank column stays put */
.hist-wrap { -webkit-overflow-scrolling: touch; }
.hist-table { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.hist-table th, .hist-table td { min-width: 9.5em; padding: 8px 10px; vertical-align: top; border-bottom: 1px solid var(--rule); text-align: left; }
.hist-table .rk { position: sticky; left: 0; z-index: 1; min-width: 3em; width: 3em; text-align: center; background: var(--surface); border-right: 1px solid var(--rule); }
.hist-table thead th { white-space: nowrap; }
.hist-table thead .rk { background: var(--night); color: #fff; }
.hist-table tbody .rk { color: var(--ink); font-size: 15px; }
.hist-table .yr { display: block; font-size: 15px; font-weight: 700; }
.hist-table .yr small { margin-left: 6px; font-size: 11px; color: var(--red); }
.hist-table .wk { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.hist-table .pname { display: block; font-weight: 700; line-height: 1.45; white-space: nowrap; }
.hist-table .country { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.hist-table td.japan { background: rgba(200, 16, 46, .08); }
.hist-table td.empty { color: var(--muted); }

/* Footer links: about, contact, privacy */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* This week: where each Japanese entry stands */
.week-meta { margin: -4px 0 10px; font-size: 13px; color: var(--muted); }
.live-tag { margin-left: 8px; padding: 0 8px; font-size: 12px; font-weight: 700; line-height: 1.8; color: #fff; background: var(--red); border-radius: 3px; }
.fin.alive { color: var(--mat); }
.res-list .wr { margin-left: 8px; font-size: 12px; color: var(--muted); }

/* Contact form */
.contact-form { display: grid; gap: 6px; max-width: 34em; }
.contact-form label { margin-top: 10px; font-size: 14px; font-weight: 700; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--rule); border-radius: var(--radius); }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--mat); outline-offset: 1px; }
.contact-form .req { margin-left: 6px; font-size: 11px; color: var(--red); }
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form button { justify-self: start; margin-top: 12px; padding: 10px 28px; font: inherit; font-weight: 700; color: #fff; background: var(--mat); border: 0; border-radius: var(--radius); cursor: pointer; }
.contact-form button:hover { filter: brightness(1.1); }
