:root {
  --bg: #0d1117;
  --bg-soft: #131922;
  --panel: #171d27;
  --panel-strong: #1d2430;
  --panel-elevated: rgba(24, 31, 42, 0.94);
  --panel-glow: rgba(87, 166, 255, 0.16);
  --line: rgba(151, 175, 209, 0.15);
  --line-strong: rgba(151, 175, 209, 0.28);
  --text: #edf3ff;
  --muted: #97a4ba;
  --blue: #4b9fff;
  --blue-soft: #74b5ff;
  --blue-fade: rgba(75, 159, 255, 0.14);
  --green: #7ee7c3;
  --gold: #f1d99b;
  --red: #ff8e86;
  --shadow: 0 18px 48px rgba(2, 8, 18, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  background:
    radial-gradient(circle at top right, rgba(75, 159, 255, 0.16), transparent 24%),
    radial-gradient(circle at bottom left, rgba(126, 231, 195, 0.07), transparent 30%),
    linear-gradient(180deg, #0b1016 0%, #111722 46%, #0e141d 100%);
  color: var(--text);
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", "Courier New", monospace;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(17, 24, 34, 0.98), rgba(15, 20, 29, 0.98));
  box-shadow: none;
}

.window::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.32;
}

.window-bar,
.tabs-bar,
.status-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.legal-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.standalone-message,
.legal-page {
  width: min(860px, calc(100% - 28px));
  margin: clamp(28px, 7vw, 80px) auto;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 28, 38, 0.96);
  box-shadow: var(--shadow);
}

.standalone-message h1,
.legal-page h1,
.legal-page h2 {
  color: #fff;
}

.standalone-message p,
.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.65;
}

.standalone-message .primary-button {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
}

.legal-page header,
.legal-page section {
  margin-bottom: 24px;
}

.legal-placeholder {
  padding: 12px;
  border: 1px solid rgba(241, 217, 155, 0.3);
  border-radius: 8px;
  background: rgba(241, 217, 155, 0.08);
  color: var(--gold) !important;
}

.window-bar {
  justify-content: space-between;
  gap: 14px;
  padding: 11px clamp(14px, 1.6vw, 24px);
  background: linear-gradient(180deg, rgba(22, 28, 38, 0.98), rgba(20, 26, 35, 0.92));
  border-bottom: 1px solid var(--line);
  z-index: 5;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 178px;
}

.brand-logo {
  width: clamp(108px, 11vw, 136px);
  aspect-ratio: 3.5 / 1;
  object-fit: cover;
  object-position: center 48%;
  display: block;
  filter: drop-shadow(0 5px 14px rgba(75, 159, 255, 0.16));
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.74;
  line-height: 1.35;
}

.top-nav,
.window-actions,
.tabs-list,
.account-actions,
.view-actions,
.header-status,
.user-menu-dropdown,
.auth-switches,
.form-actions,
.product-actions,
.admin-inline-actions,
.split-header,
.product-header,
.library-header,
.coming-soon-header,
.coming-soon-footer,
.badge-row,
.table-row {
  display: flex;
  align-items: center;
}

.top-nav {
  flex: 1;
  justify-content: center;
  gap: 4px;
}

.window-actions {
  gap: 7px;
  justify-content: flex-end;
  min-width: 178px;
}

.account-actions {
  gap: 6px;
}

.account-actions:empty,
.user-menu-shell:empty {
  display: none;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  display: block;
  color: currentColor;
  transition: transform 180ms ease, color 180ms ease, opacity 180ms ease;
}

.icon-md {
  width: 1.08rem;
  height: 1.08rem;
}

.icon-lg {
  width: 1.35rem;
  height: 1.35rem;
}

.nav-content,
.tab-content,
.button-content,
.menu-content,
.auth-switch-content,
.category-label,
.kicker-with-icon,
.note-with-icon,
.metric-label,
.user-menu-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.button-content,
.auth-switch-content {
  justify-content: center;
  white-space: nowrap;
}

.kicker-with-icon {
  gap: 6px;
}

.menu-content,
.note-with-icon,
.metric-label {
  gap: 7px;
}

