:root {
  color-scheme: dark;
  --lsh-canvas: #090d18;
  --lsh-canvas-soft: #101728;
  --lsh-surface: rgba(20, 29, 48, 0.92);
  --lsh-surface-raised: #172139;
  --lsh-surface-hover: #1d2a47;
  --lsh-border: rgba(148, 163, 184, 0.2);
  --lsh-border-strong: rgba(148, 163, 184, 0.36);
  --lsh-text: #f5f7fb;
  --lsh-muted: #a9b5c9;
  --lsh-primary: #5ad6e8;
  --lsh-primary-strong: #25b8d0;
  --lsh-primary-ink: #06131a;
  --lsh-accent: #9c8cff;
  --lsh-success: #4ade80;
  --lsh-warning: #fbbf24;
  --lsh-danger: #fb7185;
  --lsh-info-bg: rgba(90, 214, 232, 0.1);
  --lsh-success-bg: rgba(74, 222, 128, 0.1);
  --lsh-danger-bg: rgba(251, 113, 133, 0.1);
  --lsh-radius-sm: 0.65rem;
  --lsh-radius: 1rem;
  --lsh-radius-lg: 1.1rem;
  --lsh-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  --lsh-content: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { min-width: 320px; background: var(--lsh-canvas); scrollbar-gutter: stable; }
html.lsh-root { font-size: 16px !important; }

body.lsh-app {
  min-height: 100vh;
  margin: 0;
  color: var(--lsh-text);
  background:
    radial-gradient(circle at 12% -10%, rgba(90, 214, 232, 0.16), transparent 34rem),
    radial-gradient(circle at 95% 0%, rgba(156, 140, 255, 0.14), transparent 31rem),
    linear-gradient(180deg, var(--lsh-canvas-soft), var(--lsh-canvas) 42rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px !important;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.lsh-app img { max-width: 100%; }
body.lsh-app a { color: var(--lsh-primary); text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
body.lsh-app a:hover { color: #9cebf5; }
body.lsh-app h1, body.lsh-app h2, body.lsh-app h3, body.lsh-app h4 { color: var(--lsh-text); line-height: 1.15; letter-spacing: -0.02em; }
body.lsh-app h1 { font-size: clamp(1.85rem, 4vw, 2.55rem); }
body.lsh-app h2 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
body.lsh-app h3 { font-size: 1.15rem; }
body.lsh-app p { color: var(--lsh-muted); }

.lsh-skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: var(--lsh-radius-sm);
  background: var(--lsh-primary);
  color: var(--lsh-primary-ink) !important;
  font-weight: 800;
}
.lsh-skip-link:focus { top: 1rem; }

.lsh-nav-shell {
  position: relative;
  z-index: 30;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  border-bottom: 1px solid var(--lsh-border);
  color: var(--lsh-text);
  background: rgba(9, 13, 24, 0.94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  backdrop-filter: blur(18px);
}

/* Legacy public pages place the shared menu inside a fixed #header wrapper. */
#header:has(> .lsh-nav-shell) {
  height: auto;
  padding: 0;
  line-height: normal;
}

.lsh-nav {
  width: min(calc(100% - 2rem), var(--lsh-content));
  min-height: 4.25rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lsh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--lsh-text) !important;
  font-weight: 800;
  text-decoration: none !important;
  letter-spacing: -0.02em;
}
.lsh-brand img { width: 2rem; height: 2rem; object-fit: contain; }

.lsh-active-character {
  min-width: 0;
  max-width: 31rem;
  min-height: 3rem;
  margin-left: auto;
  padding: 0.38rem 0.65rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--lsh-border);
  border-radius: var(--lsh-radius-sm);
  color: var(--lsh-text) !important;
  background: rgba(255,255,255,0.035);
  text-decoration: none !important;
}
.lsh-active-character:hover, .lsh-active-character:focus-visible { border-color: rgba(90,214,232,0.58); background: var(--lsh-surface-raised); }
.lsh-active-character__label { color: var(--lsh-primary); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.lsh-active-character__identity { min-width: 0; display: grid; line-height: 1.15; }
.lsh-active-character__identity strong, .lsh-active-character__identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsh-active-character__identity strong { font-size: 0.88rem; }
.lsh-active-character__identity small { margin-top: 0.2rem; color: var(--lsh-muted); font-size: 0.74rem; }
.lsh-active-character__switch { color: var(--lsh-muted); font-size: 0.72rem; font-weight: 750; }

.lsh-menu { position: relative; }
.lsh-menu > summary {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  list-style: none;
  border: 1px solid var(--lsh-border);
  border-radius: 999px;
  color: var(--lsh-text);
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  font-weight: 750;
  user-select: none;
}
.lsh-menu > summary::-webkit-details-marker { display: none; }
.lsh-menu > summary::after { content: "⌄"; color: var(--lsh-muted); transform: translateY(-0.12rem); }
.lsh-menu[open] > summary { border-color: rgba(90,214,232,0.62); background: var(--lsh-surface-raised); }
.lsh-menu[open] > summary::after { content: "⌃"; }
.lsh-menu-links {
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(72vh, 42rem);
  overflow-y: auto;
  display: grid;
  gap: 0.3rem;
  padding: 0.7rem;
  border: 1px solid var(--lsh-border-strong);
  border-radius: var(--lsh-radius);
  background: rgba(15, 23, 40, 0.98);
  box-shadow: var(--lsh-shadow);
  backdrop-filter: blur(18px);
}
.lsh-menu-links a {
  min-height: 2.7rem;
  display: flex;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-radius: 0.7rem;
  color: var(--lsh-text) !important;
  text-decoration: none !important;
}
.lsh-menu-links a:hover, .lsh-menu-links a:focus-visible { background: var(--lsh-surface-hover); }
.lsh-menu-divider { height: 1px; margin: 0.35rem 0; background: var(--lsh-border); }

.lsh-support-banner {
  width: min(calc(100% - 2rem), var(--lsh-content));
  margin: 0.75rem auto 0;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.8rem;
  border: 1px solid rgba(251, 191, 36, 0.48);
  border-radius: var(--lsh-radius-sm);
  color: #fff7d6;
  background: rgba(120, 74, 8, 0.38);
  font-size: 0.86rem;
}
.lsh-support-banner span { color: #f8dc8b; }
.lsh-support-banner a { margin-left: auto; color: #fff7d6 !important; font-weight: 780; }

.lsh-shell, body.lsh-app > main {
  width: min(calc(100% - 2rem), var(--lsh-content));
  margin: 0 auto;
  padding: clamp(2.25rem, 4vw, 3.25rem) 0 4.5rem;
}
.lsh-shell--narrow, body.lsh-app > main.lsh-shell--narrow { max-width: var(--lsh-content); }
.lsh-shell--narrow > :where(.lsh-page-heading, .lsh-card, .lsh-note, .lsh-alert, .lsh-links) { width: min(100%, 52rem); }
.lsh-shell--auth, body.lsh-app > main.lsh-shell--auth { max-width: 32rem; padding-top: clamp(2rem, 7vh, 4.5rem); }

.lsh-page-heading { margin-bottom: clamp(1.35rem, 3vw, 2rem); }
.lsh-eyebrow {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--lsh-primary);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lsh-page-heading h1, .lsh-page-heading h2 { margin: 0; }
.lsh-page-heading p { max-width: 48rem; margin: 0.65rem 0 0; font-size: 1rem; }

.lsh-card, body.lsh-app .CardBox, body.lsh-app .login-container,
body.lsh-app .forgot-container, body.lsh-app .container {
  border: 1px solid var(--lsh-border) !important;
  border-radius: var(--lsh-radius-lg) !important;
  background: linear-gradient(145deg, rgba(24, 34, 56, 0.97), rgba(16, 24, 41, 0.97)) !important;
  box-shadow: var(--lsh-shadow) !important;
  color: var(--lsh-text) !important;
}
.lsh-card { min-width: 0; padding: clamp(1.15rem, 3vw, 1.75rem); }
.lsh-card + .lsh-card { margin-top: 1.25rem; }
.lsh-card__header { margin-bottom: 1.15rem; }
.lsh-card__header :is(h1, h2, h3) { margin: 0; }
.lsh-card__header p { margin: 0.5rem 0 0; }

.lsh-logo { width: min(13rem, 58vw); height: auto; aspect-ratio: 1431 / 875; margin: 0 auto 1.35rem; display: block; }
.lsh-stack { display: grid; gap: 0.85rem; }
.lsh-stack > :where(p, ul, ol) { margin: 0; }
.lsh-stack > :where(.lsh-alert, .lsh-note) { margin-bottom: 0; }
.lsh-stack > :is(button, input[type="submit"], input[type="button"], .lsh-button) { justify-self: start; }
.lsh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.lsh-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.15rem; }
.lsh-links { display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; margin-top: 1.5rem; }
.lsh-links { align-items: center; }
.lsh-section-grid { display: grid; gap: 1.25rem; }
.lsh-card--form { max-width: 52rem; }
.lsh-card > form:not(.lsh-stack):not(.lsh-inline-filter) { width: 100%; display: grid; align-items: start; gap: 0.7rem; max-width: 52rem; }
.lsh-card > form:not(.lsh-stack):not(.lsh-inline-filter) > :is(button, input[type="submit"], input[type="button"], .lsh-button) { justify-self: start; }
.lsh-card > form + form { margin-top: 1.25rem; }
.lsh-inline-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem !important; }
.lsh-inline-filter label { display: flex !important; align-items: center; grid-template-columns: auto 1fr; }
.lsh-inline-filter select { width: auto !important; min-width: min(100%, 22rem); flex: 0 1 22rem; }

body.lsh-app form { margin: 0; }
body.lsh-app label, body.lsh-app .form-label { display: grid; gap: 0.45rem; color: var(--lsh-text); font-size: 0.92rem; font-weight: 720; }
body.lsh-app input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
body.lsh-app select, body.lsh-app textarea {
  width: 100% !important;
  max-width: none !important;
  min-height: 2.7rem;
  margin: 0 !important;
  padding: 0.58rem 0.75rem !important;
  border: 1px solid var(--lsh-border-strong) !important;
  border-radius: var(--lsh-radius-sm) !important;
  color: var(--lsh-text) !important;
  background: rgba(5, 10, 20, 0.58) !important;
  font: inherit;
}
body.lsh-app textarea { min-height: 8rem; resize: vertical; }
body.lsh-app select { appearance: auto; }
body.lsh-app input::placeholder, body.lsh-app textarea::placeholder { color: #738199; }
body.lsh-app input[type="checkbox"], body.lsh-app input[type="radio"] { width: 1.15rem; height: 1.15rem; accent-color: var(--lsh-primary-strong); }

body.lsh-app button, body.lsh-app input[type="submit"], body.lsh-app input[type="button"], .lsh-button {
  width: auto;
  min-height: 2.45rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 0 !important;
  padding: 0.5rem 0.8rem !important;
  border: 1px solid transparent !important;
  border-radius: var(--lsh-radius-sm) !important;
  color: var(--lsh-primary-ink) !important;
  background: linear-gradient(135deg, var(--lsh-primary), #78e3f1) !important;
  box-shadow: 0 8px 24px rgba(37, 184, 208, 0.17);
  font: inherit;
  font-size: 0.9rem !important;
  font-weight: 780 !important;
  text-decoration: none !important;
  cursor: pointer;
}
body.lsh-app button:hover, body.lsh-app input[type="submit"]:hover, .lsh-button:hover { filter: brightness(1.06); }
body.lsh-app button:disabled, body.lsh-app input[type="submit"]:disabled, .lsh-button[aria-disabled="true"] { opacity: 0.52; cursor: not-allowed; filter: none; }
.lsh-button--secondary { color: var(--lsh-text) !important; border-color: var(--lsh-border-strong) !important; background: var(--lsh-surface-raised) !important; box-shadow: none; }
.lsh-button--danger { color: #22060c !important; background: var(--lsh-danger) !important; }

body.lsh-app :focus-visible {
  outline: 3px solid rgba(90, 214, 232, 0.62) !important;
  outline-offset: 3px;
}

.lsh-alert, body.lsh-app .alert, body.lsh-app .status-message {
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(90, 214, 232, 0.32) !important;
  border-radius: var(--lsh-radius-sm) !important;
  color: var(--lsh-text) !important;
  background: var(--lsh-info-bg) !important;
}
.lsh-alert--success { border-color: rgba(74,222,128,0.38) !important; background: var(--lsh-success-bg) !important; }
.lsh-alert--danger { border-color: rgba(251,113,133,0.42) !important; background: var(--lsh-danger-bg) !important; }
.lsh-one-time-secret { display: grid; gap: 0.9rem; }
.lsh-one-time-secret h2, .lsh-one-time-secret p { margin: 0; }
.lsh-one-time-secret input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-size: 1.05rem !important; letter-spacing: 0.04em; }
.lsh-note { margin: 0; padding: 0.85rem 1rem; border-left: 3px solid var(--lsh-primary); border-radius: 0 var(--lsh-radius-sm) var(--lsh-radius-sm) 0; background: var(--lsh-info-bg); color: var(--lsh-muted); }
.lsh-shell > .lsh-note { margin-bottom: 1rem; }
.lsh-field-caption { display: block; margin-bottom: 0.35rem; color: var(--lsh-muted); font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.055em; }
.lsh-character-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.75rem; }
.lsh-character-item { min-width: 0; padding: 0.9rem; border: 1px solid var(--lsh-border); border-radius: var(--lsh-radius); background: rgba(5,10,20,0.34); }
.lsh-character-item h3 { margin: 0.65rem 0 0.2rem; overflow-wrap: anywhere; }
.lsh-character-item p { margin: 0; font-size: 0.9rem; }
.lsh-character-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.lsh-badge { display: inline-flex; align-items: center; min-height: 1.55rem; padding: 0.18rem 0.5rem; border: 1px solid var(--lsh-border-strong); border-radius: 999px; color: var(--lsh-muted); background: rgba(255,255,255,0.035); font-size: 0.72rem; font-weight: 750; }
.lsh-badge--active { color: #d8ffe5; border-color: rgba(74,222,128,0.4); background: rgba(74,222,128,0.1); }
.lsh-section-heading { margin: 2rem 0 1rem; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem; }
.lsh-section-heading h2, .lsh-section-heading p { margin: 0; }
.lsh-section-heading p { margin-top: 0.35rem; }
.lsh-editor-list { display: grid; gap: 1rem; }
.lsh-editor-list > .lsh-card { margin: 0; }
.lsh-editor-section > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; list-style: none; cursor: pointer; }
.lsh-editor-section > summary::-webkit-details-marker { display: none; }
.lsh-editor-section > summary > span:first-child { min-width: 0; display: grid; }
.lsh-editor-section > summary strong, .lsh-editor-section > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsh-editor-section > summary small { margin-top: 0.2rem; color: var(--lsh-muted); }
.lsh-editor-section[open] > summary { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--lsh-border); }
.lsh-editor-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.85rem; }

.lsh-table-scroll, body.lsh-app .table-wrapper { width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--lsh-border); border-radius: var(--lsh-radius); }
body.lsh-app table { width: 100%; min-width: 46rem; margin: 0 !important; border-collapse: collapse; color: var(--lsh-text); font-size: 0.88rem; }
body.lsh-app th, body.lsh-app td { padding: 0.8rem !important; border: 0 !important; border-bottom: 1px solid var(--lsh-border) !important; text-align: left !important; vertical-align: middle; }
body.lsh-app th { position: sticky; top: 0; z-index: 1; color: #d9e1ef; background: #162139 !important; font-size: 0.76rem; letter-spacing: 0.045em; text-transform: uppercase; }
body.lsh-app tr:last-child td { border-bottom: 0 !important; }
body.lsh-app tbody tr:hover { background: rgba(90,214,232,0.045); }
body.lsh-app td button, body.lsh-app td input[type="submit"], body.lsh-app td input[type="button"] {
  min-height: 2rem;
  padding: 0.32rem 0.55rem !important;
  font-size: 0.78rem !important;
  white-space: nowrap;
}
body.lsh-app td select { min-width: 8rem; min-height: 2rem; padding-block: 0.3rem !important; font-size: 0.78rem; }
.lsh-table-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.lsh-table-actions--secondary { margin-top: 0.45rem; }
.lsh-user-manager-page { padding-top: 1.35rem !important; }
.lsh-user-manager-page-heading {
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: auto minmax(18rem, 1fr);
  align-items: end;
  gap: 1rem;
}
.lsh-user-manager-page-heading .lsh-eyebrow { margin-bottom: 0.25rem; }
.lsh-user-manager-page-heading h1 { font-size: clamp(1.55rem, 3vw, 2rem); }
.lsh-user-manager-page-heading p { max-width: none; margin: 0 0 0.15rem; font-size: 0.86rem; text-align: right; }
.lsh-user-manager-card { padding: 0.85rem; }
.lsh-user-manager-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}
body.lsh-app .lsh-user-manager-control > label {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}
.lsh-user-manager-add {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  display: grid;
  grid-template-columns: minmax(12rem, 0.65fr) minmax(20rem, 1.35fr);
  align-items: center;
  gap: 0.75rem;
  border-top: 1px solid var(--lsh-border);
}
.lsh-user-manager-section-heading { min-width: 0; }
.lsh-user-manager-section-heading h3,
.lsh-user-manager-section-heading p { margin: 0; }
.lsh-user-manager-section-heading p { margin-top: 0.2rem; font-size: 0.78rem; line-height: 1.35; }
.lsh-user-manager-access { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--lsh-border); }
.lsh-user-manager-section-heading--access { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.75rem; }
.lsh-user-manager-section-heading--access p { margin-top: 0; }
.lsh-user-manager-access .lsh-permission-list { margin-top: 0.6rem; }
.lsh-site-manager-page { padding-top: 1.35rem !important; }
.lsh-site-manager-page > .lsh-section-grid { gap: 0.75rem; }
.lsh-site-manager-page-heading {
  margin-bottom: 0.75rem;
  display: grid;
  grid-template-columns: auto minmax(18rem, 1fr);
  align-items: end;
  gap: 1rem;
}
.lsh-site-manager-page-heading .lsh-eyebrow { margin-bottom: 0.25rem; }
.lsh-site-manager-page-heading h1 { font-size: clamp(1.55rem, 3vw, 2rem); }
.lsh-site-manager-page-heading p { max-width: none; margin: 0 0 0.15rem; font-size: 0.86rem; text-align: right; }
.lsh-site-manager-create {
  padding: 0.85rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}
