@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap");

:root {
  --bg: #0e1514;
  --bg-2: #121c1a;
  --ink: #f3f6f4;
  --mute: rgba(243, 246, 244, 0.62);
  --line: rgba(243, 246, 244, 0.08);
  --line-strong: rgba(243, 246, 244, 0.16);
  --surface: #15201e;
  --surface-2: #1a2623;
  --accent: #2dd4a8;
  --accent-2: #5eead4;
  --accent-soft: rgba(45, 212, 168, 0.14);
  --ok: #2dd4a8;
  --danger: #f07167;
  --warn: #e8b86d;
  --cream: var(--ink);
  --copper: var(--accent);
  --sheet: var(--surface);
  --sheet-solid: var(--surface-2);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: "Manrope", system-ui, sans-serif;
  --display: "Syne", "Manrope", system-ui, sans-serif;
  --control-h: 42px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  text-rendering: optimizeSpeed;
}
body {
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(45, 212, 168, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(15, 118, 110, 0.12), transparent 50%),
    linear-gradient(180deg, #101a18 0%, #0e1514 40%, #0a100f 100%);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
}

.kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hidden { display: none !important; }

.lang-switch { display: inline-flex; gap: 6px; margin: 0 0 14px; }
.lang-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mute);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.lang-btn.on, .lang-btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* Topbar / docs chrome */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(14, 21, 20, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}
.topbar-brand img {
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
}
.topbar-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.topbar-nav a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
}
.topbar-nav a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }
.topbar-nav a.btn { color: #06241c; }

/* Login — full-bleed brand hero */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  color: #f3f6f4;
  background: #0e1514;
  overflow: hidden;
}
.login::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 18%, rgba(45, 212, 168, 0.18), transparent 58%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(15, 118, 110, 0.22), transparent 55%),
    linear-gradient(180deg, #101a18 0%, #0e1514 45%, #0a100f 100%);
  pointer-events: none;
}
.login::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(243,246,244,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,246,244,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 4vw, 36px);
  max-width: 1100px;
  margin: 0 auto;
}
.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.login-top .lang-switch { margin: 0; }
.login-top .lang-btn {
  border-color: rgba(243,246,244,0.22);
  color: rgba(243,246,244,0.7);
  background: transparent;
}
.login-top .lang-btn.on,
.login-top .lang-btn:hover {
  background: #f3f6f4;
  color: #0e1514;
  border-color: #f3f6f4;
}
.login-top-links {
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
}
.login-top-links a {
  color: rgba(243,246,244,0.62);
  font-size: 13px;
  font-weight: 600;
}
.login-top-links a:hover { color: #f3f6f4; }

.login-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 12px 40px;
  animation: login-rise 0.7s ease both;
}
.login-mark {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(243,246,244,0.16);
  margin-bottom: 22px;
  animation: login-fade 0.9s ease both;
}
.login-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(64px, 14vw, 128px);
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin: 0;
  color: #f3f6f4;
  text-transform: uppercase;
  animation: login-rise 0.75s 0.08s ease both;
}
.login-tag {
  margin: 22px 0 0;
  max-width: 34ch;
  color: rgba(243,246,244,0.68);
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 500;
  line-height: 1.45;
  animation: login-rise 0.75s 0.14s ease both;
}
.login-actions {
  margin-top: 34px;
  width: min(320px, 100%);
  animation: login-rise 0.75s 0.2s ease both;
}
.login .btn-discord {
  background: #2dd4a8;
  color: #06241c;
  box-shadow: 0 12px 40px rgba(45, 212, 168, 0.28);
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
}
.login .btn-discord:hover {
  background: #5eead4;
  filter: none;
}

