:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --text: #18213a;
    --muted: #5b6580;
    --line: #e2e6f0;
    --brand: #1f3fd6;
    --brand-ink: #ffffff;
    --brand-soft: #e8edff;
    --accent: #0f7a5a;
    --accent-soft: #e3f4ee;
    --warn-bg: #fff6e0;
    --warn-ink: #7a5300;
    --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 6px 20px rgba(20, 30, 60, .06);
    --radius: 14px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1424;
        --surface: #171e33;
        --text: #e7ebf7;
        --muted: #9aa4c0;
        --line: #273150;
        --brand: #6f8cff;
        --brand-ink: #0b1020;
        --brand-soft: #1e2a52;
        --accent: #4cc79c;
        --accent-soft: #15362c;
        --warn-bg: #3a2e12;
        --warn-ink: #f2d38a;
        --shadow: none;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand img { border-radius: 50%; background: #fff; }
.brand strong { display: block; font-size: 17px; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; }
.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.who form { margin: 0; }
.who-name { font-weight: 600; }
.badge { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.2; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 0 22px; font-size: 17px; }
.hero-compact { padding-top: 32px; }

.login-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 720px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 4px; font-size: 18px; }
.login-card p { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; }

.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-secondary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); padding: 6px 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.section-title { font-size: 20px; margin: 34px 0 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--brand); transform: translateY(-1px); }
.card-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.card-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font-weight: 700; font-size: 18px; }
.card-host { color: var(--muted); font-size: 13px; }
.card-text { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.card-go { color: var(--brand); font-size: 22px; line-height: 1; padding-top: 12px; }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.tag-muted { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

.about { margin-bottom: 20px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.about-grid > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.about h3 { margin: 0 0 6px; font-size: 16px; }
.about p { margin: 0; color: var(--muted); font-size: 14.5px; }

.notice { margin-top: 20px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 12px 14px; }
.error-box { text-align: left; padding-bottom: 40px; }
.muted { color: var(--muted); }
.footer { color: var(--muted); font-size: 13px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); margin-top: 36px; }

@media (max-width: 520px) {
    .cards { grid-template-columns: 1fr; }
    .who-name { display: none; }
}