.lsh-site-manager-section-heading h2,
.lsh-site-manager-manage-heading h2 { margin: 0; font-size: 1.15rem; }
.lsh-site-manager-control {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 0.65rem !important;
}
body.lsh-app .lsh-site-manager-control > label {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
}
.lsh-site-manager-control > .lsh-alert { grid-column: 1 / -1; }
.lsh-site-manager-manage { padding: 0.85rem; }
.lsh-site-manager-manage-heading { margin-bottom: 0.6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.lsh-site-manager-filter { display: flex; align-items: center; gap: 0.5rem; }
body.lsh-app .lsh-site-manager-filter label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; }
.lsh-site-manager-filter button { min-height: 2.2rem; padding: 0.35rem 0.65rem !important; font-size: 0.8rem !important; }
.lsh-site-list {
  max-height: min(72vh, 52rem);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0.1rem 0.35rem 0.1rem 0.05rem;
  scrollbar-gutter: stable;
}
.lsh-site-card + .lsh-site-card { margin-top: 0.55rem; }
.lsh-site-card { min-width: 0; overflow: hidden; border: 1px solid var(--lsh-border); border-radius: var(--lsh-radius); background: rgba(5, 10, 20, 0.32); }
.lsh-site-card__header {
  padding: 0.55rem 0.65rem;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
}
.lsh-site-card__identity { min-width: 0; }
.lsh-site-card__identity h3 { margin: 0; overflow-wrap: anywhere; }
.lsh-site-card__meta { margin-top: 0.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.55rem; font-size: 0.78rem; }
.lsh-site-card__meta a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsh-site-card__quick-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; }
body.lsh-app .lsh-site-card__quick-settings label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; white-space: nowrap; }
.lsh-site-toggle { min-height: 2.35rem !important; padding: 0.4rem 0.65rem !important; font-size: 0.8rem !important; }
.lsh-site-panel { border-top: 1px solid var(--lsh-border); }
.lsh-site-panel[hidden] { display: none !important; }
.lsh-site-settings-grid { padding: 0.75rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.lsh-site-settings-group { min-width: 0; margin: 0; padding: 0.7rem; border: 1px solid var(--lsh-border); border-radius: var(--lsh-radius-sm); }
.lsh-site-settings-group legend { padding: 0 0.35rem; color: var(--lsh-muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.055em; text-transform: uppercase; }
.lsh-site-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
body.lsh-app .lsh-site-setting-control { min-width: 0; padding: 0.45rem 0.5rem; display: flex; align-items: center; gap: 0.45rem; border-radius: 0.55rem; background: rgba(255, 255, 255, 0.025); font-size: 0.82rem; }
.lsh-site-setting-control--locked { color: var(--lsh-muted) !important; }
.lsh-site-setup-fields { display: grid; gap: 0.65rem; }
.lsh-site-theme-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.lsh-site-theme-actions button { min-height: 2.35rem; padding: 0.4rem 0.65rem !important; font-size: 0.8rem !important; }
.lsh-site-settings-group--banner { display: grid; align-content: start; gap: 0.55rem; }
.lsh-site-settings-group--banner .lsh-banner-thumb { max-width: 100%; height: 3.5rem; margin: 0; }
.lsh-site-settings-group--banner .banner-upload-form { width: 100%; }
.lsh-site-setting-help { margin: 0; font-size: 0.78rem; line-height: 1.35; }
.lsh-permission-list {
  max-height: min(72vh, 52rem);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0.1rem 0.35rem 0.1rem 0.05rem;
  scrollbar-gutter: stable;
}
.lsh-permission-card + .lsh-permission-card { margin-top: 0.55rem; }
.lsh-permission-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--lsh-border);
  border-radius: var(--lsh-radius);
  background: rgba(5, 10, 20, 0.32);
}
.lsh-permission-card__header {
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  border-bottom: 1px solid var(--lsh-border);
  background: rgba(255, 255, 255, 0.025);
}
.lsh-permission-card__header--compact {
  padding: 0.55rem 0.65rem;
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(7.5rem, 9rem) auto;
  align-items: end;
  gap: 0.75rem;
  border-bottom: 0;
}
.lsh-permission-card__identity { min-width: 0; }
.lsh-permission-card__identity h4 { margin: 0; overflow-wrap: anywhere; }
.lsh-permission-card__identity-line {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.55rem;
  color: var(--lsh-muted);
  font-size: 0.78rem;
}
.lsh-permission-card__rank { min-width: 0; display: flex !important; align-items: center; gap: 0.4rem !important; font-size: 0.78rem !important; }
.lsh-permission-card__rank select { min-width: 0 !important; min-height: 2.35rem; padding-block: 0.35rem !important; }
.lsh-permission-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.4rem; }
.lsh-permission-card__actions button { min-height: 2.35rem; padding: 0.4rem 0.65rem !important; font-size: 0.8rem !important; }
.lsh-permission-panel { border-top: 1px solid var(--lsh-border); }
.lsh-permission-panel[hidden] { display: none !important; }
.lsh-permission-groups {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.85rem;
}
.lsh-permission-group {
  min-width: 0;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--lsh-border);
  border-radius: var(--lsh-radius-sm);
}
.lsh-permission-group legend { padding: 0 0.35rem; color: var(--lsh-muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.055em; text-transform: uppercase; }
.lsh-permission-group__fields { display: grid; gap: 0.4rem; }
body.lsh-app .lsh-permission-control {
  min-width: 0;
  padding: 0.45rem 0.5rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.86rem;
  font-weight: 650;
}
body.lsh-app .lsh-permission-control:has(input:not(:disabled)):hover { background: rgba(90, 214, 232, 0.075); }
body.lsh-app .lsh-permission-control input { margin: 0; }
body.lsh-app .lsh-permission-control span { min-width: 0; overflow-wrap: anywhere; }
.lsh-permission-control--readonly { color: var(--lsh-muted) !important; }
.lsh-field-readonly { min-height: 2.7rem; display: inline-flex; align-items: center; color: var(--lsh-muted); font-weight: 720; }
.lsh-merge-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin: 1.25rem 0; }
.lsh-merge-preview > .lsh-card { min-width: 0; margin: 0; }
.banner-upload-form { min-width: 11rem; display: grid; gap: 0.4rem; }
.lsh-banner-thumb { width: auto; height: 2.5rem; display: block; margin-bottom: 0.4rem; object-fit: cover; }
.profile-picture { width: 9rem; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--lsh-border); border-radius: var(--lsh-radius); background: var(--lsh-canvas-soft); }
.profile-picture img { width: 100%; height: 100%; display: block; object-fit: cover; }
.associated-accounts { width: 100%; margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--lsh-border); }
.associated-accounts h4 { margin: 0 0 0.5rem; }
.associated-accounts ul { margin: 0; padding-left: 1.2rem; color: var(--lsh-muted); }

