:root {
  --background: 42 30% 97%;
  --card: 210 11% 93%;
  --primary: 199 20% 39%;
  --primary-foreground: 42 32% 96%;
  --foreground: 210 18% 9%;
  --luxury-ink: #111315;
  --luxury-graphite: #202326;
  --luxury-paper: #f7f4ee;
  --luxury-panel: #fcfaf6;
  --luxury-blue: #567c8d;
  --luxury-gold: #a88758;
  --luxury-line: rgba(33, 37, 41, 0.12);
}

:root {
  --border: 202 18% 48%;
  --muted-foreground: 199 20% 39%;
}

.studio-shell {
  min-height: calc(100vh - 7rem);
}

.studio-range {
  width: 100%;
  accent-color: hsl(var(--primary));
}

.studio-stat {
  min-width: 2.75rem;
  text-align: right;
}

.entitlement-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
  border: 1px solid hsl(var(--border) / 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.85rem;
}

.entitlement-panel--gallery {
  margin-bottom: 1.25rem;
}

.entitlement-panel__item {
  min-width: 0;
  border-left: 2px solid hsl(var(--primary) / 0.45);
  padding-left: 0.75rem;
}

.entitlement-panel__item span,
.entitlement-panel__item strong {
  display: block;
  overflow-wrap: anywhere;
}

.entitlement-panel__item span {
  color: hsl(var(--muted-foreground));
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.entitlement-panel__item strong {
  margin-top: 0.2rem;
  color: hsl(var(--foreground, 222 47% 11%));
  font-size: 1rem;
  font-weight: 700;
}

.studio-workspace {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.studio-workspace--image {
  grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr) minmax(18rem, 22rem);
}

.studio-workspace--video {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
}

.studio-surface {
  border: 1px solid hsl(var(--border) / 0.55);
  background: hsl(var(--background) / 0.86);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(24px);
}

.studio-side-panel {
  align-self: start;
}

.studio-sidebar-scroll {
  max-height: calc(100vh - 8rem);
  overflow: auto;
  scrollbar-width: thin;
}

.studio-command-bar {
  z-index: 20;
}

.studio-preview {
  min-height: clamp(24rem, 60vh, 48rem);
}

.studio-video-preview {
  min-height: clamp(22rem, calc(100vh - 18rem), 40rem);
  max-height: calc(100vh - 13rem);
  padding-bottom: clamp(8rem, 20vh, 10.5rem);
}

.studio-video-preview #previewVideo,
.studio-video-preview #previewImage {
  max-height: calc(100% - 7.25rem);
}

.studio-video-transport {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border: 0;
  border-radius: 0;
  background: linear-gradient(
    to top,
    rgba(248, 250, 252, 0.92),
    rgba(248, 250, 252, 0.76) 72%,
    rgba(248, 250, 252, 0)
  );
  padding: 1.2rem 1.25rem 1.05rem;
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.studio-video-transport .studio-action-btn {
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.studio-video-transport .studio-chip {
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  font-size: 0.68rem;
}

.studio-video-transport .studio-status {
  min-height: 0;
  font-size: 0.78rem;
}

.studio-preview.is-expanded {
  width: min(94vw, 108rem);
  max-width: none;
}

.studio-checkerboard {
  background-color: #f7f8fb;
  background-image:
          linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%);
      background-position: 0 0, 0 12px, 12px -12px, -12px 0;
      background-size: 24px 24px;
}

.studio-topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.studio-topbar > .space-y-1 {
  text-align: center;
}

.studio-topbar__group {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.studio-action-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.55);
  background: hsl(var(--background));
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.studio-action-btn:hover:not(:disabled) {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.studio-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-action-btn--primary {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.studio-action-btn--primary:hover:not(:disabled) {
  background: hsl(var(--primary) / 0.92);
  color: hsl(var(--primary-foreground));
}

.studio-action-btn__icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
}

.studio-action-btn:not(.studio-action-btn--primary) .studio-action-btn__icon {
  color: #567C8D;
}

.studio-command-tab {
  flex: 0 0 8rem;
  min-height: 40px;
  height: 40px;
  width: 8rem;
  min-width: 8rem;
  border-radius: 0.375rem 0.375rem 0 0;
  padding: 0.5rem 0.55rem;
  border-color: #e5e7eb;
  background: #fff;
  color: #4b5563;
  font-size: 0.78rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.studio-command-tab:hover:not(:disabled) {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.studio-command-tab.studio-action-btn--primary {
  border-color: #567C8D;
  background: #f5efeb;
  color: #567C8D;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.13);
}

.studio-command-tab.studio-action-btn--primary:hover:not(:disabled) {
  border-color: #567C8D;
  background: #f5efeb;
  color: #567C8D;
}

.studio-command-tab .studio-action-btn__icon {
  width: 1rem;
  height: 1rem;
}

.studio-command-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 8rem;
  cursor: pointer;
  user-select: none;
}

.studio-command-toggle__surface {
  width: 100%;
}

.studio-command-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.studio-command-toggle__input:focus-visible + .studio-command-toggle__surface {
  outline: 2px solid hsl(var(--primary) / 0.6);
  outline-offset: 3px;
}

.studio-command-toggle__input:checked + .studio-command-toggle__surface {
  border-color: #567C8D;
  background: #f5efeb;
  color: #567C8D;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.13);
  transform: translateY(-0.25rem);
}

.studio-command-toggle__input:checked + .studio-command-toggle__surface .studio-action-btn__icon {
  color: #2563eb;
}

.studio-command-toggle__input:disabled + .studio-command-toggle__surface {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.studio-command-toggle:has(.studio-command-toggle__input:disabled) {
  cursor: not-allowed;
}

.studio-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.studio-section {
  border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 1rem;
  padding: 1rem;
}

.studio-section__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.studio-section__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(var(--muted-foreground));
}

.studio-section__copy {
  margin: 0;
  font-size: 0.82rem;
  color: hsl(var(--muted-foreground));
}

.studio-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid hsl(var(--border) / 0.5);
  padding: 0.8rem 0.9rem;
  font-size: 0.92rem;
}

.plain-bg-panel {
  border-radius: 0.95rem;
  border: 1px solid hsl(var(--border) / 0.5);
  padding: 0.85rem;
}

.plain-bg-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(var(--muted-foreground));
}

.plain-bg-panel__clear {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.65);
  background: hsl(var(--background));
  padding: 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: hsl(var(--muted-foreground));
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.plain-bg-panel__clear:hover {
  border-color: hsl(var(--primary) / 0.55);
  color: hsl(var(--foreground));
}

.plain-bg-swatches {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.plain-bg-swatch {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 34px;
  border-radius: 0.7rem;
  border: 1px solid hsl(var(--border) / 0.75);
  background: var(--plain-bg-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.plain-bg-swatch:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42), 0 10px 24px rgba(15, 23, 42, 0.14);
}

.plain-bg-swatch.is-active {
  border-color: #567C8D;
  box-shadow: 0 0 0 2px rgba(86, 124, 141, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.plain-bg-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.plain-bg-control {
  display: grid;
  gap: 0.35rem;
}

.plain-bg-control.is-disabled {
  opacity: 0.55;
}

.plain-bg-control--wide {
  grid-column: 1 / -1;
}

.plain-bg-control span {
  font-size: 0.62rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: hsl(var(--muted-foreground));
}

.plain-bg-control__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plain-bg-control__label output {
  flex: 0 0 auto;
  color: hsl(var(--foreground));
}

.plain-bg-control select {
  min-height: 38px;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border) / 0.65);
  background: hsl(var(--background));
  padding: 0 0.65rem;
  font-size: 0.78rem;
  color: hsl(var(--foreground));
  outline: none;
}

.remove-bg-toggle {
  position: relative;
  display: block;
  cursor: pointer;
  border: 0;
  padding: 0;
  user-select: none;
}

.studio-icon-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.remove-bg-toggle__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--background));
  padding: 0.7rem 0.8rem;
  color: hsl(var(--muted-foreground));
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 120ms ease;
}