.metric-label {
  color: inherit;
}

.nav-link,
.tab-button,
.file-button,
.ghost-button,
.primary-button,
.danger-button,
.menu-button,
.user-menu-toggle,
.auth-switch {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition:
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.nav-link,
.tab-button,
.ghost-button,
.primary-button,
.danger-button,
.menu-button,
.user-menu-toggle {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 0.8rem;
}

.nav-link {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
}

.nav-link:hover,
.nav-link.active,
.tab-button.active {
  color: #ffffff;
  background: var(--blue-fade);
  border-color: rgba(75, 159, 255, 0.18);
}

.tab-button,
.nav-link,
.file-button:hover,
.ghost-button:hover,
.primary-button:hover,
.danger-button:hover,
.menu-button:hover,
.user-menu-toggle:hover,
.auth-switch:hover {
  transform: translateY(-1px);
}

.nav-link .icon,
.tab-button .icon,
.file-button .icon,
.ghost-button .icon,
.primary-button .icon,
.danger-button .icon,
.menu-button .icon,
.user-menu-toggle .icon,
.auth-switch .icon,
.activity-icon .icon,
.category-chip .icon {
  opacity: 0.9;
}

.nav-link:hover .icon,
.nav-link.active .icon,
.tab-button:hover .icon,
.tab-button.active .icon,
.file-button:hover .icon,
.file-button.active .icon,
.ghost-button:hover .icon,
.primary-button:hover .icon,
.danger-button:hover .icon,
.menu-button:hover .icon,
.user-menu-toggle:hover .icon,
.auth-switch:hover .icon,
.auth-switch.active .icon {
  transform: translateY(-1px);
  opacity: 1;
}

.primary-button {
  color: #ffffff;
  background: #347fd9;
  border-color: rgba(116, 181, 255, 0.3);
  box-shadow: 0 5px 14px rgba(75, 159, 255, 0.14);
}

.primary-button:hover {
  background: #418bdf;
}

.ghost-button,
.menu-button,
.user-menu-toggle,
.auth-switch,
.file-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.ghost-button.active {
  border-color: rgba(75, 159, 255, 0.34);
  background: rgba(75, 159, 255, 0.14);
  color: #ffffff;
}

button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.danger-button {
  border-color: rgba(255, 142, 134, 0.28);
  background: rgba(255, 142, 134, 0.12);
  color: #ffd0cb;
}

.user-menu-shell {
  position: relative;
  display: flex;
  justify-content: flex-end;
  flex: 0 1 auto;
}

.profile-control {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 160ms ease, background 160ms ease;
}

.profile-control:hover,
.profile-control:focus-within {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.user-menu-avatar-button {
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 39px;
  height: 38px;
  padding: 2px 3px;
  border: 0;
  border-radius: 6px 0 0 6px;
  background: transparent;
  color: #ffffff;
}

.user-menu-toggle {
  gap: 8px;
  flex: 1 1 auto;
  min-height: 38px;
  padding: 0 9px 0 5px;
  min-width: 0;
  max-width: min(230px, 100%);
  border: 0;
  border-radius: 0 6px 6px 0;
  background: transparent;
}

.profile-control .user-menu-toggle:hover {
  transform: none;
  background: transparent;
}

.user-menu-chevron {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}

.user-menu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.78rem;
}

.user-menu-summary {
  min-width: 0;
  flex: 1;
  justify-content: flex-start;
  gap: 5px;
}

.avatar-shell {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  border-radius: 50%;
  background: rgba(75, 159, 255, 0.16);
  color: #ffffff;
  font-weight: 700;
}

.avatar-fallback {
  position: relative;
  z-index: 0;
}

.avatar-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.user-menu-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.72rem;
}

.user-verified-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(75, 159, 255, 0.18);
  color: var(--blue-soft);
}

.user-verified-icon .icon {
  width: 9px;
  height: 9px;
  stroke-width: 2.4;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 80;
  width: min(230px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 23, 33, 0.98);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  animation: riseIn 220ms ease both;
}

.user-menu-meta {
  display: grid;
  gap: 2px;
  padding: 7px 8px 9px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}