body.lsh-app #page-wrapper { overflow-x: clip; }
body.lsh-app #header.alt { width: 100%; padding: 0 !important; background: transparent !important; }
body.lsh-app #banner { padding: clamp(2.5rem, 6vw, 4.5rem) 1rem 1rem !important; }
body.lsh-app #banner .logo { margin-bottom: 1.2rem !important; }
body.lsh-app #banner .logo img { max-height: 7rem !important; width: auto !important; }
body.lsh-app #banner h2 { font-size: clamp(2rem, 5vw, 3.35rem) !important; font-weight: 800 !important; }
body.lsh-app #banner p { color: var(--lsh-muted) !important; }
body.lsh-app .container {
  width: min(calc(100% - 2rem), var(--lsh-content)) !important;
  max-width: var(--lsh-content) !important;
  margin: 1.5rem auto 5rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  gap: 1.25rem !important;
}
body.lsh-app .CardBox { padding: clamp(1.25rem, 3vw, 2rem) !important; }
body.lsh-app .login-container, body.lsh-app .forgot-container { width: min(calc(100% - 2rem), 34rem) !important; max-width: 34rem !important; margin: 0 auto !important; padding: clamp(1.25rem, 5vw, 2.25rem) !important; text-align: left !important; }
body.lsh-app .login-logo, body.lsh-app .forgot-logo { margin-bottom: 1.3rem !important; }
body.lsh-app .login-logo img, body.lsh-app .forgot-logo img { max-height: 5.5rem !important; }
body.lsh-app .page-content-wrapper { padding: clamp(2rem, 8vh, 6rem) 0 5rem !important; }

