:root {
  --bg: #0b090b;
  --panel: rgba(20, 16, 20, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3f1f3;
  --dim: #a9a3a9;
  --red: #dc1428;
  --red-hover: #f5303f;
  --ok: #6fdc8c;
  --err: #ff7474;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg) url("assets/background.jpg") center / cover fixed;
  color: var(--text);
  font-family: "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 6, 8, 0.94) 0%, rgba(8, 6, 8, 0.72) 55%, rgba(8, 6, 8, 0.45) 100%);
  z-index: -1;
}
.hidden { display: none !important; }

/* ---- top bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px clamp(16px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 6, 8, 0.7);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 26px; }
.brand span { color: var(--dim); font-size: 12px; letter-spacing: 0.3em; font-weight: 700; }
nav { display: flex; gap: 22px; flex: 1; }
nav a {
  color: var(--dim);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
nav a:hover { color: var(--text); }
nav a.active { color: var(--text); border-color: var(--red); }
.whoami { color: var(--text); font-weight: 700; font-size: 14px; }

main { flex: 1; padding: clamp(20px, 5vw, 64px); }

/* ---- hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.eyebrow { color: #ff5a64; font-weight: 900; letter-spacing: 0.25em; font-size: 12px; margin: 0 0 10px; }
h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.15; margin: 0 0 18px; font-weight: 900; }
.lead { color: #d8d3d8; font-size: 16px; line-height: 1.8; max-width: 560px; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.points li { padding-left: 22px; position: relative; font-weight: 700; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; background: var(--red); transform: skewX(-12deg); }

/* ---- cards & forms */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 28px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.card.narrow { max-width: 480px; margin: 0 auto; }
.card h2 { margin: 0 0 8px; font-size: 26px; }
.card h3 { margin: 22px 0 10px; font-size: 16px; }
.sub { color: var(--dim); font-size: 14px; line-height: 1.7; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; color: var(--dim); font: inherit; font-weight: 700;
  padding: 10px 0 12px; cursor: pointer; border-bottom: 3px solid transparent;
}
.tab.active { color: var(--text); border-color: var(--red); }

label { display: grid; gap: 6px; font-size: 13px; color: var(--dim); margin-bottom: 14px; }
input {
  font: inherit; color: var(--text); background: #141014; border: 1px solid #3a343a;
  padding: 12px 14px; outline: none;
}
input:focus { border-color: var(--red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; font: inherit; font-weight: 900; letter-spacing: 0.05em;
  padding: 13px 18px; border: 0; cursor: pointer; transform: skewX(-8deg);
}
.btn > * { transform: skewX(8deg); }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-hover); }
.btn.secondary { background: #2a242a; color: var(--text); }
.btn.secondary:hover { background: #3a323a; }
.btn.ghost { background: transparent; color: var(--dim); border: 1px solid var(--line); margin-top: 18px; }
.btn.google { background: #f4f4f5; color: #1f1f23; }
.btn.google:hover { background: #fff; }
.btn.google svg { width: 20px; height: 20px; transform: skewX(8deg); }
.btn:disabled { opacity: 0.55; cursor: default; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.link { background: none; border: 0; color: #ff6b74; font: inherit; font-size: 13px; cursor: pointer; margin-top: 12px; padding: 0; }
.msg { min-height: 1.4em; font-size: 14px; margin: 14px 0 0; }
.msg[data-kind="error"] { color: var(--err); }
.msg[data-kind="ok"] { color: var(--ok); }

/* ---- account */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; }
.profile h2 { font-size: 40px; margin: 0; }
.rank { color: #ffc24a; font-weight: 900; letter-spacing: 0.12em; margin: 4px 0 20px; }
.level-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.level-row span:last-child { color: var(--dim); font-size: 13px; }
.bar { height: 8px; background: #231d23; }
.bar > div { height: 100%; background: var(--red); width: 0; transition: width 0.6s; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 26px; }
.stats div { background: rgba(255, 255, 255, 0.05); padding: 14px 10px; text-align: center; }
.stats b { display: block; font-size: 24px; }
.stats span { color: var(--dim); font-size: 12px; }
.info { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; font-size: 14px; }
.info dt { color: var(--dim); }
.info dd { margin: 0; word-break: break-all; }
.steps { line-height: 2; padding-left: 22px; }

.footer a { color: #a9a3a9; }
.footer { color: #6f696f; font-size: 12px; text-align: center; padding: 20px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .hero, .account-grid { grid-template-columns: 1fr; }
  nav { gap: 14px; font-size: 14px; }
  .whoami { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