.user-menu-meta > span {
  color: var(--muted);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.user-menu-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-meta small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--blue-soft);
  font-size: 0.66rem;
}

.user-menu-meta small .icon {
  width: 0.75rem;
  height: 0.75rem;
}

.menu-button {
  justify-content: flex-start;
  text-align: left;
  min-height: 32px;
  padding-inline: 8px;
  border-radius: 5px;
}

.menu-button .menu-content {
  width: 100%;
  justify-content: flex-start;
}

.user-menu-toggle[aria-expanded="true"] .user-menu-chevron .icon {
  transform: rotate(180deg);
}

.menu-button:focus-visible,
.user-menu-avatar-button:focus-visible,
.profile-avatar-button:focus-visible,
.user-menu-toggle:focus-visible,
.nav-link:focus-visible,
.tab-button:focus-visible,
.file-button:focus-visible,
.ghost-button:focus-visible,
.primary-button:focus-visible,
.danger-button:focus-visible,
.auth-switch:focus-visible,
.link-button:focus-visible {
  outline: none;
  border-color: rgba(116, 181, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(75, 159, 255, 0.18);
}

.menu-button-danger {
  color: #ffd0cb;
  border-color: rgba(255, 142, 134, 0.18);
  background: rgba(255, 142, 134, 0.08);
}

.tabs-bar {
  justify-content: space-between;
  gap: 10px;
  padding: 0 clamp(12px, 1.5vw, 22px);
  background: rgba(21, 27, 37, 0.94);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}

.tabs-list {
  gap: 3px;
  overflow-x: auto;
  padding: 4px 8px 4px 0;
}

.tab-button {
  min-height: 34px;
  border-radius: 7px;
  color: var(--muted);
}

.header-status {
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-chip {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.workspace {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 46px clamp(184px, 14vw, 218px) minmax(0, 1fr);
  flex: 1;
  min-height: calc(100vh - 137px);
}

.activity-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px 0;
  background: rgba(14, 19, 27, 0.9);
  border-right: 1px solid var(--line);
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: rgba(151, 164, 186, 0.72);
  border-left: 2px solid transparent;
}

.activity-icon-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.activity-icon.active {
  color: #ffffff;
  border-left-color: var(--blue-soft);
}

.activity-icon:hover {
  color: #ffffff;
  background: rgba(75, 159, 255, 0.08);
}

.sidebar {
  padding: 12px 10px;
  background: rgba(18, 24, 34, 0.94);
  border-right: 1px solid var(--line);
}

.sidebar-section + .sidebar-section {
  margin-top: 20px;
}

.sidebar-label,
.panel-kicker,
.modal-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-tree {
  display: grid;
  gap: 4px;
}

.file-button {
  width: 100%;
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 7px;
  text-align: left;
}

.file-entry {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.file-entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(75, 159, 255, 0.08);
  color: #cde4ff;
}

.file-entry-copy {
  min-width: 0;
}

.file-entry-copy span,
.file-entry-copy small {
  display: block;
}

.file-entry-copy span {
  color: #ffffff;
  font-size: 0.78rem;
}

.file-entry-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.64rem;
}

.file-button.active {
  border-color: rgba(75, 159, 255, 0.24);
  background: rgba(75, 159, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(75, 159, 255, 0.08);
}

.file-button.active .file-entry-icon {
  background: rgba(75, 159, 255, 0.14);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(75, 159, 255, 0.12);
}

.editor-view {
  min-width: 0;
  padding: clamp(14px, 1.7vw, 24px);
  overflow-x: hidden;
}

.notice-stack {
  display: grid;
  gap: 8px;
}

.notice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 217, 155, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(241, 217, 155, 0.08), rgba(75, 159, 255, 0.07)),
    rgba(255, 255, 255, 0.025);
  animation: riseIn 260ms ease both;
}

.notice-banner p {
  margin: 0;
}

.view-root {
  margin-top: 11px;
}

.view-panel {
  display: grid;
  gap: 13px;
  animation: panelIn 260ms ease both;
}