.remove-bg-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border) / 0.65);
  background: #f8fafc;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.remove-bg-toggle__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.remove-bg-toggle__text {
  font-size: 0.92rem;
  font-weight: 500;
}

.remove-bg-toggle:hover .remove-bg-toggle__content {
  border-color: hsl(var(--primary) / 0.45);
  color: hsl(var(--foreground));
}

.studio-icon-toggle__input:focus-visible + .remove-bg-toggle__content {
  outline: 2px solid hsl(var(--primary) / 0.6);
  outline-offset: 3px;
}

.studio-icon-toggle__input:checked + .remove-bg-toggle__content {
  border-color: #567C8D;
  background: #eff6ff;
  color: #567C8D;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18), 0 10px 28px rgba(37, 99, 235, 0.14);
  transform: translateY(1px);
}

.studio-icon-toggle__input:checked + .remove-bg-toggle__content .remove-bg-toggle__icon {
  border-color: #567C8D;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.studio-tool-toggle {
  position: relative;
  display: block;
  cursor: pointer;
  user-select: none;
}

.studio-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.studio-tool-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.studio-tool-toggle__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--background));
  padding: 0.7rem 0.8rem;
  color: hsl(var(--muted-foreground));
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease, opacity 160ms ease, transform 120ms ease;
}

.studio-tool-toggle__icon,
.studio-range-control__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border) / 0.65);
  background: #f8fafc;
  color: #567C8D;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.studio-tool-toggle__icon svg,
.studio-range-control__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.studio-tool-toggle__text {
  font-size: 0.92rem;
  font-weight: 500;
}

.studio-tool-toggle--tab .studio-tool-toggle__content {
  min-height: 5.35rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.35rem;
  text-align: center;
}

.studio-tool-toggle--tab .studio-tool-toggle__icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
}

.studio-tool-toggle--tab .studio-tool-toggle__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.studio-tool-toggle--tab .studio-tool-toggle__text {
  display: flex;
  min-height: 1.55rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.15;
}

.studio-tool-toggle:hover .studio-tool-toggle__content {
  border-color: hsl(var(--primary) / 0.45);
  color: hsl(var(--foreground));
}

.studio-tool-toggle__input:focus-visible + .studio-tool-toggle__content {
  outline: 2px solid hsl(var(--primary) / 0.6);
  outline-offset: 3px;
}

.studio-tool-toggle__input:checked + .studio-tool-toggle__content {
  border-color: #567C8D;
  background: #eff6ff;
  color: #567C8D;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18), 0 10px 28px rgba(37, 99, 235, 0.14);
  transform: translateY(1px);
}

.studio-tool-toggle__input:checked + .studio-tool-toggle__content .studio-tool-toggle__icon {
  border-color: #567C8D;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.studio-tool-toggle__input:disabled + .studio-tool-toggle__content {
  opacity: 0.55;
}

.studio-tool-toggle:has(.studio-tool-toggle__input:disabled) {
  cursor: not-allowed;
}

.studio-range-control:has(input:disabled),
.studio-toggle-row:has(input:disabled),
.studio-toggle-row:has(select:disabled) {
  opacity: 0.55;
}

.is-media-disabled {
  cursor: not-allowed !important;
}

.bg-option.is-media-disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.75);
}

.studio-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-range-control {
  display: grid;
  gap: 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--background));
  padding: 0.75rem 0.8rem;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.studio-range-control__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.studio-range-control__identity {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.studio-range-control.is-active {
  border-color: #567C8D;
  background: #eff6ff;
  color:#567C8D;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.18), 0 10px 28px rgba(37, 99, 235, 0.14);
}

.studio-range-control.is-active .studio-range-control__header {
  color: #567C8D;
}

.studio-range-control.is-active .studio-range-control__icon {
  border-color: #567C8D;
  background: #dbeafe;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.studio-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.studio-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.studio-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.55);
  background: hsl(var(--background));
  padding: 0.4rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 500;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.studio-chip:hover {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.studio-status {
  min-height: 1.25rem;
}

.studio-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 58rem);
  border-radius: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.96);
  padding: 1.25rem;
  color: #fff;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.56), 0 32px 90px rgba(15, 23, 42, 0.5);
  z-index: 10000;
}

.studio-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.studio-modal__actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.studio-helper {
  font-size: 0.78rem;
  color: rgba(226, 232, 240, 0.72);
}

#cropCanvas {
  position: relative;
  margin-top: 1rem;
  width: min(88vw, 54rem);
  max-width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 1rem;
  background: #020617;
  overflow: hidden;
  touch-action: none;
}

