:root {
  --color-brand-50: #f5f3ff;
  --color-brand-200: #ddd6fe;
  --color-brand-300: #c4b5fd;
  --color-brand-400: #b47cff;
  --color-brand-600: #7c3aed;
  --color-brand-700: #6d28d9;
}

html,
body {
  height: 100%;
  max-width: 100%;
  overflow-x-hidden;
}

.brand-gradient {
  background-image: linear-gradient(95deg, #7c3aed, #b47cff) !important;
}

.brand-text {
  background: linear-gradient(135deg, #7c3aed, #b47cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-brand-700 {
  color: #6d28d9 !important;
}

.bg-brand-200 {
  background-color: #ddd6fe !important;
}

.bg-brand-300 {
  background-color: #c4b5fd !important;
}

/* Content studio: workspace fits a laptop without zooming out */
.gb-shell {
  display: flex;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: #f4f6f9;
}

.gb-sidebar {
  display: flex;
  width: 220px;
  flex-shrink: 0;
  flex-direction: column;
  border-right: 1px solid #e9edf2;
  background: rgba(255, 255, 255, 0.97);
  padding: 16px 12px;
}

.gb-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.gb-topbar {
  display: none;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e9edf2;
  background: #fff;
  padding: 8px 12px;
}

.gb-workspace {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 12px 14px 16px;
}

.gb-footer {
  flex-shrink: 0;
  border-top: 1px solid #e9edf2;
  background: #fff;
  padding: 8px 14px;
}

.gb-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(26, 26, 46, 0.35);
}

.gb-workspace-editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gb-editor {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.gb-workspace-editor .gb-editor {
  flex: 1;
  min-height: 0;
}

.gb-editor-body {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding-bottom: 12px;
}

.gb-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e9edf2;
  background: #f4f6f9;
  padding: 10px 0 4px;
  overflow: visible;
  pointer-events: auto;
}

.gb-editor-actions .gb-btn {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.gb-editor-status {
  flex: 1 1 100%;
  margin: 0;
  min-height: 1.2em;
  font-size: 0.875rem;
  font-weight: 600;
  color: #dc2626;
}

.gb-editor-status.is-busy {
  color: #6d28d9;
}

.gb-editor-status.is-ok {
  color: #047857;
}

.gb-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gb-preview img,
.gb-preview-img {
  max-height: 180px;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
}

.gb-media-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.gb-media-item {
  position: relative;
  width: 92px;
}

.gb-media-item-on .gb-media-thumb {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.gb-media-thumb {
  position: relative;
  display: block;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid #e9edf2;
  background: #fff;
  padding: 0;
}

.gb-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gb-media-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  height: 18px;
  width: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.gb-media-del {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
}

.gb-media-del:hover {
  background: #ea580c;
}

.gb-media-del-link {
  color: #ea580c !important;
}

.gb-media-meta {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gb-media-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #64748b;
}

@media (max-width: 767px) {
  .gb-workspace-editor .gb-editor-body {
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 150px);
  }

  .gb-workspace-editor .gb-editor-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    margin: 0;
    padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
    box-shadow: 0 -8px 24px rgba(26, 26, 46, 0.12);
    pointer-events: auto;
  }

  .gb-workspace-editor .gb-cal-dock {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 108px);
  }
}

@media (max-width: 767px) {
  .gb-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .gb-sidebar.open {
    transform: translateX(0);
  }

  .gb-topbar {
    display: flex;
  }
}

@media (min-width: 768px) {
  .w-\[250px\] {
    width: 220px;
  }
}

.gb-dash-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .gb-dash-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.gb-dash-card {
  border: 1px solid #e9edf2;
  border-radius: 20px;
  background: #fff;
  padding: 18px;
}

.gb-dash-bot {
  width: 100%;
  text-align: left;
  border: 1px solid #e9edf2;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px 14px;
}

.gb-dash-bot.open,
.gb-dash-bot:hover {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.gb-mock-page {
  height: 100%;
  background: #eceff3;
}

.gb-mock-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 10px;
  background: #fff;
  border-bottom: 1px solid #e9edf2;
}

.gb-mock-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gb-mock-tab {
  border: 1px solid #e9edf2;
  background: #fff;
  color: #3d4a5c;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gb-mock-tab.on {
  border-color: transparent;
  background: linear-gradient(95deg, #7c3aed, #b47cff);
  color: #fff;
}

.gb-mock-note {
  margin: 0;
  padding: 8px 18px 0;
  font-size: 12px;
  color: #3d4a5c;
}

.gb-mock-stage {
  padding: 12px 18px 18px;
  height: calc(100vh - 92px);
  min-height: 520px;
}

.gb-mock-frame {
  height: 100%;
  border: 1px solid #e9edf2;
  border-radius: 16px;
  overflow: hidden;
  background: #f4f6f9;
  display: flex;
  flex-direction: column;
}

.gb-mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e9edf2;
}

