/* ログイン画面・マイページ（ポータルの style.css と同じ色） */
:root {
  --bg: #0b0d14;
  --panel: #151926;
  --panel-2: #1d2233;
  --line: rgba(255, 255, 255, .1);
  --text: #eef0f6;
  --muted: #9aa1b5;
  --accent: #a78bfa;
  --danger: #f87171;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(167, 139, 250, .14), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(34, 211, 238, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "M PLUS 1p", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: start center;
  padding: max(24px, env(safe-area-inset-top)) 16px 32px;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }

.card {
  width: 100%;
  max-width: 440px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
}
.mark { width: 48px; height: 48px; image-rendering: pixelated; display: block; }
h1 { font-size: 1.25rem; font-weight: 900; margin: 10px 0 8px; }
h2 { font-size: 1rem; font-weight: 700; margin: 24px 0 8px; }
.lead { line-height: 1.7; margin: 0 0 16px; }
.note, .muted { color: var(--muted); font-size: .85rem; line-height: 1.6; }
.google { min-height: 44px; margin: 8px 0 16px; }
.row { display: flex; gap: 8px; }
.avatar-row { align-items: center; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
input {
  flex: 1;
  min-width: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary, .secondary, .danger {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.primary { background: var(--accent); color: #140f24; }
.secondary { background: var(--panel-2); border: 1px solid var(--line); }
.danger { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 8px 0; cursor: pointer; }
.error { color: var(--danger); margin: 12px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0 0; }

/* トロフィー一覧 */
h3.game { font-size: .9rem; margin: 16px 0 6px; color: var(--muted); }
ul.trophies { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.trophies li { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
ul.trophies li b { font-size: .95rem; }
ul.trophies li span, ul.trophies li small { font-size: .8rem; color: var(--muted); }
ul.trophies li.got { border-color: rgba(167, 139, 250, .55); }
ul.trophies li.got b::before { content: "★ "; color: var(--accent); }
ul.trophies li.not { opacity: .55; }
ul.trophies li.not b::before { content: "☆ "; }

/* RTA ランキング・記録 */
.card.wide { max-width: 560px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tabs button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 700; cursor: pointer; }
.tabs button[aria-current="true"] { background: var(--accent); color: #140f24; border-color: var(--accent); }
ol.ranking { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 4px; }
ol.ranking li { display: grid; grid-template-columns: 2.5em 1fr auto; align-items: baseline; column-gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
ol.ranking li.me { border-color: rgba(167, 139, 250, .7); }
ol.ranking .rank { font-weight: 900; color: var(--accent); text-align: right; }
ol.ranking .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.ranking .time, .runs .time { font-variant-numeric: tabular-nums; font-weight: 700; }
ol.ranking small { grid-column: 2 / -1; color: var(--muted); font-size: .75rem; }
ul.rules { padding-left: 1.2em; margin: 0; }
ul.runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.runs li { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
ul.runs li small { font-size: .8rem; color: var(--muted); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.badge.ref { border: 1px solid var(--muted); color: var(--muted); }
.badge.best { background: var(--accent); color: #140f24; }
a.primary { margin-top: 8px; }