#cropCanvas #cropSource,
#cropCanvas #cropVideoSource {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 10;
  pointer-events: none;
}

#editorCanvas {
  position: relative;
  margin-top: 1rem;
  width: min(82vw, 42rem);
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 60vh;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background:
          linear-gradient(45deg, rgba(148, 163, 184, 0.11) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, 0.11) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.11) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.11) 75%),
        #020617;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
  touch-action: none;
}

#bgLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

#subjectFrame {
  position: absolute;
  left: 50%;
  top: 50%;
  box-sizing: border-box;
  cursor: move;
  touch-action: none;
  transform-origin: center center;
}

#subjectFrame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.68);
  pointer-events: none;
}

#subjectLayer {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.subject-resize-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #0f172a;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
  touch-action: none;
}

.subject-resize-handle--nw {
  left: 0;
  top: 0;
  cursor: nwse-resize;
  transform: translate(-50%, -50%);
}

.subject-resize-handle--ne {
  right: 0;
  top: 0;
  cursor: nesw-resize;
  transform: translate(50%, -50%);
}

.subject-resize-handle--se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
  transform: translate(50%, 50%);
}

.subject-resize-handle--sw {
  left: 0;
  bottom: 0;
  cursor: nesw-resize;
  transform: translate(-50%, 50%);
}

#previewStage {
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

#previewBgLayer,
#previewSubjectLayer {
  user-select: none;
  -webkit-user-drag: none;
}

#previewSubjectLayer {
  object-fit: contain;
  max-width: none;
  max-height: none;
}