.gb-mock-body {
  display: flex;
  min-height: 0;
  flex: 1;
}

.gb-mock-side {
  width: 200px;
  flex-shrink: 0;
  padding: 12px;
  background: #fff;
  border-right: 1px solid #e9edf2;
}

.gb-mock-side.narrow {
  width: 168px;
}

.gb-mock-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 18px;
}

.gb-mock-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #3d4a5c;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.gb-mock-item.on {
  background: #f5f3ff;
  color: #7c3aed;
  font-weight: 700;
}

.gb-mock-tile {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e9edf2;
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
}

.gb-mock-tile:hover,
.gb-mock-tile.on {
  border-color: #c4b5fd;
  background: #faf8ff;
}

.gb-mock-tile.hero {
  padding: 22px;
  min-height: 140px;
}

/* Lab: №41 shine on hover; selected = A7 running frame + №1 rainbow */
.gb-pick-row {
  display: grid;
  gap: 14px;
  padding: 8px 6px 18px;
}

@media (min-width: 768px) {
  .gb-pick-row {
    grid-template-columns: 1fr 1fr;
  }
}

.gb-pick-shine {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 22px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgb(146, 148, 248);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  z-index: 0;
  cursor: pointer;
}

.gb-pick-shine:hover:not(.on) {
  box-shadow: 1px 1px 25px 10px rgba(146, 148, 248, 0.4);
}

.gb-pick-shine:not(.on)::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(146, 148, 248, 0.4),
    transparent
  );
  transition: all 650ms;
  pointer-events: none;
}

.gb-pick-shine:not(.on):hover::before {
  left: 100%;
}

.gb-pick-shine.on {
  border-color: transparent;
  box-shadow: none;
}

.gb-pick-shine.on::before {
  content: "";
  position: absolute;
  z-index: -2;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: conic-gradient(
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  animation: gb-pick-spin 2.4s linear infinite;
  pointer-events: none;
}

.gb-pick-shine.on::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #fff;
  border-radius: 12px;
  z-index: -1;
  pointer-events: none;
}

.gb-pick-shine:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 3px;
}

.gb-pick-shine > * {
  position: relative;
  z-index: 1;
}

@keyframes gb-pick-spin {
  to {
    transform: rotate(1turn);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gb-pick-shine:not(.on)::before {
    transition: none;
  }
  .gb-pick-shine.on::before {
    animation: none;
  }
}

.gb-mock-chip {
  display: inline-block;
  border: 1px solid #e9edf2;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #3d4a5c;
  background: #fff;
}

.gb-mock-seg {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: #f0f2f5;
}

.gb-mock-seg button {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: #3d4a5c;
  cursor: pointer;
}

.gb-mock-seg button.on {
  background: #fff;
  color: #7c3aed;
}

.gb-mock-seg a {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  background: transparent;
  color: #3d4a5c;
  text-decoration: none;
}

.gb-mock-seg a.on {
  background: #fff;
  color: #7c3aed;
}

body.gb-apps-page,
body.gb-apps {
  background: #f4f6f9;
}

.gb-apps-root {
  position: sticky;
  top: 0;
  z-index: 70;
  background: #fff;
  border-bottom: 1px solid #e9edf2;
}

.gb-apps-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 8px;
}

.gb-apps-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.gb-apps-mark {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #0b0b12 url("/images/logo-goodbot.png") center / cover no-repeat;
  color: transparent;
  font-size: 0;
}

.gb-apps-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gb-apps-email {
  font-size: 12px;
  color: #3d4a5c;
}

.gb-apps-sub {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  padding: 0 16px 10px;
}

.gb-apps-link {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #3d4a5c;
  text-decoration: none;
}

.gb-apps-link:hover,
.gb-apps-link.on {
  background: #f5f3ff;
  color: #7c3aed;
}

.gb-apps-ctx {
  padding: 8px 16px 10px;
  font-size: 12px;
  color: #3d4a5c;
  background: #faf8ff;
  border-top: 1px solid #ede9fe;
}

.gb-apps-ctx a {
  margin-left: 8px;
  font-weight: 700;
  color: #7c3aed;
  text-decoration: none;
}

