:root {
  color-scheme: dark;
  --ink: #f5f5ff;
  --muted: #c1c8df;
  --soft: #9daac8;
  --sky: #b6d9ff;
  --blue: #82bfff;
  --lilac: #d3baff;
  --pink: #f1b8dc;
  --gold: #f4d8a4;
  --glass: rgba(18, 30, 52, .34);
  --glass-deep: rgba(13, 23, 42, .68);
  --border: rgba(224, 234, 255, .24);
  --shadow: 0 24px 80px rgba(4, 12, 31, .3);
  --motion-fast: 120ms;
  --motion-standard: 180ms;
  --motion-reveal: 220ms;
  --motion-enter: cubic-bezier(.2, .8, .2, 1);
  --motion-theme: 200ms;
  font-family: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #101b31;
  font-size: 14px;
}

button, select, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid #d5c6ff; outline-offset: 3px; }
[hidden] { display: none !important; }

.backdrop, .backdrop-wash, .grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.backdrop {
  z-index: -4;
  background-image: url("/assets/court-of-fontaine-outskirts.avif");
  background-position: center 45%;
  background-size: cover;
  transform: scale(1.025);
  filter: saturate(1.02) brightness(1.02);
}

.backdrop-wash {
  z-index: -3;
  background:
    radial-gradient(ellipse at 18% 22%, rgba(166, 206, 255, .1), transparent 34%),
    radial-gradient(ellipse at 83% 19%, rgba(234, 194, 238, .08), transparent 31%),
    linear-gradient(105deg, rgba(10, 21, 40, .36) 0%, rgba(18, 30, 52, .12) 48%, rgba(13, 23, 42, .32) 100%),
    linear-gradient(0deg, rgba(10, 17, 34, .32), transparent 56%, rgba(14, 24, 42, .08));
}

.grain {
  z-index: -2;
  opacity: .025;
  background-image: radial-gradient(rgba(255,255,255,.32) .45px, transparent .65px);
  background-size: 5px 5px;
}

.glass {
  border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(255,255,255,.105), rgba(255,255,255,.035)), var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(5px) saturate(118%);
  -webkit-backdrop-filter: blur(5px) saturate(118%);
  transition: background var(--motion-theme) ease, border-color var(--motion-theme) ease, box-shadow var(--motion-theme) ease;
}

.cursor-stardust { position: fixed; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.shell { position: relative; z-index: 1; min-height: 100vh; padding: 18px; }

.loading-view {
  position: fixed;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 22px;
  transform: translate(-50%, -50%);
  color: var(--muted);
}

.brand-mark { display: inline-grid; place-items: center; color: var(--gold); font-size: 26px; filter: drop-shadow(0 0 10px rgba(244,216,164,.45)); }
.loading-copy { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.loading-dots { display: flex; gap: 4px; }
.loading-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--pink); animation: dot-bounce .8s infinite alternate; }
.loading-dots i:nth-child(2) { animation-delay: .2s; }
.loading-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot-bounce { to { transform: translateY(-4px); opacity: .45; } }

.auth-view {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .7fr);
  grid-template-rows: auto 1fr auto;
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 36px));
  margin: auto;
  padding: 32px 42px 25px;
  overflow: hidden;
  border-radius: 34px;
  isolation: isolate;
  animation: rise-in .45s cubic-bezier(.2,.8,.2,1) both;
}

.auth-view::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: radial-gradient(ellipse at 15% 75%, rgba(114,182,239,.16), transparent 43%);
}

.auth-brand, .auth-footer { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; }
.auth-brand { justify-content: flex-start; gap: 11px; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .12em; }
.auth-brand .brand-mark { font-size: 30px; }
.auth-brand small { display: block; margin-top: 2px; color: var(--soft); font-size: 8px; letter-spacing: .32em; }
.window-dots { display: flex; gap: 6px; margin-left: auto; }
.window-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ff8a9b; box-shadow: 14px 0 #f4d48a, 28px 0 #a6e1ba; }