.bg-option {
  border: 2px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.bg-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.bg-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bg-category-tab {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.65);
  background: hsl(var(--background));
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.bg-category-tab:hover {
  border-color: hsl(var(--primary) / 0.55);
  color: hsl(var(--foreground));
}

.bg-category-tab.is-active {
  border-color: #567C8D;
  background: #eff6ff;
  color: #567C8D;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.14);
}

@media (min-width: 1280px) {
  .studio-side-panel {
    position: sticky;
    top: 6.5rem;
  }
}

    @media (max-width: 1279px) {
      .studio-workspace--image,
      .studio-workspace--video {
        grid-template-columns: minmax(0, 1fr);
      }

      .studio-sidebar-scroll {
        max-height: none;
      }
    }

    @media (max-width: 767px) {
      .studio-preview {
        min-height: 20rem;
      }

      .studio-video-preview {
        min-height: 28rem;
        max-height: none;
        padding-bottom: 12rem;
      }

      .studio-video-transport {
        gap: 0.55rem;
        padding: 1rem 0.75rem 0.85rem;
      }

      .studio-video-transport .studio-chip-row,
      .studio-video-transport .flex.flex-wrap {
        gap: 0.35rem;
      }

      .studio-video-transport .studio-action-btn {
        min-height: 34px;
        padding: 0.4rem 0.65rem;
      }

      .studio-field-grid {
        grid-template-columns: minmax(0, 1fr);
      }

      .studio-modal {
        padding: 1rem;
      }

      .studio-modal__actions {
        flex-direction: column;
        align-items: stretch;
      }

      .studio-topbar {
        align-items: flex-start;
      }
    }

    .studio-save-modal[hidden] {
      display: none;
    }

    .studio-save-modal {
      position: fixed;
      inset: 0;
      z-index: 140;
      display: grid;
      place-items: center;
      padding: 20px;
    }

    .studio-save-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(8, 12, 16, 0.42);
      backdrop-filter: blur(10px);
    }

    .studio-save-modal__panel {
      position: relative;
      z-index: 1;
      display: grid;
      width: min(440px, 100%);
      gap: 18px;
      border: 1px solid rgba(86, 124, 141, 0.24);
      border-radius: 8px;
      background: #fff;
      color: #101820;
      padding: 22px;
      box-shadow: 0 28px 80px rgba(8, 16, 22, 0.24);
    }

    .studio-save-modal__header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .studio-save-modal__header p {
      margin: 0 0 6px;
      color: #567C8D;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .studio-save-modal__header h2 {
      margin: 0;
      color: #101820;
      font-size: 22px;
      font-weight: 650;
      letter-spacing: 0;
      line-height: 1.15;
    }

    .studio-save-modal__close {
      display: inline-flex;
      width: 38px;
      height: 38px;
      align-items: center;
      justify-content: center;
      border: 1px solid #d9e2e6;
      border-radius: 8px;
      background: #fff;
      color: #101820;
      cursor: pointer;
    }

    .studio-save-modal__close svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .studio-save-options {
      display: grid;
      gap: 10px;
    }

    .studio-save-option {
      display: flex;
      min-height: 42px;
      align-items: center;
      gap: 10px;
      border: 1px solid #e2e8ec;
      border-radius: 8px;
      padding: 0 12px;
      font-size: 14px;
      font-weight: 650;
    }

    .studio-save-option input {
      width: 16px;
      height: 16px;
      accent-color: #567C8D;
    }

    .studio-save-select,
    .studio-save-input {
      min-height: 42px;
      width: 100%;
      border: 1px solid #d9e2e6;
      border-radius: 8px;
      background: #fff;
      color: #101820;
      padding: 0 12px;
      font-size: 14px;
      outline: none;
    }

    .studio-save-select:disabled,
    .studio-save-input:disabled {
      background: #f5f7f8;
      color: #8a96a0;
    }

    .studio-save-status {
      min-height: 18px;
      margin: 0;
      color: #567C8D;
      font-size: 13px;
    }

    .studio-save-status.is-error {
      color: #9f2d2d;
    }

    .studio-save-modal__actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

 body {
      background: #fff;
    }

    .gallery-page {
      min-height: 100vh;
      background: #fff;
      color: #050505;
    }

    .gallery-shell {
      width: 100%;
      padding: 144px 35px 56px 42px;
    }

    .gallery-heading {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 34px;
    }

    .gallery-kicker {
      margin: 0 0 12px;
      color: #567C8D;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size: 15px;
      font-weight: 600;
      line-height: 1;
      letter-spacing: 0.32em;
      text-transform: uppercase;
    }

    #gallery-title {
      margin: 0;
      color: #030303;
      font-size: 48px;
      font-weight: 300;
      letter-spacing: 0;
      line-height: 0.96;
    }

    .gallery-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      padding-top: 28px;
      white-space: nowrap;
    }

    .gallery-new-button {
      display: inline-flex;
      min-width: 112px;
      min-height: 42px;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border: 1px solid #567C8D;
      border-radius: 8px;
      background: #567C8D;
      color: #fff;
      padding: 0 14px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      line-height: 1;
      text-decoration: none;
      text-transform: uppercase;
    }

    .gallery-new-button--secondary {
      background: #fff;
      color: #31515e;
    }

    .gallery-new-button span {
      font-size: 18px;
      font-weight: 400;
      line-height: 0;
      transform: translateY(-1px);
    }

    .gallery-messages {
      display: grid;
      gap: 8px;
      margin-bottom: 20px;
    }

    .gallery-message {
      margin: 0;
      border: 1px solid #d9e2e6;
      border-radius: 8px;
      background: #f6fafb;
      color: #243f49;
      padding: 12px 14px;
      font-size: 14px;
    }

    .gallery-message--warning,
    .gallery-message--error {
      border-color: #ead6b8;
      background: #fff8ed;
      color: #6d4514;
    }

    .gallery-folder-tabs {
      display: flex;
      gap: 10px;
      margin-bottom: 24px;
      border-bottom: 1px solid #e8ecef;
      overflow-x: auto;
    }

    .gallery-folder-tab {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      border-bottom: 2px solid transparent;
      color: #6b7280;
      padding: 0 4px 14px;
      text-decoration: none;
      white-space: nowrap;
    }

    .gallery-folder-tab span {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .gallery-folder-tab strong {
      min-width: 28px;
      border-radius: 999px;
      background: #eef3f5;
      color: #31515e;
      padding: 3px 8px;
      font-size: 12px;
      text-align: center;
    }

    .gallery-folder-tab--active {
      border-color: #567C8D;
      color: #111827;
    }

    .gallery-folder-toolbar {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 18px;
    }

    .gallery-folder-toolbar p {
      margin: 0 0 6px;
      color: #567C8D;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.16em;
      line-height: 1;
      text-transform: uppercase;
    }

    .gallery-folder-toolbar h2 {
      margin: 0;
      color: #101820;
      font-size: 24px;
      font-weight: 650;
      letter-spacing: 0;
      line-height: 1.15;
    }

    .gallery-folder-form {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 0;
    }

    .gallery-folder-form input {
      width: min(260px, 42vw);
      min-height: 40px;
      border: 1px solid #d9e2e6;
      border-radius: 8px;
      background: #fff;
      color: #101820;
      padding: 0 12px;
      font-size: 14px;
      outline: none;
    }

    .gallery-folder-form input:focus {
      border-color: #567C8D;
      box-shadow: 0 0 0 3px rgba(86, 124, 141, 0.16);
    }

    .gallery-folder-form button {
      min-height: 40px;
      border: 1px solid #567C8D;
      border-radius: 8px;
      background: #567C8D;
      color: #fff;
      padding: 0 12px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
    }

    .gallery-folder-list {
      display: flex;
      gap: 8px;
      margin-bottom: 22px;
      overflow-x: auto;
      padding-bottom: 2px;
    }

    .gallery-folder-pill {
      display: inline-flex;
      min-height: 40px;
      align-items: center;
      gap: 9px;
      border: 1px solid #d9e2e6;
      border-radius: 999px;
      background: #fff;
      color: #4b5563;
      padding: 0 12px;
      text-decoration: none;
      white-space: nowrap;
    }

    .gallery-folder-pill span {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.04em;
    }

    .gallery-folder-pill strong {
      min-width: 24px;
      border-radius: 999px;
      background: #eef3f5;
      color: #31515e;
      padding: 2px 7px;
      font-size: 12px;
      text-align: center;
    }

    .gallery-folder-pill--active {
      border-color: #567C8D;
      background: #f6fafb;
      color: #101820;
    }

    .gallery-subfolder-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 22px;
    }

    .gallery-subfolder-card {
      display: grid;
      gap: 8px;
      border: 1px solid #e6eaee;
      border-radius: 8px;
      background: #fff;
      color: #101820;
      padding: 16px;
      text-decoration: none;
      box-shadow: 0 12px 30px rgba(18, 32, 41, 0.06);
    }

    .gallery-subfolder-icon {
      display: flex;
      width: 38px;
      height: 38px;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      background: #eef3f5;
      color: #567C8D;
    }

    .gallery-subfolder-icon svg {
      width: 22px;
      height: 22px;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .gallery-subfolder-card span:not(.gallery-subfolder-icon) {
      font-size: 15px;
      font-weight: 700;
      line-height: 1.2;
    }

    .gallery-subfolder-card strong {
      color: #6b7280;
      font-size: 13px;
      font-weight: 500;
    }

    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
    }

    .gallery-card {
      display: grid;
      overflow: hidden;
      border: 1px solid #e6eaee;
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 16px 42px rgba(18, 32, 41, 0.08);
    }

    .gallery-card-media {
      aspect-ratio: 4 / 3;
      background: #f3f5f7;
      overflow: hidden;
    }

    .gallery-card-media img,
    .gallery-card-media video {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .gallery-card-copy {
      padding: 16px 16px 10px;
    }

    .gallery-card-copy p {
      margin: 0 0 8px;
      color: #567C8D;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      font-size: 10px;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .gallery-card-copy h2 {
      margin: 0 0 7px;
      color: #101820;
      font-size: 17px;
      font-weight: 650;
      letter-spacing: 0;
      line-height: 1.2;
    }

    .gallery-card-copy span {
      display: block;
      color: #6b7280;
      font-size: 13px;
      line-height: 1.35;
    }

    .gallery-card-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      border-top: 1px solid #edf0f2;
      padding: 12px 16px 16px;
    }

    .gallery-card-actions form {
      margin: 0;
    }

    .gallery-card-link,
    .gallery-card-delete {
      display: inline-flex;
      min-height: 36px;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      padding: 0 12px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      line-height: 1;
      text-decoration: none;
      text-transform: uppercase;
    }

    .gallery-card-link {
      border: 1px solid #d2dde2;
      color: #31515e;
    }

    .gallery-card-delete {
      border: 1px solid #ead6d6;
      background: #fff;
      color: #9f2d2d;
      cursor: pointer;
    }

    .gallery-empty {
      display: grid;
      min-height: 320px;
      place-items: center;
      border: 1px dashed #d7dee3;
      border-radius: 8px;
      background: #f8fafb;
      padding: 40px 20px;
      text-align: center;
    }

    .gallery-empty-icon {
      display: flex;
      width: 58px;
      height: 58px;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      background: #eef3f5;
      color: #567C8D;
    }

    .gallery-empty-icon svg {
      width: 28px;
      height: 28px;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .gallery-empty h2 {
      margin: 18px 0 8px;
      color: #101820;
      font-size: 22px;
      font-weight: 650;
      letter-spacing: 0;
    }

    .gallery-empty p {
      margin: 0;
      color: #6b7280;
      font-size: 14px;
    }

    @media (max-width: 900px) {
      .gallery-shell {
        padding: 132px 20px 44px;
      }

      .gallery-heading {
        margin-bottom: 28px;
      }

      #gallery-title {
        font-size: 42px;
      }

      .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .gallery-subfolder-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 640px) {
      .gallery-heading {
        flex-direction: column;
        gap: 18px;
      }

      .gallery-actions {
        width: 100%;
        justify-content: stretch;
        padding-top: 0;
      }

      .gallery-new-button {
        flex: 1;
        min-width: 0;
      }

      #gallery-title {
        font-size: 36px;
      }

      .gallery-grid {
        grid-template-columns: 1fr;
      }

      .gallery-folder-toolbar {
        align-items: stretch;
        flex-direction: column;
      }

      .gallery-folder-form {
        align-items: stretch;
        flex-direction: column;
      }

      .gallery-folder-form input {
        width: 100%;
      }

      .gallery-subfolder-grid {
        grid-template-columns: 1fr;
      }

      .gallery-card-actions {
        align-items: stretch;
        flex-direction: column;
      }

      .gallery-card-link,
      .gallery-card-delete {
        width: 100%;
      }
    }

