/* Shared by account.html, player.html and matches.html (index.html has the same variables) */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eceef2;
  --text: #1b1e24; --text-2: #525966; --text-3: #6b7280;
  --line: rgba(27, 30, 36, .10); --line-strong: rgba(27, 30, 36, .18);
  --accent: #f0b90b; --accent-ink: #1b1e24; --accent-text: #8a5a00; --accent-soft: rgba(240, 185, 11, .18);
  --danger: #b3443c;
  --gold: #9a6b00; --silver: #6e7681; --bronze: #a0582a; /* places 1-3, readable on white */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 15px/1.7 var(--font); font-feature-settings: "palt" 1; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 24px;
         border-bottom: 1px solid var(--line); background: var(--surface); }
header a { text-decoration: none; }
header a:hover { text-decoration: underline; }
header .brand { font-weight: 600; }
header nav { display: flex; gap: 16px; margin-left: auto; align-items: center; flex-wrap: wrap; color: var(--text-2); }
header nav .me { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
select, input, textarea { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
                          border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 16px; min-width: 0; }
select.lang { font-size: 16px; padding: 4px 8px; }
textarea { width: 100%; resize: vertical; min-height: 72px; }
input[type=color] { padding: 4px; width: 48px; height: 40px; }
button { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px;
         padding: 8px 16px; font: inherit; cursor: pointer; transition: background-color 150ms var(--ease); }
button:hover { background: var(--surface-2); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.primary:hover { background: #e0ac08; }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
main { padding: 24px 24px 40px; max-width: 920px; margin: 0 auto; }
h1 { font-size: 22px; font-weight: 700; line-height: 1.4; margin: 0 0 16px; }
h2 { font-size: 16px; font-weight: 600; margin: 28px 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.cards .card { margin: 0; }
.card h1, .card h2:first-child { margin-top: 0; }
.field { display: grid; gap: 4px; margin-bottom: 16px; }
.field label { font-size: 14px; color: var(--text-2); }
.field .note { font-size: 13px; color: var(--text-3); }
.row-inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: grid; gap: 8px; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.buttons.spaced { margin-top: 16px; }
.msg { margin-top: 12px; min-height: 1.4em; color: var(--text-2); font-size: 14px; white-space: pre-wrap; }
.msg.err { color: var(--danger); }
.muted { color: var(--text-2); }
.av { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none;
      border-radius: 50%; background: #6b7280; color: #fff; font-size: 13px; font-weight: 600; overflow: hidden;
      white-space: nowrap; line-height: 1; }
.av.big { width: 72px; height: 72px; font-size: 32px; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums;
        background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
th { text-align: left; color: var(--text-2); font-weight: 600; font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.rank { font-weight: 700; text-align: center; width: 44px; }
td.rank.r1, tr.r1 .who { color: var(--gold); }
td.rank.r2, tr.r2 .who { color: var(--silver); }
td.rank.r3, tr.r3 .who { color: var(--bronze); }
td .who { display: inline-flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }
.live { color: var(--accent-text); font-size: 13px; font-weight: 600; margin-left: 8px; }
.profile-top { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-top .name { font-size: 24px; font-weight: 700; line-height: 1.4; }
.profile-top .meta { color: var(--text-2); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); margin-right: 4px; }
.dot.on { background: var(--accent); }
.bio { white-space: pre-wrap; margin: 16px 0 0; }
.links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; word-break: break-all; }
.totals { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.totals .v { font-size: 24px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.totals .l { color: var(--text-2); font-size: 13px; }
@media (max-width: 640px) {
  main, header { padding-left: 12px; padding-right: 12px; }
  td, th { padding: 8px; }
  td.star { min-width: 136px; }
  td.date { white-space: nowrap; }
  .hide-narrow { display: none; }
}
