/* Members, Achievements and Contact pages. Colours come from the same tokens as the rest of the site;
   css/themes.css swaps them when the theme is Light. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #0f0a1f; --bg-raise: #161033; --line: rgba(196, 181, 253, 0.16); --line-strong: rgba(196, 181, 253, 0.32);
  --text: #efeafd; --muted: #a99fd0; --accent: #7c3aed; --accent-ink: #c4b5fd;
  --gold: #fbbf24; --green: #6ee7b7; --soft: rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}
html[data-theme="light"] {
  --line-strong: rgba(76, 29, 149, 0.32); --gold: #b45309; --green: #047857; --soft: rgba(76, 29, 149, 0.06);
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; padding-bottom: calc(7rem + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding-inline: 1.25rem; }
.hero { padding-top: max(3.5rem, calc(env(safe-area-inset-top) + 2rem)); padding-bottom: 1.4rem; }
.hero__title { font-size: clamp(2rem, 9vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.hero__lede { margin-top: 0.6rem; max-width: 44ch; color: var(--muted); font-size: clamp(1rem, 3.6vw, 1.15rem); }
main { flex: 1; padding-bottom: 3rem; }
h2 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 600 0.95rem/1 inherit; font-family: inherit; color: var(--text); background: var(--soft); border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.8rem 1.1rem; min-height: 44px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent-ink); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--solid:hover { filter: brightness(1.1); border-color: var(--accent); }

.footer { text-align: center; padding: 1.25rem 1rem; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); color: var(--muted); border-top: 1px solid var(--line); font-size: 0.9rem; }
.footer p + p { margin-top: 0.2rem; }
.footer__small { font-size: 0.8rem; }

.empty { color: var(--muted); padding: 2rem 0; }

/* ---------- Members ---------- */
.tools { display: grid; gap: 0.75rem; margin-bottom: 1.1rem; }
.search { width: 100%; font: inherit; font-size: max(1rem, 16px); color: var(--text); background: var(--bg-raise); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.85rem; }
.search::placeholder { color: var(--muted); }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font: 600 0.85rem/1 inherit; font-family: inherit; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 99px; padding: 0.6rem 0.9rem; min-height: 38px; cursor: pointer; }
.chip i { font-style: normal; font-weight: 500; margin-left: 0.35rem; opacity: 0.75; }
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--accent-ink); background: var(--soft); }
.count { font-size: 0.85rem; color: var(--muted); }

.roster { list-style: none; display: grid; border-top: 1px solid var(--line); }
.m { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.m__av { width: 3rem; height: 3rem; border-radius: 50%; overflow: hidden; background: var(--bg-raise); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.03em; color: var(--accent-ink); flex: none; }
.m__av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m__id { min-width: 0; }
.m__name { display: block; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.m__handle { display: block; color: var(--muted); font-size: 0.88rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.m__meta { text-align: right; display: grid; gap: 0.25rem; justify-items: end; }
.m__joined { color: var(--muted); font-size: 0.78rem; }
.role { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0.15rem 0.45rem; color: var(--muted); }
.role--core { color: var(--accent-ink); border-color: var(--accent-ink); }
.role--trial { color: var(--gold); border-color: var(--gold); }
@media (min-width: 48rem) {
  .roster { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
}

/* ---------- Achievements ---------- */
.sum { color: var(--muted); font-size: 0.95rem; }
.year { display: grid; grid-template-columns: 1fr; gap: 0.6rem; padding: 1.6rem 0 0.4rem; border-top: 1px solid var(--line); margin-top: 1.4rem; }
.year:first-of-type { margin-top: 0.6rem; }
.year__n { font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.wins { list-style: none; display: grid; gap: 0.9rem; }
.win { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-raise); padding: 1rem 1.05rem; display: grid; gap: 0.5rem; }
.win--hi { border-color: var(--gold); }
.win__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.8rem; }
.win__res { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gold); }
.win__date { font-size: 0.82rem; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
.win__title { font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.win__event { color: var(--muted); font-size: 0.9rem; }
.win__body { color: var(--text); opacity: 0.9; font-size: 0.97rem; }
.win__img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); margin-top: 0.3rem; }
@media (min-width: 48rem) {
  .year { grid-template-columns: 7rem 1fr; gap: 1.5rem; }
  .year__n { position: sticky; top: 1.5rem; align-self: start; }
}

/* ---------- Contact ---------- */
.sec { padding: 1.6rem 0 0.2rem; }
.sec > h2 { margin-bottom: 0.8rem; }
.tag { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 1.2rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg-raise); padding: 1.1rem 1.2rem; }
.tag__v { font: 700 clamp(1.5rem, 7vw, 2.2rem)/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.tag__k { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.3rem; letter-spacing: 0.06em; text-transform: uppercase; }
.chan { list-style: none; border-top: 1px solid var(--line); }
.chan__row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.2rem 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
a.chan__row:hover .chan__label { color: var(--accent-ink); }
.chan__kind { grid-column: 1; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.chan__label { grid-column: 1; font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.chan__note { grid-column: 1; color: var(--muted); font-size: 0.9rem; }
.chan__go { grid-column: 2; grid-row: 1 / span 3; width: 22px; height: 22px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 0.8rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.7rem; align-items: baseline; }
.steps li::before { content: counter(s); font-size: 1.5rem; font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.more { margin-top: 1.8rem; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 8px); background: var(--bg-raise); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.6rem 0.95rem; font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 70; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toast { transition: none; } }