/* Luxury UI pass */
body {
  background:
    linear-gradient(180deg, #fbfaf7 0%, #f2f4f4 48%, #f7f4ee 100%);
  color: var(--luxury-ink);
}

.luxury-header {
  border-bottom: 1px solid rgba(18, 19, 20, 0.08);
  background: rgba(252, 250, 246, 0.84) !important;
  box-shadow: 0 18px 45px rgba(18, 22, 26, 0.045);
  backdrop-filter: blur(22px) saturate(1.08);
}

.luxury-header img {
  filter: contrast(1.08);
}

.home-hero {
  height: auto !important;
  min-height: 92svh;
  align-items: center;
  background: #f7f4ee;
  padding: 8rem 1.5rem 7rem;
  isolation: isolate;
}

.home-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.36;
  filter: saturate(0.82) contrast(1.08);
}

.home-hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(247, 244, 238, 0.96) 0%, rgba(247, 244, 238, 0.78) 34%, rgba(247, 244, 238, 0.62) 100%),
    linear-gradient(180deg, rgba(247, 244, 238, 0.28) 0%, rgba(32, 35, 38, 0.08) 100%);
}

.home-hero__frame {
  position: absolute;
  inset: 6.7rem 2rem 3.4rem;
  z-index: 2;
  border: 1px solid rgba(17, 19, 21, 0.11);
  pointer-events: none;
}

.home-hero > .relative.z-10 {
  width: 100%;
}

.home-hero h1 {
  color: #111315;
  letter-spacing: 0 !important;
  text-wrap: balance;
}

.home-hero h1 span,
.home-hero .text-primary {
  color: #476d7d;
}

.home-hero p {
  color: rgba(17, 19, 21, 0.68);
}

.home-hero #homeUploadButton {
  border: 1px solid rgba(17, 19, 21, 0.9);
  border-radius: 999px;
  background: #111315;
  color: #fbfaf7;
  box-shadow: 0 22px 60px rgba(17, 19, 21, 0.18);
}

.home-hero #homeUploadButton:hover {
  background: #202326;
}

.home-hero a[href$="/image/"],
.home-hero a[href*="image"] {
  border-bottom: 1px solid rgba(17, 19, 21, 0.22);
  color: #111315;
}