.view-panel > *,
.hero-grid > *,
.product-grid > *,
.library-grid > *,
.profile-grid > *,
.form-grid > *,
.dashboard-grid > *,
.history-grid > *,
.activity-grid > * {
  min-width: 0;
}

.hero-grid,
.product-grid,
.library-grid,
.profile-grid,
.form-grid,
.dashboard-grid,
.history-grid,
.activity-grid {
  display: grid;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.72fr);
  gap: 12px;
}

.hero-surface,
.code-surface,
.section-shell,
.identity-surface,
.centered-empty-card,
.coming-soon-card,
.panel-card,
.hero-card,
.code-card,
.metric-card,
.product-card,
.form-card,
.profile-card,
.table-card,
.empty-card,
.library-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 28, 38, 0.94);
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.16);
}

.hero-card,
.code-card,
.panel-card,
.form-card,
.profile-card,
.table-card,
.empty-card,
.library-card,
.coming-soon-card {
  padding: 17px;
}

.hero-surface::before,
.code-surface::before,
.section-shell::before,
.identity-surface::before,
.centered-empty-card::before,
.coming-soon-card::before {
  content: none;
  position: absolute;
  inset: -35% auto auto -18%;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 159, 255, 0.18), transparent 70%);
  opacity: 0.75;
  pointer-events: none;
}

.hero-title,
.section-title,
.modal-main h3,
.table-card h3,
.profile-card h3,
.form-card h3,
.coming-soon-title {
  margin: 0;
  color: #ffffff;
}

.hero-title {
  font-size: clamp(2.35rem, 4.4vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-title,
.coming-soon-title {
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  line-height: 1.15;
}

.hero-copy,
.section-copy,
.muted,
.product-card p,
.library-card p,
.table-helper,
.coming-soon-copy,
.modal-side p,
.auth-helper {
  color: var(--muted);
  line-height: 1.52;
  font-size: 0.84rem;
}

.hero-copy,
.section-copy,
.coming-soon-copy {
  margin: 9px 0 0;
  max-width: 62ch;
}

.hero-copy {
  max-width: 58ch;
  font-size: 0.86rem;
}

.terminal-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--blue-soft);
  font-size: 0.78rem;
}

.prompt {
  color: var(--green);
}

.prompt::after {
  content: "_";
  margin-left: 4px;
  color: var(--blue-soft);
  animation: blink 1s steps(1, end) infinite;
}

.view-actions,
.form-actions,
.product-actions,
.admin-inline-actions,
.split-header,
.product-header,
.library-header,
.coming-soon-header,
.coming-soon-footer,
.badge-row {
  gap: 7px;
  flex-wrap: wrap;
}

.view-actions {
  margin-top: 15px;
}

.product-grid,
.library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid,
.form-grid,
.history-grid,
.activity-grid {
  gap: 11px;
}

.profile-grid {
  grid-template-columns: 0.92fr 1.08fr;
}