.gb-apps-workspace {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.gb-apps-more {
  position: relative;
}

.gb-apps-more summary {
  list-style: none;
  cursor: pointer;
  border: 1px solid #e9edf2;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #3d4a5c;
}

.gb-apps-more summary::-webkit-details-marker {
  display: none;
}

.gb-apps-more-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  min-width: 220px;
  padding: 8px;
  border: 1px solid #e9edf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(61, 74, 92, 0.12);
}

.gb-apps-more-list a,
.gb-apps-more-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #3d4a5c;
  text-decoration: none;
  cursor: pointer;
}

.gb-apps-more-list a:hover,
.gb-apps-more-list button:hover {
  background: #f5f3ff;
  color: #7c3aed;
}

body.gb-apps .gb-content-tabs {
  display: none;
}

body.gb-apps aside.w-\[250px\],
body.gb-apps aside.fixed.inset-y-0.left-0 {
  display: none !important;
}

body.gb-apps .fixed.inset-0.z-40 {
  display: none !important;
}

body.gb-apps .mb-4.flex.items-center.gap-3.md\:hidden {
  display: none !important;
}

body.gb-product {
  display: flex;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #f4f6f9;
}

body.gb-product #gb-product-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

body.gb-product #root {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

body.gb-product .gb-workspace {
  flex: 1;
}

body.gb-product .gb-content-tabs {
  display: none;
}

body.gb-product aside.w-\[250px\],
body.gb-product aside.fixed.inset-y-0.left-0.z-50 {
  display: none !important;
}

body.gb-product .fixed.inset-0.z-40 {
  display: none !important;
}

body.gb-product .mb-4.flex.items-center.gap-3.md\:hidden {
  display: none !important;
}

.gb-cal {
  position: relative;
  border: 1px solid #e9edf2;
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(61, 74, 92, 0.12);
}

.gb-cal-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  z-index: 8;
  padding-bottom: 8px;
  pointer-events: none;
}

.gb-cal-dock .gb-cal {
  pointer-events: auto;
  max-width: 360px;
  margin-left: auto;
}

.gb-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.gb-cal-month {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a2e;
}

.gb-cal-nav {
  width: 32px;
  height: 32px;
  border: 1px solid #e9edf2;
  border-radius: 999px;
  background: #fff;
  color: var(--color-brand-600);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.gb-cal-nav:hover {
  background: var(--color-brand-50);
}

.gb-cal-week,
.gb-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  justify-items: center;
}

.gb-cal-week {
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #3d4a5c;
}

.gb-cal-pad,
.gb-cal-day {
  width: 36px;
  height: 36px;
}

.gb-cal-day {
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
}

.gb-cal-day:hover {
  background: var(--color-brand-50);
  color: var(--color-brand-600);
}

.gb-cal-day.is-today {
  box-shadow: inset 0 0 0 1.5px var(--color-brand-600);
}

.gb-cal-day.is-selected,
.gb-cal-day.is-selected:hover {
  color: #fff;
  background: var(--color-brand-600);
  background-image: linear-gradient(95deg, var(--color-brand-600), var(--color-brand-400));
  box-shadow: none;
}

.gb-cal-time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.gb-cal-time select {
  width: 76px;
}

.gb-cal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.gb-cal-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Content studio: interactive buttons */
.gb-btn {
  cursor: pointer;
  border: 0;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.gb-btn:focus-visible {
  outline: 2px solid var(--color-brand-600);
  outline-offset: 2px;
}

.gb-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.gb-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.gb-btn-primary {
  color: #fff;
  background-image: linear-gradient(95deg, var(--color-brand-600), var(--color-brand-400));
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.22);
}

.gb-btn-primary:hover:not(:disabled) {
  filter: brightness(0.94);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
}

.gb-btn-secondary {
  border: 1px solid #e9edf2;
  background: #fff;
  color: var(--color-brand-600);
}