.home-hero__proof {
  position: absolute;
  z-index: 4;
  left: 2rem;
  right: 2rem;
  bottom: 3.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  color: rgba(17, 19, 21, 0.56);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-hero__proof span {
  border-left: 1px solid rgba(17, 19, 21, 0.18);
  padding-left: 1rem;
}

.home-hero__proof span:first-child {
  border-left: 0;
  padding-left: 0;
}

.home-hero__scroll {
  display: none;
}

.studio-shell {
  background:
    linear-gradient(180deg, #f8f6f1 0%, #eef2f2 54%, #f7f4ee 100%);
}

.studio-workspace {
  gap: 1.25rem;
}

.studio-surface,
.entitlement-panel {
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 8px !important;
  background: rgba(252, 250, 246, 0.78);
  box-shadow: 0 28px 70px rgba(17, 19, 21, 0.08);
  backdrop-filter: blur(22px) saturate(1.04);
}

.entitlement-panel {
  background: rgba(252, 250, 246, 0.7);
  padding: 0.75rem 0.9rem;
}

.entitlement-panel__item {
  border-left: 1px solid rgba(86, 124, 141, 0.42);
}

.studio-side-panel {
  box-shadow: 0 20px 60px rgba(17, 19, 21, 0.07);
}

.studio-section {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  padding: 1rem;
}

.studio-section + .studio-section {
  border-top: 1px solid rgba(17, 19, 21, 0.08);
}

.studio-command-bar {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.studio-topbar {
  align-items: stretch;
  border: 1px solid rgba(17, 19, 21, 0.1);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.82);
  padding: 1rem;
  box-shadow: 0 20px 50px rgba(17, 19, 21, 0.07);
}

.studio-topbar > .space-y-1 {
  text-align: center;
}

.studio-topbar h1 {
  color: #111315;
  font-weight: 600;
}

.studio-command-tab,
.studio-command-toggle {
  flex-basis: auto;
}

.studio-command-tab {
  width: auto;
  min-width: 7.25rem;
  height: 38px;
  min-height: 38px;
  border-radius: 999px;
  border-color: rgba(17, 19, 21, 0.1);
  background: rgba(255, 255, 255, 0.58);
  color: rgba(17, 19, 21, 0.74);
  box-shadow: none;
}

.studio-command-tab:hover:not(:disabled) {
  border-color: rgba(168, 135, 88, 0.48);
  color: #111315;
  background: #fff;
}

.studio-command-tab.studio-action-btn--primary,
.studio-command-toggle__input:checked + .studio-command-toggle__surface {
  border-color: #111315;
  background: #111315;
  color: #f8f6f1;
  box-shadow: 0 18px 36px rgba(17, 19, 21, 0.18);
  transform: translateY(-1px);
}

.studio-command-tab:disabled,
.studio-action-btn--primary:disabled,
.studio-command-tab.studio-action-btn--primary:disabled {
  border-color: rgba(17, 19, 21, 0.08);
  background: rgba(255, 255, 255, 0.42);
  color: rgba(17, 19, 21, 0.32);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.studio-command-tab:disabled .studio-action-btn__icon,
.studio-action-btn--primary:disabled .studio-action-btn__icon {
  color: rgba(17, 19, 21, 0.28);
}

.studio-action-btn:not(.studio-action-btn--primary) .studio-action-btn__icon,
.studio-command-toggle__input:checked + .studio-command-toggle__surface .studio-action-btn__icon,
.studio-tool-toggle__icon,
.studio-range-control__icon {
  color: #567c8d;
}

.studio-preview {
  border-color: rgba(17, 19, 21, 0.16);
  background-color: #17191b;
  box-shadow: 0 40px 95px rgba(17, 19, 21, 0.2);
}

.studio-checkerboard {
  background-color: #17191b;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    radial-gradient(circle at center, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.16) 58%, rgba(0, 0, 0, 0.32) 100%);
  background-position: 0 0, 0 11px, 11px -11px, -11px 0, center;
  background-size: 22px 22px, 22px 22px, 22px 22px, 22px 22px, 100% 100%;
}

.studio-preview #uploadPlaceholder {
  color: #f8f6f1;
}

.studio-preview #uploadPlaceholder .bg-muted {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.studio-preview #uploadPlaceholder .text-foreground {
  color: #f8f6f1;
}

.studio-preview #uploadPlaceholder .text-muted-foreground {
  color: rgba(248, 246, 241, 0.58);
}

.studio-tool-toggle__content,
.remove-bg-toggle__content,
.studio-range-control,
.studio-toggle-row,
.plain-bg-panel,
.plain-bg-control select,
.studio-chip {
  border-color: rgba(17, 19, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.studio-tool-toggle__icon,
.studio-range-control__icon,
.remove-bg-toggle__icon {
  border-radius: 8px;
  border-color: rgba(17, 19, 21, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.studio-tool-toggle__input:checked + .studio-tool-toggle__content,
.studio-range-control.is-active,
.remove-bg-toggle .studio-icon-toggle__input:checked + .remove-bg-toggle__content {
  border-color: rgba(168, 135, 88, 0.5);
  background: rgba(255, 255, 255, 0.72);
  color: #111315;
  box-shadow: inset 0 0 0 1px rgba(168, 135, 88, 0.16), 0 16px 34px rgba(17, 19, 21, 0.08);
}

.plain-bg-swatch {
  overflow: hidden;
  border-radius: 8px;
  border-color: rgba(17, 19, 21, 0.12);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--plain-bg-color), white 24%) 0%,
      var(--plain-bg-color) 57%,
      color-mix(in srgb, var(--plain-bg-color), black 22%) 100%
    );
  box-shadow: inset 0 -18px 28px rgba(17, 19, 21, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.plain-bg-swatch::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 10%;
  height: 24%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
}

.plain-bg-swatch::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 57%;
  height: 1px;
  background: rgba(17, 19, 21, 0.12);
}

.plain-bg-swatch.is-active {
  border-color: #111315;
  box-shadow: 0 0 0 2px rgba(168, 135, 88, 0.34), inset 0 -18px 28px rgba(17, 19, 21, 0.16);
}

.studio-modal,
.studio-save-modal__panel {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(17, 19, 21, 0.96);
  box-shadow: 0 0 0 100vmax rgba(17, 19, 21, 0.58), 0 34px 95px rgba(0, 0, 0, 0.38);
}

.gallery-page {
  background:
    linear-gradient(180deg, #fbfaf7 0%, #f2f4f4 52%, #f7f4ee 100%);
  color: #111315;
}

.gallery-shell {
  max-width: 1500px;
  margin: 0 auto;
  padding-top: 132px;
}

.gallery-heading {
  min-height: 11rem;
  align-items: center;
  border-bottom: 1px solid rgba(17, 19, 21, 0.1);
}

.gallery-kicker,
.studio-section__eyebrow,
.studio-range-control__header,
.plain-bg-panel__header,
.plain-bg-control span {
  color: #567c8d;
}

#gallery-title {
  color: #111315;
  font-size: 60px;
  line-height: 0.95;
}

.gallery-new-button,
.gallery-folder-form button {
  border-color: #111315;
  border-radius: 999px;
  background: #111315;
  color: #f8f6f1;
}

.gallery-new-button--secondary {
  border-color: rgba(17, 19, 21, 0.16);
  background: rgba(252, 250, 246, 0.7);
  color: #111315;
}

.gallery-folder-tabs {
  border-bottom-color: rgba(17, 19, 21, 0.1);
}

.gallery-folder-tab--active {
  border-color: #a88758;
}

.gallery-folder-pill,
.gallery-subfolder-card,
.gallery-card,
.gallery-empty,
.gallery-message {
  border-color: rgba(17, 19, 21, 0.1);
  border-radius: 8px;
  background: rgba(252, 250, 246, 0.72);
  box-shadow: 0 24px 60px rgba(17, 19, 21, 0.08);
}

.gallery-card {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 135, 88, 0.42);
  box-shadow: 0 34px 80px rgba(17, 19, 21, 0.13);
}

.gallery-card-media {
  background: #202326;
}

.gallery-card-actions {
  border-top-color: rgba(17, 19, 21, 0.08);
}

.gallery-card-link,
.gallery-card-delete,
.gallery-folder-form input,
.studio-save-select,
.studio-save-input,
.studio-save-option,
.studio-save-modal__close {
  border-radius: 8px;
}