.profile-identity-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-name {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.profile-username {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-avatar-button {
  position: relative;
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 70px;
  height: 70px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}

.profile-avatar-button:hover {
  border-color: rgba(116, 181, 255, 0.42);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  font-size: 1.15rem;
}

.avatar-edit-mark {
  position: absolute;
  right: -1px;
  bottom: -1px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(22, 28, 38, 1);
  border-radius: 50%;
  background: #347fd9;
  color: #ffffff;
}

.avatar-edit-mark .icon {
  width: 11px;
  height: 11px;
}

.avatar-editor {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.avatar-file-input {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
}

.avatar-file-input::file-selector-button {
  margin-right: 9px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.avatar-helper {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.avatar-helper.error {
  color: var(--red);
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.avatar-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

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

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.history-grid,
.activity-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 29, 39, 0.9);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.metric-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.2rem;
  color: #ffffff;
}

.metric-card span {
  color: var(--muted);
}

.metric-card:hover,
.product-card:hover,
.library-card:hover,
.coming-soon-card:hover,
.hero-card:hover,
.code-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.code-block,
.modal-code {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(75, 159, 255, 0.16);
  border-radius: 8px;
  background: rgba(10, 14, 20, 0.82);
  color: var(--gold);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 0.76rem;
  line-height: 1.42;
}

.runtime-panel {
  align-self: start;
  padding: 15px;
}

.coming-soon-card {
  min-height: 220px;
  display: grid;
  align-content: start;
  gap: 11px;
  background:
    linear-gradient(135deg, rgba(29, 36, 48, 0.94), rgba(16, 22, 31, 0.98)),
    rgba(255, 255, 255, 0.02);
}

.coming-soon-ambient {
  position: absolute;
  inset: auto -12% -20% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(75, 159, 255, 0.22), transparent 72%);
  filter: blur(8px);
  opacity: 0.9;
  animation: floatGlow 8s ease-in-out infinite;
}

.coming-soon-copy {
  max-width: 58ch;
}

.coming-soon-footer {
  margin-top: auto;
  padding-top: 8px;
}

.coming-soon-note {
  color: rgba(237, 243, 255, 0.74);
  font-size: 0.78rem;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(75, 159, 255, 0.18);
  border-radius: 6px;
  background: rgba(75, 159, 255, 0.08);
  color: #cce3ff;
  font-size: 0.7rem;
}

.category-chip .category-label {
  gap: 6px;
}

.product-card,
.library-card {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 13px;
}

.product-card h3,
.library-card h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
}

.product-card > p,
.library-card > p {
  margin: 0;
  font-size: 0.76rem;
}

.product-header,
.library-header,
.split-header {
  justify-content: space-between;
  align-items: flex-start;
}

.latest-projects-panel > .split-header {
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 0;
}

.latest-projects-panel {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 14px;
}

.latest-projects-panel .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 0.64rem;
}

.badge.free {
  background: rgba(126, 231, 195, 0.12);
  color: #b7f5e1;
}

.badge.paid {
  background: rgba(75, 159, 255, 0.14);
  color: #cae3ff;
}

.badge.muted {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.detail-list {
  display: grid;
  gap: 5px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.72rem;
}

.detail-line span:first-child {
  color: var(--muted);
}

.detail-line span:last-child {
  color: #ffffff;
}

.inline-note {
  padding: 9px 10px;
  border: 1px solid rgba(75, 159, 255, 0.18);
  border-radius: 8px;
  background: rgba(75, 159, 255, 0.08);
  color: #dceeff;
  line-height: 1.62;
}

.note-with-icon {
  align-items: flex-start;
}

.empty-card-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  border: 1px solid rgba(75, 159, 255, 0.16);
  background: rgba(75, 159, 255, 0.08);
  color: #d5e8ff;
  box-shadow: 0 12px 28px rgba(75, 159, 255, 0.12);
}

.field-group {
  display: grid;
  gap: 5px;
}

.settings-email-state {
  margin: 12px 0;
}

.field-group label {
  color: var(--muted);
  font-size: 0.74rem;
}

.field-group input,
.field-group textarea,
.field-group select {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field-group textarea {
  min-height: 104px;
  resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
  outline: none;
  border-color: rgba(116, 181, 255, 0.46);
  box-shadow: 0 0 0 3px rgba(75, 159, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.full-width {
  grid-column: 1 / -1;
}

.table-card {
  overflow: hidden;
}

.table-shell {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: top;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
}

td {
  color: var(--text);
  font-size: 0.8rem;
}

.table-empty {
  color: var(--muted);
  text-align: center;
  padding: 18px 12px;
}

.empty-card {
  display: grid;
  gap: 10px;
}

.centered-empty-card {
  min-height: 190px;
  align-content: center;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  width: min(860px, 100%);
  max-height: calc(100dvh - 28px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 20, 29, 0.98);
  box-shadow: var(--shadow);
  overflow: auto;
  animation: riseIn 260ms ease both;
}

.modal-side,
.modal-main {
  padding: 21px;
}

.modal-side {
  background:
    radial-gradient(circle at top right, rgba(75, 159, 255, 0.2), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  border-right: 1px solid var(--line);
}

.modal-side h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  line-height: 1.08;
  color: #ffffff;
}

.modal-logo {
  display: block;
  width: min(170px, 100%);
  aspect-ratio: 3.5 / 1;
  object-fit: cover;
  object-position: center 48%;
  margin: 0 0 12px;
  filter: drop-shadow(0 10px 28px rgba(75, 159, 255, 0.18));
}

.modal-main {
  display: grid;
  align-content: start;
  gap: 11px;
}

.auth-switches {
  gap: 5px;
  flex-wrap: wrap;
}

.auth-switch {
  min-height: 34px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 0.76rem;
}

.auth-switch.active {
  color: #ffffff;
  background: rgba(75, 159, 255, 0.12);
  border-color: rgba(75, 159, 255, 0.22);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #b9d9ff;
}

.toast-shell {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  display: grid;
  gap: 7px;
  width: min(330px, calc(100% - 24px));
}

.toast {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(15, 20, 29, 0.98);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  animation: riseIn 220ms ease both;
}

.toast strong {
  display: block;
  margin-bottom: 4px;
  color: #ffffff;
}

.status-bar {
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(32, 95, 178, 0.96);
  color: #ffffff;
  font-size: 0.68rem;
}

@keyframes panelIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-12px, -10px, 0) scale(1.04);
  }
}

.modal-open {
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.product-card-media {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(7, 12, 20, 0.75);
  color: var(--blue-soft);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.product-cover-image,
.product-gallery-image,
.gallery-thumbnail img,
.admin-image-media img,
.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-media .product-cover-image {
  transition: transform 180ms ease, opacity 180ms ease;
}

.product-card-media:hover .product-cover-image,
.product-card-media:focus-visible .product-cover-image {
  transform: scale(1.025);
  opacity: 0.92;
}

.product-image-fallback {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: radial-gradient(circle at center, rgba(75, 159, 255, 0.14), transparent 64%), rgba(7, 12, 20, 0.72);
  color: var(--blue-soft);
}

.image-load-failed {
  display: none;
}

.product-modal-shell,
.image-lightbox-shell {
  position: fixed;
  inset: 0;
  z-index: 64;
  display: grid;
  place-items: center;
  padding: 18px;
}

.product-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 20, 29, 0.99);
  box-shadow: var(--shadow);
  animation: riseIn 220ms ease both;
}

#product-modal-main {
  padding: 18px;
}