.login-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 20px;
  padding-top: 12px;
  color: rgba(243,246,244,0.45);
  font-size: 12px;
}
.login-foot a {
  color: rgba(243,246,244,0.45);
  font-weight: 600;
}
.login-foot a:hover { color: #f3f6f4; }

@keyframes login-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes login-fade {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .login-hero, .login-mark, .login-brand, .login-tag, .login-actions { animation: none; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; padding: 11px 16px; cursor: pointer; font-weight: 700;
  border-radius: 12px;
  transition: background 0.08s ease, color 0.08s ease, border-color 0.08s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn-discord {
  background: var(--accent);
  color: #06241c;
  width: 100%;
}
.btn-discord:hover { background: var(--accent-2); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(243,246,244,0.08); border-color: rgba(243,246,244,0.28); }
.btn-ok {
  background: var(--accent);
  color: #06241c;
}
.btn-ok:hover { background: var(--accent-2); }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(240, 113, 103, 0.35);
  padding: 8px 12px;
  font-size: 12px;
}
.btn-danger:hover { background: rgba(240, 113, 103, 0.12); }

/* Pick / Dashboard */
.pick {
  min-height: 100vh;
  padding: 0 0 64px;
}
.dash-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 36px);
  background: rgba(10, 16, 15, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.dash-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}
.dash-brand img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
}
.dash-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dash-lang { margin: 0; }
.dash-lang .lang-btn {
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11px;
}
.dash-links {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(243, 246, 244, 0.03);
}
.dash-links a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
}
.dash-links a:hover {
  color: var(--ink);
  background: rgba(243, 246, 244, 0.06);
}
.dash-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}
.dash-refresh:hover {
  border-color: rgba(45, 212, 168, 0.45);
  background: var(--accent-soft);
  color: var(--accent-2);
}
.dash-me {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.dash-me:hover { border-color: var(--accent); }
.dash-me .rail-avatar {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}
.pick-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px clamp(16px, 4vw, 36px) 0;
}
.dash-hero {
  margin-bottom: 36px;
  max-width: 40rem;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.dash-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(36px, 5.4vw, 56px);
  letter-spacing: -0.055em;
}
.pick-sub {
  margin: 0;
  color: var(--mute);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}
.guilds {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.guild-block { margin-bottom: 36px; }
.guild-block .kicker { margin-bottom: 14px; }
.guild {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  text-align: left;
  text-decoration: none;
  background: rgba(243, 246, 244, 0.03);
  border: 1px solid var(--line);
  padding: 16px;
  cursor: pointer;
  color: inherit;
  border-radius: var(--radius);
  transition: border-color 0.08s ease, background 0.08s ease, transform 0.12s ease;
  width: 100%;
}
.guild:hover {
  border-color: rgba(45, 212, 168, 0.45);
  background: var(--accent-soft);
  color: inherit;
  transform: translateY(-1px);
}
.guild.locked { cursor: default; opacity: 0.9; }
.guild.locked:hover {
  border-color: var(--line);
  background: rgba(243, 246, 244, 0.03);
  transform: none;
}
.guild-body { min-width: 0; }
.guild-ico {
  width: 52px; height: 52px;
  object-fit: cover;
  background: var(--bg-2);
  display: grid; place-items: center;
  font-size: 18px;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  font-family: var(--display);
  font-weight: 700;
}
.guild strong {
  display: block;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.guild-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  border: 1px solid var(--line-strong);
  padding: 6px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.guild-badge.on {
  color: #06241c;
  background: var(--accent);
  border-color: var(--accent);
}
.guild-badge.muted { opacity: 0.55; }
.guild-invite {
  margin-top: 10px;
  width: auto !important;
  padding: 8px 14px !important;
  font-size: 13px;
}
.meta { color: var(--mute); font-size: 12.5px; margin-top: 4px; }
.empty {
  color: var(--mute);
  padding: 20px 0;
  font-size: 14px;
}

/* App shell — side rail + desk */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 12px;
  background: rgba(10, 16, 15, 0.92);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
  z-index: 20;
}
.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 14px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  text-decoration: none;
}
.rail-brand img {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
}
.rail-brand:hover { background: rgba(243,246,244,0.05); }
.rail-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  scrollbar-width: thin;
}
.rail-nav .dock-group {
  margin: 12px 8px 4px;
  padding: 0;
  color: rgba(243, 246, 244, 0.35);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rail-nav button,
.rail-nav a {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  color: var(--mute);
  padding: 9px 12px;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  transition: none;
}
.rail-nav button:hover,
.rail-nav a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }
.rail-nav button.on,
.rail-nav a.on {
  color: #06241c;
  background: var(--accent);
  font-weight: 750;
}
.rail-more { position: relative; padding: 4px 0 0; }
.rail-more > button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--mute);
  padding: 9px 12px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.rail-more > button:hover,
.rail-more > button.on {
  color: #06241c;
  background: var(--accent);
}
.rail-more .dock-more-pop {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  min-width: 100%;
}
.rail-foot {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.rail-guild, .rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(243,246,244,0.03);
  border-radius: 14px;
  cursor: pointer;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}