@media (min-width: 1280px) {
  .studio-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .studio-topbar > .space-y-1 {
    text-align: left;
  }

  .studio-topbar__group {
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  html,
  body,
  #root {
    overflow-x: hidden;
  }

  .luxury-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .luxury-header > a {
    min-width: 0;
  }

  .luxury-header > a img {
    width: auto !important;
    max-width: 34vw;
    height: 3.35rem !important;
    object-fit: contain;
  }

  .luxury-header > .pointer-events-auto.flex {
    justify-self: end;
    flex-shrink: 0;
    gap: 0.5rem;
    max-width: calc(100vw - 9rem);
  }

  .luxury-header > .pointer-events-auto.flex > a[href*="signin"] {
    display: none;
  }

  .luxury-header a[href*="signin"],
  .luxury-header form button {
    justify-content: center;
    width: 58px;
    min-width: 58px;
    min-height: 40px;
    padding-left: 0;
    padding-right: 0;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  #openMenu {
    position: relative;
    order: -1;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    overflow: hidden;
    border: 1px solid rgba(17, 19, 21, 0.18);
    border-radius: 999px;
    padding: 0;
    font-size: 0;
    letter-spacing: 0;
  }

  #openMenu::before {
    content: "";
    width: 16px;
    height: 1px;
    background: currentColor;
    box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
  }

  .home-hero {
    min-height: 90svh;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 7rem;
    padding-bottom: 6rem;
  }

  .home-hero > .relative.z-10 {
    max-width: 100%;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
  }

  .home-hero h1 {
    font-size: clamp(2.1rem, 9vw, 2.7rem);
    line-height: 1.08;
  }

  .home-hero h1 span {
    display: block;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero h1 + p {
    max-width: 20.5rem;
    font-size: 0.94rem;
  }

  .home-hero__frame {
    inset: 5.7rem 1rem 2.6rem;
  }

  .home-hero__proof {
    display: none;
  }

  .studio-command-tab {
    min-width: 6.75rem;
  }

  #gallery-title {
    font-size: 42px;
  }
}

.luxury-footer {
  background: rgba(252, 250, 246, 0.72);
  color: #111315;
}

.luxury-footer,
.luxury-footer .border-t {
  border-color: rgba(17, 19, 21, 0.1);
}

.pricing-page,
.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fbfaf7 0%, #eef2f2 52%, #f7f4ee 100%);
  color: #111315;
}

.pricing-shell {
  background:
    linear-gradient(180deg, rgba(251, 250, 247, 0.96) 0%, rgba(238, 242, 242, 0.82) 52%, rgba(247, 244, 238, 0.96) 100%);
}

.pricing-hero {
  position: relative;
  min-height: 31rem;
  overflow: hidden;
  padding: 10.5rem 0 5.5rem;
  isolation: isolate;
}

.pricing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("https://media.base44.com/images/public/69c3cb15653733a3dab284cc/9dbd9ad35_generated_54c2350e.png");
  background-position: center;
  background-size: cover;
  opacity: 0.22;
  filter: saturate(0.76) contrast(1.05);
}

.pricing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 244, 238, 0.98) 0%, rgba(247, 244, 238, 0.84) 42%, rgba(247, 244, 238, 0.64) 100%),
    linear-gradient(180deg, rgba(17, 19, 21, 0.02) 0%, rgba(17, 19, 21, 0.08) 100%);
}

.pricing-hero__frame {
  position: absolute;
  inset: 6.7rem 2rem 2.5rem;
  border: 1px solid rgba(17, 19, 21, 0.1);
  pointer-events: none;
}

.pricing-kicker {
  margin: 0 0 1rem;
  color: #567c8d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.pricing-hero__copy h1 {
  margin: 0;
  color: #111315;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.96;
  text-wrap: balance;
}

.pricing-hero__copy > p:last-child {
  max-width: 41rem;
  margin: 1.5rem 0 0;
  color: rgba(17, 19, 21, 0.68);
  font-size: 1.05rem;
  line-height: 1.75;
}

.pricing-page [data-billing-toggle] {
  border-color: rgba(17, 19, 21, 0.1);
  border-radius: 999px;
  background: rgba(252, 250, 246, 0.76);
  box-shadow: 0 20px 50px rgba(17, 19, 21, 0.08);
  backdrop-filter: blur(18px);
}

.pricing-page [data-billing-mode] {
  border-radius: 999px;
}

.pricing-page [data-billing-mode][aria-selected="true"] {
  background: #111315 !important;
  color: #f8f6f1 !important;
  box-shadow: 0 16px 34px rgba(17, 19, 21, 0.18);
}

.pricing-page .pricing-plan-card {
  border-color: rgba(17, 19, 21, 0.1) !important;
  border-radius: 8px !important;
  background: rgba(252, 250, 246, 0.78) !important;
  box-shadow: 0 28px 70px rgba(17, 19, 21, 0.08) !important;
  backdrop-filter: blur(22px) saturate(1.04);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pricing-page .pricing-plan-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 135, 88, 0.44) !important;
  box-shadow: 0 38px 88px rgba(17, 19, 21, 0.13) !important;
}

.pricing-page .pricing-plan-card[data-plan-variant="featured"] {
  border-color: #111315 !important;
  background: #111315 !important;
  color: #f8f6f1 !important;
}

.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-title,
.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-price,
.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-strong {
  color: #f8f6f1 !important;
}

.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-muted,
.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-copy {
  color: rgba(248, 246, 241, 0.68) !important;
}

.pricing-page .pricing-plan-title,
.pricing-page .pricing-plan-price,
.pricing-page .pricing-plan-strong {
  color: #111315 !important;
  letter-spacing: 0;
}

.pricing-page .pricing-plan-muted,
.pricing-page .pricing-plan-copy {
  color: rgba(17, 19, 21, 0.62) !important;
}

.pricing-page .pricing-plan-divider {
  border-color: rgba(17, 19, 21, 0.1) !important;
}

.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-divider {
  border-color: rgba(248, 246, 241, 0.14) !important;
}

.pricing-page select,
.pricing-page .pricing-plan-button,
.pricing-page #subscribe-modal button,
.pricing-page #subscribe-modal a {
  border-radius: 8px !important;
}

.pricing-page select {
  border-color: rgba(17, 19, 21, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.72) !important;
}