.product-dialog-header,
.product-detail-layout,
.admin-image-actions {
  display: flex;
}

.product-dialog-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.product-dialog-header h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.icon-only-button {
  min-width: 38px;
  padding-inline: 9px;
  font-size: 1.15rem;
}

.product-detail-layout {
  align-items: flex-start;
  gap: 18px;
}

.product-gallery {
  flex: 1 1 66%;
  min-width: 0;
}

.product-detail-copy {
  flex: 1 1 34%;
  display: grid;
  gap: 14px;
  min-width: 250px;
}

.product-detail-copy > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.product-gallery-main {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #080d15;
  aspect-ratio: 16 / 9;
}

.gallery-main-button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-gallery-fallback {
  min-height: 100%;
}

.gallery-arrow,
.lightbox-arrow,
.lightbox-close {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 9, 15, 0.78);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.gallery-arrow {
  top: 50%;
  width: 38px;
  height: 48px;
  transform: translateY(-50%);
  border-radius: 8px;
  font-size: 1.7rem;
}

.gallery-arrow-left,
.lightbox-arrow-left {
  left: 10px;
}

.gallery-arrow-right,
.lightbox-arrow-right {
  right: 10px;
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.gallery-thumbnail {
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #080d15;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.gallery-thumbnail.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(75, 159, 255, 0.18);
}

.gallery-counter {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.image-lightbox-shell {
  z-index: 80;
  background: rgba(0, 0, 0, 0.22);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
}

.image-lightbox {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.lightbox-image {
  max-width: calc(100vw - 76px);
  max-height: calc(100dvh - 100px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
}

.lightbox-arrow {
  top: 50%;
  width: 48px;
  height: 58px;
  transform: translateY(-50%);
  border-radius: 9px;
  font-size: 2rem;
}

.lightbox-caption {
  position: absolute;
  bottom: 0;
  left: 50%;
  max-width: min(80vw, 720px);
  margin: 0;
  padding: 8px 12px;
  transform: translateX(-50%);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.78rem;
  text-align: center;
}

.product-image-manager {
  display: grid;
  gap: 16px;
}

.product-image-upload-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed rgba(75, 159, 255, 0.34);
  border-radius: 10px;
  background: rgba(75, 159, 255, 0.035);
}

.product-image-previews,
.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.product-image-preview,
.admin-image-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(7, 12, 20, 0.55);
}

.product-image-preview img {
  display: block;
  aspect-ratio: 16 / 9;
}

.product-image-preview span {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-image-card {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 10px;
}

.admin-image-media {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  background: #080d15;
  aspect-ratio: 16 / 9;
}

.image-cover-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: rgba(32, 95, 178, 0.92);
  color: #fff;
  font-size: 0.68rem;
}

.admin-image-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.admin-image-actions {
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-image-actions button {
  min-height: 33px;
  font-size: 0.7rem;
}

.empty-image-state {
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 1700px) {
  .workspace {
    grid-template-columns: 48px 220px minmax(0, 1fr);
  }

  .product-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.72fr);
  }

  .latest-projects-panel .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 46px 190px minmax(0, 1fr);
  }

  .profile-grid,
  .history-grid,
  .activity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 46px 180px minmax(0, 1fr);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  }

  .editor-view {
    padding-inline: 14px;
  }

  .modal-card {
    width: min(680px, 100%);
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .modal-card {
    grid-template-columns: 1fr;
    width: min(640px, 100%);
  }

  .modal-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .window-bar,
  .tabs-bar,
  .status-bar {
    flex-wrap: wrap;
  }

  .brand-block {
    min-width: 148px;
  }

  .top-nav {
    order: 3;
    justify-content: flex-start;
    width: 100%;
  }

  .window-actions {
    min-width: 0;
  }

  .tabs-list {
    max-width: 100%;
  }

  .form-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero-grid,
  .product-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .latest-projects-panel {
    grid-template-columns: 1fr;
  }

  .latest-projects-panel .product-grid {
    grid-template-columns: 1fr;
  }

  .window-bar {
    align-items: flex-start;
  }

  .window-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .account-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .window-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .brand-block {
    width: 100%;
    min-width: 0;
    gap: 6px;
  }

  .brand-logo {
    width: 118px;
  }

  .brand-subtitle {
    font-size: 0.6rem;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .nav-link,
  .top-nav .nav-content {
    width: 100%;
  }

  .nav-link {
    min-height: 44px;
    justify-content: center;
  }

  .window-actions,
  .account-actions,
  .user-menu-shell {
    width: 100%;
  }

  .profile-control {
    width: 100%;
    height: 46px;
  }

  .user-menu-avatar-button {
    width: 45px;
    height: 44px;
  }

  .account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .account-actions > button,
  .user-menu-toggle {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .user-menu-toggle {
    justify-content: space-between;
  }

  .user-menu-dropdown {
    right: 0;
    left: 0;
    width: 100%;
    max-width: none;
  }

  .menu-button {
    min-height: 44px;
  }

  .avatar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .avatar-actions button {
    width: 100%;
    min-height: 44px;
  }

  .tabs-bar {
    display: block;
    padding: 0 12px;
  }

  .tabs-list {
    width: 100%;
    padding-right: 0;
    scrollbar-width: thin;
  }

  .tab-button {
    min-height: 42px;
    flex: none;
  }

  .header-status {
    display: none;
  }

  .workspace {
    display: block;
    min-height: 0;
  }

  .activity-bar {
    display: none;
  }

  .editor-view {
    width: 100%;
    padding: 12px;
  }

  .view-root {
    margin-top: 10px;
  }

  .view-panel {
    gap: 11px;
  }

  .hero-card,
  .code-card,
  .panel-card,
  .form-card,
  .profile-card,
  .table-card,
  .empty-card,
  .library-card,
  .coming-soon-card {
    padding: 14px;
    border-radius: 10px;
  }

  .hero-title {
    font-size: clamp(2.15rem, 11vw, 2.8rem);
    line-height: 1;
  }

  .section-title,
  .coming-soon-title {
    font-size: clamp(1.25rem, 6.5vw, 1.65rem);
  }

  .hero-copy,
  .section-copy,
  .product-card p,
  .library-card p,
  .coming-soon-copy {
    line-height: 1.5;
  }

  .view-actions,
  .form-actions,
  .product-actions,
  .admin-inline-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .view-actions > button,
  .form-actions > button,
  .product-actions > button,
  .admin-inline-actions > button {
    width: 100%;
    min-height: 44px;
  }

  .ghost-button,
  .primary-button,
  .danger-button,
  .menu-button,
  .auth-switch {
    min-height: 44px;
  }

  .split-header,
  .product-header,
  .library-header,
  .coming-soon-header {
    align-items: flex-start;
  }

  .detail-line {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .detail-line span:last-child {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: right;
  }

  .field-group input,
  .field-group textarea,
  .field-group select {
    min-height: 46px;
    font-size: 16px;
  }

  .table-card {
    padding-inline: 0;
  }

  .table-card > h3,
  .table-card > .panel-kicker,
  .table-card > .table-helper,
  .table-card > .split-header {
    margin-inline: 18px;
  }

  th,
  td {
    padding: 13px 14px;
    white-space: nowrap;
  }

  .modal-shell {
    place-items: stretch;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .modal-side {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
  }

  .modal-side h2,
  .modal-side > p:not(.modal-kicker),
  .modal-code {
    display: none;
  }

  .modal-kicker {
    margin: 0;
  }

  .modal-logo {
    width: 124px;
    margin: 0;
  }

  .modal-main {
    padding: 22px 18px max(22px, env(safe-area-inset-bottom));
  }

  .auth-switches {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .auth-switches::-webkit-scrollbar {
    display: none;
  }

  .auth-switch {
    min-width: max-content;
    min-height: 46px;
  }

  .toast-shell {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
  }

  .status-bar {
    justify-content: space-between;
    padding: 7px 12px max(7px, env(safe-area-inset-bottom));
    font-size: 0.66rem;
  }

  .status-bar span:first-child,
  .status-bar span:last-child {
    display: none;
  }
}

@media (max-width: 400px) {
  .window-bar,
  .editor-view {
    padding-inline: 14px;
  }

  .account-actions {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.15rem;
  }

  .hero-card,
  .code-card,
  .panel-card,
  .form-card,
  .profile-card,
  .empty-card,
  .library-card,
  .coming-soon-card {
    padding: 13px;
  }
}

@media (max-width: 760px) {
  .product-modal-shell,
  .image-lightbox-shell {
    padding: 0;
  }

  .product-dialog {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  #product-modal-main {
    padding: 16px 14px max(18px, env(safe-area-inset-bottom));
  }

  .product-detail-layout {
    flex-direction: column;
  }

  .product-gallery,
  .product-detail-copy {
    flex-basis: auto;
    width: 100%;
    min-width: 0;
  }

  .gallery-thumbnails {
    display: flex;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
  }

  .gallery-thumbnail {
    flex: 0 0 86px;
    scroll-snap-align: start;
  }

  .lightbox-image {
    max-width: 100vw;
    max-height: calc(100dvh - 100px);
  }

  .lightbox-arrow {
    top: auto;
    bottom: 48px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .lightbox-caption {
    bottom: max(4px, env(safe-area-inset-bottom));
    width: calc(100% - 110px);
  }

  .product-image-previews,
  .admin-image-grid {
    grid-template-columns: 1fr;
  }
}

@media (hover: none) {
  .nav-link:hover,
  .tab-button:hover,
  .file-button:hover,
  .ghost-button:hover,
  .primary-button:hover,
  .danger-button:hover,
  .menu-button:hover,
  .user-menu-toggle:hover,
  .auth-switch:hover,
  .metric-card:hover,
  .product-card:hover,
  .library-card:hover,
  .coming-soon-card:hover,
  .hero-card:hover,
  .code-card:hover {
    transform: none;
  }
}

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