.rail-guild:hover, .rail-user:hover {
  border-color: rgba(45, 212, 168, 0.4);
  background: var(--accent-soft);
  color: var(--ink);
}
.rail-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 11px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
}
.rail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rail-avatar > span {
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  color: var(--accent);
}
.rail-guild-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.rail-guild-meta strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-guild-meta em {
  font-style: normal;
  font-size: 11px;
  color: var(--mute);
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

main.desk {
  padding: 36px clamp(18px, 4vw, 40px) 48px;
  max-width: 820px;
}
.desk-head {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
main.desk h2 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.05em;
}
.lead {
  color: var(--mute);
  margin: 0;
  max-width: 56ch;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.5;
}

#page {
  display: grid;
  gap: 16px;
}

/* Sections */
.sec {
  background: rgba(243, 246, 244, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.sec-h {
  padding: 16px 18px 0;
}
.sec-h h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font);
}
.sec-h .chip {
  margin: 4px 0 0;
}
.sec-body { padding: 6px 8px 8px; }
.sec-body:first-child { padding-top: 8px; }

.sheet, .block {
  background: rgba(243, 246, 244, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sheet { padding: 6px 8px; }
.block { padding: 18px; }
.block h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-family: var(--font);
  letter-spacing: -0.02em;
}
.chip {
  color: var(--mute);
  font-size: 12.5px;
  margin: 0 0 14px;
  font-weight: 500;
  line-height: 1.45;
}
.stack { display: grid; gap: 14px; }

/* Fields */
.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 13px 12px;
  border-radius: 12px;
  transition: background 0.12s ease;
}
.field:hover { background: rgba(243, 246, 244, 0.03); }
.field + .field { margin-top: 2px; }
.field-stack {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
}
.field-h { display: grid; gap: 2px; min-width: 0; }
.field-h span {
  font-weight: 650;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.field-h em {
  color: var(--mute);
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.field input,
.field select,
.field textarea,
.actions input,
.actions select,
textarea {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 10px 12px;
  min-width: 0;
  color: var(--ink);
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field select,
.actions select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg-2);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232dd4a8' d='M1.4 1.4L6 6l4.6-4.6L12 2.8 6 8.8 0 2.8z'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 12px 8px;
  background-repeat: no-repeat;
  padding-right: 36px;
  min-width: 180px;
  height: var(--control-h);
  cursor: pointer;
  border-radius: 12px;
}
.field-stack select,
.field-stack input {
  width: 100%;
  min-width: 0;
}
.field input[type="number"],
.field input[type="text"],
.actions input {
  height: var(--control-h);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.actions input:focus,
.actions select:focus,
textarea:focus {
  border-color: rgba(45, 212, 168, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea, textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
.field option, select option {
  background: #15201e;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.actions input,
.actions select {
  flex: 1 1 140px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  margin: 0 -2px;
  border-radius: 12px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: rgba(243, 246, 244, 0.03); }
.list-item .chip { margin: 4px 0 0; }

/* Status metrics */
.status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.status > div {
  background: rgba(243, 246, 244, 0.03);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.status > div::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.7;
}
.status b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.04em;
}
.status span {
  color: var(--mute);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 48px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span {
  position: absolute;
  inset: 0;
  background: rgba(243, 246, 244, 0.12);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.toggle span:before {
  content: "";
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: rgba(243, 246, 244, 0.85);
  border-radius: 50%;
  transition: transform 0.18s ease, background 0.18s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.toggle input:checked + span {
  background: rgba(45, 212, 168, 0.28);
  border-color: rgba(45, 212, 168, 0.55);
}
.toggle input:checked + span:before {
  transform: translateX(20px);
  background: var(--accent);
}

.prem-lock, .block.prem-lock, .sec.prem-lock {
  border-color: rgba(45, 212, 168, 0.28);
  background: linear-gradient(160deg, rgba(45, 212, 168, 0.1), rgba(243, 246, 244, 0.02));
}

/* Dock — mobile only */
.dock {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 16px));
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(18, 28, 26, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(45, 212, 168, 0.06);
  backdrop-filter: blur(16px);
  contain: layout style;
}
.dock-tabs {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  min-width: 0;
  padding: 2px 4px;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent);
}
.dock-tabs::-webkit-scrollbar { display: none; }
.dock-tabs button,
.dock-tabs a {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: var(--mute);
  padding: 8px 11px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 650;
  border-radius: 11px;
  text-decoration: none;
}
.dock-tabs button:hover,
.dock-tabs a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }
.dock-tabs button.on,
.dock-tabs a.on {
  color: #06241c;
  background: var(--accent);
  font-weight: 750;
}
.dock-group {
  flex: 0 0 auto;
  color: rgba(243, 246, 244, 0.35);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0 4px 0 10px;
  white-space: nowrap;
}
.dock-hint { color: var(--mute); font-size: 13px; padding: 0 10px; white-space: nowrap; }
.dock-more { position: relative; flex: 0 0 auto; }
.dock-more > button {
  background: transparent;
  border: 0;
  color: var(--mute);
  padding: 8px 11px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 750;
  border-radius: 11px;
}
.dock-more > button:hover,
.dock-more > button.on { color: #06241c; background: var(--accent); }
.dock-more-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 180px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  z-index: 60;
}
.dock-more-pop.hidden { display: none; }
.dock-more-pop button,
.dock-more-pop a {
  display: block;
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: 0;
  color: var(--mute);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.dock-more-pop button:hover,
.dock-more-pop a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }
.dock-more-pop button.on,
.dock-more-pop a.on { color: #06241c; background: var(--accent); }
.dock-face {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  cursor: pointer;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  font-family: var(--display);
  text-decoration: none;
  border-radius: 13px;
}
.dock-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dock-face:hover { border-color: rgba(243,246,244,0.35); }
.dock-face.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.dock-pp { border-color: rgba(45, 212, 168, 0.4); }

.me-pop {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 50;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  padding: 14px 16px;
  min-width: 200px;
  display: grid;
  gap: 2px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
@media (max-width: 900px) {
  .me-pop {
    left: auto;
    right: max(12px, calc(50% - 560px));
    bottom: 78px;
  }
}
.me-pop strong { font-size: 14px; margin-bottom: 4px; }
.me-pop a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  margin: 0 -8px;
}
.me-pop a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  background: var(--accent);
  color: #06241c;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 80;
  box-shadow: 0 10px 30px rgba(45, 212, 168, 0.25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Docs / legal site pages */
.topbar-nav a.on { color: var(--ink); background: rgba(243,246,244,0.06); }
.topbar-cta {
  width: auto !important;
  padding: 8px 14px !important;
  font-size: 13px;
}
.site-hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px clamp(16px, 4vw, 28px) 28px;
  text-align: center;
}
.site-mark {
  width: 48px; height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  margin-bottom: 18px;
}
.site-hero h1 {
  font-size: clamp(40px, 7vw, 64px);
  letter-spacing: -0.05em;
  margin: 8px 0 12px;
  text-transform: uppercase;
}
.site-lead {
  margin: 0 auto;
  max-width: 48ch;
  color: var(--mute);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.site-hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.site-hero-actions .btn-discord,
.site-hero-actions .btn-ghost {
  width: auto;
  min-width: 160px;
}
.guide-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 28px) 72px;
  align-items: start;
}
.guide-toc {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(243,246,244,0.03);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.guide-toc a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 650;
  padding: 8px 10px;
  border-radius: 10px;
}
.guide-toc a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }
.guide-toc a.on {
  color: #06241c;
  background: var(--accent);
}
.guide-main { display: grid; gap: 12px; min-width: 0; }
.guide-sec {
  background: rgba(243,246,244,0.03);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 18px;
  scroll-margin-top: 80px;
}
.guide-sec h2 {
  font-size: 20px;
  margin: 0 0 12px;
  font-family: var(--font);
  letter-spacing: -0.02em;
}
.guide-sec p, .guide-sec li { color: var(--mute); }
.guide-sec strong { color: var(--ink); }
.guide-sec ol { margin: 0; padding-left: 1.2rem; }
.guide-sec code, .legal-body code {
  font-size: 0.9em;
  background: rgba(45, 212, 168, 0.1);
  border: 1px solid rgba(45, 212, 168, 0.2);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--accent-2);
}

.docs-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 28px) 72px;
  align-items: start;
}
.docs-side {
  position: sticky;
  top: 72px;
  display: grid;
  gap: 12px;
}
.docs-side-title {
  font-size: 28px;
  letter-spacing: -0.04em;
  margin: 0;
}
.docs-side-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.docs-side-actions .btn { width: 100%; }
.docs-main { display: grid; gap: 14px; min-width: 0; }
.docs-intro {
  margin-bottom: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.docs-intro h2 {
  margin: 8px 0 10px;
  font-size: clamp(26px, 4vw, 36px);
}
.docs-steps, .docs-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--mute);
}
.docs-steps li, .docs-list li { margin: 8px 0; }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.docs-grid article {
  background: rgba(243,246,244,0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.docs-grid h3 {
  font-size: 14px;
  font-family: var(--font);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.docs-grid p { margin: 0; color: var(--mute); font-size: 13px; }
.docs-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 168, 0.25);
  background: rgba(45, 212, 168, 0.08);
  color: var(--mute);
  font-size: 13.5px;
}
.docs-cmds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.docs-cmds code {
  font-size: 13px;
  background: rgba(45, 212, 168, 0.1);
  border: 1px solid rgba(45, 212, 168, 0.2);
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--accent-2);
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}
.docs-table th, .docs-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.docs-table th {
  color: var(--mute);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.docs-table td { color: var(--mute); }
.docs-table code {
  color: var(--accent-2);
  background: rgba(45, 212, 168, 0.1);
  border: 1px solid rgba(45, 212, 168, 0.2);
  padding: 2px 6px;
  border-radius: 6px;
}

.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 28px) 72px;
}
.legal-hero { margin-bottom: 24px; }
.legal-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.04em;
}
.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px;
  background: rgba(243,246,244,0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.legal-tabs a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 10px;
}
.legal-tabs a:hover { color: var(--ink); background: rgba(243,246,244,0.06); }
.legal-tabs a.current {
  color: #06241c;
  background: var(--accent);
}
.legal-body {
  background: rgba(243,246,244,0.03);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px;
}
.legal-body h2 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-family: var(--font);
  letter-spacing: -0.02em;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--mute); }