.pricing-page .pricing-plan-button,
.pricing-page #subscribe-modal-cta,
.pricing-page a[href^="mailto:"].bg-zinc-950 {
  border: 1px solid #111315 !important;
  background: #111315 !important;
  color: #f8f6f1 !important;
  box-shadow: 0 18px 40px rgba(17, 19, 21, 0.16);
}

.pricing-page .pricing-plan-card[data-plan-variant="featured"] .pricing-plan-button {
  border-color: #f8f6f1 !important;
  background: #f8f6f1 !important;
  color: #111315 !important;
}

.pricing-page section.border-y,
.pricing-page .mt-8.overflow-hidden.rounded-3xl,
.pricing-page #pricing-enterprise > div,
.pricing-page #subscribe-modal > div,
.pricing-page .rounded-3xl.bg-zinc-100 {
  border-color: rgba(17, 19, 21, 0.1) !important;
  border-radius: 8px !important;
  background: rgba(252, 250, 246, 0.76) !important;
  box-shadow: 0 28px 70px rgba(17, 19, 21, 0.08);
}

.pricing-page details {
  border-color: rgba(17, 19, 21, 0.1) !important;
}

.pricing-page details summary,
.pricing-page h2,
.pricing-page h3,
.pricing-page h4 {
  color: #111315 !important;
  letter-spacing: 0;
}

.pricing-page .rounded-full.bg-amber-300,
.pricing-page .inline-flex.h-5.w-5.bg-amber-300 {
  background: #d9c39b !important;
  color: #111315 !important;
}

.auth-shell {
  position: relative;
  overflow: hidden;
  padding: 10.5rem 1rem 5rem;
  isolation: isolate;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("https://media.base44.com/images/public/69c3cb15653733a3dab284cc/13cbf9da1_generated_31ba3a61.png");
  background-position: center;
  background-size: cover;
  opacity: 0.16;
  filter: saturate(0.78) contrast(1.04);
}

.auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 244, 238, 0.96) 0%, rgba(247, 244, 238, 0.82) 48%, rgba(238, 242, 242, 0.78) 100%),
    linear-gradient(180deg, rgba(17, 19, 21, 0.01), rgba(17, 19, 21, 0.07));
}

.auth-page .auth-shell > .text-center {
  position: relative;
  z-index: 1;
}

.auth-page .auth-shell > .text-center h1 {
  color: #111315 !important;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  text-wrap: balance;
}

.auth-page .auth-shell > .text-center p {
  color: rgba(17, 19, 21, 0.62) !important;
  line-height: 1.7;
}

.auth-page .auth-shell > .w-full {
  position: relative;
  z-index: 1;
}

.auth-page .auth-shell > .w-full > .bg-white {
  border-color: rgba(17, 19, 21, 0.1) !important;
  border-radius: 8px !important;
  background: rgba(252, 250, 246, 0.82) !important;
  box-shadow: 0 34px 86px rgba(17, 19, 21, 0.13) !important;
  backdrop-filter: blur(24px) saturate(1.04);
}

.auth-page .auth-shell .flex.border-b {
  border-color: rgba(17, 19, 21, 0.1) !important;
}

.auth-page .auth-shell .flex.border-b a {
  color: rgba(17, 19, 21, 0.58) !important;
}

.auth-page .auth-shell .flex.border-b a.border-primary {
  border-color: #a88758 !important;
  color: #111315 !important;
}

.auth-page .auth-shell label {
  color: rgba(17, 19, 21, 0.76) !important;
}

.auth-page .auth-shell input[type="email"],
.auth-page .auth-shell input[type="password"] {
  min-height: 44px;
  border-color: rgba(17, 19, 21, 0.14) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.68) !important;
  color: #111315;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-page .auth-shell input[type="email"]:focus,
.auth-page .auth-shell input[type="password"]:focus {
  border-color: rgba(86, 124, 141, 0.78) !important;
  box-shadow: 0 0 0 3px rgba(86, 124, 141, 0.16) !important;
}

.auth-page .auth-shell input[type="checkbox"] {
  accent-color: #567c8d;
}

.auth-page .auth-shell button[type="submit"],
.auth-page .auth-shell [data-firebase-google-auth] {
  min-height: 44px;
  border-radius: 8px !important;
}

.auth-page .auth-shell button[type="submit"] {
  border: 1px solid #111315 !important;
  background: #111315 !important;
  color: #f8f6f1 !important;
  box-shadow: 0 18px 40px rgba(17, 19, 21, 0.16);
}

.auth-page .auth-shell [data-firebase-google-auth] {
  border-color: rgba(17, 19, 21, 0.12) !important;
  background: rgba(255, 255, 255, 0.56);
  color: #111315;
}

.auth-page .auth-shell [data-firebase-google-auth]:hover {
  border-color: rgba(168, 135, 88, 0.42) !important;
  background: rgba(255, 255, 255, 0.82);
}

.auth-page .auth-shell .border-red-200 {
  border-color: rgba(159, 45, 45, 0.22) !important;
  border-radius: 8px !important;
  background: rgba(255, 245, 245, 0.88) !important;
}

.auth-page .auth-shell .rounded-xl.border-gray-200 {
  border-color: rgba(17, 19, 21, 0.1) !important;
  border-radius: 8px !important;
  background: rgba(252, 250, 246, 0.86) !important;
}

@media (max-width: 767px) {
  .pricing-hero {
    min-height: 26rem;
    padding: 8.25rem 0 3.75rem;
  }

  .pricing-hero__frame {
    inset: 5.7rem 1rem 1.7rem;
  }

  .pricing-hero__copy h1 {
    font-size: clamp(2.45rem, 12vw, 3.5rem);
  }

  .pricing-hero__copy > p:last-child {
    max-width: 22rem;
    font-size: 0.95rem;
  }

  .pricing-page [data-billing-toggle] {
    width: 100%;
    justify-content: center;
  }

  .pricing-page [data-billing-mode] {
    flex: 1 1 0;
    justify-content: center;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .auth-shell {
    padding-top: 8.5rem;
    padding-bottom: 3.5rem;
  }

  .auth-page .auth-shell > .text-center h1 {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .luxury-footer .flex.gap-16 {
    flex-direction: column;
    gap: 2rem;
  }
}
