:root {
  --bg: #0b1020; --bg-soft: #121a33; --card: #fff; --surface: #f5f7fb; --text: #0f172a;
  --muted: #64748b; --line: #e2e8f0; --brand: #4f46e5; --brand-2: #06b6d4;
  --good: #16a34a; --warn: #f59e0b; --bad: #ef4444; --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, system-ui, sans-serif; color: var(--text); background: var(--surface); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
.container { width: min(1200px, 92%); margin: 0 auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 10px; font-weight: 600; border: 0; cursor: pointer; transition: transform .15s, background .15s; font-size: .95rem; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), #7c3aed); color: #fff; box-shadow: 0 6px 18px rgba(79,70,229,.3); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-danger { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }
.pill { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef2ff; color: var(--brand); }
.muted { color: var(--muted); }

header.site { position: sticky; top: 0; z-index: 50; background: rgba(11,16,32,.92); backdrop-filter: blur(12px); }
header.site nav { display: flex; align-items: center; justify-content: space-between; height: 68px; color: #fff; }
.logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; }
.logo-mark svg { display: block; } .logo-text { letter-spacing: -.02em; } .logo-less { background: linear-gradient(90deg, #6366f1, #06b6d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; }
.nav-links { display: flex; gap: 2rem; font-size: .95rem; color: #cbd5e1; }
.nav-links a:hover { color: #fff; }

/* Auth nav widget (shared with index.html) */
.auth-nav { display: flex; gap: .6rem; align-items: center; position: relative; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; border: 2px solid rgba(255,255,255,.25); cursor: pointer; flex-shrink: 0; }
.user-menu { position: absolute; right: 0; top: 48px; background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,.2); min-width: 220px; padding: .5rem; display: none; z-index: 70; }
.user-menu.show { display: block; }
.user-menu .who { padding: .6rem .75rem; border-bottom: 1px solid var(--line); margin-bottom: .35rem; font-size: .85rem; }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; padding: .55rem .75rem; border-radius: 8px; font-size: .9rem; background: none; border: 0; cursor: pointer; font-family: inherit; color: inherit; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.host-logo { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; flex-shrink: 0; }
.host-logo.has-img { background: #fff; border: 1px solid var(--line); overflow: hidden; padding: 4px; }
.host-logo.has-img img { width: 100%; height: 100%; object-fit: contain; }
.stars { color: var(--warn); letter-spacing: 1px; display: inline-flex; vertical-align: middle; }
.star-row { display: inline-flex; gap: .22em; vertical-align: middle; line-height: 1; }
.sbox { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.55em; height: 1.55em; border: 1.5px solid #e2e8f0; border-radius: .3em; background: #fff; transition: border-color .15s, background .15s, transform .1s; }
.sbox svg { width: 1.1em; height: 1.1em; display: block; }
.sbox .s-on { position: absolute; display: none; }
.sbox.on, .sbox.half { border-color: #86d99a; background: #effbf1; }
.sbox.on .s-on { display: block; }
.sbox.on .s-off { visibility: hidden; }
.sbox.half .s-on { display: block; clip-path: inset(0 50% 0 0); }

/* Forms */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.field input, .field select, .field textarea { width: 100%; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--bad); }
.field .err { font-size: .78rem; color: var(--bad); margin-top: .3rem; display: none; }
.field.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.alert { padding: .8rem 1rem; border-radius: 10px; font-size: .9rem; margin-bottom: 1rem; display: none; }
.alert.show { display: block; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 150%); background: var(--bg); color: #fff; padding: .8rem 1.2rem; border-radius: 12px; transition: transform .3s; z-index: 200; font-size: .92rem; }
.toast.show { transform: translate(-50%, 0); }

footer.site { background: var(--bg); color: #94a3b8; padding: 2rem 0; margin-top: 4rem; font-size: .85rem; text-align: center; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .row2 { grid-template-columns: 1fr; }
}

.gstar { color: #1f9d47; font-style: normal; }