.legal-body strong { color: var(--ink); }
.legal-body ul { padding-left: 1.2rem; }

.site-foot {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.site-foot a { color: var(--mute); font-weight: 600; }
.site-foot a:hover { color: var(--accent-2); }

.doc-frame {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}
.toc {
  position: sticky;
  top: 72px;
  align-self: start;
  display: grid;
  gap: 4px;
}
.toc a {
  color: var(--mute);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 8px;
}
.toc a:hover { background: rgba(243,246,244,0.06); color: var(--ink); }
.doc {
  background: rgba(243, 246, 244, 0.03);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 36px 28px;
}

@media (max-width: 900px) {
  .field:not(.field-stack) { grid-template-columns: 1fr auto; }
  .field-stack { grid-template-columns: 1fr; }
  .status { grid-template-columns: 1fr; }
  .app { display: block; }
  .rail { display: none; }
  .dock:not(.hidden) { display: flex; }
  main.desk { padding: 24px 16px 120px; max-width: none; }
  .pick-shell { padding: 28px 16px 0; }
  .dash-bar { padding: 12px 16px; }
  .dash-links { display: none; }
  .dash-refresh span { display: none; }
  .dash-refresh { width: 36px; padding: 0; justify-content: center; }
  .guide-layout { grid-template-columns: 1fr; gap: 16px; }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { position: static; }
  .docs-side-actions { grid-template-columns: 1fr 1fr; }
  .guide-toc { display: flex; flex-wrap: wrap; }
  .guide-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .doc-frame { grid-template-columns: 1fr; gap: 16px; padding: 20px 14px 80px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 6px; }
  .topbar { padding: 10px 14px; }
  .dock { width: calc(100% - 10px); bottom: 8px; border-radius: 16px; }
  .dock-group { display: none; }
  .dock-tabs button,
  .dock-tabs a { padding: 7px 8px; font-size: 12px; }
}
@media (max-width: 640px) {
  .dock-face { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; }
  .field select { min-width: 0; width: 100%; }
  .field:not(.field-stack) { grid-template-columns: 1fr; }
  .field:not(.field-stack) .toggle { justify-self: start; }
  .guild { grid-template-columns: 48px 1fr; }
  .guild-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .guild, .toast, .toggle span:before { transition: none; }
}