.gb-btn-secondary:hover:not(:disabled) {
  border-color: var(--color-brand-200);
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.gb-btn-muted {
  border: 1px solid #e9edf2;
  background: #fff;
  color: #3d4a5c;
}

.gb-btn-muted:hover:not(:disabled) {
  border-color: #d0d7de;
  background: #f8fafc;
  color: #1a1a2e;
}

.gb-btn-ghost {
  border: 0;
  background: transparent;
  color: #64748b;
}

.gb-btn-ghost:hover:not(:disabled) {
  background: #f0f2f5;
  color: #1a1a2e;
}

.gb-btn-danger {
  border: 0;
  background: transparent;
  color: #dc2626;
}

.gb-btn-danger:hover:not(:disabled) {
  background: #fef2f2;
}

.gb-btn-link {
  border: 0;
  background: transparent;
  color: var(--color-brand-600);
  text-decoration: underline;
  padding: 0;
}

.gb-btn-link:hover:not(:disabled) {
  color: var(--color-brand-700);
  text-decoration: none;
}

.gb-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d0d7de;
  background: #f8fafc;
  padding: 8px 12px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gb-input:hover {
  border-color: #c4b5fd;
}

.gb-input:focus {
  border-color: var(--color-brand-600);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* Branded custom select (content studio filters, editor) */
.gb-select {
  position: relative;
  width: 100%;
}

.gb-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.gb-select-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid #d0d7de;
  background: #f8fafc;
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a2e;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.gb-select-btn:hover {
  border-color: #c4b5fd;
  background: #fff;
}

.gb-select-btn[aria-expanded="true"] {
  border-color: var(--color-brand-600);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
  background: #fff;
}

.gb-select-chevron {
  color: var(--color-brand-600);
  font-size: 12px;
  line-height: 1;
}

.gb-select-menu {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #e9edf2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(61, 74, 92, 0.14);
}

.gb-select-menu.hidden {
  display: none;
}

.gb-select-option {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #3d4a5c;
  cursor: pointer;
}

.gb-select-option:hover,
.gb-select-option.is-focused {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.gb-select-option.is-selected {
  background: var(--color-brand-50);
  color: var(--color-brand-700);
}

.gb-media-thumb {
  cursor: pointer;
  transition: transform 0.12s ease, outline-color 0.15s ease;
}

.gb-media-thumb:hover {
  transform: scale(1.03);
}

.gb-media-thumb:active {
  transform: scale(0.98);
}

.gb-preview-wrap {
  position: relative;
  display: inline-block;
}

.gb-preview-edit {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(26, 26, 46, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.gb-preview-del {
  position: absolute;
  left: 6px;
  top: 6px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
  padding: 0;
  cursor: pointer;
}

.gb-pe {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  background: #12121a;
  color: #fff;
}

.gb-pe[hidden] {
  display: none;
}

.gb-pe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px calc(8px + env(safe-area-inset-top, 0px));
  background: #1a1a2e;
}

.gb-pe-title {
  font-size: 15px;
  font-weight: 800;
}

.gb-pe-bar .gb-btn {
  min-height: 40px;
}

.gb-pe-icon-del {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.gb-pe-stage {
  position: relative;
  flex: 1;
  min-height: 220px;
  overflow: hidden;
  touch-action: none;
  background: #0b0b12;
}

.gb-pe-stage canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
}

.gb-pe-texts {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.gb-pe-t {
  position: absolute;
  z-index: 2;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  max-width: 90%;
  padding: 4px 8px;
  border: 1px dashed transparent;
  border-radius: 8px;
  color: transparent;
  background: transparent;
  cursor: grab;
  user-select: none;
  white-space: pre-wrap;
  line-height: 1.15;
}

.gb-pe-t.is-on {
  border-color: #fb923c;
}

.gb-pe-tools {
  background: #1a1a2e;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

.gb-pe-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.gb-pe-tab {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 6px;
  background: #2a2a40;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.gb-pe-tab.is-on {
  background: linear-gradient(95deg, #f97316, #fb923c);
  color: #fff;
}

.gb-pe-pane {
  display: none;
}

.gb-pe-pane.is-on {
  display: block;
}

.gb-pe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.gb-pe-chip {
  border: 1px solid #3f3f5a;
  border-radius: 999px;
  padding: 7px 10px;
  background: #25253a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gb-pe-chip.is-on {
  border-color: #fb923c;
  background: #fb923c;
  color: #1a1a2e;
}

.gb-pe-sliders label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.gb-pe-sliders input[type="range"] {
  flex: 1;
  accent-color: #f97316;
}

.gb-pe-input {
  width: 100%;
  border: 1px solid #3f3f5a;
  border-radius: 12px;
  padding: 8px 10px;
  background: #25253a;
  color: #fff;
  font-size: 14px;
}

.gb-pe-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid #3f3f5a;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}

.gb-pe-swatch.is-on {
  border-color: #fff;
}

.gb-pe-err {
  min-height: 18px;
  margin: 4px 0 0;
  color: #fda4af;
  font-size: 12px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .gb-pe {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    width: min(560px, 96vw);
    height: min(860px, 96vh);
    transform: translate(-50%, -50%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  }

  .gb-pe::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 20, 0.55);
    z-index: -1;
  }
}
