/* 四维创界 v14
 * Brand register: editorial technology showcase.
 * Product register: quiet, result-first dark workspace.
 */

/* ---------- Foundation ---------- */

html {
  background: var(--bg-base);
  scroll-behavior: smooth;
}

body,
body.page-gradient {
  min-width: 320px;
  min-height: 100dvh;
  color: var(--text-primary);
  background: var(--bg-base);
  background-image: none;
  background-attachment: initial;
}

::selection {
  color: var(--text-on-primary);
  background: var(--primary-400);
}

:where(a, button, input, textarea, select, [role="button"]):focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 1000;
  padding: 9px 14px;
  color: var(--text-on-primary);
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transform: translateY(-160%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

.hidden,
[hidden] {
  display: none;
}

.muted {
  color: var(--text-tertiary);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: oklch(0.93 0.01 90 / 0.18);
  border: 2px solid var(--bg-base);
  border-radius: var(--radius-full);
}

/* ---------- Controls ---------- */

.btn {
  min-height: 42px;
  padding-inline: 18px;
  border-radius: var(--radius-full);
  box-shadow: none;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.btn:hover,
.btn-primary:hover,
.btn-danger:hover {
  box-shadow: none;
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--text-on-primary);
  background: var(--text-primary);
  border-color: var(--text-primary);
}

.btn-primary:hover {
  color: var(--text-on-primary);
  background: white;
  border-color: white;
}

.btn-secondary {
  color: var(--text-primary);
  background: var(--surface-control);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--surface-control);
}

.btn-danger {
  color: oklch(0.96 0.01 25);
  background: var(--danger);
  border-color: var(--danger);
}

.btn-sm {
  min-height: 40px;
  padding-inline: 14px;
  border-radius: var(--radius-full);
}

.btn-lg {
  min-height: 48px;
  border-radius: var(--radius-full);
}

.btn-icon,
.btn-icon.btn-sm {
  width: 40px;
  padding: 0;
}

.input,
.textarea,
.select,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select {
  color: var(--text-primary);
  background: var(--surface-control);
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.input::placeholder,
.textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}

.input:hover,
.textarea:hover,
.select:hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
textarea:hover,
select:hover {
  border-color: var(--border-strong);
}

.input:focus,
.textarea:focus,
.select:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: var(--shadow-focus);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--primary-400);
}

/* ---------- Shared navigation ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: var(--z-fixed);
  width: 100%;
  height: var(--topbar-height);
  color: var(--text-primary);
  background: oklch(0.105 0.006 165 / 0.88);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topnav-inner {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1720px;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 48px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: var(--text-primary);
}

.brand:hover {
  color: var(--text-primary);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--text-tertiary);
  font-size: 8px;
  line-height: 1.2;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px;
  background: oklch(0.18 0.009 165 / 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 40px;
  padding: 0 15px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--radius-full);
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.nav-link.is-active {
  color: var(--text-on-primary);
  background: var(--text-primary);
}

.nav-link-button {
  border: 0;
}

.topnav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.dash-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dash-balance {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-on-primary);
  background: var(--text-primary);
  border: 0;
  border-radius: var(--radius-full);
  box-shadow: none;
}

/* ---------- Brand portal ---------- */

.explore-body {
  overflow-x: hidden;
  background: #0d0f0d;
}

.explore-body .topnav {
  position: fixed;
  background: linear-gradient(to bottom, rgba(13, 15, 13, 0.92), rgba(13, 15, 13, 0.35));
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portal-page {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(330px, 1fr) auto;
  gap: clamp(12px, 2vh, 28px);
  width: 100%;
  min-height: 100dvh;
  padding: calc(var(--topbar-height) + clamp(28px, 5vh, 64px)) clamp(18px, 3vw, 52px) clamp(20px, 3vh, 34px);
  overflow: hidden;
  background: #0d0f0d;
}

.portal-atmosphere,
.portal-line-field,
.portal-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.portal-atmosphere {
  z-index: -1;
}

.portal-line-field {
  opacity: 0.82;
}

.portal-vignette {
  background:
    radial-gradient(ellipse at 50% 43%, transparent 4%, rgba(13, 15, 13, 0.14) 44%, rgba(13, 15, 13, 0.76) 100%),
    linear-gradient(to bottom, rgba(13, 15, 13, 0.08), rgba(13, 15, 13, 0.58));
}

.portal-intro {
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(800px, 94vw);
  margin-top: clamp(12px, 4vh, 52px);
  text-align: center;
}

.portal-signature {
  margin-bottom: 18px;
  color: var(--primary-300);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.24em;
}

.portal-intro h1 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-brand);
  font-size: clamp(48px, 6.1vw, 76px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.portal-intro h1 span {
  color: var(--primary-300);
}

.portal-summary {
  max-width: 610px;
  margin: 22px auto 0;
  color: var(--text-secondary);
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.8;
  text-wrap: balance;
}

.portal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 26px;
}

.portal-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 46px;
  padding: 0 20px 0 22px;
  color: var(--text-on-primary);
  background: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

.portal-primary-action:hover {
  color: var(--text-on-primary);
  background: white;
}

.portal-primary-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.portal-text-action {
  position: relative;
  padding-block: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.portal-text-action::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 6px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.38);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.portal-text-action:hover {
  color: var(--text-primary);
}

.portal-text-action:hover::after {
  transform: scaleX(1);
}

.portal-gallery {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: clamp(14px, 2.2vw, 34px);
  width: min(1400px, 100%);
  margin: 0 auto;
}

.portal-entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 13px 10px;
  min-width: 0;
  color: var(--text-primary);
  transform-origin: 50% 100%;
  transition: transform 420ms var(--ease-out);
}

.portal-entry--product {
  transform: rotate(-3.2deg) translateY(7px);
}

