.right-panel-toolbar {
  position: absolute;
  inset: 8px 5px 40px;
  z-index: 4;
  display: grid;
  /* Three rows: the scrolling category list, the see-more chevron, then the
     pinned Cart / Upload / Favorites section. Only the first row scrolls, so
     those three stay reachable however long the category list grows. */
  grid-template-rows: minmax(0, 1fr) 34px auto;
  align-items: stretch;
  justify-items: center;
  min-height: 0;
  width: 34px;
  gap: 6px;
  user-select: none;
  contain: layout paint style;
}

.right-panel-tool-stack {
  display: grid;
  grid-template-columns: 34px;
  grid-auto-rows: max-content;
  align-content: start;
  justify-items: center;
  width: 34px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  gap: clamp(5px, 0.9vh, 8px);
}

.right-panel-tool-stack::-webkit-scrollbar {
  display: none;
}

.right-panel-tool-stack > [hidden] {
  display: none !important;
}

.right-panel-tool-section {
  display: grid;
  grid-auto-rows: 34px;
  gap: clamp(4px, 0.8vh, 7px);
  width: 34px;
  justify-items: center;
}

.right-panel-tool-section:last-child {
  margin-top: 0;
}

/* Separate the pinned commerce actions from the scrolling emoji categories.
   The band begins exactly at the Cart section and continues behind the lower
   expand/collapse control. */
