:root {
  color-scheme: dark;
  --bg: #0e1912;
  --panel: #17271c;
  --panel-2: #1d3324;
  --line: #35503c;
  --text: #eef4ea;
  --muted: #a9bda9;
  --gold: #ddc88e;
  --green: #7fbd84;
  --danger: #e09a9a;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(125, 165, 112, .22), transparent 32rem),
    radial-gradient(circle at 85% 100%, rgba(170, 125, 68, .18), transparent 34rem),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 42px 42px;
}
.auth-shell { position: relative; width: min(1120px, 100%); margin: 0 auto; padding: 34px 20px 28px; }
.auth-brand { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; }
.auth-crest {
  width: 60px; height: 60px; display: grid; place-items: center; flex: 0 0 auto;
  border-radius: 16px; font-size: 30px; background: linear-gradient(160deg, #2a4a33, #16251b);
  border: 1px solid #416348; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow);
}
.eyebrow { margin: 0 0 4px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-brand h1 { margin: 0; font-size: clamp(20px, 3vw, 30px); line-height: 1.15; letter-spacing: -.02em; }
.auth-card {
  background: linear-gradient(180deg, rgba(29,51,36,.96), rgba(20,35,25,.98));
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}
.auth-card h2 { margin: 0 0 6px; font-size: 24px; }
.auth-card p.lead { margin: 0 0 20px; color: var(--muted); line-height: 1.55; }
.tabs { display: flex; gap: 8px; padding: 5px; background: #101c14; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 22px; }
.tabs button { flex: 1; border: 0; border-radius: 9px; padding: 10px 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 750; cursor: pointer; }
.tabs button.active { background: #2a4933; color: var(--text); box-shadow: inset 0 0 0 1px #43664c; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
input, select {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #0c1710; color: var(--text);
  padding: 12px 13px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(221,200,142,.15); }
button.primary, button.secondary, button.ghost, button.danger {
  border: 0; border-radius: 11px; padding: 12px 16px; font: inherit; font-weight: 800; cursor: pointer; transition: transform .12s, filter .12s;
}
button.primary { background: var(--gold); color: #24301f; }
button.secondary { background: #2b4a34; color: var(--text); border: 1px solid #47664e; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.danger { background: #512d2d; color: #ffdada; border: 1px solid #754343; }
button:hover { filter: brightness(1.08); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: wait; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.link-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.link-button { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-weight: 750; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.notice { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid #4c6843; background: #1b2d1d; color: #d7e8d2; line-height: 1.5; }
.error { margin: 14px 0 0; padding: 11px 13px; border-radius: 11px; border: 1px solid #7a4646; background: #361f1f; color: #ffd2d2; line-height: 1.45; }
.muted { color: var(--muted); }
.world-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.world-head h2 { margin-bottom: 5px; }
.account-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.account-chip strong { color: var(--text); }
.world-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 18px 0; }
.world-card { border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: #132117; display: grid; gap: 10px; }
.world-card h3 { margin: 0; font-size: 18px; }
.world-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12px; }
.tag { border: 1px solid #3b573f; border-radius: 999px; padding: 3px 8px; background: #1b2e20; }
.empty { border: 1px dashed #3c5842; border-radius: 15px; padding: 24px; text-align: center; color: var(--muted); margin: 18px 0; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
details { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin-top: 18px; background: #111e15; }
summary { cursor: pointer; color: var(--gold); font-weight: 750; }
details .form-grid { margin-top: 14px; }
.auth-footer { color: #819681; font-size: 12px; text-align: center; margin-top: 18px; line-height: 1.6; }
.boot-line { height: 6px; border-radius: 999px; background: #213625; overflow: hidden; }
.boot-line i { display: block; width: 42%; height: 100%; background: var(--gold); border-radius: inherit; animation: boot 1.1s ease-in-out infinite alternate; }
.auth-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #223528; border: 1px solid #4a6a50; color: var(--text); padding: 11px 16px; border-radius: 12px; font-weight: 700; box-shadow: var(--shadow); transition: .2s; max-width: calc(100vw - 32px); }
.auth-toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes boot { from { transform: translateX(-15%); } to { transform: translateX(145%); } }
@media (max-width: 680px) {
  .auth-shell { padding: 20px 14px; }
  .auth-brand { align-items: flex-start; }
  .auth-crest { width: 50px; height: 50px; font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .world-head { align-items: stretch; }
  .account-chip { width: fit-content; }
}