.portal-entry--model {
  transform: rotate(1.8deg) translateY(-6px);
}

.portal-entry--suite {
  transform: rotate(-1.4deg) translateY(3px);
}

.portal-entry--video {
  transform: rotate(3deg) translateY(-2px);
}

.portal-entry:hover {
  z-index: 3;
  color: var(--text-primary);
  transform: rotate(0) translateY(-9px);
}

.portal-entry-media {
  grid-column: 1 / -1;
  position: relative;
  aspect-ratio: 1.46 / 1;
  overflow: hidden;
  background: var(--surface-control);
  border-radius: var(--radius-xl);
}

.portal-entry-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: inherit;
  pointer-events: none;
}

.portal-entry-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03) brightness(0.88);
  transition: transform 700ms var(--ease-out), filter 300ms var(--ease-out);
}

.portal-entry--product img {
  object-position: 50% 49%;
}

.portal-entry--model img {
  object-position: 50% 32%;
}

.portal-entry--suite img {
  object-position: 50% 42%;
}

.portal-entry--video img {
  object-position: 50% 24%;
}

.portal-entry:hover img {
  filter: saturate(1) contrast(1.02) brightness(0.96);
  transform: scale(1.045);
}

.portal-entry-copy {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.portal-entry-copy strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.portal-entry-copy small {
  overflow: hidden;
  color: var(--text-tertiary);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-entry-arrow {
  align-self: center;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--text-tertiary);
  stroke-width: 1.35;
  transition: stroke var(--transition-fast), transform var(--transition-fast);
}

.portal-entry:hover .portal-entry-arrow {
  stroke: var(--primary-300);
  transform: translate(2px, -2px);
}

/* ---------- Authentication ---------- */

.auth-body {
  overflow: hidden;
  background: var(--bg-base);
}

.auth-page,
.auth-split {
  width: 100%;
  min-height: 100dvh;
}

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(480px, 0.82fr);
}

.auth-brand {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #111310;
}

.auth-brand-photo,
.auth-brand-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-brand-photo {
  object-fit: cover;
  object-position: 50% 35%;
  filter: saturate(0.7) contrast(1.04) brightness(0.72);
  transform: scale(1.015);
}

.auth-brand-shade {
  background:
    linear-gradient(to bottom, rgba(9, 10, 9, 0.56), transparent 34%, rgba(9, 10, 9, 0.82) 100%),
    linear-gradient(to right, rgba(9, 10, 9, 0.16), rgba(9, 10, 9, 0.38));
}