.side-panel.right {
  --right-utility-band-height: calc(
    149px +
    clamp(5px, 0.9vh, 8px) +
    clamp(5px, 0.9vh, 8px)
  );
  --right-utility-band-bg: color-mix(
    in srgb,
    var(--surface-muted, #f7f8fa) 90%,
    var(--surface, #ffffff)
  );
}

.side-panel.right::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: var(--right-utility-band-height);
  border-top: 1px solid var(--rail-divider, rgba(148, 163, 184, 0.48));
  background: var(--right-utility-band-bg);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--surface, #ffffff) 54%, transparent);
  pointer-events: none;
}

body.right-side-panel-expanded .side-panel.right {
  --right-utility-band-height: 136px;
}

body.theme-dark .side-panel.right {
  --right-utility-band-bg: color-mix(
    in srgb,
    var(--surface-muted, #151515) 92%,
    var(--surface, #0b0b0b)
  );
}
.right-panel-divider {
  width: 28px;
  height: 1px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.48);
}

.right-panel-tool {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  /* Match .left-view-button's reserved focus border so both rails' 34px
     buttons share the same content box and icon alignment. */
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  line-height: 1;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

.right-panel-tool:hover,
.right-panel-tool:focus-visible,
.right-panel-tool.is-active {
  color: #c97d0e;
  background: rgba(251, 241, 221, 0.78);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.right-panel-tool:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.right-panel-tool:active {
  transform: translateY(1px);
}

/* Pinned below the see-more chevron. Cart, Upload and Favorites are actions
   rather than filters, so they sit outside the scrolling category list and
   stay put while it scrolls. */
.right-panel-pinned-tools {
  display: grid;
  grid-template-columns: 34px;
  grid-auto-rows: max-content;
  justify-items: center;
  align-self: end;
  width: 34px;
  padding-top: 6px;
  border-top: 1px solid var(--border, rgba(148, 163, 184, 0.32));
  gap: clamp(5px, 0.9vh, 8px);
}

body.right-side-panel-expanded .right-panel-pinned-tools {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  width: auto;
}

/* Occasional gold pulse so the upload path stays discoverable. Long cycle on
   purpose: the point is a periodic nudge, not a blinking control. The idle
   stretch is baked into the keyframes rather than run on a timer so it costs
   nothing and pauses with the tab. The pulse rides the icon's own strokes —
   the button surface never lights up, because a glowing rail button reads as a
   pressed or active tool rather than as a hint. */
@keyframes right-panel-upload-attention {
  0%, 86%, 100% {
    stroke: currentColor;
    filter: none;
    transform: scale(1);
  }
  89% {
    stroke: var(--upload-pulse-stroke, #e8971a);
    filter: drop-shadow(0 0 3px rgba(232, 151, 26, 0.5));
    transform: scale(1.12);
  }
  92% {
    stroke: currentColor;
    filter: none;
    transform: scale(1);
  }
  95% {
    stroke: var(--upload-pulse-stroke, #e8971a);
    filter: drop-shadow(0 0 2px rgba(232, 151, 26, 0.36));
    transform: scale(1.08);
  }
  98% {
    stroke: currentColor;
    filter: none;
    transform: scale(1);
  }
}

.right-panel-pinned-tools .print-upload-trigger svg {
  transform-origin: center;
  animation: right-panel-upload-attention 24s ease-in-out infinite;
}

/* Dark rails already draw their icons warm, so the pulse has to brighten
   rather than deepen to register at all. */
body.theme-dark .right-panel-pinned-tools .print-upload-trigger svg,
body[data-ui-style-preset="batman"] .right-panel-pinned-tools .print-upload-trigger svg {
  --upload-pulse-stroke: #ffc75a;
}

/* The pulse is decoration; never fight a stated motion preference, and never
   distract from an already-open panel. */
.right-panel-pinned-tools .print-upload-trigger[aria-expanded="true"] svg,
.right-panel-pinned-tools .print-upload-trigger:hover svg,
.right-panel-pinned-tools .print-upload-trigger:focus-visible svg {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .right-panel-pinned-tools .print-upload-trigger svg {
    animation: none;
  }
}

.right-panel-more {
  align-self: end;
  color: #c97d0e;
  background: rgba(251, 241, 221, 0.72);
}

.right-panel-more:hover,
.right-panel-more:focus-visible {
  background: rgba(250, 225, 179, 0.92);
}

.right-panel-more.is-muted {
  color: #64748b;
  background: transparent;
}

.right-panel-tool svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.marketplace-category-button {
  position: relative;
}

/* The world above the fire is an action ("show the whole scattered field"), not
   a category filter, so it never takes the pressed gold state below it. The
   hairline is what tells the rail where the category list actually starts. */
.marketplace-scattered-button {
  position: relative;
}

.marketplace-scattered-button::before {
  content: "";
  position: absolute;
  right: 5px;
  bottom: -4px;
  left: 5px;
  height: 1px;
  border-radius: 999px;
  background: var(--rail-divider);
  pointer-events: none;
}

body.right-side-panel-expanded .marketplace-scattered-button::before {
  display: none;
}

.marketplace-category-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: calc(18px * var(--ui-font-scale, 1));
  line-height: 1;
  pointer-events: none;
  filter: saturate(0.92) drop-shadow(0 1px 1px rgba(15, 23, 42, 0.18));
  transform: translateY(-0.5px);
}

.marketplace-category-button.is-active {
  background: linear-gradient(145deg, rgba(255, 247, 214, 0.96), rgba(254, 240, 181, 0.86));
  border-color: rgba(202, 138, 4, 0.34);
  box-shadow: 0 1px 5px rgba(146, 92, 0, 0.16);
}

.marketplace-category-button.is-active .marketplace-category-icon {
  filter: saturate(1.12) drop-shadow(0 1px 2px rgba(146, 92, 0, 0.32));
  transform: translateY(-0.5px) scale(1.07);
}

body.theme-dark .right-panel-tool {
  color: #eeeeee;
}

body.theme-dark .right-panel-tool:hover,
body.theme-dark .right-panel-tool:focus-visible,
body.theme-dark .right-panel-tool.is-active {
  color: #ffffff;
  background: rgba(24, 24, 24, 0.84);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.34);
}

body.theme-dark .marketplace-category-button.is-active {
  background: linear-gradient(145deg, rgba(83, 59, 15, 0.92), rgba(48, 36, 14, 0.9));
  border-color: rgba(242, 191, 69, 0.48);
  box-shadow: 0 1px 7px rgba(242, 191, 69, 0.16);
}

body.theme-dark .right-panel-tool:focus-visible {
  outline-color: rgba(160, 160, 160, 0.34);
}

body.theme-dark .right-panel-more {
  color: #ffffff;
  background: rgba(24, 24, 24, 0.84);
}

body.theme-dark .right-panel-more.is-muted {
  color: #9ca3af;
  background: transparent;
}

body.theme-dark .right-panel-divider {
  background: rgba(90, 90, 90, 0.78);
}

.left-view-toolbar {
  position: absolute;
  top: 9px;
  left: 5px;
  bottom: 50px;
  z-index: 4;
  display: grid;
  grid-auto-rows: 34px;
  align-content: start;
  gap: 8px;
  width: 34px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  justify-items: center;
  contain: layout paint style;
}

.left-view-toolbar::-webkit-scrollbar {
  display: none;
}

.left-view-button {
  --left-rail-active-icon-gradient: linear-gradient(135deg, #ffe39a 0%, #f4b942 34%, var(--accent, #e8971a) 68%, #c97d0e 100%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #1f2937;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  touch-action: none;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

/* The brand mark at the top of the rail — the way back to the front door. It
   is sized and spaced like the view buttons beneath it, but it is deliberately
   NOT a .left-view-button: it routes to no view, so it must never pick up the
   active/pressed treatment those carry. */
.left-rail-front-door-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--accent, #e8971a);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.left-rail-front-door-button:hover,
.left-rail-front-door-button:focus-visible {
  border-color: var(--rail-control-border, #cbd5e1);
  background: var(--rail-control-hover-bg, rgba(251, 241, 221, 0.78));
}

.left-rail-front-door-button:active {
  transform: scale(0.94);
}

.left-rail-front-door-button .rail-hive-mark {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The three bars of the hive mark, in the brand's own descending golds. */
.left-rail-front-door-button .rail-hive-mark path:nth-child(1) {
  stroke: #f4b942;
}

.left-rail-front-door-button .rail-hive-mark path:nth-child(2) {
  stroke: #f2a51f;
}

.left-rail-front-door-button .rail-hive-mark path:nth-child(3) {
  stroke: var(--accent, #e8971a);
}

.left-view-toolbar.is-left-rail-reordering {
  cursor: grabbing;
}

.left-view-toolbar.is-left-rail-reordering .left-view-button {
  transition: background 90ms ease, border-color 90ms ease, box-shadow 90ms ease;
}

.left-view-button.is-left-rail-dragging {
  position: relative;
  z-index: 8;
  cursor: grabbing;
  border-color: color-mix(in srgb, var(--accent, #e8971a) 42%, transparent);
  background: rgba(251, 241, 221, 0.96);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  opacity: 0.94;
}

.left-view-button:hover,
.left-view-button:focus-visible,
.left-view-button.is-active {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.09);
}

.left-view-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.left-view-button:active {
  transform: translateY(1px);
}

.left-view-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.left-view-button.rail-button {
  position: relative;
  overflow: hidden;
}

.left-view-button.rail-button > svg,
.left-view-button.rail-button .rail-icon {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.left-view-button.rail-button > svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.left-view-button[data-left-view-id="globe"] > svg,
.left-view-button[data-left-view-id="video"] > svg {
  stroke-width: 1.65;
}

.left-view-button.rail-button .rail-icon {
  object-fit: contain;
}

.left-view-button.is-active {
  color: var(--accent, #e8971a);
}

.left-view-button.is-active .left-view-icon,
.left-view-button.is-active > svg {
  color: var(--accent, #e8971a);
  stroke: var(--accent, #e8971a);
}

.left-profile-button {
  position: absolute;
  left: 5px;
  bottom: 8px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #1f2937;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

.left-rail-stack-mark {
  position: absolute;
  left: 5px;
  bottom: 8px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #d7dee8;
  border-radius: 9px;
  color: #f2a30b;
  background: #ffffff;
  box-shadow:
    0 1px 4px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  user-select: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.left-rail-stack-mark:hover,
.left-rail-stack-mark:focus-visible,
.left-rail-stack-mark.is-active {
  border-color: color-mix(in srgb, var(--accent, #e8971a) 58%, #d7dee8);
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--accent, #e8971a) 18%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

body.theme-dark .left-rail-stack-mark {
  border-color: var(--rail-control-border, #2f2f2f);
  background: var(--rail-control-active-bg, rgba(8, 8, 8, 0.96));
  box-shadow:
    0 1px 5px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-dark .left-rail-stack-mark:hover,
body.theme-dark .left-rail-stack-mark:focus-visible,
body.theme-dark .left-rail-stack-mark.is-active {
  border-color: color-mix(in srgb, #f4b942 54%, var(--rail-control-border, #2f2f2f));
  background: color-mix(in srgb, #f4b942 8%, var(--rail-control-active-bg, rgba(8, 8, 8, 0.96)));
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--accent, #e8971a) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.left-rail-stack-mark:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.left-rail-stack-mark:active {
  transform: translateY(0);
}

.left-rail-stack-mark svg {
  display: block;
  width: 22px;
  height: 22px;
  overflow: visible;
}

/* The bottom-left control is the PROFILE button: a person mark signed out, the
   bee avatar signed in. The 3Dhive hive mark it used to carry now lives at the
   top of the rail, where it opens the front door. */
.left-rail-stack-mark .rail-profile-mark {
  fill: none;
  stroke: var(--accent, #e8971a);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Signed-in bee avatar replaces the profile mark on the profile button. */
.left-rail-stack-mark .rail-bee-avatar {
  display: none;
  width: 24px;
  height: 24px;
}

.left-rail-stack-mark[data-signed-in="true"] .rail-profile-mark {
  display: none;
}

.left-rail-stack-mark[data-signed-in="true"] .rail-bee-avatar {
  display: block;
}

.rail-bee-wing {
  fill: rgba(255, 255, 255, 0.88);
  stroke: #dcb457;
  stroke-width: 0.7;
}

.rail-bee-body {
  fill: #f4b942;
  stroke: #b9781a;
  stroke-width: 1;
}

.rail-bee-stripe {
  fill: none;
  stroke: #3a2a0c;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.rail-bee-eye {
  fill: #2a1c06;
  stroke: none;
}

.rail-bee-antenna {
  fill: none;
  stroke: #6b4a12;
  stroke-width: 1.1;
  stroke-linecap: round;
}

body.theme-dark .rail-bee-wing {
  fill: rgba(255, 246, 224, 0.9);
  stroke: #c79a3f;
}

body.left-side-panel-expanded .left-rail-stack-mark {
  left: 8px;
}

/* Seller workspace entry: sits just above the profile button at the bottom of
   the left rail, shown only for seller accounts (JS toggles [hidden]). The
   teal marketplace accent ties it to the seller bottom tabs. */
.left-seller-page-button {
  position: absolute;
  left: 5px;
  bottom: 48px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #d7dee8;
  border-radius: 9px;
  color: var(--seller-tab-accent, #16b39a);
  background: #ffffff;
  box-shadow:
    0 1px 4px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.left-seller-page-button[hidden] {
  display: none;
}

.left-seller-page-button svg {
  display: block;
  width: 22px;
  height: 22px;
  overflow: visible;
}

.left-seller-page-button:hover,
.left-seller-page-button:focus-visible,
.left-seller-page-button.is-active {
  border-color: color-mix(in srgb, var(--seller-tab-accent, #16b39a) 60%, #d7dee8);
  box-shadow:
    0 4px 12px color-mix(in srgb, var(--seller-tab-accent, #16b39a) 20%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.left-seller-page-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--seller-tab-accent, #16b39a) 62%, transparent);
  outline-offset: 2px;
}

.left-seller-page-button:active {
  transform: translateY(0);
}

body.theme-dark .left-seller-page-button {
  border-color: var(--rail-control-border, #2f2f2f);
  background: var(--rail-control-active-bg, rgba(8, 8, 8, 0.96));
  color: var(--seller-tab-accent, #2fd4a7);
  box-shadow:
    0 1px 5px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-dark .left-seller-page-button:hover,
body.theme-dark .left-seller-page-button:focus-visible,
body.theme-dark .left-seller-page-button.is-active {
  border-color: color-mix(in srgb, var(--seller-tab-accent, #2fd4a7) 54%, var(--rail-control-border, #2f2f2f));
  background: color-mix(in srgb, var(--seller-tab-accent, #2fd4a7) 9%, var(--rail-control-active-bg, rgba(8, 8, 8, 0.96)));
}

body.left-side-panel-expanded .left-seller-page-button {
  left: 8px;
}

.left-profile-name {
  display: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.left-panel-add-button {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #1f2937;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.92);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 0s linear 140ms,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
  will-change: transform;
  backface-visibility: hidden;
}

.side-panel.left:hover .left-panel-add-button,
.side-panel.left:focus-within .left-panel-add-button {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.left-panel-add-button:hover,
.left-panel-add-button:focus-visible {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.09);
}

.left-panel-add-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.left-panel-add-button:active {
  transform: translateY(1px) scale(1);
}

.left-panel-add-button svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.left-profile-button:hover,
.left-profile-button:focus-visible,
.left-profile-button.is-active {
  border-color: #cbd5e1;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.09);
}

.left-profile-button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.left-profile-button:active {
  transform: translateY(1px);
}

.left-profile-icon {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

body.theme-dark .left-view-button {
  color: #eeeeee;
}


body.theme-dark .left-profile-button {
  color: #eeeeee;
}

body.theme-dark .left-panel-add-button {
  color: #eeeeee;
}

body.theme-dark .left-view-button:hover,
body.theme-dark .left-view-button:focus-visible,
body.theme-dark .left-view-button.is-active,
body.theme-dark .left-panel-add-button:hover,
body.theme-dark .left-panel-add-button:focus-visible,
body.theme-dark .left-profile-button:hover,
body.theme-dark .left-profile-button:focus-visible,
body.theme-dark .left-profile-button.is-active {
  border-color: #4a4a4a;
  background: rgba(22, 22, 22, 0.92);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.34);
}

body.theme-dark .left-view-button:focus-visible,
body.theme-dark .left-panel-add-button:focus-visible,
body.theme-dark .left-profile-button:focus-visible {
  outline-color: rgba(160, 160, 160, 0.34);
}

.side-tool-label,
.side-tool-action {
  display: none;
}

body.left-side-panel-expanded,
body.right-side-panel-expanded {
  --expanded-side-row-height: 28.275px;
  --expanded-right-row-height: 28.275px;
  --expanded-left-row-gap: 2px;
  --expanded-right-row-gap: 2px;
}

body.right-side-panel-expanded {
  --expanded-marketplace-row-height: 32px;
}

.right-panel-expand-button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--rail-control-border, #cbd5e1);
  border-radius: 6px;
  background: var(--surface, #ffffff);
  color: var(--rail-icon, #334155);
  box-shadow: none;
  cursor: pointer;
}

.right-panel-expand-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.right-panel-expand-button:hover,
.right-panel-expand-button:focus-visible {
  color: var(--rail-icon-active, #b7791f);
  border-color: var(--rail-control-border, currentColor);
  background: var(--rail-control-hover-bg, rgba(251, 241, 221, 0.78));
  outline: none;
}

body.right-side-panel-expanded .right-panel-expand-button svg {
  transform: rotate(180deg);
}

body.left-side-panel-expanded .left-view-toolbar {
  top: 8px;
  right: 8px;
  left: 8px;
  bottom: 50px;
  grid-auto-rows: var(--expanded-side-row-height);
  gap: var(--expanded-left-row-gap);
  width: auto;
  justify-items: stretch;
}

body.left-side-panel-expanded .left-panel-add-button {
  justify-self: stretch;
  width: 100%;
  height: var(--expanded-side-row-height);
}

body.left-side-panel-expanded .left-profile-button {
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: 12px;
  width: auto;
  height: var(--expanded-side-row-height);
  padding: 0 10px;
  border-radius: 6px;
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 700;
  line-height: 1;
  text-align: left;
}

body.left-side-panel-expanded .left-profile-button::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 1px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.52);
  pointer-events: none;
}

body.left-side-panel-expanded .left-profile-button .left-profile-icon {
  justify-self: center;
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
}

body.left-side-panel-expanded .left-profile-button .left-profile-name {
  display: block;
}

body.right-side-panel-expanded .right-panel-toolbar {
  inset: 8px 8px 40px;
  grid-template-rows: minmax(0, 1fr) var(--expanded-right-row-height) auto;
  width: auto;
  justify-items: stretch;
  gap: var(--expanded-right-row-gap);
}

body.right-side-panel-expanded .right-panel-tool-stack {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: stretch;
  width: 100%;
  gap: var(--expanded-right-row-gap);
}

body.right-side-panel-expanded .right-panel-tool-section {
  grid-auto-rows: var(--expanded-right-row-height);
  justify-items: stretch;
  width: 100%;
  gap: var(--expanded-right-row-gap);
}

body.right-side-panel-expanded .marketplace-category-tools > .right-panel-tool {
  position: relative;
  height: var(--expanded-marketplace-row-height);
}

body.right-side-panel-expanded .marketplace-category-tools {
  grid-auto-rows: var(--expanded-marketplace-row-height);
}

body.right-side-panel-expanded .marketplace-category-tools > .right-panel-tool::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: -1px;
  left: 6px;
  height: 1px;
  border-radius: 999px;
  background: var(--rail-divider);
  pointer-events: none;
}

body.right-side-panel-expanded .right-panel-divider {
  width: 100%;
  margin: 0;
}

body.left-side-panel-expanded .left-view-button,
body.right-side-panel-expanded .right-panel-tool {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  justify-items: stretch;
  gap: 12px;
  width: 100%;
  height: var(--expanded-side-row-height);
  min-width: 0;
  padding: 0 11px 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #0f172a;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
}

body.right-side-panel-expanded .right-panel-tool {
  grid-template-columns: 20px minmax(0, 1fr) 14px;
  gap: 5px;
  height: var(--expanded-right-row-height);
  padding: 0 6px;
  border-radius: 5px;
  font-size: calc(14.4px * var(--ui-font-scale, 1));
  font-weight: 700;
}

body.left-side-panel-expanded .left-view-button:hover,
body.left-side-panel-expanded .left-view-button:focus-visible,
body.right-side-panel-expanded .right-panel-tool:hover,
body.right-side-panel-expanded .right-panel-tool:focus-visible {
  color: #0f172a;
  background: rgba(251, 241, 221, 0.76);
  box-shadow: none;
}

body.left-side-panel-expanded .left-view-button.is-active,
body.right-side-panel-expanded .right-panel-tool.is-active {
  color: #0f172a;
  border-color: #e8c98d;
  background: #eff6fd;
  box-shadow: inset 0 0 0 1px rgba(232, 201, 141, 0.22);
}

body.left-side-panel-expanded .left-view-button:focus-visible,
body.right-side-panel-expanded .right-panel-tool:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

body.left-side-panel-expanded .left-view-button svg,
body.left-side-panel-expanded .left-view-button .rail-icon,
body.right-side-panel-expanded .right-panel-tool svg {
  justify-self: center;
  width: 18px;
  height: 18px;
  color: var(--accent, #e8971a);
  stroke: var(--accent, #e8971a);
  stroke-width: 1.75;
}

body.right-side-panel-expanded .right-panel-tool svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.6;
}

body.left-side-panel-expanded .left-view-button[data-left-view-id="globe"] svg,
body.left-side-panel-expanded .left-view-button[data-left-view-id="video"] svg {
  stroke-width: 1.55;
}


body.left-side-panel-expanded .left-view-button .side-tool-label,
body.right-side-panel-expanded .right-panel-tool .side-tool-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.left-side-panel-expanded .left-view-button .side-tool-action,
body.right-side-panel-expanded .right-panel-tool .side-tool-action {
  display: block;
  justify-self: end;
  color: #c97d0e;
  font-size: calc(15px * var(--ui-font-scale));
  font-weight: 400;
  line-height: 1;
}

body.right-side-panel-expanded .right-panel-tool .side-tool-action {
  font-size: calc(15px * var(--ui-font-scale));
}

body.left-side-panel-expanded .left-view-button .side-tool-action::before,
body.right-side-panel-expanded .right-panel-tool .side-tool-action::before {
  content: "+";
}

body.left-side-panel-expanded .left-view-button.is-active .side-tool-action,
body.right-side-panel-expanded .right-panel-tool.is-active .side-tool-action {
  color: #111827;
  font-size: calc(14px * var(--ui-font-scale));
}

body.right-side-panel-expanded .right-panel-tool.is-active .side-tool-action {
  font-size: calc(14px * var(--ui-font-scale));
}

body.left-side-panel-expanded .left-view-button.is-active .side-tool-action::before,
body.right-side-panel-expanded .right-panel-tool.is-active .side-tool-action::before {
  content: "-";
}

body.right-side-panel-expanded .right-panel-more {
  align-self: stretch;
}

body.right-side-panel-expanded .right-panel-more.is-muted {
  color: #64748b;
  background: transparent;
}

body.theme-dark.left-side-panel-expanded .left-view-button,
body.theme-dark.right-side-panel-expanded .right-panel-tool {
  color: #eeeeee;
}

body.theme-dark.left-side-panel-expanded .left-view-button:hover,
body.theme-dark.left-side-panel-expanded .left-view-button:focus-visible,
body.theme-dark.left-side-panel-expanded .left-view-button.is-active,
body.theme-dark.right-side-panel-expanded .right-panel-tool:hover,
body.theme-dark.right-side-panel-expanded .right-panel-tool:focus-visible,
body.theme-dark.right-side-panel-expanded .right-panel-tool.is-active {
  color: #ffffff;
  border-color: #5f5f5f;
  background: rgba(22, 22, 22, 0.94);
  box-shadow: inset 0 0 0 1px rgba(112, 112, 112, 0.18);
}

body.theme-dark.left-side-panel-expanded .left-view-button:focus-visible,
body.theme-dark.right-side-panel-expanded .right-panel-tool:focus-visible {
  outline-color: rgba(160, 160, 160, 0.34);
}

body.theme-dark.left-side-panel-expanded .left-view-button svg,
body.theme-dark.left-side-panel-expanded .left-view-button .rail-icon,
body.theme-dark.right-side-panel-expanded .right-panel-tool svg,
body.theme-dark.left-side-panel-expanded .left-view-button .side-tool-action,
body.theme-dark.right-side-panel-expanded .right-panel-tool .side-tool-action {
  color: #d8d8d8;
  stroke: #d8d8d8;
}

body.theme-dark.left-side-panel-expanded .left-view-button.is-active .side-tool-action,
body.theme-dark.right-side-panel-expanded .right-panel-tool.is-active .side-tool-action {
  color: #ffffff;
}

body.theme-dark.left-side-panel-expanded .left-profile-button::before {
  background: rgba(90, 90, 90, 0.78);
}

body.theme-dark.right-side-panel-expanded .right-panel-more.is-muted {
  color: #9ca3af;
  background: transparent;
}

.profile-auth-overlay {
  --profile-auth-backdrop: rgba(248, 250, 252, 0.58);
  --profile-auth-card-bg: rgba(255, 255, 255, 0.96);
  --profile-auth-card-border: rgba(148, 163, 184, 0.42);
  --profile-auth-text: #0f172a;
  --profile-auth-strong: #020617;
  --profile-auth-muted: #64748b;
  --profile-auth-soft: #f8fafc;
  --profile-auth-soft-hover: #fbf1dd;
  --profile-auth-input-bg: #ffffff;
  --profile-auth-input-text: #111827;
  --profile-auth-input-placeholder: #94a3b8;
  --profile-auth-rule: rgba(148, 163, 184, 0.34);
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: var(--profile-auth-backdrop);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  transition: opacity 160ms ease, visibility 160ms ease;
}

.profile-auth-overlay.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.profile-auth-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(452px, calc(100vw - 36px));
  /* Sign up adds account-type choices while phone verification can add more. */
  max-height: min(960px, calc(100vh - 36px));
  max-height: min(960px, calc(100dvh - 36px));
  padding: 26px 38px 28px;
  border: 1px solid var(--profile-auth-card-border);
  border-top: 0;
  border-radius: 8px;
  color: var(--profile-auth-text);
  background: var(--profile-auth-card-bg);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
  overflow: auto;
  scrollbar-width: none;
  transform: translateY(8px) scale(0.985);
  transition: transform 160ms ease;
}

.profile-auth-overlay.is-visible .profile-auth-card {
  transform: translateY(0) scale(1);
}

.profile-auth-card::-webkit-scrollbar {
  display: none;
}

.profile-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #8ea0bd;
  background: transparent;
  cursor: pointer;
}

.profile-auth-close:hover,
.profile-auth-close:focus-visible {
  color: var(--hive-accent-strong, #c97d0e);
  background: rgba(148, 163, 184, 0.12);
}

.profile-auth-close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.profile-auth-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.profile-auth-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
}

/* The hive mark that tops the card — the left rail's front-door glyph at brand
   size, down to its three descending golds. They are literal here, as they are
   in the rail: the mark is the logo, so it does not follow the theme accent. */
.profile-auth-hive-mark {
  display: block;
  width: 38px;
  height: 38px;
  fill: none;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-auth-hive-mark path:nth-child(1) {
  stroke: #f4b942;
}

.profile-auth-hive-mark path:nth-child(2) {
  stroke: #f2a51f;
}

.profile-auth-hive-mark path:nth-child(3) {
  stroke: var(--accent, #e8971a);
}

/* "Welcome to" + the wordmark, on one line. The logo is a word in that
   sentence, so it is sized off the heading's own type rather than the banner
   width it had when it sat alone at the top of the card. */
.profile-auth-welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 9px;
}

.profile-auth-brand-image {
  display: block;
  width: clamp(150px, 14vw, 230px);
  max-width: calc(100% - 56px);
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  image-rendering: auto;
  filter: none;
}

.profile-auth-welcome .profile-auth-brand-image {
  width: auto;
  max-width: min(52%, 190px);
  /* Taller than the 21px type it sits beside: the asset carries transparent
     margin above and below, so matching the font-size would set the wordmark
     visibly smaller than the words. */
  height: calc(38px * var(--ui-font-scale, 1));
}

.profile-auth-brand-image-dark {
  display: none;
}

.profile-auth-brand-image-light {
  filter: invert(1) hue-rotate(180deg) brightness(1.66) saturate(0.6);
}

body.theme-dark .profile-auth-brand-image-light {
  display: none;
}

body.theme-dark .profile-auth-brand-image-dark {
  display: block;
}

.profile-auth-copy {
  margin: 10px 0 20px;
  color: #cbd5e1;
  font-size: calc(12px * var(--ui-font-scale));
  font-weight: 440;
  line-height: 1.3;
  text-align: center;
}

.profile-auth-session {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  padding: 12px 13px;
  border: 1px solid var(--profile-auth-card-border);
  border-radius: 10px;
  color: var(--profile-auth-text);
  background: var(--profile-auth-soft);
}

.profile-auth-session[hidden],
.profile-auth-mode[hidden],
.profile-auth-providers[hidden],
.profile-auth-divider[hidden],
.profile-auth-form[hidden] {
  display: none;
}

.profile-auth-session-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.profile-auth-session-copy strong {
  color: var(--profile-auth-strong);
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 700;
}

.profile-auth-session-copy small {
  overflow: hidden;
  color: var(--profile-auth-muted);
  font-size: calc(11px * var(--ui-font-scale, 1));
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-auth-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--accent, #e8971a) 64%, var(--profile-auth-card-border));
  border-radius: 8px;
  color: var(--accent, #e8971a);
  background: transparent;
  font: inherit;
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 680;
  cursor: pointer;
}

.profile-auth-signout svg {
  width: 15px;
  height: 15px;
}

.profile-auth-signout:hover,
.profile-auth-signout:focus-visible {
  color: #1a1205;
  background-color: var(--accent, #e8971a);
  background-image: var(--ai-gold-gradient);
}

.profile-auth-signout:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.profile-auth-signout:disabled {
  opacity: 0.58;
  cursor: wait;
}

.profile-auth-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  height: 46px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid #1d3046;
  border-radius: 10px;
  background: #0b0b0b;
}

.profile-auth-mode-button {
  border: 0;
  border-radius: 8px;
  color: #b7c3d4;
  background: transparent;
  font: inherit;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 620;
  cursor: pointer;
}

.profile-auth-mode-button.is-active {
  color: #1a1205;
  background-color: var(--accent, #e8971a);
  background-image: var(--ai-gold-gradient);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent, #e8971a) 24%, transparent);
}

.profile-auth-providers {
  display: grid;
  gap: 11px;
}

.profile-auth-provider {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #1e3046;
  border-radius: 8px;
  color: #f8fafc;
  background: #0c0c0c;
  font: inherit;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 620;
  line-height: 1;
  cursor: pointer;
}

.profile-auth-provider:hover,
.profile-auth-provider:focus-visible {
  border-color: #365377;
  background: #151515;
}

.profile-auth-provider:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.profile-auth-provider-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  justify-self: center;
  color: #ffffff;
}

.profile-auth-provider-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.profile-auth-google svg,
.profile-auth-microsoft svg {
  fill: none;
}

.profile-auth-github {
  color: #ffffff;
}

.profile-auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 22px 0 18px;
  color: #9aa8bd;
  font-size: calc(12px * var(--ui-font-scale));
  line-height: 1;
}

.profile-auth-divider::before,
.profile-auth-divider::after {
  content: "";
  height: 1px;
  background: #303030;
}

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

.profile-auth-account-type {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.profile-auth-account-type[hidden] {
  display: none;
}

.profile-auth-account-type legend {
  margin-bottom: 8px;
  color: var(--profile-auth-strong);
  font-size: calc(12px * var(--ui-font-scale, 1));
  font-weight: 600;
}

.profile-auth-account-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.profile-auth-account-type-option {
  position: relative;
  display: grid;
  min-width: 0;
  cursor: pointer;
}

.profile-auth-account-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Themed, not hardcoded: the label colour comes from --profile-auth-text,
   which flips with the theme, so a fixed near-black card produced dark-on-dark
   text in every theme whose text token is dark. Both surfaces must track the
   same theme. */
.profile-auth-account-type-option > span {
  display: grid;
  min-height: 76px;
  align-content: start;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--profile-auth-card-border);
  border-radius: 9px;
  color: var(--profile-auth-text);
  background: var(--profile-auth-soft);
}

.profile-auth-account-type-option:hover > span {
  background: var(--profile-auth-soft-hover);
}

.profile-auth-account-type-option strong {
  font-size: calc(13px * var(--ui-font-scale, 1));
  font-weight: 600;
}

.profile-auth-account-type-option small {
  color: var(--profile-auth-muted);
  font-size: calc(10px * var(--ui-font-scale, 1));
  line-height: 1.35;
}

.profile-auth-account-type-option input:checked + span {
  border-color: color-mix(in srgb, var(--accent, #e8971a) 72%, var(--profile-auth-card-border));
  background: color-mix(in srgb, var(--accent, #e8971a) 12%, var(--profile-auth-soft));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #e8971a) 20%, transparent);
}

.profile-auth-account-type-option input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--ui-focus-ring, var(--accent, #e8971a)) 60%, transparent);
  outline-offset: 2px;
}

.profile-auth-phone-confirmation {
  display: grid;
  gap: 12px;
}

.profile-auth-phone-confirmation[hidden],
.profile-auth-turnstile[hidden] {
  display: none;
}

.profile-auth-phone-confirmation .profile-auth-submit {
  width: 100%;
  margin-top: 0;
}

/* The 65px is a RESERVATION for the Cloudflare widget, so it is only spent
   once a widget is actually in the box. Unconditionally it was 65px of blank
   card on every deployment without a Turnstile site key — which, with the
   status line and the footnote, is what pushed the submit button off the
   bottom of a laptop-height viewport. */
.profile-auth-turnstile {
  overflow: hidden;
  border-radius: 8px;
}

.profile-auth-turnstile:not(:empty) {
  min-height: 65px;
}

.profile-auth-turnstile > iframe {
  max-width: 100%;
}

.profile-auth-field {
  display: grid;
  gap: 8px;
  color: #c9d4e4;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 600;
}

.profile-auth-field input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid #1e3046;
  border-radius: 10px;
  color: #e5edf8;
  background: #101010;
  font: inherit;
  font-size: calc(14px * var(--ui-font-scale));
  font-weight: 400;
  outline: none;
}

.profile-auth-field input::placeholder {
  color: #7f8da4;
}

.profile-auth-field input:focus {
  border-color: #c97d0e;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #e8971a) 18%, transparent);
}

body.theme-dark .profile-auth-field input:focus {
  border-color: #707070;
  box-shadow: 0 0 0 3px rgba(160, 160, 160, 0.18);
}

.profile-auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 1px;
}

.profile-auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #dbe4f3;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 600;
}

.profile-auth-remember input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent, #e8971a);
}

body.theme-dark .profile-auth-remember input {
  accent-color: #9a9a9a;
}

.profile-auth-link {
  padding: 0;
  border: 0;
  color: var(--accent, #e8971a);
  background: transparent;
  font: inherit;
  font-size: calc(13px * var(--ui-font-scale));
  font-weight: 620;
  cursor: pointer;
}

.profile-auth-link:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.profile-auth-link:hover,
.profile-auth-link:focus-visible {
  color: #f4b942;
}

body.theme-dark .profile-auth-link {
  color: #d8d8d8;
}

body.theme-dark .profile-auth-link:hover,
body.theme-dark .profile-auth-link:focus-visible {
  color: #ffffff;
}

.profile-auth-submit {
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  color: #1a1205;
  background-color: var(--accent, #e8971a);
  background-image: var(--ai-gold-gradient);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent, #e8971a) 25%, transparent);
  font: inherit;
  font-size: calc(14px * var(--ui-font-scale));
  font-weight: 680;
  cursor: pointer;
}

body.theme-dark .profile-auth-submit {
  color: #1a1205;
  background-color: var(--accent, #e8971a);
  background-image: var(--ai-gold-gradient);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--accent, #e8971a) 25%, transparent);
}

.profile-auth-submit:hover,
.profile-auth-submit:focus-visible {
  background-color: #c97d0e;
  background-image: var(--ai-gold-gradient);
  filter: brightness(1.04);
}

.profile-auth-submit:focus-visible {
  outline: 2px solid rgba(232, 201, 141, 0.54);
  outline-offset: 2px;
}

.profile-auth-status {
  min-height: 16px;
  margin: 10px auto 0;
  color: #9aa8bd;
  font-size: calc(11px * var(--ui-font-scale));
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
}

/* Nothing to say, no space taken. The min-height above reserves a line so a
   message does not shove the layout when it arrives — but it only needs
   reserving once there IS one. */
.profile-auth-status:empty {
  min-height: 0;
  margin-top: 0;
}

.profile-auth-status.is-error {
  color: #f87171;
}

.profile-auth-status.is-success {
  color: #34d399;
}

.profile-auth-footnote {
  max-width: 340px;
  margin: 12px auto 0;
  color: #9aa8bd;
  font-size: calc(11px * var(--ui-font-scale));
  line-height: 1.35;
  text-align: center;
}

body.theme-dark .profile-auth-overlay {
  --profile-auth-backdrop: rgba(0, 0, 0, 0.56);
  --profile-auth-card-bg: rgba(4, 4, 4, 0.98);
  --profile-auth-card-border: #3a3a3a;
  --profile-auth-text: #eeeeee;
  --profile-auth-strong: #ffffff;
  --profile-auth-muted: #a5a5a5;
  --profile-auth-soft: #0a0a0a;
  --profile-auth-soft-hover: #151515;
  --profile-auth-input-bg: #101010;
  --profile-auth-input-text: #eeeeee;
  --profile-auth-input-placeholder: #8a8a8a;
  --profile-auth-rule: #303030;
}

body[data-ui-style-preset="batman"] .profile-auth-overlay {
  --profile-auth-backdrop: rgba(18, 18, 18, 0.58);
  --profile-auth-card-bg: linear-gradient(145deg, #050505 0%, #0f0f0f 60%, #000000 100%);
  --profile-auth-card-border: rgba(165, 165, 165, 0.22);
  --profile-auth-text: #e7e7e7;
  --profile-auth-strong: #ffffff;
  --profile-auth-muted: #a5a5a5;
  --profile-auth-soft: #050505;
  --profile-auth-soft-hover: #121212;
  --profile-auth-input-bg: #070707;
  --profile-auth-input-text: #f1f1f1;
  --profile-auth-input-placeholder: #7d7d7d;
  --profile-auth-rule: rgba(165, 165, 165, 0.18);
}

.profile-auth-close {
  color: var(--profile-auth-muted);
}

.profile-auth-close:hover,
.profile-auth-close:focus-visible {
  color: var(--profile-auth-strong);
  background: rgba(148, 163, 184, 0.12);
}

.profile-auth-copy,
.profile-auth-divider,
.profile-auth-status,
.profile-auth-footnote {
  color: var(--profile-auth-muted);
}

.profile-auth-mode {
  border-color: var(--profile-auth-rule);
  background: var(--profile-auth-soft);
}

.profile-auth-mode-button {
  color: var(--profile-auth-muted);
}

.profile-auth-mode-button.is-active {
  color: #1a1205;
  background-color: var(--accent, #e8971a);
  background-image: var(--ai-gold-gradient);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent, #e8971a) 24%, transparent);
}

.profile-auth-provider {
  border-color: var(--profile-auth-rule);
  color: var(--profile-auth-strong);
  background: var(--profile-auth-soft);
}

.profile-auth-provider:hover,
.profile-auth-provider:focus-visible {
  border-color: var(--profile-auth-card-border);
  background: var(--profile-auth-soft-hover);
}

.profile-auth-provider-icon {
  color: var(--profile-auth-strong);
}

.profile-auth-divider::before,
.profile-auth-divider::after {
  background: var(--profile-auth-rule);
}

.profile-auth-field,
.profile-auth-remember {
  color: var(--profile-auth-text);
}

.profile-auth-field input {
  border-color: var(--profile-auth-rule);
  color: var(--profile-auth-input-text);
  background: var(--profile-auth-input-bg);
}

.profile-auth-field input::placeholder {
  color: var(--profile-auth-input-placeholder);
}

body.theme-dark .profile-auth-status.is-error,
body[data-ui-style-preset="batman"] .profile-auth-status.is-error {
  color: #f87171;
}

body.theme-dark .profile-auth-status.is-success,
body[data-ui-style-preset="batman"] .profile-auth-status.is-success {
  color: #34d399;
}
@media (max-width: 560px) {
  .profile-auth-overlay {
    padding: 10px;
  }

  .profile-auth-card {
    width: min(452px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 24px 22px;
  }
}


.resize-handle {
  position: relative;
  z-index: 30;
  width: 6px;
  min-width: 6px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  outline: none;
}

.resize-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 1px;
  border-radius: 999px;
  background: #c5ceda;
  box-shadow: 2px 0 10px rgba(15, 23, 42, 0.20);
  transition: background 120ms ease, box-shadow 120ms ease;
}

.resize-handle:hover::after,
.resize-handle:focus-visible::after {
  background: var(--accent);
  box-shadow: 2px 0 12px color-mix(in srgb, var(--accent, #e8971a) 32%, transparent);
}

body.is-resizing-left .left-handle::after,
body.is-resizing-right .right-handle::after {
  background: var(--accent);
  box-shadow: 2px 0 12px color-mix(in srgb, var(--accent, #e8971a) 32%, transparent);
}
body.theme-dark .resize-handle::after {
  background: #4a4a4a;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.36);
}

body.theme-dark .resize-handle:hover::after,
body.theme-dark .resize-handle:focus-visible::after {
  background: #b8b8b8;
  box-shadow: 2px 0 12px rgba(210, 210, 210, 0.18);
}

body.theme-dark.is-resizing-left .left-handle::after,
body.theme-dark.is-resizing-right .right-handle::after {
  background: #b8b8b8;
  box-shadow: 2px 0 12px rgba(210, 210, 210, 0.18);
}
.left-handle {
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: end;
}

.left-handle::after {
  left: auto;
  right: 0;
}

.right-handle {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: start;
}

.right-handle::after {
  left: 0;
}

.right-panel-drop-layer {
  --right-drop-border: rgba(100, 116, 139, 0.72);
  --right-drop-active: color-mix(in srgb, var(--accent, #e8971a) 86%, transparent);
  --right-drop-surface: rgba(248, 250, 252, 0.82);
  --right-drop-card: rgba(255, 255, 255, 0.94);
  --right-drop-text: #0f172a;
  --right-drop-muted: #64748b;
  --right-drop-card-shadow: rgba(154, 167, 182, 0.4);
  --right-drop-card-grid: rgba(148, 163, 184, 0.16);

  position: fixed;
  inset: 0;
  z-index: var(--z-right-drop-overlay);
  pointer-events: none;
}

.side-panel.right.has-docked-panels .right-panel-toolbar {
  top: var(--right-panel-docked-top-offset, 8px);
}

.side-panel.right.has-stacked-panels {
  border-left-color: rgba(148, 163, 184, 0.62);
}

.right-panel-drop-target,
.right-panel-stack-drop-bar,
.right-panel-stack-pull-tab,
.right-panel-dropped-dock,
.right-panel-stack-panel {
  position: fixed;
  box-sizing: border-box;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.right-panel-drop-target {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px dashed var(--right-drop-border);
  border-radius: 9px;
  color: var(--right-drop-muted);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(241, 245, 249, 0.48));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 12px 36px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.right-panel-drop-target svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.right-panel-drop-ghost {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  place-items: center;
  overflow: hidden;
}

.right-panel-stack-drop-bar {
  width: 5px;
  border-radius: 5px 0 0 5px;
  background: rgba(100, 116, 139, 0.22);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.22), 0 8px 26px rgba(15, 23, 42, 0.14);
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.right-panel-drop-layer.is-visible .right-panel-drop-target,
.right-panel-drop-layer.is-visible .right-panel-stack-drop-bar {
  opacity: 1;
}

.right-panel-drop-target.is-active {
  border-color: var(--right-drop-active);
  color: #c97d0e;
  background: linear-gradient(180deg, rgba(251, 241, 221, 0.9), rgba(250, 225, 179, 0.58));
  box-shadow: inset 0 0 0 1px rgba(232, 201, 141, 0.52), 0 14px 40px color-mix(in srgb, var(--accent, #e8971a) 18%, transparent);
}

.right-panel-stack-drop-bar.is-active {
  background: color-mix(in srgb, var(--accent, #e8971a) 86%, transparent);
  box-shadow: 0 0 0 2px rgba(232, 201, 141, 0.34), 0 10px 28px color-mix(in srgb, var(--accent, #e8971a) 26%, transparent);
  transform: scaleX(1.18);
}

.right-panel-stack-pull-tab {
  z-index: var(--z-right-stack-pull-tab);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  color: #f8fafc;
  background: rgba(18, 18, 18, 0.92);
  box-shadow: -8px 10px 24px rgba(0, 0, 0, 0.28);
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
}

.right-panel-stack-pull-tab[hidden] {
  display: none;
}

.right-panel-stack-pull-tab svg {
  display: block;
  flex: none;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-right: 1px;
  margin-left: -1px;
}

.right-panel-stack-pull-tab:hover,
.right-panel-stack-pull-tab:focus-visible {
  color: #1a1205;
  background: color-mix(in srgb, var(--accent, #e8971a) 94%, transparent);
  outline: none;
  box-shadow: -8px 10px 24px color-mix(in srgb, var(--accent, #e8971a) 24%, transparent);
}

.right-panel-dropped-dock,
.right-panel-stack-panel {
  pointer-events: auto;
}

.right-panel-dropped-dock[hidden],
.right-panel-stack-panel[hidden] {
  display: none;
}

.right-panel-dropped-dock {
  z-index: var(--z-right-dropped-dock);
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.46);
  border-radius: 9px;
  background: rgba(248, 250, 252, 0.82);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
  overflow: auto;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.right-panel-dropped-dock::-webkit-scrollbar {
  display: none;
}

.right-panel-stack-panel {
  z-index: var(--z-right-stack-panel);
  display: grid;
  grid-template-rows: 30px minmax(0, 1fr);
  border: 1px solid rgba(148, 163, 184, 0.56);
  border-right: 0;
  border-radius: 9px 0 0 9px;
  background: #ffffff;
  box-shadow: -10px 18px 48px rgba(15, 23, 42, 0.18);
  transform: translate3d(var(--right-stack-collapse-drag-offset, 0px), 0, 0);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  overflow: hidden;
}

.right-panel-stack-panel.is-collapse-dragging {
  cursor: ew-resize;
  transition: none;
}

.right-panel-stack-panel.is-active {
  border-color: var(--right-drop-active);
  box-shadow: -10px 18px 48px color-mix(in srgb, var(--accent, #e8971a) 24%, transparent), 0 0 0 2px rgba(232, 201, 141, 0.2);
}

.right-panel-stack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 0 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.42);
  color: #f8fafc;
  background: #181818;
  cursor: ew-resize;
  font-size: calc(10px * var(--ui-font-scale, 1));
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
}

.right-panel-stack-title-shell {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
}

.right-panel-stack-title,
.right-panel-stack-title-input {
  width: 100%;
  min-width: 0;
  height: 22px;
  border-radius: 4px;
  font: inherit;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
}

.right-panel-stack-title {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: text;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.right-panel-stack-title:hover,
.right-panel-stack-title:focus-visible {
  color: #ffffff;
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.right-panel-stack-header-actions {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.right-panel-stack-collapse {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(248, 250, 252, 0.16);
  border-radius: 4px;
  color: #f8fafc;
  background: transparent;
  cursor: pointer;
}

.right-panel-stack-collapse svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.right-panel-stack-collapse:hover,
.right-panel-stack-collapse:focus-visible {
  color: #ffffff;
  border-color: rgba(248, 250, 252, 0.36);
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.right-panel-stack-title-input {
  padding: 0 4px;
  border: 1px solid rgba(248, 250, 252, 0.28);
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.right-panel-stack-title-input:focus {
  border-color: rgba(248, 250, 252, 0.72);
  background: rgba(255, 255, 255, 0.18);
}

.right-panel-stack-header strong {
  flex: 0 0 auto;
  font-size: calc(10px * var(--ui-font-scale, 1));
}

.right-panel-stack-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 7px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.right-panel-stack-list::-webkit-scrollbar {
  display: none;
}

.side-panel-drop-card {
  position: relative;
  min-width: 0;
  height: var(--side-drop-card-height, 36px);
  border: 0;
  border-radius: 7px;
  background: transparent;
  overflow: visible;
  contain: layout paint style;
  isolation: isolate;
}

.side-panel-drop-card:not(.is-drop-preview) {
  cursor: grab;
  touch-action: none;
}

.side-panel-drop-card:not(.is-drop-preview):active {
  cursor: grabbing;
}

.side-panel-drop-card.is-card-drag-source {
  opacity: 0.34;
}

.side-panel-drop-card-drag-ghost {
  position: fixed;
  z-index: var(--z-drop-card-ghost);
  width: auto;
  pointer-events: none;
  opacity: 0.94;
  filter: drop-shadow(0 14px 30px rgba(15, 23, 42, 0.24));
}

.side-panel-drop-card-shadow,
.side-panel-drop-card-surface {
  position: absolute;
  inset: 0;
  border-radius: 7px;
}

.side-panel-drop-card-shadow {
  z-index: 0;
  background: var(--right-drop-card-shadow);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  opacity: 0.58;
  transform: translate3d(0.6%, 1.1%, 0) scale(1.004, 1.012);
}

.side-panel-drop-card-surface {
  z-index: 1;
  display: block;
  min-width: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(var(--right-drop-card-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--right-drop-card-grid) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--right-drop-card) 96%, #ffffff 4%), var(--right-drop-card));
  background-size: 18px 18px, 18px 18px, auto;
}

.side-panel-drop-card-title,
.side-panel-drop-card-subtitle {
  position: absolute;
  z-index: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-panel-drop-card-title {
  top: 12%;
  right: 6px;
  max-width: 88%;
  color: var(--right-drop-text);
  font-size: clamp(9px, calc(var(--side-drop-card-height, 36px) * 0.28), 28px);
  font-weight: 850;
  line-height: 1;
  text-align: right;
}

.side-panel-drop-card-subtitle {
  left: 6px;
  bottom: 10%;
  max-width: 84%;
  color: var(--right-drop-muted);
  font-size: clamp(7px, calc(var(--side-drop-card-height, 36px) * 0.15), 11px);
  font-weight: 750;
  line-height: 1;
  text-transform: lowercase;
}

.side-panel-drop-card-border {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid rgba(148, 163, 184, 0.58);
  border-radius: 7px;
  pointer-events: none;
}

.side-panel-drop-remove {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(18, 18, 18, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(18, 18, 18, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
  font-size: calc(13px * var(--ui-font-scale, 1));
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 120ms ease, transform 120ms ease, background 120ms ease;
}

.side-panel-drop-card.is-remove-visible .side-panel-drop-remove,
.side-panel-drop-card:focus-within .side-panel-drop-remove {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.side-panel-drop-remove:hover,
.side-panel-drop-remove:focus-visible {
  background: var(--ui-danger, #dc2626);
}

.side-panel-drop-card[data-panel-kind="product"] {
  border-radius: 12px;
}

.side-panel-drop-card[data-panel-kind="product"] .side-panel-drop-card-shadow,
.side-panel-drop-card[data-panel-kind="product"] .side-panel-drop-card-surface,
.side-panel-drop-card[data-panel-kind="product"] .side-panel-drop-card-border {
  border-radius: 12px;
}

.side-panel-drop-product-card {
  color: #f5f5f6;
  background: linear-gradient(180deg, #171717 0%, #101010 66%, #0b0b0b 100%);
}

.side-panel-drop-product-hero {
  position: absolute;
  inset: 0 0 34%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(92% 80% at 50% 34%, color-mix(in srgb, var(--side-product-accent) 22%, transparent), transparent 72%),
    #101010;
}

.side-panel-drop-product-object {
  display: block;
  width: 86%;
  height: 86%;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.34));
  transform: translateY(2%) scale(0.96);
  transition: opacity 140ms ease, transform 180ms ease;
  pointer-events: none;
}

.side-panel-drop-product-object.is-loaded {
  opacity: 1;
  transform: translateY(2%) scale(1);
}

.side-panel-drop-product-footer {
  position: absolute;
  inset: 66% 0 0;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: max(3px, calc(var(--side-drop-card-height, 120px) * 0.02));
  padding: max(6px, calc(var(--side-drop-card-height, 120px) * 0.035)) 6.5%;
  background: linear-gradient(180deg, rgba(16, 16, 16, 0.96), rgba(10, 10, 10, 1));
}

.side-panel-drop-product-title {
  min-width: 0;
  overflow: hidden;
  color: #f5f5f6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(10px, calc(var(--side-drop-card-height, 120px) * 0.07), 17px);
  font-weight: 820;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-panel-drop-product-chips {
  display: flex;
  min-width: 0;
  gap: 4px;
  overflow: hidden;
}

.side-panel-drop-product-chip {
  flex: 0 1 auto;
  min-width: 0;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: #b7bac2;
  background: rgba(255, 255, 255, 0.055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(6px, calc(var(--side-drop-card-height, 120px) * 0.031), 9px);
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-panel-drop-product-chip.is-discount {
  color: #f5bd57;
  background: rgba(247, 168, 37, 0.14);
}

.side-panel-drop-product-bottom {
  display: flex;
  align-self: end;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.side-panel-drop-product-price {
  min-width: 0;
  color: #f4f6fa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(9px, calc(var(--side-drop-card-height, 120px) * 0.054), 14px);
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-panel-drop-product-price.is-free {
  color: #5fe0a5;
}

.side-panel-drop-product-order {
  flex: 0 0 auto;
  padding: clamp(4px, calc(var(--side-drop-card-height, 120px) * 0.027), 7px) clamp(6px, calc(var(--side-drop-card-height, 120px) * 0.043), 11px);
  border-radius: 7px;
  color: #1a1205;
  background: var(--accent, #e8971a);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(7px, calc(var(--side-drop-card-height, 120px) * 0.035), 10px);
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.side-panel-drop-card[data-panel-kind="product"] .side-panel-drop-card-border {
  border-color: rgba(255, 255, 255, 0.09);
}

body.theme-dark .right-panel-drop-layer {
  --right-drop-border: rgba(180, 180, 180, 0.58);
  --right-drop-active: rgba(244, 185, 66, 0.86);
  --right-drop-surface: rgba(15, 15, 15, 0.82);
  --right-drop-card: rgba(22, 22, 22, 0.94);
  --right-drop-text: #f1f5f9;
  --right-drop-muted: #b8b8b8;
  --right-drop-card-shadow: rgba(0, 0, 0, 0.52);
  --right-drop-card-grid: rgba(210, 210, 210, 0.12);
}

body.theme-dark .right-panel-drop-target {
  background: linear-gradient(180deg, rgba(22, 22, 22, 0.86), rgba(10, 10, 10, 0.64));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.3);
}

body.theme-dark .right-panel-drop-target.is-active {
  color: #f4b942;
  background: linear-gradient(180deg, rgba(244, 185, 66, 0.16), rgba(22, 22, 22, 0.72));
  box-shadow: inset 0 0 0 1px rgba(244, 185, 66, 0.26), 0 14px 40px rgba(0, 0, 0, 0.38);
}

body.theme-dark .right-panel-stack-pull-tab {
  border-color: rgba(74, 74, 74, 0.9);
  color: #f3f3f3;
  background: rgba(8, 8, 8, 0.94);
  box-shadow: -8px 10px 24px rgba(0, 0, 0, 0.4);
}

body.theme-dark .right-panel-stack-pull-tab:hover,
body.theme-dark .right-panel-stack-pull-tab:focus-visible {
  color: #1a1205;
  background: rgba(244, 185, 66, 0.96);
  box-shadow: -8px 10px 24px rgba(244, 185, 66, 0.24);
}

body.theme-dark .right-panel-dropped-dock,
body.theme-dark .right-panel-stack-panel {
  border-color: rgba(74, 74, 74, 0.9);
  background: #0c0c0c;
  box-shadow: -10px 18px 48px rgba(0, 0, 0, 0.42);
}

body.theme-dark .right-panel-stack-header {
  border-bottom-color: rgba(74, 74, 74, 0.9);
  background: #050505;
}

body.theme-dark .right-panel-stack-collapse {
  border-color: rgba(210, 210, 210, 0.16);
  color: #f3f3f3;
}

body.theme-dark .right-panel-stack-collapse:hover,
body.theme-dark .right-panel-stack-collapse:focus-visible {
  border-color: rgba(230, 230, 230, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

body.theme-dark .right-panel-stack-panel.is-active {
  border-color: rgba(244, 185, 66, 0.86);
  box-shadow: -10px 18px 48px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(244, 185, 66, 0.18);
}

body.theme-dark .side-panel-drop-card-border {
  border-color: rgba(74, 74, 74, 0.9);
}
/* Rail contrast guardrails: keep side icons readable and side lines non-white across dark backgrounds. */
.right-panel-divider {
  background: var(--rail-divider);
}

.left-view-button,
.left-profile-button,
.left-panel-add-button,
.right-panel-tool {
  color: var(--rail-icon);
}

.left-view-button:hover,
.left-view-button:focus-visible,
.left-panel-add-button:hover,
.left-panel-add-button:focus-visible,
.left-profile-button:hover,
.left-profile-button:focus-visible,
.left-profile-button.is-active,
.right-panel-tool:hover,
.right-panel-tool:focus-visible,
.right-panel-tool.is-active {
  color: var(--rail-icon-active);
  border-color: var(--rail-control-border);
  background: var(--rail-control-hover-bg);
}

.left-view-button.is-active,
.right-panel-tool.is-active {
  color: var(--rail-icon-active);
  background: var(--rail-control-active-bg);
}

.left-view-button.is-active .left-view-icon,
.left-view-button.is-active > svg,
.right-panel-tool.is-active svg {
  color: var(--rail-icon-active);
  stroke: var(--rail-icon-active);
}

.right-panel-more {
  color: var(--rail-icon-active);
  background: var(--rail-control-active-bg);
}

.right-panel-more:hover,
.right-panel-more:focus-visible {
  color: var(--rail-icon-active);
  background: var(--rail-control-hover-bg);
}

.right-panel-more.is-muted,
body.theme-dark .right-panel-more.is-muted,
body.right-side-panel-expanded .right-panel-more.is-muted,
body.theme-dark.right-side-panel-expanded .right-panel-more.is-muted {
  color: var(--rail-muted-icon-on-dark, var(--text-muted));
  background: transparent;
}

body.left-side-panel-expanded .left-view-button,
body.right-side-panel-expanded .right-panel-tool {
  color: var(--rail-icon);
  background: transparent;
}

body.left-side-panel-expanded .left-view-button:hover,
body.left-side-panel-expanded .left-view-button:focus-visible,
body.right-side-panel-expanded .right-panel-tool:hover,
body.right-side-panel-expanded .right-panel-tool:focus-visible {
  color: var(--rail-icon-active);
  border-color: var(--rail-control-border);
  background: var(--rail-control-hover-bg);
}

body.left-side-panel-expanded .left-view-button.is-active,
body.right-side-panel-expanded .right-panel-tool.is-active {
  color: var(--rail-icon-active);
  border-color: var(--rail-control-border);
  background: var(--rail-control-active-bg);
}

body.left-side-panel-expanded .left-view-button svg,
body.left-side-panel-expanded .left-view-button .rail-icon,
body.right-side-panel-expanded .right-panel-tool svg,
body.left-side-panel-expanded .left-view-button .side-tool-action,
body.right-side-panel-expanded .right-panel-tool .side-tool-action {
  color: var(--rail-icon-active);
  stroke: var(--rail-icon-active);
}

body.left-side-panel-expanded .left-view-button.is-active .side-tool-action,
body.right-side-panel-expanded .right-panel-tool.is-active .side-tool-action {
  color: var(--rail-icon-active);
}

body.theme-dark .left-view-button,
body.theme-dark .left-profile-button,
body.theme-dark .left-panel-add-button,
body.theme-dark .right-panel-tool {
  color: var(--rail-icon);
}

body.theme-dark .left-view-button:hover,
body.theme-dark .left-view-button:focus-visible,
body.theme-dark .left-view-button.is-active,
body.theme-dark .left-panel-add-button:hover,
body.theme-dark .left-panel-add-button:focus-visible,
body.theme-dark .left-profile-button:hover,
body.theme-dark .left-profile-button:focus-visible,
body.theme-dark .left-profile-button.is-active,
body.theme-dark .right-panel-tool:hover,
body.theme-dark .right-panel-tool:focus-visible,
body.theme-dark .right-panel-tool.is-active,
body.theme-dark.left-side-panel-expanded .left-view-button:hover,
body.theme-dark.left-side-panel-expanded .left-view-button:focus-visible,
body.theme-dark.left-side-panel-expanded .left-view-button.is-active,
body.theme-dark.right-side-panel-expanded .right-panel-tool:hover,
body.theme-dark.right-side-panel-expanded .right-panel-tool:focus-visible,
body.theme-dark.right-side-panel-expanded .right-panel-tool.is-active {
  color: var(--rail-icon-active);
  border-color: var(--rail-control-border);
  background: var(--rail-control-active-bg);
}

body.theme-dark .left-view-button.is-active .left-view-icon,
body.theme-dark .left-view-button.is-active > svg,
body.theme-dark .left-view-button.is-active [data-left-rail-gradient-stroke],
body.theme-dark .right-panel-tool.is-active svg,
body.theme-dark.left-side-panel-expanded .left-view-button svg,
body.theme-dark.left-side-panel-expanded .left-view-button .rail-icon,
body.theme-dark.right-side-panel-expanded .right-panel-tool svg,
body.theme-dark.left-side-panel-expanded .left-view-button .side-tool-action,
body.theme-dark.right-side-panel-expanded .right-panel-tool .side-tool-action {
  color: var(--rail-icon-active);
  stroke: var(--rail-icon-active);
}

body.theme-dark .right-panel-divider,
body.theme-dark.left-side-panel-expanded .left-profile-button::before {
  background: var(--rail-divider);
}

.resize-handle::after,
body.theme-dark .resize-handle::after {
  background: var(--rail-side-line);
}

.resize-handle:hover::after,
.resize-handle:focus-visible::after,
body.is-resizing-left .left-handle::after,
body.is-resizing-right .right-handle::after,
body.theme-dark .resize-handle:hover::after,
body.theme-dark .resize-handle:focus-visible::after,
body.theme-dark.is-resizing-left .left-handle::after,
body.theme-dark.is-resizing-right .right-handle::after {
  background: var(--rail-side-line-active);
}

.side-panel.right.has-stacked-panels {
  border-left-color: var(--rail-side-line);
}

/* Keep marketplace selection gold after the shared rail guardrails above. */
.marketplace-category-button.is-active,
body.right-side-panel-expanded .marketplace-category-button.is-active {
  border-color: rgba(202, 138, 4, 0.38);
  background: linear-gradient(145deg, rgba(255, 247, 214, 0.96), rgba(254, 240, 181, 0.86));
  box-shadow: 0 1px 5px rgba(146, 92, 0, 0.16);
}

body.theme-dark .marketplace-category-button.is-active,
body.theme-dark.right-side-panel-expanded .marketplace-category-button.is-active {
  border-color: rgba(242, 191, 69, 0.48);
  background: linear-gradient(145deg, rgba(83, 59, 15, 0.92), rgba(48, 36, 14, 0.9));
  box-shadow: 0 1px 7px rgba(242, 191, 69, 0.16);
}

/* My Designs is a fixed Design-workspace shortcut, not a sortable top-rail
   destination. Keep it directly above the 3Dhive menu and remove it entirely
   from the focus order in every other view. */
.side-panel.left > .design-projects-rail-button {
  position: absolute;
  left: 5px;
  bottom: 50px;
  z-index: 5;
}

body:not([data-left-view="design"]) .side-panel.left > .design-projects-rail-button {
  display: none;
}

body[data-left-view="design"] .side-panel.left > .left-seller-page-button:not([hidden]) {
  bottom: 92px;
}

body.left-side-panel-expanded .side-panel.left > .design-projects-rail-button {
  right: 8px;
  left: 8px;
  width: auto;
}

body.left-side-panel-expanded[data-left-view="design"] .side-panel.left > .left-seller-page-button:not([hidden]) {
  bottom: 92px;
}