.lsh-footer { width: min(calc(100% - 2rem), var(--lsh-content)); margin: 0 auto; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--lsh-border); color: var(--lsh-muted); font-size: 0.86rem; }

@media (max-width: 720px) {
  .lsh-nav { min-height: 4.25rem; }
  .lsh-brand span { display: none; }
  .lsh-active-character { max-width: none; margin-left: auto; grid-template-columns: minmax(0, 1fr); gap: 0; padding-inline: 0.55rem; }
  .lsh-active-character__label, .lsh-active-character__switch, .lsh-active-character__username { display: none; }
  .lsh-active-character__identity strong { font-size: 0.82rem; }
  .lsh-active-character__identity small { font-size: 0.7rem; }
  .lsh-menu { position: static; }
  .lsh-menu-links { left: 0; right: 0; width: 100%; }
  .lsh-support-banner { align-items: flex-start; }
  .lsh-support-banner a { width: 100%; margin-left: 0; }
  .lsh-grid { grid-template-columns: 1fr; }
  .lsh-merge-preview { grid-template-columns: 1fr; }
  .lsh-editor-section > summary { align-items: flex-start; flex-direction: column; }
  .lsh-actions { align-items: center; }
  .lsh-actions > * { flex: 0 0 auto; }
  .lsh-user-manager-page-heading,
  .lsh-site-manager-page-heading,
  .lsh-user-manager-add { grid-template-columns: 1fr; align-items: stretch; }
  .lsh-user-manager-page-heading,
  .lsh-site-manager-page-heading { gap: 0.35rem; }
  .lsh-user-manager-page-heading p,
  .lsh-site-manager-page-heading p { margin: 0; text-align: left; }
  .lsh-user-manager-control { grid-template-columns: 1fr auto; }
  body.lsh-app .lsh-user-manager-control > label { grid-template-columns: 1fr; gap: 0.3rem; }
  .lsh-site-manager-create,
  .lsh-site-card__header,
  .lsh-site-settings-grid { grid-template-columns: 1fr; align-items: stretch; }
  .lsh-site-manager-control { grid-template-columns: 1fr auto; }
  body.lsh-app .lsh-site-manager-control > label { grid-template-columns: 1fr; gap: 0.3rem; }
  .lsh-site-card__quick-settings { justify-content: flex-start; }
  .lsh-site-module-grid { grid-template-columns: 1fr; }
  .lsh-permission-card__header--compact { grid-template-columns: 1fr; align-items: stretch; }
  .lsh-permission-card__actions > :is(button, .lsh-button) { flex: 1 1 auto; }
  body.lsh-app .lsh-shell--auth .lsh-actions > button,
  body.lsh-app .lsh-shell--auth .lsh-actions > input[type="submit"] { width: 100%; }
  body.lsh-app #banner { text-align: left !important; }
  body.lsh-app #banner .logo { justify-content: flex-start !important; }
}

@media (pointer: coarse) {
  body.lsh-app button, body.lsh-app input[type="submit"], body.lsh-app input[type="button"], .lsh-button, .lsh-menu > summary { min-height: 2.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