.auth-copy { align-self: center; max-width: 610px; padding: 44px 25px 50px 5px; }
.eyebrow, .micro-label, .sidebar-label {
  color: var(--sky);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.auth-copy h1, .page-title {
  margin: 18px 0 14px;
  font-family: ui-rounded, "SF Pro Rounded", "SF Pro Display", -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -.07em;
  line-height: .98;
  color: #e7e8ff;
  text-shadow: 0 4px 28px rgba(175, 186, 255, .18);
  background: linear-gradient(105deg, #f3f5ff 4%, #cbdcff 45%, #f0cce8 88%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-copy h1 span { color: #dec8ff; text-shadow: 0 5px 35px rgba(192,168,255,.28); }
.auth-copy p { max-width: 450px; color: #d4d9ea; font-size: 15px; line-height: 1.75; }
.bubble-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 27px; }
.word-bubble {
  display: inline-flex;
  padding: 9px 14px;
  border: 1px solid rgba(226,236,255,.2);
  border-radius: 999px;
  background: rgba(225,235,255,.09);
  color: #e2e8fa;
  font-size: 10px;
  animation: float-soft 4s ease-in-out infinite;
}
.bubble-b { animation-delay: .16s; color: #f2d5eb; }
.bubble-c { animation-delay: .3s; color: #f3deaf; }

.auth-action {
  align-self: center;
  width: min(100%, 340px);
  justify-self: center;
  padding: 27px 24px 23px;
  border: 1px solid rgba(225,235,255,.18);
  border-radius: 27px;
  background: rgba(9,18,35,.44);
  box-shadow: 0 22px 60px rgba(5,12,28,.2), inset 0 1px rgba(255,255,255,.1);
  backdrop-filter: blur(8px) saturate(122%);
  -webkit-backdrop-filter: blur(8px) saturate(122%);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 47px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-standard) var(--motion-enter), box-shadow var(--motion-standard) ease, background var(--motion-standard) ease, border-color var(--motion-standard) ease;
}
.button:not(:disabled):hover { transform: translateY(-2px); }
.button:not(:disabled):active { transform: translateY(0) scale(.975); transition-duration: var(--motion-fast); }

.button-primary {
  width: 100%;
  color: #17243b;
  background: linear-gradient(105deg, #d6e8ff, #ead7f3 55%, #f5d9c9);
  box-shadow: 0 9px 27px rgba(179,197,255,.2), inset 0 1px rgba(255,255,255,.8);
}
.button-primary:hover { box-shadow: 0 12px 35px rgba(197,196,255,.32); }
.button-arrow { margin-left: auto; font-size: 16px; }
.discord-symbol { font-size: 16px; }
.auth-message { min-height: 32px; margin: 12px 0 18px; color: var(--soft); font-size: 10px; line-height: 1.6; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: #8e9bb8; font-size: 8px; letter-spacing: .15em; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: rgba(220,230,255,.15); content: ""; }
.auth-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; color: #b5c2d6; font-size: 9px; line-height: 1.5; }
.status-spark { width: 6px; height: 6px; flex: 0 0 6px; margin-top: 3px; border-radius: 50%; background: #a4e7c2; box-shadow: 0 0 11px #a4e7c2; }
.auth-footer { align-self: end; padding-top: 15px; border-top: 1px solid rgba(223,232,255,.12); color: #a7b2c9; font-size: 8px; letter-spacing: .16em; }
.auth-footer a { color: #e9cbee; letter-spacing: .04em; transition: color .2s; }
.auth-footer a:hover { color: #fff; }
.auth-orbit { position: absolute; z-index: -1; width: 230px; height: 230px; border: 1px solid rgba(204,222,255,.11); border-radius: 50%; box-shadow: 0 0 50px rgba(147,201,255,.08), inset 0 0 42px rgba(147,201,255,.07); }
.orbit-one { top: 9%; right: 24%; animation: orbit 25s linear infinite; }
.orbit-two { top: 21%; right: 14%; width: 300px; height: 300px; border-color: rgba(238,207,237,.11); animation: orbit 38s linear infinite reverse; }

.dashboard-view { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; width: min(1600px, 100%); min-height: calc(100vh - 36px); margin: 0 auto; animation: rise-in .36s both; }
.sidebar { position: sticky; top: 18px; display: flex; flex-direction: column; height: calc(100vh - 36px); min-height: 630px; padding: 22px 15px 14px; border-radius: 27px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; padding: 1px 8px 26px; }
.brand-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(245,221,173,.38); border-radius: 14px; background: linear-gradient(145deg, rgba(244,216,164,.19), rgba(238,202,244,.1)); color: var(--gold); font-size: 23px; box-shadow: 0 0 26px rgba(244,216,164,.12); }
.brand-name { color: #fff; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.brand-name small { display: block; margin-top: 1px; color: var(--soft); font-size: 7px; letter-spacing: .27em; }
.sidebar-label { padding: 9px 10px; color: #96a4c1; font-size: 8px; }
.side-nav { display: grid; gap: 5px; }
.nav-button { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #c5cee1; font-size: 11px; text-align: left; cursor: pointer; transition: border-color var(--motion-standard) ease, background-color var(--motion-standard) ease, color var(--motion-standard) ease, transform var(--motion-fast) ease; }
.nav-button::after { position: absolute; top: 50%; left: 0; width: 2px; height: 0; border-radius: 2px; background: linear-gradient(var(--sky), var(--lilac)); box-shadow: 0 0 12px rgba(182,217,255,.35); content: ""; transform: translateY(-50%); transition: height var(--motion-standard) var(--motion-enter); }
.nav-button:hover { border-color: rgba(221,233,255,.12); background: rgba(225,235,255,.07); color: white; transform: translateX(2px); }
.nav-button.active { border-color: rgba(214,221,255,.18); background: linear-gradient(100deg, rgba(191,205,255,.17), rgba(238,205,241,.08)); color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.1); }
.nav-button.active::after { height: 58%; }
.nav-icon { display: inline-grid; width: 20px; place-items: center; color: #d9c9ff; font-size: 17px; }
.nav-star { margin-left: auto; color: var(--gold); }
.sidebar-spacer { flex: 1; min-height: 22px; }
.sidebar-hint { display: flex; gap: 10px; padding: 12px 10px; border: 1px solid rgba(230,235,255,.11); border-radius: 16px; background: rgba(236,226,255,.055); }
.hint-star { color: var(--gold); font-size: 17px; }
.sidebar-hint b, .sidebar-hint small { display: block; }
.sidebar-hint b { font-size: 10px; }
.sidebar-hint small { margin-top: 4px; color: var(--soft); font-size: 9px; line-height: 1.4; }
.instagram-link { display: flex; align-items: center; gap: 9px; margin: 12px 3px 4px; padding: 9px 7px; border-radius: 14px; transition: background .2s, transform .2s; }
.instagram-link:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.instagram-mark { width: 34px; height: 34px; flex: 0 0 34px; padding: 5px; border: 1px solid rgba(239,214,177,.4); border-radius: 12px; background: rgba(255,255,255,.06); box-shadow: 0 0 15px rgba(241,209,162,.1); }
.instagram-avatar { width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid rgba(239,214,177,.4); border-radius: 14px; object-fit: cover; background: rgba(255,255,255,.08); box-shadow: 0 0 15px rgba(241,209,162,.1); }
.instagram-link small, .instagram-link b { display: block; }
.instagram-link small { color: #9ba9c6; font-size: 7px; letter-spacing: .12em; }
.instagram-link b { margin-top: 3px; font-size: 10px; }
.instagram-link i { color: var(--pink); font-style: normal; }
.logout-button { align-self: flex-start; display: flex; align-items: center; gap: 8px; margin: 6px 6px 0; padding: 8px 7px; border: 0; background: none; color: #adb9d0; font-size: 10px; cursor: pointer; }
.logout-button:hover { color: #fff; }

.main-panel { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; z-index: 5; top: 18px; display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 17px; border-radius: 21px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #c1c9dc; font-size: 10px; }
.breadcrumb b { color: #8290ae; font-weight: 400; }
.breadcrumb span:last-child { color: white; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(210,230,255,.15); border-radius: 99px; color: #b7c5dd; font-size: 8px; letter-spacing: .12em; }
.live-pill i, .connection-state i { width: 6px; height: 6px; border-radius: 50%; background: #96e5bf; box-shadow: 0 0 10px rgba(150,229,191,.8); }
.live-pill b { color: #d8f6e5; font-size: 8px; }
.profile-button { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border: 1px solid rgba(224,234,255,.13); border-radius: 99px; background: rgba(255,255,255,.06); font-size: 10px; cursor: pointer; }
.profile-button img { width: 29px; height: 29px; object-fit: cover; border-radius: 50%; background: rgba(255,255,255,.14); }
.profile-chevron { color: var(--soft); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid rgba(224,234,255,.15); border-radius: 12px; background: rgba(255,255,255,.06); color: #d4d9ea; font-size: 9px; cursor: pointer; transition: color var(--motion-theme) ease, background var(--motion-standard) ease, border-color var(--motion-standard) ease, transform var(--motion-fast) ease; }
.theme-toggle:hover { border-color: rgba(224,234,255,.3); background: rgba(255,255,255,.12); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(.96); }
.theme-toggle-icon { color: var(--gold); font-size: 14px; transition: transform var(--motion-standard) var(--motion-enter); }
.theme-toggle:hover .theme-toggle-icon { transform: rotate(22deg); }
.theme-toggle-auth { flex: 0 0 auto; margin-left: 8px; }

.workspace { flex: 1; padding: 30px 12px 12px; }
.dashboard-section { display: none; animation: section-in .18s var(--motion-enter) both; }
.dashboard-section.active { display: block; }
.section-intro .eyebrow { animation: editorial-enter .24s var(--motion-enter) both; }
.section-intro .page-title { animation: title-reveal .28s var(--motion-enter) both; }
.section-intro .page-subtitle { animation: subtitle-enter .22s var(--motion-enter) 20ms both; }
.motion-pending { opacity: 0; }
.motion-revealed[data-motion-reveal="up"] { animation: reveal-up var(--motion-reveal) var(--motion-enter) var(--motion-delay, 0ms) backwards; }
.motion-revealed[data-motion-reveal="left"] { animation: reveal-left var(--motion-reveal) var(--motion-enter) var(--motion-delay, 0ms) backwards; }
.motion-revealed[data-motion-reveal="right"] { animation: reveal-right var(--motion-reveal) var(--motion-enter) var(--motion-delay, 0ms) backwards; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 4px 1px 23px; }
.page-title { margin: 11px 0 8px; font-size: clamp(34px, 4vw, 50px); }
.title-star { display: inline-block; margin-left: 10px; color: var(--gold); font-size: 24px; vertical-align: 15px; animation: twinkle 2.8s ease-in-out infinite; }
.page-subtitle { margin: 0; color: #c0c9dd; font-size: 12px; line-height: 1.65; }
.date-chip { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 15px; color: #e7dece; font-size: 9px; white-space: nowrap; }
.date-sun { color: var(--gold); font-size: 17px; }

.server-strip { display: grid; grid-template-columns: auto minmax(120px, 1fr) auto minmax(160px, .6fr); align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; }
.server-emblem { display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border: 1px solid rgba(235,220,255,.27); border-radius: 15px; background: rgba(255,255,255,.1); }
.server-emblem img { width: 100%; height: 100%; object-fit: cover; }
.server-details { min-width: 0; }
.server-details b, .server-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-details b { margin: 4px 0 3px; font-size: 12px; }
.server-details small { color: #aeb9d0; font-size: 9px; }
.micro-label { display: block; color: #a8c9f3; font-size: 8px; letter-spacing: .16em; }
.server-links { display: flex; align-items: center; gap: 14px; }
.tiny-link { display: inline-flex; align-items: center; gap: 6px; color: #d9ddf1; font-size: 9px; white-space: nowrap; }
.tiny-link span { color: #c7b7fb; font-size: 13px; }
.tiny-link i { color: var(--gold); font-style: normal; }
.owner-mini { display: flex; align-items: center; gap: 7px; padding-left: 13px; border-left: 1px solid rgba(224,234,255,.15); }
.owner-mini img { width: 29px; height: 29px; border: 1px solid rgba(236,226,255,.3); border-radius: 50%; object-fit: cover; }
.owner-mini small, .owner-mini b { display: block; }
.owner-mini small { color: #9eacc7; font-size: 7px; letter-spacing: .11em; }
.owner-mini b { max-width: 95px; margin-top: 3px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.server-picker-wrap { display: flex; align-items: center; gap: 8px; justify-self: end; color: #a8b7d2; }
.server-picker-wrap .micro-label { white-space: nowrap; }
.server-picker-wrap select { max-width: 170px; }

.content-grid { display: grid; grid-template-columns: minmax(260px, 1.45fr) repeat(2, minmax(170px, .8fr)); gap: 13px; margin-top: 15px; }
.welcome-card, .mini-card { position: relative; min-height: 206px; overflow: hidden; border-radius: 23px; }
.welcome-card { padding: 22px; background: linear-gradient(130deg, rgba(156,197,255,.17), rgba(236,204,238,.1) 60%, rgba(249,218,188,.07)), var(--glass); }
.welcome-card .eyebrow { color: #d4ceff; }
.welcome-card h2 { position: relative; z-index: 1; margin: 13px 0 8px; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: clamp(20px, 2.2vw, 27px); font-weight: 600; letter-spacing: -.05em; line-height: 1.18; }
.welcome-card h2 em { color: #ead7fc; font-style: normal; }
.welcome-card p { position: relative; z-index: 1; max-width: 345px; margin: 0 0 14px; color: #d1d9e8; font-size: 10px; line-height: 1.6; }
.button-soft { min-height: 35px; padding: 0 12px; border-color: rgba(226,236,255,.2); background: rgba(255,255,255,.11); color: white; font-size: 9px; }
.button-soft:hover { background: rgba(255,255,255,.18); box-shadow: 0 8px 18px rgba(10,20,40,.16); }
.button-soft span { color: var(--gold); font-size: 14px; }
.card-sparkle { position: absolute; top: 18px; right: 20px; color: #f8dca9; font-size: 22px; animation: twinkle 2s infinite; }
.floating-orb { position: absolute; border: 1px solid rgba(225,236,255,.14); border-radius: 50%; pointer-events: none; }
.orb-left { right: 13%; bottom: -34px; width: 105px; height: 105px; box-shadow: inset 0 0 35px rgba(187,218,255,.09), 0 0 30px rgba(187,218,255,.06); }
.orb-right { right: 2%; bottom: 38px; width: 39px; height: 39px; background: rgba(237,219,251,.06); animation: float-soft 5s infinite; }
.mini-card { display: flex; flex-direction: column; padding: 18px 17px 15px; }
.mini-card-icon { display: grid; width: 31px; height: 31px; place-items: center; margin-bottom: 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 11px; font-size: 16px; }
.mini-card-icon.pink { color: #f5c1e0; background: rgba(241,184,220,.1); }
.mini-card-icon.blue { color: #b6d9ff; background: rgba(130,191,255,.1); }
.mini-card .micro-label { color: #aab8d2; }
.mini-card > b { margin-top: 6px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mini-card > small { margin-top: 5px; color: #aeb9d0; font-size: 9px; line-height: 1.5; }
.text-action { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding: 11px 0 0; border: 0; background: none; color: #d9c9ff; font-size: 9px; cursor: pointer; }
.text-action:hover { color: white; }
.text-action span { color: var(--gold); }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 27px 2px 12px; }
.section-heading h2 { margin: 6px 0 0; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -.04em; }
.decorative-caption { color: #bcc7de; font-size: 9px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.quick-card { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px 13px; border-radius: 17px; color: inherit; text-align: left; cursor: pointer; transition: transform .22s, border-color .22s, background .22s; }
.quick-card:hover { border-color: rgba(228,225,255,.35); background-color: rgba(255,255,255,.1); transform: translateY(-3px); }
.quick-icon { display: grid; width: 35px; height: 35px; flex: 0 0 35px; place-items: center; border-radius: 12px; background: rgba(239,190,218,.12); color: #f5d2ec; font-size: 17px; }
.star-icon { background: rgba(243,220,171,.11); color: var(--gold); }
.link-icon { background: rgba(161,208,255,.12); color: var(--sky); }
.quick-card b, .quick-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-card b { font-size: 10px; }
.quick-card small { margin-top: 4px; color: #acb8d0; font-size: 8px; }
.quick-card i { margin-left: auto; color: #decaff; font-size: 12px; font-style: normal; }
.empty-note { margin: 15px 0 0; padding: 12px 15px; border: 1px solid rgba(245,216,164,.22); border-radius: 15px; background: rgba(244,216,164,.08); color: #f0dfc0; font-size: 10px; line-height: 1.55; }

.section-intro { margin: 4px 1px 23px; }
.section-intro .page-title { font-size: clamp(34px, 4vw, 47px); }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(245px, .7fr); align-items: start; gap: 14px; }
.settings-card, .side-note { border-radius: 23px; }
.settings-card { padding: 22px; }
.settings-card-head { display: flex; align-items: center; gap: 12px; }
.large-icon { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border: 1px solid rgba(240,225,255,.17); border-radius: 15px; font-size: 19px; }
.large-icon.pink { background: rgba(239,183,219,.1); color: #f5c3e4; }
.large-icon.blue { background: rgba(138,190,255,.1); color: #b9d8ff; }
.settings-card-head h2 { margin: 4px 0 0; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: 17px; font-weight: 650; letter-spacing: -.04em; }
.helper-copy { max-width: 620px; margin: 17px 0 19px; color: #bec9dc; font-size: 10px; line-height: 1.7; }
code { padding: 2px 5px; border: 1px solid rgba(220,230,255,.12); border-radius: 6px; background: rgba(4,10,24,.24); color: #ead6ff; font-family: Consolas, monospace; font-size: .95em; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 14px 0 7px; color: #edf1ff; font-size: 10px; font-weight: 600; }
.field-label small { color: #99a9c5; font-size: 8px; font-weight: 400; }
.glass-select, .server-picker-wrap select {
  width: 100%;
  min-height: 41px;
  padding: 0 38px 0 12px;
  appearance: none;
  border: 1px solid rgba(222,232,255,.2);
  border-radius: 14px;
  background-color: rgba(15,24,43,.76);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23d8cafa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 13px;
  color: #f3f5ff;
  color-scheme: dark;
  accent-color: #b6d9ff;
  font-size: 10px;
  transition: background-color var(--motion-theme) ease, border-color var(--motion-standard) ease, box-shadow var(--motion-standard) ease;
}
.glass-select:hover, .server-picker-wrap select:hover { border-color: rgba(216,202,250,.48); background-color: rgba(23,34,57,.9); }
.glass-select:focus-visible, .server-picker-wrap select:focus-visible { border-color: rgba(216,202,250,.72); box-shadow: 0 0 0 4px rgba(190,177,239,.12); }
.glass-select option, .server-picker-wrap select option { background: #17233a; color: #f3f5ff; }
.glass-select option:checked, .server-picker-wrap select option:checked { background: #514a73; color: #fff; }
.glass-select option:hover, .server-picker-wrap select option:hover { background: #615783; color: #fff; }
.multi-select { min-height: 116px; padding: 7px; appearance: auto; background-image: none; }
.multi-select option { padding: 7px; border-radius: 7px; }
.multi-select option:checked { background: linear-gradient(90deg, #687fa8, #735e8e); }
.glass-textarea { display: block; width: 100%; min-height: 112px; resize: vertical; padding: 12px; border: 1px solid rgba(222,232,255,.17); border-radius: 13px; background: rgba(8,16,31,.48); color: #f3f5ff; font: inherit; font-size: 10px; line-height: 1.65; transition: background var(--motion-theme) ease, border-color var(--motion-standard) ease, box-shadow var(--motion-standard) ease; }
.glass-textarea::placeholder { color: #8d9bb5; }
.glass-textarea:focus-visible { outline: 2px solid #d5c6ff; outline-offset: 3px; border-color: rgba(213,198,255,.65); box-shadow: 0 0 0 4px rgba(213,198,255,.1); }
.switch-row { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 13px; border: 1px solid rgba(224,234,255,.14); border-radius: 15px; background: rgba(5,14,30,.2); cursor: pointer; }
.switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; width: 39px; height: 22px; flex: 0 0 39px; border: 1px solid rgba(223,232,255,.2); border-radius: 99px; background: rgba(7,14,28,.55); transition: background .2s, border-color .2s; }
.switch-track::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #c2cbe0; content: ""; transition: transform .2s, background .2s; }
.switch-row input:checked + .switch-track { border-color: rgba(199,195,255,.5); background: linear-gradient(100deg, #9fbaff, #dabde8); }
.switch-row input:checked + .switch-track::after { background: #292b46; transform: translateX(17px); }
.switch-row input:focus-visible + .switch-track { outline: 2px solid #d5c6ff; outline-offset: 3px; }
.switch-row b, .switch-row small { display: block; }
.switch-row b { font-size: 10px; }
.switch-row small { margin-top: 4px; color: #aeb9d0; font-size: 9px; line-height: 1.5; }
.welcome-preview { transition: opacity .2s, filter .2s; }
.welcome-preview.disabled { opacity: .58; filter: saturate(.55); }
.preview-foot { display: flex; align-items: center; gap: 8px; margin-top: 17px; color: #bdc8dc; font-size: 9px; }
.field-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #aebad0; font-size: 9px; line-height: 1.5; }
.field-note span { color: var(--gold); }
.save-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 19px; padding-top: 15px; border-top: 1px solid rgba(224,234,255,.1); }
.save-row .button { width: auto; min-height: 39px; font-size: 9px; }
.save-status { color: #a8edc8; font-size: 9px; }
.save-status.error { color: #ffb8c2; }
.side-note { position: relative; overflow: hidden; padding: 22px 20px; }
.note-stamp { display: grid; width: 39px; height: 39px; place-items: center; margin-bottom: 19px; border: 1px solid rgba(243,205,228,.22); border-radius: 14px; background: rgba(242,189,220,.09); color: #f2cbe2; font-size: 20px; }
.note-stamp.blue-stamp { border-color: rgba(187,214,255,.22); background: rgba(172,208,255,.09); color: #cadfff; }
.side-note h3 { margin: 7px 0 8px; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -.04em; }
.side-note > p { margin: 0; color: #bdc8dc; font-size: 10px; line-height: 1.75; }
.check-line { display: flex; gap: 8px; margin-top: 13px; color: #c4d2e7; font-size: 9px; }
.check-line span { color: #a5e3bf; }
.help-link { display: inline-block; margin-top: 21px; color: #d9c9ff; font-size: 9px; }
.help-link:hover { color: #fff; }
.permission-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; }
.permission-heading .field-label { margin: 0; }
.permission-heading .text-action { margin: 0; padding: 4px 0; }
.permission-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 360px; margin-top: 9px; overflow: auto; padding: 1px 3px 3px 1px; }
.permission-item { display: flex; align-items: flex-start; gap: 8px; min-height: 61px; padding: 9px; border: 1px solid rgba(224,234,255,.11); border-radius: 13px; background: rgba(4,12,27,.2); cursor: pointer; transition: background .18s, border .18s; }
.permission-item:has(input:checked) { border-color: rgba(178,208,255,.32); background: rgba(174,207,255,.09); }
.permission-item input { width: 13px; height: 13px; flex: 0 0 13px; margin: 2px 0 0; accent-color: #b8b1ff; }
.permission-item b, .permission-item small { display: block; }
.permission-item b { font-size: 9px; font-weight: 600; }
.permission-item small { margin-top: 4px; color: #aab7cd; font-size: 8px; line-height: 1.4; }
.grant-summary-list { display: grid; gap: 8px; max-height: 240px; margin-top: 15px; overflow: auto; }
.grant-summary-item { display: flex; gap: 7px; color: #d0daea; font-size: 9px; line-height: 1.5; }
.grant-summary-item span { color: var(--gold); }
.caution-note { display: grid; gap: 5px; margin-top: 19px; padding: 11px; border: 1px solid rgba(245,216,164,.16); border-radius: 13px; background: rgba(244,216,164,.055); }
.caution-note b { color: #f3dfb9; font-size: 9px; }
.caution-note span { color: #c2c7d4; font-size: 8px; line-height: 1.6; }

.profile-editor-grid { display: grid; grid-template-columns: minmax(240px, .82fr) minmax(0, 1.45fr); align-items: start; gap: 14px; }
.profile-preview-card { position: sticky; top: 96px; }
.profile-card-frame { display: grid; width: 100%; min-height: 132px; margin-top: 17px; overflow: hidden; border: 1px solid rgba(224,234,255,.18); border-radius: 17px; background: rgba(4,12,25,.62); box-shadow: 0 16px 38px rgba(4,10,24,.24); }
.profile-card-frame img { display: block; width: 100%; min-height: 130px; aspect-ratio: 16 / 9; object-fit: contain; }
.profile-card-frame p { align-self: center; justify-self: center; max-width: 34em; margin: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.profile-picks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin-top: 8px; }
.profile-picks-grid .field-label { display: grid; align-content: start; gap: 7px; }
.access-manager-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.access-search-card, .access-list-card { min-width: 0; }
.access-status { min-height: 18px; margin: 11px 0 8px; color: #b7c5dd; font-size: 9px; line-height: 1.55; }
.access-status.error { color: #ffb6c1; }
.access-member-list { display: grid; gap: 8px; max-height: 440px; margin: 0; padding: 0 3px 0 0; overflow: auto; list-style: none; scrollbar-color: rgba(213,198,255,.4) transparent; scrollbar-width: thin; }
.access-member-item { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid rgba(224,234,255,.11); border-radius: 14px; background: rgba(5,14,30,.24); animation: card-rise .28s var(--motion-enter) both; }
.access-member-identity { display: flex; min-width: 0; align-items: center; gap: 9px; }
.access-member-avatar { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid rgba(224,234,255,.16); border-radius: 50%; object-fit: cover; background: rgba(255,255,255,.08); }
.access-member-details { display: grid; min-width: 0; gap: 4px; }
.access-member-details b, .access-member-details small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-member-details b { font-size: 10px; }
.access-member-details small, .access-member-action small { color: #aeb9d0; font-size: 8px; }
.access-grant-button { min-height: 33px; padding: 0 10px; white-space: nowrap; }
.access-granted-button { min-height: 33px; padding: 0 9px; border: 1px solid rgba(150,229,191,.2); border-radius: 11px; background: rgba(150,229,191,.08); color: #bdeed2; font-size: 8px; white-space: nowrap; }
.access-member-action { display: grid; justify-items: end; gap: 3px; flex: 0 0 auto; }
.access-remove-action { margin: 0; padding: 2px 3px; color: #f1b8c5; font-size: 9px; }
.glass-input { width: 100%; min-height: 41px; padding: 0 12px; border: 1px solid rgba(222,232,255,.17); border-radius: 13px; background: rgba(8,16,31,.48); color: #f3f5ff; font: inherit; font-size: 10px; transition: background var(--motion-theme) ease, border-color var(--motion-standard) ease, box-shadow var(--motion-standard) ease; }
.glass-input::placeholder { color: #8d9bb5; }
.glass-input:focus-visible { outline: 2px solid #d5c6ff; outline-offset: 3px; border-color: rgba(213,198,255,.65); box-shadow: 0 0 0 4px rgba(213,198,255,.1); }
.profile-upload-list { display: grid; gap: 8px; margin-top: 15px; }
.profile-upload-row { display: grid; grid-template-columns: minmax(115px, .8fr) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid rgba(224,234,255,.1); border-radius: 13px; background: rgba(5,14,30,.2); }
.profile-upload-row label b, .profile-upload-row label small { display: block; }
.profile-upload-row label b { font-size: 9px; }
.profile-upload-row label small { margin-top: 4px; color: #aeb9d0; font-size: 8px; line-height: 1.4; }
.profile-upload-row input[type="file"] { width: 100%; min-width: 0; color: #bdc8dc; font-size: 8px; }
.profile-upload-row input[type="file"]::file-selector-button { margin-right: 7px; padding: 6px 8px; border: 1px solid rgba(224,234,255,.16); border-radius: 8px; background: rgba(255,255,255,.08); color: #f3f5ff; cursor: pointer; }
.profile-upload-row .text-action { margin: 0; padding: 6px; }
.color-mode-row, .color-target-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.color-mode-button, .color-target-button { min-height: 34px; padding: 0 12px; border: 1px solid rgba(222,232,255,.15); border-radius: 11px; background: rgba(6,14,29,.28); color: #c6d0e3; font-size: 9px; cursor: pointer; }
.color-mode-button.active, .color-target-button.active { border-color: rgba(210,205,255,.4); background: rgba(204,190,255,.15); color: #fff; }
.color-picker-layout { display: grid; grid-template-columns: minmax(190px, 260px) minmax(120px, 1fr); align-items: center; gap: 20px; margin-top: 18px; }
#color-wheel { display: block; width: min(100%, 260px); height: auto; aspect-ratio: 1; touch-action: none; }
#color-wheel:focus-visible { outline: 2px solid #d5c6ff; outline-offset: 5px; border-radius: 50%; }
.color-controls .field-label { display: grid; gap: 8px; }
.color-controls input[type="color"] { width: 100%; height: 39px; padding: 4px; border: 1px solid rgba(222,232,255,.17); border-radius: 11px; background: rgba(8,16,31,.48); cursor: pointer; }
.color-target-row { margin: 0 0 10px; }
.color-swatch { width: 100%; min-height: 46px; margin-top: 14px; border: 1px solid rgba(255,255,255,.58); border-radius: 13px; box-shadow: inset 0 1px rgba(255,255,255,.35), 0 8px 22px rgba(4,10,24,.2); }
.remove-color-action { margin-top: 15px; color: #f0b5c2; }

.connection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.connection-card { min-height: 213px; padding: 18px; border-radius: 20px; }
.connection-icon { display: grid; width: 35px; height: 35px; place-items: center; margin-bottom: 17px; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; font-size: 17px; }
.discord-color { color: #c2bdff; background: rgba(172,170,255,.1); }
.groq-color { color: #f3d9aa; background: rgba(243,217,170,.1); }
.ask-color { color: #b3dcff; background: rgba(170,215,255,.1); }
.connection-card h2 { margin: 7px 0; font-family: ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", sans-serif; font-size: 15px; font-weight: 600; letter-spacing: -.03em; }
.connection-card p { min-height: 43px; margin: 0; color: #b9c5d9; font-size: 9px; line-height: 1.65; }
.connection-state { display: flex; align-items: center; gap: 8px; margin-top: 17px; padding-top: 12px; border-top: 1px solid rgba(224,234,255,.1); color: #d7e2ee; font-size: 9px; }
.connection-state i { background: #92e4b7; }
.connection-state.offline i { background: #f1b9c8; box-shadow: 0 0 10px rgba(241,185,200,.55); }
.security-banner { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 14px 16px; border-radius: 17px; }
.security-banner > span { color: var(--gold); font-size: 20px; }
.security-banner p { margin: 0; color: #c6d0e0; font-size: 9px; line-height: 1.65; }
.security-banner b { color: #f2e3c3; }

.toast { position: fixed; z-index: 10; right: 34px; bottom: 33px; max-width: min(360px, calc(100vw - 40px)); padding: 12px 17px; border-radius: 14px; color: #f5efff; font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(9px); transition: opacity .25s, transform .25s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,185,200,.34); }
.main-footer { display: flex; justify-content: space-between; gap: 10px; padding: 8px 17px 6px; color: #b0bed4; font-size: 7px; letter-spacing: .13em; }
.main-footer i { color: var(--gold); font-style: normal; }
.footer-server-status { display: flex; align-items: center; justify-content: flex-end; gap: 8px; max-width: min(62%, 720px); }
.footer-server-status [role="status"] { color: inherit; font-size: 8px; letter-spacing: .02em; line-height: 1.45; text-align: right; overflow-wrap: anywhere; }
.footer-retry { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgba(224,234,255,.2); border-radius: 9px; background: rgba(255,255,255,.08); color: #e7dcff; font-size: 8px; cursor: pointer; transition: background var(--motion-standard) ease, border-color var(--motion-standard) ease; }
.footer-retry:hover { border-color: rgba(216,202,250,.5); background: rgba(216,202,250,.14); }

.magnetic:hover { filter: brightness(1.06); }
.nav-button, .quick-card, .button, .instagram-link, .text-action { -webkit-tap-highlight-color: transparent; }

@keyframes rise-in { from { opacity: 0; transform: translateY(13px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes section-in { from { opacity: 0; transform: translate3d(9px, 5px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes card-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes editorial-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes title-reveal { from { opacity: .35; clip-path: inset(0 100% 0 0); transform: translateY(5px); } to { opacity: 1; clip-path: inset(0 -3% -8% 0); transform: translateY(0); } }
@keyframes subtitle-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes reveal-left { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes reveal-right { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes twinkle { 0%, 100% { opacity: .7; transform: scale(.92) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.08) rotate(8deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .dashboard-view { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-right: 11px; padding-left: 11px; }
  .server-strip { grid-template-columns: auto minmax(100px, 1fr) auto; }
  .server-picker-wrap { grid-column: 2 / -1; justify-self: stretch; justify-content: flex-end; margin-top: 6px; }
  .server-picker-wrap select { flex: 1; max-width: 250px; }
  .content-grid { grid-template-columns: minmax(230px, 1.2fr) repeat(2, minmax(140px, .8fr)); }
  .quick-card { padding: 10px; }
}

@media (max-width: 860px) {
  .shell { padding: 10px; }
  .auth-view { min-height: calc(100vh - 20px); padding: 25px; border-radius: 26px; }
  .auth-copy h1 { font-size: clamp(40px, 8vw, 62px); }
  .dashboard-view { grid-template-columns: 1fr; min-height: calc(100vh - 20px); gap: 10px; }
  .sidebar { position: relative; top: auto; display: grid; grid-template-columns: 1fr auto; align-items: center; height: auto; min-height: 0; padding: 10px; border-radius: 20px; }
  .brand-lockup { padding: 0 5px; }
  .sidebar-label, .sidebar-spacer, .sidebar-hint, .instagram-link, .logout-button { display: none; }
  .side-nav { display: flex; gap: 3px; overflow-x: auto; }
  .nav-button { justify-content: center; width: auto; min-width: 41px; min-height: 40px; padding: 0 10px; }
  .nav-button::after { top: auto; bottom: 2px; left: 50%; width: 0; height: 2px; transform: translateX(-50%); }
  .nav-button.active::after { width: 52%; height: 2px; }
  .nav-button span:nth-child(2) { display: none; }
  .nav-star { display: none; }
  .main-panel { min-height: calc(100vh - 78px); }
  .topbar { top: 10px; min-height: 55px; border-radius: 17px; }
  .workspace { padding: 23px 4px 12px; }
  .main-footer { padding-right: 6px; padding-left: 6px; }
}

@media (max-width: 650px) {
  .auth-view { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; padding: 20px 19px 16px; }
  .auth-copy { padding: 38px 0 23px; }
  .auth-copy h1 { font-size: clamp(40px, 12vw, 58px); }
  .auth-copy p { font-size: 13px; }
  .bubble-row { gap: 6px; margin-top: 19px; }
  .word-bubble { padding: 8px 10px; font-size: 8px; }
  .auth-action { width: 100%; justify-self: stretch; padding: 20px; }
  .auth-footer { gap: 12px; margin-top: 23px; font-size: 6px; }
  .auth-footer a { font-size: 8px; white-space: nowrap; }
  .window-dots { margin-right: 0; }
  .welcome-row { align-items: flex-start; flex-direction: column; gap: 13px; }
  .page-title { font-size: 36px; }
  .date-chip { padding: 7px 10px; }
  .server-strip { grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; padding: 12px; }
  .server-links { grid-column: 1 / -1; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(224,234,255,.12); }
  .server-picker-wrap { grid-column: 1 / -1; justify-content: space-between; }
  .server-picker-wrap select { max-width: none; }
  .content-grid { grid-template-columns: 1fr 1fr; }
  .welcome-card { grid-column: 1 / -1; }
  .mini-card { min-height: 183px; padding: 14px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 57px; }
  .decorative-caption { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
  .access-manager-grid { grid-template-columns: 1fr; }
  .profile-editor-grid { grid-template-columns: 1fr; }
  .profile-preview-card { position: static; }
  .profile-card-frame { max-width: 620px; }
  .color-picker-layout { grid-template-columns: minmax(0, 260px) minmax(120px, 1fr); }
  .settings-card { padding: 17px; }
  .switch-row { align-items: flex-start; }
  .side-note { padding: 18px; }
  .permission-list { grid-template-columns: 1fr; max-height: 300px; }
  .connection-grid { grid-template-columns: 1fr; }
  .connection-card { min-height: 180px; }
  .profile-picks-grid { grid-template-columns: 1fr; }
  .profile-upload-row { grid-template-columns: 1fr; }
  .profile-upload-row .text-action { margin-top: 0; }
  .color-picker-layout { grid-template-columns: 1fr; justify-items: center; }
  .color-controls { width: 100%; }
  .topbar { padding: 0 10px; }
  .breadcrumb { gap: 6px; font-size: 9px; }
  .top-actions { gap: 7px; }
  .theme-toggle { min-width: 34px; padding: 0 8px; }
  .theme-toggle [data-theme-label] { display: none; }
  .live-pill { padding: 6px 7px; font-size: 7px; }
  .profile-button { gap: 5px; padding-right: 6px; font-size: 0; }
  .profile-button img { width: 27px; height: 27px; }
  .profile-chevron { font-size: 10px; }
  .main-footer { flex-direction: column; gap: 4px; font-size: 6px; }
  .footer-server-status { justify-content: flex-start; max-width: 100%; }
  .footer-server-status [role="status"] { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-pending { opacity: 1 !important; transform: none !important; }
  .backdrop { transform: scale(1.025) !important; }
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #25304a;
  --muted: #4b5672;
  --soft: #626d87;
  --sky: #55729e;
  --blue: #5377aa;
  --lilac: #725b9a;
  --pink: #a36383;
  --gold: #997438;
  --glass: rgba(248,251,255,.46);
  --glass-deep: rgba(247,249,255,.86);
  --border: rgba(57,74,103,.22);
  --shadow: 0 22px 65px rgba(39,57,88,.18);
}

html[data-theme="light"] body { color: var(--ink); background: #e7edf5; }
html[data-theme="light"] .backdrop { filter: saturate(1.02) brightness(1.08); }
html[data-theme="light"] .backdrop-wash {
  background:
    radial-gradient(ellipse at 18% 22%, rgba(196,220,255,.16), transparent 34%),
    radial-gradient(ellipse at 83% 19%, rgba(243,218,242,.14), transparent 31%),
    linear-gradient(105deg, rgba(226,235,248,.12), rgba(251,249,247,.025) 48%, rgba(228,235,247,.12)),
    linear-gradient(0deg, rgba(225,233,246,.13), transparent 58%);
}
html[data-theme="light"] .grain { opacity: .025; }
html[data-theme="light"] .glass {
  background: linear-gradient(140deg, rgba(250,252,255,.56), rgba(220,233,249,.4));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(5px) saturate(118%);
  -webkit-backdrop-filter: blur(5px) saturate(118%);
}
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .micro-label,
html[data-theme="light"] .sidebar-label { color: #536f99; }
html[data-theme="light"] .large-icon.pink,
html[data-theme="light"] .mini-card-icon.pink {
  border-color: rgba(153,81,123,.2);
  background: rgba(208,124,170,.15);
  color: #975476;
}
html[data-theme="light"] .large-icon.blue,
html[data-theme="light"] .mini-card-icon.blue {
  border-color: rgba(71,112,164,.2);
  background: rgba(112,164,217,.16);
  color: #456b9e;
}
html[data-theme="light"] .auth-view::after { background: radial-gradient(ellipse at 15% 75%, rgba(154,194,238,.18), transparent 43%); }
html[data-theme="light"] .auth-brand,
html[data-theme="light"] .auth-copy p,
html[data-theme="light"] .auth-message,
html[data-theme="light"] .auth-foot,
html[data-theme="light"] .auth-footer,
html[data-theme="light"] .sidebar-label,
html[data-theme="light"] .nav-button,
html[data-theme="light"] .breadcrumb,
html[data-theme="light"] .live-pill,
html[data-theme="light"] .profile-button,
html[data-theme="light"] .page-subtitle,
html[data-theme="light"] .server-details small,
html[data-theme="light"] .server-picker-wrap,
html[data-theme="light"] .owner-mini small,
html[data-theme="light"] .tiny-link,
html[data-theme="light"] .section-heading h2,
html[data-theme="light"] .decorative-caption,
html[data-theme="light"] .mini-card .micro-label,
html[data-theme="light"] .mini-card > small,
html[data-theme="light"] .helper-copy,
html[data-theme="light"] .field-label,
html[data-theme="light"] .field-note,
html[data-theme="light"] .check-line,
html[data-theme="light"] .side-note h3,
html[data-theme="light"] .side-note p,
html[data-theme="light"] .settings-card-head h2,
html[data-theme="light"] .access-status,
html[data-theme="light"] .access-member-details small,
html[data-theme="light"] .access-member-action small,
html[data-theme="light"] .connection-card p,
html[data-theme="light"] .connection-state,
html[data-theme="light"] .security-banner p,
html[data-theme="light"] .main-footer {
  color: #46536d;
}
html[data-theme="light"] .auth-copy h1,
html[data-theme="light"] .page-title {
  color: #334361;
  background-image: linear-gradient(105deg, #34496d 4%, #5d709f 48%, #916b91 90%);
  text-shadow: 0 3px 20px rgba(93,112,159,.12);
}
html[data-theme="light"] .auth-copy h1 span { color: #735e9a; text-shadow: none; }
html[data-theme="light"] .auth-action { border-color: rgba(70,87,119,.18); background: rgba(249,251,255,.72); box-shadow: 0 22px 60px rgba(48,65,96,.12), inset 0 1px rgba(255,255,255,.85); }
html[data-theme="light"] .auth-divider { color: #6a7690; }
html[data-theme="light"] .auth-divider::before, html[data-theme="light"] .auth-divider::after { background: rgba(70,87,119,.2); }
html[data-theme="light"] .auth-footer { border-color: rgba(70,87,119,.16); }
html[data-theme="light"] .auth-footer a { color: #735f91; }
html[data-theme="light"] .auth-footer a:hover { color: #3c4564; }
html[data-theme="light"] .brand-name,
html[data-theme="light"] .sidebar-hint b,
html[data-theme="light"] .date-chip,
html[data-theme="light"] .logout-button { color: #334361; }
html[data-theme="light"] .sidebar-hint { border-color: rgba(70,87,119,.15); background: rgba(255,255,255,.32); }
html[data-theme="light"] .server-strip,
html[data-theme="light"] .topbar,
html[data-theme="light"] .settings-card,
html[data-theme="light"] .side-note,
html[data-theme="light"] .connection-card,
html[data-theme="light"] .access-manager-card {
  border-color: rgba(70,87,119,.2);
}
html[data-theme="light"] .nav-button:hover { border-color: rgba(70,87,119,.15); background: rgba(255,255,255,.52); color: #293753; }
html[data-theme="light"] .nav-button.active { border-color: rgba(80,100,140,.2); background: linear-gradient(100deg, rgba(180,205,244,.44), rgba(228,207,238,.34)); color: #293753; box-shadow: inset 0 1px rgba(255,255,255,.8); }
html[data-theme="light"] .nav-icon,
html[data-theme="light"] .nav-star { color: #71608f; }
html[data-theme="light"] .breadcrumb span:last-child,
html[data-theme="light"] .server-details b,
html[data-theme="light"] .owner-mini b,
html[data-theme="light"] .mini-card > b,
html[data-theme="light"] .access-member-details b,
html[data-theme="light"] .connection-card h2 {
  color: #26334e;
}
html[data-theme="light"] .live-pill { border-color: rgba(70,87,119,.17); }
html[data-theme="light"] .live-pill b { color: #3e7357; }
html[data-theme="light"] .profile-button { border-color: rgba(70,87,119,.17); background: rgba(255,255,255,.46); }
html[data-theme="light"] .theme-toggle { border-color: rgba(70,87,119,.19); background: rgba(255,255,255,.52); color: #394968; }
html[data-theme="light"] .theme-toggle:hover { border-color: rgba(70,87,119,.32); background: rgba(255,255,255,.8); }
html[data-theme="light"] .welcome-card { background: linear-gradient(130deg, rgba(177,208,248,.55), rgba(234,211,239,.5) 60%, rgba(247,224,193,.42)), rgba(250,251,255,.68); }
html[data-theme="light"] .welcome-card .eyebrow,
html[data-theme="light"] .welcome-card h2 { color: #334361; }
html[data-theme="light"] .welcome-card h2 em { color: #785f91; }
html[data-theme="light"] .welcome-card p { color: #4a5872; }
html[data-theme="light"] .quick-card small,
html[data-theme="light"] .permission-item small,
html[data-theme="light"] .grant-summary-item,
html[data-theme="light"] .profile-upload-row label small { color: #5d6980; }
html[data-theme="light"] .quick-card:hover { border-color: rgba(70,87,119,.24); background-color: rgba(255,255,255,.36); }
html[data-theme="light"] .quick-icon { background: rgba(208,124,170,.15); color: #975476; }
html[data-theme="light"] .quick-icon.star-icon { background: rgba(204,159,80,.15); color: #82652e; }
html[data-theme="light"] .quick-icon.link-icon { background: rgba(112,164,217,.16); color: #456b9e; }
html[data-theme="light"] .quick-card i { color: #71608f; }
html[data-theme="light"] .word-bubble { border-color: rgba(70,87,119,.18); background: rgba(255,255,255,.55); color: #46536d; }
html[data-theme="light"] .button-soft { border-color: rgba(70,87,119,.2); background: rgba(255,255,255,.5); color: #344361; }
html[data-theme="light"] .button-soft:hover { background: rgba(255,255,255,.8); }
html[data-theme="light"] .text-action { color: #68598e; }
html[data-theme="light"] .text-action:hover { color: #3c4564; }
html[data-theme="light"] .glass-input,
html[data-theme="light"] .glass-select,
html[data-theme="light"] .glass-textarea {
  border-color: rgba(70,87,119,.23);
  background-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.72);
  color: #293753;
}
html[data-theme="light"] .glass-input::placeholder,
html[data-theme="light"] .glass-textarea::placeholder { color: #7d879c; }
html[data-theme="light"] .glass-select,
html[data-theme="light"] .server-picker-wrap select { border-color: rgba(70,87,119,.23); background-color: rgba(255,255,255,.78); color: #293753; color-scheme: light; }
html[data-theme="light"] .glass-select option,
html[data-theme="light"] .server-picker-wrap select option { background: #f9fbff; color: #293753; }
html[data-theme="light"] .glass-select option:checked,
html[data-theme="light"] .server-picker-wrap select option:checked { background: #ded8ef; color: #293753; }
html[data-theme="light"] .footer-retry { border-color: rgba(70,87,119,.2); background: rgba(255,255,255,.5); color: #514475; }
html[data-theme="light"] .field-label small { color: #66738d; }
html[data-theme="light"] .color-mode-button,
html[data-theme="light"] .color-target-button { border-color: rgba(70,87,119,.2); background: rgba(255,255,255,.42); color: #43516d; }
html[data-theme="light"] .color-mode-button.active,
html[data-theme="light"] .color-target-button.active { border-color: rgba(112,95,156,.34); background: rgba(200,185,234,.42); color: #39425f; }
html[data-theme="light"] .switch-row,
html[data-theme="light"] .permission-item,
html[data-theme="light"] .access-member-item {
  border-color: rgba(70,87,119,.15);
  background: rgba(255,255,255,.42);
}
html[data-theme="light"] .permission-item:has(input:checked) { border-color: rgba(95,124,170,.35); background: rgba(190,214,249,.4); }
html[data-theme="light"] .access-granted-button { border-color: rgba(76,145,111,.25); background: rgba(129,201,158,.18); color: #35654d; }
html[data-theme="light"] .access-remove-action { color: #9a526a; }
html[data-theme="light"] .access-member-list { scrollbar-color: rgba(115,95,145,.36) transparent; }
html[data-theme="light"] .profile-upload-row { border-color: rgba(70,87,119,.15); background: rgba(255,255,255,.32); }
html[data-theme="light"] .profile-upload-row input[type="file"] { color: #4b5872; }
html[data-theme="light"] .profile-upload-row input[type="file"]::file-selector-button { border-color: rgba(70,87,119,.18); background: rgba(255,255,255,.65); color: #344361; }
html[data-theme="light"] .security-banner { border-color: rgba(153,119,56,.2); background: rgba(255,249,232,.55); }
html[data-theme="light"] .security-banner b { color: #6e572b; }
html[data-theme="light"] .connection-state { border-color: rgba(70,87,119,.15); }
html[data-theme="light"] .toast { color: #293753; }
html[data-theme="light"] .empty-note { border-color: rgba(153,119,56,.24); background: rgba(255,249,232,.72); color: #6e572b; }
html[data-theme="light"] .caution-note { border-color: rgba(153,119,56,.22); background: rgba(255,249,232,.65); }
html[data-theme="light"] .caution-note b { color: #6e572b; }
html[data-theme="light"] .caution-note span { color: #5e6170; }
html[data-theme="light"] .profile-card-frame { border-color: rgba(70,87,119,.2); background: rgba(255,255,255,.48); box-shadow: 0 16px 38px rgba(39,57,88,.14); }

@media (max-width: 650px) {
  .auth-brand { gap: 8px; }
  .theme-toggle-auth { min-height: 32px; }
  .theme-toggle-auth [data-theme-label] { display: none; }
}