.brand-lockup {
  position: absolute;
  top: 32px;
  left: 38px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.brand-lockup:hover {
  color: var(--text-primary);
}

.brand-lockup-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand-lockup-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-lockup-copy strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.brand-lockup-copy small {
  color: rgba(240, 238, 231, 0.64);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.auth-brand-statement {
  position: absolute;
  right: clamp(32px, 5vw, 80px);
  bottom: clamp(42px, 7vh, 78px);
  left: clamp(38px, 6vw, 90px);
  z-index: 2;
  max-width: 660px;
}

.auth-brand-statement > p {
  margin-bottom: 13px;
  color: var(--primary-200);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.auth-brand-statement h1 {
  color: white;
  font-family: var(--font-brand);
  font-size: clamp(44px, 5vw, 70px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.auth-brand-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 28px;
}

.auth-brand-capabilities span {
  color: rgba(240, 238, 231, 0.76);
  font-size: 12px;
}

.auth-brand-capabilities span + span::before {
  content: "/";
  margin-right: 24px;
  color: var(--primary-300);
}

.auth-form-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 100dvh;
  padding: 70px clamp(38px, 6vw, 92px) 54px;
  background: var(--bg-base);
}

.auth-mobile-header {
  position: absolute;
  top: 24px;
  right: 26px;
  left: 26px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.auth-mobile-brand {
  display: none;
}

.auth-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
}

.auth-close:hover {
  color: var(--text-primary);
  background: var(--surface-control);
}

.auth-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.auth-card {
  width: min(100%, 430px);
  margin: auto 0;
  padding: 0;
  color: var(--text-primary);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.auth-head {
  margin-bottom: 34px;
}

.auth-head-label {
  margin-bottom: 13px;
  color: var(--primary-300);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.auth-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.auth-head > p:last-child {
  margin-top: 9px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-default);
}

.auth-tabs.hidden,
.auth-tab.hidden,
.auth-form.hidden,
.auth-agreement.hidden,
.auth-link-btn.hidden {
  display: none;
}

.auth-tab {
  position: relative;
  min-height: 40px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.auth-tab.is-active {
  color: var(--text-primary);
}

.auth-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: var(--primary-300);
}

.auth-form .form-group {
  margin-bottom: 19px;
}

.auth-form .form-label {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.auth-form .input {
  min-height: 48px;
  padding-inline: 15px;
}

.auth-form .btn {
  margin-top: 7px;
}

.auth-help {
  margin-bottom: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

.auth-agreement {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 19px;
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.75;
  cursor: pointer;
}

.auth-agreement input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.auth-agreement a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 25px;
  padding-top: 21px;
  border-top: 1px solid var(--border-subtle);
}

.auth-foot-text {
  color: var(--text-tertiary);
  font-size: 12px;
}

.auth-foot-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-link-btn {
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-link-btn:hover {
  color: var(--primary-300);
}

.auth-notice {
  min-height: 21px;
  margin-top: 15px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.auth-notice.is-ok {
  color: var(--success);
}

.auth-notice.is-bad {
  color: var(--danger);
}

.auth-legal-note {
  color: var(--text-disabled);
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* ---------- Product shell ---------- */

.studio-ambient,
.studio-ambient-grid,
.studio-ambient-glow,
.studio-ambient-shape,
.dash-ambient,
.doc-ambient {
  display: none;
}

.layout-studio {
  --bg-base: oklch(0.105 0.006 165);
  --bg-subtle: oklch(0.145 0.008 165);
  --bg-elevated: oklch(0.18 0.009 165);
  --border-default: oklch(0.93 0.01 90 / 0.11);
  --border-strong: oklch(0.93 0.01 90 / 0.2);
  --border-subtle: oklch(0.93 0.01 90 / 0.065);
  display: block;
  min-height: 100dvh;
  overflow: visible;
  background: var(--bg-base);
}

.create-page.layout-studio,
.video-page.layout-studio {
  background: var(--bg-base);
  background-image: none;
}

.create-page .topnav,
.video-page .topnav {
  background: oklch(0.105 0.006 165 / 0.9);
  border-bottom-color: var(--border-subtle);
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.create-page .btn-primary,
.video-page .btn-primary {
  color: var(--text-on-primary);
  background: var(--text-primary);
  background-image: none;
  border-color: var(--text-primary);
  box-shadow: none;
}

.create-page .btn-primary:hover,
.video-page .btn-primary:hover {
  color: var(--text-on-primary);
  background: white;
  background-image: none;
  border-color: white;
  box-shadow: none;
}

.create-page .btn-secondary,
.create-page .btn-ghost,
.video-page .btn-secondary,
.video-page .btn-ghost,
.video-page .button-link {
  color: var(--text-secondary);
  background: var(--surface-control);
  background-image: none;
  border-color: var(--border-default);
  box-shadow: none;
}

.create-page .btn-secondary:hover,
.create-page .btn-ghost:hover,
.video-page .btn-secondary:hover,
.video-page .btn-ghost:hover,
.video-page .button-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: none;
}

.layout-studio .nav-rail {
  display: none;
}

.studio-main {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-overlay);
  background: oklch(0.04 0 0 / 0.68);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity var(--transition-base);
}

.drawer {
  color: var(--text-primary);
  background: var(--surface-panel);
  border-right: 1px solid var(--border-default);
  box-shadow: var(--shadow-xl);
}

.drawer-header {
  min-height: 68px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-body {
  padding: 18px;
}

.drawer-heading {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.drawer-history-card,
.drawer-account-button {
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.drawer-history-card:hover,
.drawer-account-button:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-default);
  box-shadow: none;
}

.account-popover,
.user-menu {
  color: var(--text-primary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.account-menu-row,
.user-menu a,
.user-menu button {
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

.account-menu-row:hover,
.user-menu a:hover,
.user-menu button:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

/* ---------- Image workbench ---------- */

.create-page .studio-workspace.workspace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(600px, 1.1fr);
  align-items: start;
  gap: 22px;
  width: min(1680px, 100%);
  max-width: 1680px;
  margin: 0 auto;
  padding: 22px clamp(18px, 2.2vw, 36px) 42px;
}

.create-page .studio-edit-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.create-page .studio-result-column {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  align-self: start;
  min-width: 0;
  max-height: calc(100dvh - var(--topbar-height) - 44px);
  overflow: auto;
}

.create-page .studio-section,
.video-page .panel {
  position: relative;
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--text-primary);
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition: border-color var(--transition-fast);
}

.create-page .studio-section:hover,
.video-page .panel:hover {
  background: var(--surface-panel);
  border-color: var(--border-default);
  box-shadow: none;
  transform: none;
}

.create-page .studio-section-header,
.video-page .panel-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 17px 20px;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
}

.video-page .panel-head::before,
.video-page .panel-head::after,
.create-page .studio-section-header::before,
.create-page .studio-section-header::after {
  display: none;
}

.create-page .studio-section-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.create-page .studio-section-title h2,
.video-page .panel-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.create-page .studio-section-title .muted,
.video-page .panel-head p {
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.5;
}

.create-page .studio-section-body {
  padding: 20px;
}

.create-page .asset-workflow-section .studio-section-body,
.create-page .creator-console-section .studio-section-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.create-page .mini-heading {
  min-height: 28px;
}

.create-page .mini-heading > span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.create-page .compact-action {
  min-height: 30px;
  padding: 0 11px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
}

.create-page .compact-action:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.create-page .material-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.create-page .material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 14px 15px;
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.create-page .material-copy strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.create-page .material-copy span {
  color: var(--text-tertiary);
  font-size: 11px;
  line-height: 1.55;
}

.create-page .upload-button,
.video-page .upload-button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
}

.create-page .upload-button:hover,
.video-page .upload-button:hover {
  color: var(--text-on-primary);
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: none;
  transform: none;
}

.create-page .asset-role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.create-page .asset-role-button,
.create-page .template-card,
.create-page .plan-card {
  min-height: 68px;
  padding: 11px 12px;
  color: var(--text-primary);
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
  transform: none;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast);
}

.create-page .asset-role-button:hover,
.create-page .template-card:hover,
.create-page .plan-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}

.create-page .asset-role-button strong,
.create-page .template-card strong,
.create-page .plan-card strong {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.create-page .asset-role-button span,
.create-page .template-card span,
.create-page .plan-card > span {
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.45;
}

.create-page .brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.create-page .brief-field {
  gap: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.create-page .brief-field input {
  min-height: 40px;
  color: var(--text-primary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.create-page .plan-summary,
.create-page .queue-wrap {
  padding: 11px 13px;
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.create-page .template-grid,
.create-page .plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.create-page .template-card.active,
.create-page .template-card.is-active,
.create-page .plan-card.active,
.create-page .plan-card.is-active {
  color: var(--text-primary);
  background: var(--surface-selected);
  border-color: var(--primary-400);
  box-shadow: none;
}

.create-page .template-card.active strong,
.create-page .template-card.is-active strong,
.create-page .template-card.active span,
.create-page .template-card.is-active span,
.create-page .plan-card.active strong,
.create-page .plan-card.is-active strong {
  color: var(--primary-200);
}

.create-page .plan-count input {
  color: var(--text-primary);
  background: var(--bg-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}

.create-page .param-settings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.create-page .param-settings .mini-heading {
  grid-column: 1 / -1;
}

.create-page .setting-group h3 {
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.create-page .pill-row,
.create-page .chip-row {
  gap: 6px;
}

.create-page .pill,
.create-page .chip {
  min-height: 30px;
  padding: 0 10px;
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  box-shadow: none;
}

.create-page .pill:hover,
.create-page .chip:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-default);
}

.create-page .pill.active,
.create-page .pill.is-active {
  color: var(--text-on-primary);
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: none;
}

.create-page .prompt-area textarea {
  min-height: 118px;
  padding: 13px;
  color: var(--text-primary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
}

.create-page .generate-bar,
.video-page .generate-bar {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.create-page .status-line,
.video-page .status-line {
  padding-left: 0;
  color: var(--text-tertiary);
  font-size: 12px;
}

.create-page .status-line::before,
.video-page .status-line::before {
  display: none;
}

.create-page .studio-result-column .studio-section {
  margin-bottom: 0;
  background: oklch(0.16 0.009 165);
  border-color: oklch(0.79 0.065 82 / 0.28);
}

.create-page .studio-result-column .studio-section-body {
  display: flex;
  min-height: 0;
  padding: 14px;
}

.create-page .history-controls,
.video-page .history-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.create-page .result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  width: 100%;
  min-height: calc(100dvh - var(--topbar-height) - 136px);
  padding: 12px;
  background: var(--bg-base);
  background-image: none;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

/* Result pane scroll contract: the grid is the only desktop scroll owner. */
.create-page .create-workspace-shell .studio-result-column {
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-5));
  height: calc(100dvh - var(--topbar-height) - var(--space-10));
  max-height: calc(100dvh - var(--topbar-height) - var(--space-10));
  min-height: 0;
  overflow: visible;
}

.create-page .create-workspace-shell .studio-result {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin-bottom: 0;
  overflow: hidden;
}

.create-page .create-workspace-shell .studio-result .studio-section-body {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.create-page .create-workspace-shell .studio-result .result-grid {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

.create-page .result-item,
.video-page .media-card {
  overflow: hidden;
  background: var(--surface-control);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: none;
  transition: border-color var(--transition-fast);
}

.create-page .result-item:hover,
.video-page .media-card:hover {
  border-color: var(--border-strong);
  box-shadow: none;
  transform: none;
}

.create-page .empty,
.video-page .empty-state {
  align-self: center;
  grid-column: 1 / -1;
  color: var(--text-tertiary);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.create-page .empty-title,
.video-page .empty-state-title {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.create-page .empty-desc,
.video-page .empty-state-desc {
  color: var(--text-tertiary);
  font-size: 12px;
}

.thumb {
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-control);
}

.image-modal {
  background: oklch(0.03 0 0 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.image-modal-close {
  color: var(--text-primary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
}

/* ---------- Video workbench ---------- */

.video-page {
  min-height: 100dvh;
  background: var(--bg-base);
}

.video-page .video-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(520px, 0.9fr) minmax(600px, 1.1fr);
  align-items: start;
  gap: 22px;
  width: min(1680px, 100%);
  max-width: 1680px;
  margin: 0 auto;
  padding: 22px clamp(18px, 2.2vw, 36px) 42px;
}

.video-page .video-edit-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
}

.video-page .video-result-column {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  align-self: start;
  min-width: 0;
  max-height: calc(100dvh - var(--topbar-height) - 44px);
  overflow: auto;
}

.video-page .panel {
  padding: 0;
}

.video-page .panel > .prompt-area,
.video-page .panel > .field-grid,
.video-page .panel > .field-extra,
.video-page .panel > .upload-grid,
.video-page .panel > .generate-bar {
  margin-right: 20px;
  margin-left: 20px;
}

.video-page .panel > .prompt-area,
.video-page .panel > .field-grid,
.video-page .panel > .upload-grid {
  margin-top: 20px;
}

.video-page .panel > .generate-bar,
.video-page .panel > .field-extra,
.video-page .panel > .upload-grid {
  margin-bottom: 20px;
}

.video-page .panel-note,
.video-page .mini-label {
  color: var(--text-tertiary);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.video-page .panel-note::before,
.video-page .mini-label::before {
  display: none;
}

.video-page .prompt-area .textarea,
.video-page .field .select,
.video-page .field .input,
.video-page .field .textarea {
  color: var(--text-primary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.video-page .field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.video-page .field {
  gap: 7px;
}

.video-page .field label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.video-page .upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-page .upload-card {
  padding: 13px;
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.video-page .upload-card:hover {
  background: var(--surface-control);
  border-color: var(--border-default);
  box-shadow: none;
  transform: none;
}

.video-page .upload-card-head strong {
  color: var(--text-primary);
  font-size: 12px;
}

.video-page .upload-card-head span,
.video-page .preview-empty {
  color: var(--text-tertiary);
  font-size: 10px;
}

.video-page .upload-preview,
.video-page .preview-grid {
  background: var(--bg-base);
  background-image: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.video-page .studio-result {
  margin-bottom: 0;
  background: oklch(0.16 0.009 165);
  border-color: oklch(0.79 0.065 82 / 0.28);
}

.video-page .result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-height: calc(100dvh - var(--topbar-height) - 136px);
  margin: 14px;
  padding: 12px;
  background: var(--bg-base);
  background-image: none;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.video-page .result-grid > .empty-state,
.video-page .preview-grid > .empty-state {
  min-height: 240px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.video-page .result-grid > .empty-state::before,
.video-page .preview-grid > .empty-state::before,
.video-page .preview-empty::before {
  display: none;
}

.video-page .param-chip {
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  box-shadow: none;
}

/* ---------- Account center ---------- */

.dash-page {
  position: relative;
  min-height: calc(100dvh - var(--topbar-height));
  overflow-x: hidden;
  background: var(--bg-base);
  background-image: none;
}

.dash-page .studio-ambient,
.dash-page .studio-ambient-grid,
.dash-page .studio-ambient-glow,
.dash-page .studio-ambient-shape {
  display: none;
}

.dash-page .dash-content {
  position: relative;
  z-index: 1;
  width: min(var(--content-max-width), 100%);
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 38px clamp(18px, 3vw, 42px) 56px;
}

.dash-page .dash-hero {
  margin: 0 0 30px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dash-page .dash-hero-kicker {
  display: block;
  margin: 0 0 11px;
  padding: 0;
  color: var(--primary-300);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.dash-page .dash-hero-title {
  margin: 0 0 9px;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.dash-page .dash-hero-subtitle {
  max-width: 660px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.65;
}

.dash-page .profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 22px;
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.dash-page .profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--text-on-primary);
  background: var(--text-primary);
  border: 0;
  border-radius: var(--radius-full);
  box-shadow: none;
  font-size: 15px;
  font-weight: 600;
}

.dash-page .profile-main {
  min-width: 0;
}

.dash-page .identity-line,
.dash-page .profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.dash-page .identity-line strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

.dash-page .profile-meta {
  margin-top: 8px;
  color: var(--text-tertiary);
  font-size: 11px;
}

.dash-page .profile-meta strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.dash-page .small-badge,
.dash-page .request-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  color: var(--text-tertiary);
  background: var(--surface-control);
  border: 0;
  border-radius: var(--radius-full);
  box-shadow: none;
  font-size: 10px;
}

.dash-page .profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  align-items: stretch;
  gap: 0;
}

.dash-page .profile-stats .stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 92px;
  min-height: 58px;
  padding: 0 18px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0;
  box-shadow: none;
}

.dash-page .profile-stats .stat span {
  color: var(--text-tertiary);
  font-size: 10px;
}

.dash-page .profile-stats .stat strong {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
}

.dash-page .content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 20px;
}

.dash-page .panel,
.dash-page .side-panel {
  color: var(--text-primary);
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.dash-page .panel {
  overflow: hidden;
}

.dash-page .side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-page .side-panel {
  padding: 18px;
}

.dash-page .side-panel h2 {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.dash-page .toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-page .tabs {
  display: flex;
  gap: 4px;
}

.dash-page .tab {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text-tertiary);
  background: transparent;
  border: 0;
  border-radius: var(--radius-full);
  font-size: 11px;
}

.dash-page .tab:hover {
  color: var(--text-primary);
  background: var(--surface-control);
}

.dash-page .tab.active {
  color: var(--text-on-primary);
  background: var(--text-primary);
}

.dash-page .filters {
  display: flex;
  flex: 1 1 620px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.dash-page .filters .input {
  flex: 1 1 126px;
  min-width: 112px;
  min-height: 36px;
  font-size: 11px;
}

.dash-page .table-wrap {
  width: 100%;
  overflow-x: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.dash-page .table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: transparent;
}

.dash-page .table th,
.dash-page .table td {
  padding: 13px 15px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  text-align: left;
}

.dash-page .table th {
  color: var(--text-tertiary);
  background: var(--bg-base);
  font-weight: 500;
}

.dash-page .table tbody tr:hover td {
  background: oklch(0.93 0.01 90 / 0.025);
}

.dash-page .pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 16px;
  color: var(--text-tertiary);
  font-size: 11px;
}

.dash-page .pager .input {
  width: auto;
  min-height: 34px;
}

.dash-page .package-list,
.dash-page .quick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-page .package,
.dash-page .quick-list a,
.dash-page .quick-list button {
  width: 100%;
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.dash-page .package:hover,
.dash-page .quick-list a:hover,
.dash-page .quick-list button:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-default);
  box-shadow: none;
  transform: none;
}

.dash-page .ql-icon {
  color: var(--primary-300);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dialog-backdrop {
  background: oklch(0.04 0 0 / 0.74);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog-card {
  color: var(--text-primary);
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.dialog-head {
  border-bottom-color: var(--border-subtle);
}

.dialog-close {
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
}

/* ---------- Admin console ---------- */

:root {
  --admin-bg: var(--bg-base);
  --admin-bg-2: var(--surface-panel);
  --admin-surface: var(--surface-panel);
  --admin-surface-2: var(--surface-control);
  --admin-surface-3: oklch(0.93 0.01 90 / 0.04);
  --admin-line: var(--border-default);
  --admin-line-soft: var(--border-subtle);
  --admin-line-strong: oklch(0.79 0.065 82 / 0.36);
  --admin-text: var(--text-primary);
  --admin-muted: var(--text-secondary);
  --admin-faint: var(--text-tertiary);
  --admin-accent: var(--primary-400);
  --admin-accent-2: var(--primary-300);
  --admin-danger: var(--danger);
  --admin-success: var(--success);
}

.admin-body .topnav {
  background: oklch(0.105 0.006 165 / 0.9);
  border-bottom-color: var(--border-subtle);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.admin-body .topnav-inner {
  max-width: 1720px;
  padding: 0 clamp(18px, 3vw, 48px);
}

.admin-body .brand-logo {
  border: 0;
  box-shadow: none;
}

.admin-body .nav-link,
.admin-body .brand {
  color: var(--text-secondary);
}

.admin-body .brand {
  color: var(--text-primary);
}

.admin-body .nav-link:hover,
.admin-body .nav-link:focus-visible {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.admin-body .nav-link.is-active {
  color: var(--text-on-primary);
  background: var(--text-primary);
}

.admin-body .btn {
  min-height: 42px;
  border-radius: var(--radius-full);
  box-shadow: none;
}

.admin-body .btn-sm {
  min-height: 40px;
}

.admin-body .btn-primary {
  color: var(--text-on-primary);
  background: var(--text-primary);
  background-image: none;
  border-color: var(--text-primary);
  font-weight: 500;
}

.admin-body .btn-primary:hover {
  color: var(--text-on-primary);
  background: white;
  background-image: none;
  border-color: white;
  box-shadow: none;
}

.admin-body .btn-secondary,
.admin-body .btn-ghost {
  color: var(--text-secondary);
  background: var(--surface-control);
  border-color: var(--border-default);
}

.admin-body .btn-secondary:hover,
.admin-body .btn-ghost:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: none;
}

.admin-body .btn-danger {
  color: oklch(0.96 0.01 25);
  background: var(--danger);
  border-color: var(--danger);
  font-weight: 500;
}

.admin-body .avatar-button {
  color: var(--text-on-primary);
  background: var(--text-primary);
  border: 0;
  box-shadow: none;
}

.admin-page {
  position: relative;
  min-height: calc(100dvh - var(--topbar-height));
  overflow-x: hidden;
  background: var(--bg-base);
  background-image: none;
}

.admin-page .studio-ambient {
  display: none;
}

.admin-page .admin-shell {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  width: min(1720px, 100%);
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px clamp(18px, 2.6vw, 42px) 60px;
}

.admin-page .admin-rail {
  position: sticky;
  top: calc(var(--topbar-height) + 24px);
  align-self: start;
  min-height: auto;
  padding: 18px;
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.admin-page .rail-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-page .rail-brand span {
  color: var(--text-tertiary);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.admin-page .rail-brand strong {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
}

.admin-page .rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
}

.admin-page .rail-nav a {
  min-height: 38px;
  padding: 0 11px;
  color: var(--text-secondary);
  background: transparent;
  border-radius: var(--radius-md);
}

.admin-page .rail-nav a::before {
  display: none;
}

.admin-page .rail-nav a:hover,
.admin-page .rail-nav a:focus-visible {
  color: var(--text-primary);
  background: var(--surface-control);
}

.admin-page .rail-hint {
  margin-top: 18px;
  padding-top: 14px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  font-size: 10px;
  line-height: 1.65;
}

.admin-page .admin-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 0;
}

.admin-page .workflow-zone {
  margin: 0;
}

.admin-page .overview-zone {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-page .overview-zone .hero-card,
.admin-page .overview-zone .system-panel {
  width: 100%;
  max-width: none;
}

.admin-page .hero-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  align-items: end;
  gap: 28px;
  padding: 18px 0 24px;
  background: transparent;
  background-image: none;
  border: 0;
  border-bottom: 1px solid var(--border-default);
  border-radius: 0;
  box-shadow: none;
}

.admin-page .hero-card::before,
.admin-page .hero-card::after,
.admin-page .panel::before,
.admin-page .panel::after,
.admin-page .side-panel::before,
.admin-page .side-panel::after,
.admin-page .ops-tool-card::before,
.admin-page .finance-table-card::before {
  display: none;
}

.admin-page .hero-card-kicker {
  margin-bottom: 9px;
  padding: 0;
  color: var(--primary-300);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.admin-page .hero-card h1 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.admin-page .hero-card .muted,
.admin-page .panel-head .muted {
  color: var(--text-tertiary);
  font-size: 11px;
}

.admin-page .summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.admin-page .summary-grid .stat {
  min-width: 0;
  padding: 2px 14px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border-subtle);
  border-radius: 0;
  box-shadow: none;
}

.admin-page .summary-grid .stat::before {
  display: none;
}

.admin-page .summary-grid .stat span,
.admin-page .ops-card span,
.admin-page .system-card span {
  color: var(--text-tertiary);
  font-size: 10px;
}

.admin-page .summary-grid .stat strong {
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 600;
}

.admin-page .panel,
.admin-page .side-panel,
.admin-page .ops-tool-card,
.admin-page .finance-table-card {
  color: var(--text-primary);
  background: var(--surface-panel);
  background-image: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.admin-page .panel:hover,
.admin-page .side-panel:hover,
.admin-page .summary-grid .stat:hover {
  border-color: var(--border-default);
  box-shadow: none;
  transform: none;
}

.admin-page .panel-head {
  min-height: 66px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-page .panel-head h2,
.admin-page .side-panel h2,
.admin-page .mini-head h3 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.admin-page .system-pill {
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 0;
  border-radius: var(--radius-full);
  box-shadow: none;
}

.admin-page .system-grid,
.admin-page .ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 16px 18px;
}

.admin-page .system-card,
.admin-page .ops-card {
  min-width: 0;
  padding: 14px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  box-shadow: none;
}

.admin-page .system-card:nth-child(3n),
.admin-page .ops-card:nth-child(3n) {
  border-right: 0;
}

.admin-page .system-card:nth-last-child(-n + 3),
.admin-page .ops-card:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.admin-page .system-card strong,
.admin-page .ops-card strong {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
}

.admin-page .system-card small,
.admin-page .ops-card small,
.admin-page .helper-line,
.admin-page .mini-note,
.admin-page .notice,
.admin-page .admin-output-empty {
  color: var(--text-tertiary);
}

.admin-page .ops-tool-grid,
.admin-page .finance-grid,
.admin-page .user-workspace {
  gap: 16px;
}

.admin-page .ops-tool-card,
.admin-page .finance-table-card,
.admin-page .side-panel {
  padding: 17px;
}

.admin-page .package-editor-row,
.admin-page .channel-editor-row,
.admin-page .model-health-item,
.admin-page .audit-item,
.admin-page .detail-item,
.admin-page .system-failure-item {
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.admin-page .input,
.admin-page .select,
.admin-page input,
.admin-page textarea,
.admin-page select {
  color: var(--text-primary);
  background: var(--surface-control);
  border-color: var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: none;
}

.admin-page .table-wrap {
  overflow-x: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-page .table {
  background: transparent;
  border-collapse: collapse;
}

.admin-page .table thead th {
  color: var(--text-tertiary);
  background: var(--bg-base);
  border-color: var(--border-subtle);
  font-weight: 500;
}

.admin-page .table th,
.admin-page .table td {
  color: var(--text-secondary);
  border-color: var(--border-subtle);
  font-size: 11px;
}

.admin-page .table tbody tr.selected td {
  background: var(--surface-selected);
}

.admin-page .table tbody tr:not(.selected):hover td {
  background: oklch(0.93 0.01 90 / 0.025);
}

.admin-page .badge,
.admin-page .system-pill {
  box-shadow: none;
}

/* ---------- Legal documents ---------- */

.layout-doc {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg-base);
}

.layout-doc .doc-ambient {
  display: none;
}

.layout-doc .doc-page {
  position: relative;
  z-index: 1;
  width: min(var(--doc-max-width), calc(100% - 36px));
  max-width: var(--doc-max-width);
  margin: 0 auto;
  padding: 36px 0 70px;
}

.layout-doc .doc-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-bottom: 18px;
  padding: 0 13px;
  color: var(--text-secondary);
  background: var(--surface-control);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  box-shadow: none;
}

.layout-doc .doc-back-link:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: none;
}

.layout-doc .doc-panel {
  padding: clamp(26px, 5vw, 48px);
  color: var(--text-primary);
  background: var(--surface-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.layout-doc .doc-panel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--primary-300);
  background: var(--surface-selected);
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.layout-doc .doc-title {
  margin-bottom: 14px;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.layout-doc .doc-intro {
  margin-bottom: 32px;
  padding-bottom: 28px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  font-size: 13px;
  line-height: 1.85;
}

.layout-doc .doc-section {
  margin: 0;
  padding: 25px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.layout-doc .doc-section:last-child {
  border-bottom: 0;
}

.layout-doc .doc-section h2 {
  margin: 0 0 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.layout-doc .doc-section p,
.layout-doc .doc-muted {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.9;
}

.layout-doc .doc-section p + p {
  margin-top: 9px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
  .auth-split {
    grid-template-columns: minmax(0, 1fr) minmax(450px, 0.84fr);
  }

  .create-page .studio-workspace.workspace,
  .video-page .video-grid {
    grid-template-columns: minmax(460px, 0.92fr) minmax(500px, 1.08fr);
  }

  .create-page .asset-role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .create-page .param-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .create-page .studio-workspace.workspace,
  .video-page .video-grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(920px, 100%);
  }

  .create-page .studio-result-column,
  .video-page .video-result-column {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .create-page .result-grid,
  .video-page .result-grid {
    min-height: 520px;
  }

  .create-page .create-workspace-shell .studio-result-column,
  .create-page .create-workspace-shell .studio-result {
    position: static;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .create-page .create-workspace-shell .studio-result .studio-section-body {
    display: block;
    min-height: 0;
    overflow: visible;
  }

  .create-page .create-workspace-shell .studio-result .result-grid {
    height: auto;
    max-height: none;
    min-height: 420px;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .dash-page .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-page .side-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-page .admin-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .admin-page .hero-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .topnav-inner {
    grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
    gap: 12px;
    padding-inline: 18px;
  }

  .brand-copy small {
    display: none;
  }

  .nav-link {
    min-width: 52px;
    padding-inline: 12px;
  }

  .portal-page {
    grid-template-rows: minmax(360px, 1fr) auto;
  }

  .portal-gallery {
    gap: 16px;
  }

  .portal-entry-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .auth-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-brand {
    display: none;
  }

  .auth-form-zone {
    padding-inline: clamp(24px, 9vw, 86px);
  }

  .auth-mobile-header {
    justify-content: space-between;
  }

  .auth-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
  }

  .auth-mobile-brand img {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .dash-page .profile-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dash-page .profile-stats {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
  }

  .dash-page .profile-stats .stat:first-child {
    border-left: 0;
  }

  .admin-page .admin-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-page .admin-rail {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
  }

  .admin-page .rail-brand {
    padding: 0 18px 0 0;
    border-right: 1px solid var(--border-subtle);
    border-bottom: 0;
  }

  .admin-page .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0;
  }

  .admin-page .rail-hint {
    display: none;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-bottom: 74px;
  }

  .topnav {
    height: 60px;
  }

  .topnav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 14px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .topnav .nav-links {
    position: fixed;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 10px;
    top: auto;
    z-index: var(--z-fixed);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    width: auto;
    max-width: 520px;
    min-height: 56px;
    padding: 5px;
    background: oklch(0.14 0.008 165 / 0.94);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    margin-inline: auto;
    transform: none;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  .nav-link {
    min-width: 0;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .nav-link-button {
    display: none;
  }

  .topnav-actions .btn:not(.btn-icon),
  .topnav-actions .dash-balance {
    display: none;
  }

  .explore-body .topnav {
    height: 60px;
  }

  .portal-page {
    display: block;
    min-height: 100dvh;
    padding: 104px 0 94px;
    overflow: hidden;
  }

  .portal-intro {
    width: min(650px, calc(100vw - 36px));
    min-height: 330px;
    margin: 0 auto;
  }

  .portal-gallery {
    display: grid;
    grid-auto-columns: min(62vw, 330px);
    grid-auto-flow: column;
    grid-template-columns: none;
    align-items: end;
    gap: 17px;
    width: 100%;
    padding: 18px 22px 18px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 22px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .portal-gallery::-webkit-scrollbar {
    display: none;
  }

  .portal-entry {
    scroll-snap-align: center;
  }

  .portal-entry--product,
  .portal-entry--model,
  .portal-entry--suite,
  .portal-entry--video {
    transform: rotate(0) translateY(0);
  }

  .portal-entry:hover {
    transform: translateY(-4px);
  }

  .portal-entry-media {
    aspect-ratio: 1.32 / 1;
  }

  .create-page .studio-workspace.workspace,
  .video-page .video-grid {
    padding: 16px 12px 92px;
  }

  .create-page .studio-section-header,
  .video-page .panel-head {
    padding-inline: 16px;
  }

  .create-page .studio-section-body {
    padding: 16px;
  }

  .create-page .template-grid,
  .create-page .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-page .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-page .dash-content {
    padding: 28px 14px 98px;
  }

  .dash-page .filters {
    justify-content: stretch;
  }

  .dash-page .filters .input {
    flex-basis: calc(50% - 4px);
  }

  .admin-page .admin-shell {
    padding: 16px 12px 96px;
  }

  .admin-page .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 16px;
  }

  .admin-page .summary-grid .stat:nth-child(4) {
    border-left: 0;
  }

  .admin-page .system-grid,
  .admin-page .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-page .system-card:nth-child(3n),
  .admin-page .ops-card:nth-child(3n) {
    border-right: 1px solid var(--border-subtle);
  }

  .admin-page .system-card:nth-child(2n),
  .admin-page .ops-card:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 620px) {
  .topnav-actions .dash-actions > .btn,
  .topnav-actions .dash-actions > .dash-balance {
    display: none;
  }

  .portal-intro {
    min-height: 350px;
  }

  .portal-signature {
    margin-bottom: 15px;
    font-size: 9px;
    letter-spacing: 0.18em;
  }

  .portal-intro h1 {
    font-size: clamp(42px, 13vw, 58px);
  }

  .portal-summary {
    max-width: 390px;
    margin-top: 19px;
    font-size: 13px;
    line-height: 1.75;
  }

  .portal-summary br {
    display: none;
  }

  .portal-actions {
    margin-top: 22px;
  }

  .portal-gallery {
    grid-auto-columns: min(74vw, 310px);
  }

  .auth-form-zone {
    justify-content: flex-start;
    padding: 92px 20px 34px;
    overflow-y: auto;
  }

  .auth-card {
    margin: 26px 0 44px;
  }

  .auth-head {
    margin-bottom: 28px;
  }

  .auth-head h2 {
    font-size: 27px;
  }

  .auth-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .create-page .brief-grid,
  .create-page .param-settings {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-page .material-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .create-page .upload-button {
    width: 100%;
  }

  .create-page .result-grid,
  .video-page .result-grid {
    min-height: 420px;
  }

  .video-page .field-grid,
  .video-page .upload-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .video-page .panel > .prompt-area,
  .video-page .panel > .field-grid,
  .video-page .panel > .field-extra,
  .video-page .panel > .upload-grid,
  .video-page .panel > .generate-bar {
    margin-right: 16px;
    margin-left: 16px;
  }

  .dash-page .profile-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 17px;
  }

  .dash-page .profile-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-page .profile-stats .stat {
    min-width: 0;
    padding: 0 8px;
  }

  .dash-page .side-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-page .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dash-page .tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dash-page .filters .input,
  .dash-page .filters .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .admin-page .admin-rail {
    display: block;
  }

  .admin-page .rail-brand {
    padding: 0 0 13px;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .admin-page .rail-nav {
    margin-top: 11px;
  }

  .admin-page .hero-card h1,
  .dash-page .dash-hero-title {
    font-size: 25px;
  }

  .admin-page .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-page .summary-grid .stat:nth-child(odd) {
    border-left: 0;
  }

  .layout-doc .doc-page {
    width: min(100% - 24px, var(--doc-max-width));
    padding: 20px 0 44px;
  }

  .layout-doc .doc-panel {
    padding: 24px 18px;
  }

  .layout-doc .doc-title {
    font-size: 24px;
  }
}

@media (max-width: 430px) {
  .brand-copy {
    display: none;
  }

  .portal-gallery {
    grid-auto-columns: 78vw;
    padding-inline: 16px;
    scroll-padding-inline: 16px;
  }

  .portal-primary-action {
    gap: 14px;
  }

  .create-page .asset-role-grid,
  .create-page .template-grid,
  .create-page .plan-grid,
  .create-page .result-grid,
  .video-page .result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .create-page .studio-section-header,
  .video-page .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .create-page .history-controls,
  .video-page .history-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .create-page .generate-bar,
  .video-page .generate-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .create-page .generate-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-page .profile-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .dash-page .profile-avatar {
    width: 46px;
    height: 46px;
  }

  .dash-page .profile-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .dash-page .profile-stats .stat {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    min-height: 38px;
    padding: 0;
    border-left: 0;
  }

  .admin-page .system-grid,
  .admin-page .ops-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-page .system-card,
  .admin-page .ops-card,
  .admin-page .system-card:nth-child(2n),
  .admin-page .ops-card:nth-child(2n),
  .admin-page .system-card:nth-child(3n),
  .admin-page .ops-card:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .portal-entry,
  .portal-entry-media img,
  .portal-entry-arrow,
  .portal-text-action::after {
    transition: none;
  }
}
