﻿/* ── Dim non-selected hotspots while one is being edited ── */
#viewerWrap.hs-active .hs-link-wrap:not(.selected),
#viewerWrap.hs-active .hs-info-wrap:not(.selected) {
  opacity: 0.2;
  pointer-events: none;
  transition: opacity 0.2s;
}
#viewerWrap.hs-active .std-spot-anchor:not(.selected) {
  opacity: 0.2;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* Measure mode used to have its own separate, unconditional dim rule for
   nav/info hotspots covering the whole mode (idle included). Removed --
   nav/info hotspots should behave exactly like they do everywhere else:
   full opacity/interactive while idle (a tap on one still always selects
   it first, same priority link/info hotspots already get over measurement
   placement -- see placeAt()/_flatPhotoClick's measurement hit-test order),
   and only dim via the shared #viewerWrap.hs-active rule above once
   something is actually selected/being edited (hasPending -- see
   _updateMeasureActPanelVisibility, which sets hs-active for measure mode
   the same way selectHotspot/_selectFlatSpot do for hotspots). Mirrors
   Link/Info, which never had a mode-wide dim of their own either. ── */

/* ── Blur mode: same declutter as Measure -- also hides the measurements
   themselves (unlike Measure mode, which keeps its own tool's markers
   visible), since a blur stroke painted over a measurement's line/dots is
   confusing to look at and they're not relevant to picking a region to hide. ── */
#viewerWrap.mode-blur .hs-link-wrap,
#viewerWrap.mode-blur .hs-info-wrap,
#viewerWrap.mode-blur .std-spot-anchor {
  display: none;
}
#viewerWrap.mode-blur #measureOverlay,
#viewerWrap.mode-blur #flatMeasureCanvas {
  visibility: hidden;
}

/* ── Thumbnail capture mode: hide overlays, keep the image ── */
/* Target only our hotspot elements, not Marzipano's internal control layer */
#viewer.thumbnail-mode .hs-link-wrap,
#viewer.thumbnail-mode .hs-info-wrap { visibility: hidden; }
/* Measure overlay, action bar and hints are in #viewerWrap */
.viewer-wrap.thumbnail-mode #measureOverlay,
.viewer-wrap.thumbnail-mode .hs-selected-actions,
.viewer-wrap.thumbnail-mode .hs-panel,
.viewer-wrap.thumbnail-mode .mode-hint { visibility: hidden; }
/* Sidebars and scene strip are hidden via JS in setSubStep to avoid specificity fights */
#flatViewer.thumbnail-mode #flatSpotOverlay,
#flatViewer.thumbnail-mode #flatMeasureCanvas { visibility: hidden; }

/* ── Unit tabs (editor) ── */
.editor-unit-strip {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px 4px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0;
  background: var(--bg); border-bottom: 1px solid var(--border-lt);
}
.editor-unit-strip::-webkit-scrollbar { display: none; }
.editor-unit-strip .unit-tab {
  padding: 3px 11px; font-size: 11px;
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.45);
}
.editor-unit-strip .unit-tab.active {
  background: rgba(109,40,217,.65); border-color: rgba(167,139,250,.5);
  color: #fff; font-weight: var(--fw-semi);
}
.editor-unit-strip .unit-tab-add {
  width: 24px; height: 24px;
  border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.3);
}
.editor-unit-strip .unit-tab-add:hover {
  border-color: rgba(167,139,250,.7); color: rgba(167,139,250,.85);
}

/* ── Scene strip ── */
.scene-strip {
  background: var(--bg);
  border-top: 1px solid var(--border-lt);
  display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  overflow-x: auto; flex-shrink: 0; scrollbar-width: none;
}
.scene-strip::-webkit-scrollbar { display: none; }
.strip-thumb {
  flex-shrink: 0; position: relative; cursor: pointer; border-radius: 9px; overflow: hidden;
  width: 76px; height: 52px; border: 2.5px solid transparent; transition: all .18s;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.strip-thumb.active { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 2px 8px rgba(0,0,0,.3); }
.strip-scene-name {
  position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6);
  color: white; font-size: 10px; padding: 2px 4px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: var(--fw-medium);
}
.dir-badge {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  font-size: 10px; font-weight: var(--fw-bold); display: flex; align-items: center; justify-content: center;
  border: 1.5px solid white;
}
.dir-badge.set { background: #059669; color: white; }
.dir-badge.unset { background: #f59e0b; color: white; }
.hs-badge {
  position: absolute; top: 3px; right: 3px; background: var(--teal); color: white;
  font-size: 9px; font-weight: 700; border-radius: 8px; padding: 1px 5px;
}
.strip-360-badge {
  position: absolute; top: 3px; left: 3px;
  background: rgba(124,58,237,.85); color: white;
  font-size: 9px; font-weight: var(--fw-bold); border-radius: 4px; padding: 1px 4px;
  letter-spacing: .3px; pointer-events: none;
}
.strip-add-btn {
  flex-shrink: 0; width: 44px; height: 52px; border-radius: 9px;
  border: 2px dashed rgba(255,255,255,.25); background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.55); cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.strip-add-btn:hover { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(255,255,255,.1); }

/* ── Viewer ── */
.viewer-wrap { flex: 1; position: relative; background: var(--bg); min-height: 160px; }
#viewer { position: absolute; inset: 0; }
.viewer-wrap.mode-link { cursor: crosshair; }
.viewer-wrap.mode-info { cursor: cell; }
.mode-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(9,9,11,0.82); color: var(--indigo-lt);
  padding: 7px 16px; border-radius: 22px;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); pointer-events: none; display: none; z-index: 10;
  white-space: nowrap; backdrop-filter: blur(10px);
  border: 1px solid rgba(124,58,237,0.35);
  box-shadow: 0 4px 16px rgba(0,0,0,.4), 0 0 12px rgba(109,40,217,0.15);
}
.mode-hint.show { display: block; }

/* ── Arc compass ── */
.compass-tape {
  display: none; position: absolute; bottom: 0; left: 0; width: 100%; height: 150px;
  pointer-events: none; z-index: 10;
}
.compass-tape.show { display: block; pointer-events: all; cursor: ew-resize; }
/* .confirmed used to also set pointer-events:none/cursor:default here,
   permanently locking the tape the moment a direction was first confirmed --
   drag listeners are now always attached (see startCompass()), so this can't
   block interaction anymore or a re-attached listener would never actually
   be reachable through the disabled pointer-events. */
.compass-confirm-btn {
  display: none; position: absolute; bottom: 28px; left: calc(50% - 44px); transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(109,40,217,0.12); border: 2px solid rgba(167,139,250,0.55);
  align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  color: rgba(167,139,250,0.9); transition: background .15s, transform .1s, box-shadow .15s, border-color .15s; z-index: 12; pointer-events: all;
  box-shadow: 0 4px 14px rgba(109,40,217,0.18);
}
.compass-confirm-btn.show { display: flex; }
.compass-confirm-btn:hover { background: rgba(109,40,217,0.28); border-color: rgba(167,139,250,0.8); box-shadow: 0 4px 20px rgba(109,40,217,0.3); }
.compass-confirm-btn:active { transform: translateX(-50%) scale(0.93); }
.compass-confirm-btn.confirmed {
  background: rgba(109,40,217,0.85); border-color: rgba(167,139,250,0.7); color: #fff;
  box-shadow: 0 4px 20px rgba(109,40,217,0.45);
}
.compass-confirm-btn.confirmed:hover { background: rgba(109,40,217,1); box-shadow: 0 4px 26px rgba(109,40,217,0.6); }
.compass-done-btn {
  position: absolute; bottom: 40px; left: calc(50% + 44px); transform: translateX(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(9,9,11,0.55); border: 1.5px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85); cursor: pointer; z-index: 12;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); padding: 0;
  transition: background .15s, border-color .15s, transform .1s;
}
.compass-done-btn:hover { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.6); color: #4ade80; }
.compass-done-btn:active { transform: translateX(-50%) scale(0.92); }

/* ── Persistent direction badge (read-only, once direction is confirmed) ── */
.direction-badge {
  position: absolute; top: 12px; right: 12px; width: 52px; height: 52px;
  border-radius: 50%; background: rgba(9,9,11,0.72); border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(8px); z-index: 10; pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.direction-badge-dial { position: absolute; inset: 0; }
.direction-badge-n {
  position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  color: #f87171; font-size: 12px; font-weight: 800; font-family: -apple-system, system-ui, sans-serif;
}
.direction-badge-marker {
  position: absolute; top: 50%; left: 50%; width: 2.5px; height: 10px;
  background: rgba(255,255,255,0.65); transform: translate(-50%, -100%);
}

/* ── Measure editor toolbar ── */
.measure-color-palette {
  display: none; position: absolute; left: 68px; top: 50%; transform: translateY(-50%);
  z-index: 13; pointer-events: auto;
  flex-direction: column; gap: 10px;
  background: rgba(9,9,11,0.9); backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 16px;
  padding: 12px 14px;
}
.measure-color-palette.show { display: flex; }
.measure-done-btn {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(9,9,11,0.55); border: 1.5px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85); cursor: pointer; z-index: 12;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); padding: 0;
  transition: background .15s, border-color .15s, transform .1s;
}
.measure-done-btn:hover { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.6); color: #4ade80; }
.measure-done-btn:active { transform: translateX(-50%) scale(0.92); }

/* ── Vertical sub-step icons ── */
/* Fully hide (not dim) the left/right tool bars while a hotspot or
   measurement is selected -- .hs-active is shared by both
   selectHotspot/_selectFlatSpot (hotspots) and
   _updateMeasureActPanelVisibility (measurements being placed/edited), so
   this one rule covers both. Unlike hotspots/measurements themselves (which
   stay visible, just dimmed, elsewhere in this file), the tool bars go fully
   invisible here -- its own item's action panel (Rotate/Tilt/Resize/Color/
   Delete/Done) sits at this same left-middle position, so leaving it
   merely faded would still visually collide with that panel. */
.viewer-wrap.hs-active .substep-icons,
.viewer-wrap.hs-active .ssicons-right {
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.substep-icons, .ssicons-right { transition: opacity 0.15s; }

/* ── Tool panels (left & right side of viewer) ── */
.substep-icons {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px; z-index: 30;
  background: rgba(9,9,11,0.45); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 5px 3px; backdrop-filter: blur(10px);
}
.ssicons-right {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px; z-index: 30;
  background: rgba(9,9,11,0.45); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 5px 3px; backdrop-filter: blur(10px);
}

/* Mobile: compact icon-only buttons */
.ssicon-btn {
  width: 36px; height: 36px; border-radius: 50%; position: relative;
  background: transparent; border: 1px solid transparent;
  color: rgba(255,255,255,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; transition: all .18s; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
/* Labels hidden on mobile by default */
.ssicon-label { display: none; }

/* Long-press tooltip (JS adds .lp-peek class) */
.ssicon-btn.lp-peek::before {
  content: attr(data-label);
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: rgba(9,9,11,0.92); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  pointer-events: none; z-index: 50;
  border: 1px solid rgba(255,255,255,0.12);
}
/* Right panel tooltips appear to the left */
.ssicons-right .ssicon-btn.lp-peek::before {
  left: auto; right: calc(100% + 8px);
}

.ssicon-btn:hover {
  border-color: rgba(124,58,237,0.4); color: var(--indigo-lt);
  background: rgba(124,58,237,0.12);
}
.ssicon-btn.active {
  background: rgba(109,40,217,0.8); border-color: rgba(167,139,250,0.45); color: #fff;
  box-shadow: 0 0 10px rgba(109,40,217,0.3);
}
.ssicon-btn.ss-disabled {
  opacity: 0.35; cursor: not-allowed;
  pointer-events: auto;
}
.ssicon-btn.ss-disabled::after {
  content: '✕'; position: absolute; bottom: -3px; right: -3px;
  width: 14px; height: 14px; border-radius: 50%; background: #ef4444;
  border: 1.5px solid rgba(10,14,30,0.85);
  font-size: 7px; font-weight: 900; color: white;
  line-height: 14px; text-align: center; display: flex;
  align-items: center; justify-content: center;
}

/* Desktop: spacious buttons with inline labels */
@media (min-width: 768px) {
  .substep-icons, .ssicons-right {
    background: rgba(9,9,11,0.42); gap: 3px; padding: 6px 5px;
  }
  .ssicon-btn {
    width: 52px; height: auto; padding: 8px 4px; gap: 4px; border-radius: 50px;
  }
  .ssicon-label {
    display: block; font-size: 9px; font-weight: 600; letter-spacing: 0.3px;
    text-transform: uppercase; line-height: 1; color: inherit;
  }
  /* Tooltips not needed on desktop since labels are visible */
  .ssicon-btn.lp-peek::before { display: none; }
}

/* ── Sub-step panels ── */
.substep-panel {
  background: var(--surface); flex-shrink: 0; padding: 12px 16px;
  border-top: 1px solid var(--border-light);
}
.ss-hint { font-size: var(--fs-sm); color: var(--text-3); line-height: var(--lh-base); margin-bottom: 9px; }
.ss-hs-list { display: flex; flex-direction: column; gap: 6px; max-height: 90px; overflow-y: auto; }
.ss-hs-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 9px; font-size: var(--fs-sm);
  transition: border-color .15s;
}
.ss-hs-item:hover { border-color: rgba(124,58,237,.4); }
.ss-hs-badge { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.ss-hs-badge.link { background: rgba(124,58,237,.15); color: var(--indigo-lt); }
.ss-hs-badge.info { background: rgba(251,146,60,.12); color: #fb923c; }
.ss-hs-item span { flex: 1; font-weight: var(--fw-normal); color: var(--text); }
.ss-hs-del { background: none; border: none; color: var(--text-4); font-size: 18px; cursor: pointer; padding: 2px 5px; flex-shrink: 0; transition: color .15s; line-height: 1; }
.ss-hs-del:active { color: #ef4444; }
.ss-hs-rot {
  background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted);
  font-size: 14px; cursor: pointer; padding: 2px 7px; flex-shrink: 0; line-height: 1;
  -webkit-tap-highlight-color: transparent; transition: all .15s;
}
.ss-hs-rot:hover { border-color: rgba(124,58,237,.4); color: var(--indigo-lt); }
.ss-hs-rot:active { background: rgba(124,58,237,.1); }
.ss-hs-move {
  background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted);
  font-size: 12px; cursor: pointer; padding: 2px 7px; flex-shrink: 0; line-height: 1;
  -webkit-tap-highlight-color: transparent; transition: all .15s;
}
.ss-hs-move:hover { border-color: var(--teal); color: var(--teal); }
.ss-hs-move:active { background: rgba(14,165,233,.1); }
.ss-empty { font-size: 13px; color: var(--text-4); text-align: center; padding: 8px 0; }

/* ── Hotspot elements ── */
.hs-link-wrap, .hs-info-wrap {
  position: relative; display: flex; flex-direction: column; align-items: center;
  transform: translate(-50%, calc(-50% - 10px));
  perspective: 280px;
}
/* Flat spots wrap this in .std-spot-anchor, which already centers itself at
   the tap point via its own translate(-50%,-50%) -- the rule above was
   written for 360, where the wrap IS the hotspot and that's the only
   centering applied. Stacking both on flat double-centered it, visually
   offsetting the icon from the anchor's actual position/tap point by
   roughly half the icon's own size. Keep just the -10px lift (consistent
   with 360's slight upward nudge) and drop the redundant -50%/-50%. */
.std-spot-wrap {
  transform: translateY(-10px);
}
.hs-link-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(109,40,217,.9); border: 2.5px solid rgba(167,139,250,.8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 16px rgba(109,40,217,.5); cursor: grab;
  transform: rotateX(60deg) rotateY(0deg);
  /* Flat spots render this as a real <button> (360 uses a <div>, which
     never gets this) -- without resetting the browser's default tap/focus
     highlight, it stayed visibly washed-out while focused, i.e. right after
     tapping it to select/edit, which read as "the icon is too light." */
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.hs-link-btn svg { width: 22px; height: 22px; }
.hs-viewer-label {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  background: rgba(15,23,42,.8); color: white; padding: 3px 9px; border-radius: 11px;
  font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none;
  backdrop-filter: blur(4px);
}
.hs-info-btn {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(245,158,11,.95);
  border: 2.5px solid white; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; font-size: 20px; box-shadow: 0 3px 12px rgba(0,0,0,.4); cursor: grab;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.hs-dragging, .hs-dragging * { cursor: grabbing !important; }
.hs-info-popup {
  position: absolute; bottom: 56px; left: 50%; transform: translateX(-50%);
  background: var(--surface-2); border-radius: var(--radius); padding: 12px 16px;
  min-width: 160px; max-width: 210px; box-shadow: var(--shadow-lg); display: none; z-index: 20;
  border: 1px solid var(--border);
}
.hs-info-popup.show { display: block; }
.hs-info-popup-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.hs-info-popup-text { font-size: 12px; color: var(--muted); line-height: 1.5; }
.hs-link-wrap.selected .hs-link-btn,
.hs-info-wrap.selected .hs-info-btn {
  border-color: rgba(167,139,250,0.9);
  box-shadow: 0 0 0 4px rgba(109,40,217,0.3), 0 3px 14px rgba(0,0,0,.5);
}

/* ── Hotspot action bar ── */
/* ── Hotspot edit panels — match ssicon style ── */
.hs-selected-actions {
  display: none; position: absolute; inset: 0; z-index: 12; pointer-events: none;
}
.hs-selected-actions.show { display: block; }

/* Panel containers — same look as .substep-icons / .ssicons-right */
.hs-panel {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(9,9,11,0.45); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 5px 3px; backdrop-filter: blur(10px);
}
.hs-panel-left   { left: 10px;  top: 50%; transform: translateY(-50%); }
.hs-panel-right  { right: 10px; top: 50%; transform: translateY(-50%); }
.hs-panel-bottom {
  bottom: 16px; left: 50%; transform: translateX(-50%);
  flex-direction: row; padding: 3px 5px;
}

/* Buttons — same as .ssicon-btn */
.hs-act-btn {
  width: 36px; height: 36px; border-radius: 50%; position: relative;
  background: transparent; border: 1px solid transparent;
  color: rgba(255,255,255,0.5); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 0; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent; transition: all .18s;
}
.hs-act-btn svg { width: 15px; height: 15px; flex-shrink: 0; display: block; }
.hs-act-label { display: none; }

/* Tooltip — left panel: appear to the right */
.hs-panel-left .hs-act-btn.lp-peek::before {
  content: attr(data-label);
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: rgba(9,9,11,0.92); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  pointer-events: none; z-index: 50; border: 1px solid rgba(255,255,255,0.12);
}
/* Tooltip — right panel: appear to the left */
.hs-panel-right .hs-act-btn.lp-peek::before {
  content: attr(data-label);
  position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: rgba(9,9,11,0.92); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  pointer-events: none; z-index: 50; border: 1px solid rgba(255,255,255,0.12);
}
/* Tooltip — bottom panel: appear above */
.hs-panel-bottom .hs-act-btn.lp-peek::before {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: rgba(9,9,11,0.92); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
  padding: 4px 9px; border-radius: 7px; white-space: nowrap;
  pointer-events: none; z-index: 50; border: 1px solid rgba(255,255,255,0.12);
}

.hs-act-btn:hover { border-color: rgba(124,58,237,0.4); color: var(--indigo-lt); background: rgba(124,58,237,0.12); }
.hs-act-btn:active { transform: scale(0.88); }

/* Desktop: pill with label — same as ssicon-btn @media */
@media (min-width: 768px) {
  .hs-panel { gap: 3px; padding: 6px 5px; background: rgba(9,9,11,0.42); }
  .hs-panel-bottom { padding: 5px 8px; flex-direction: row; }
  .hs-act-btn { width: 52px; height: auto; padding: 8px 4px; gap: 4px; border-radius: 50px; }
  .hs-act-label { display: block; font-size: 9px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; line-height: 1; color: inherit; }
  .hs-panel-bottom .hs-act-btn { width: auto; padding: 6px 12px; flex-direction: row; gap: 5px; border-radius: 50px; }
  .hs-act-btn.lp-peek::before { display: none; }
}

/* ── Colour palette ── */
.hs-color-palette {
  display: none; position: absolute; left: 68px; top: 50%; transform: translateY(-50%);
  z-index: 13; pointer-events: auto;
  flex-direction: column; gap: 10px;
  background: rgba(9,9,11,0.88); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 16px;
  padding: 12px 14px;
}
.hs-color-palette.show { display: flex; }
.hs-palette-section { display: flex; flex-direction: column; gap: 6px; }
.hs-palette-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: rgba(255,255,255,0.38); line-height: 1;
}
.hs-palette-grid { display: grid; grid-template-columns: repeat(4, 22px); gap: 5px; }
.hs-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.22); cursor: pointer; padding: 0; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.hs-swatch:hover  { transform: scale(1.18); border-color: rgba(255,255,255,0.65); }
.hs-swatch.active { border-color: #fff; box-shadow: 0 0 0 2.5px rgba(255,255,255,0.35); transform: scale(1.08); }
.hs-swatch-custom {
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  background: rgba(255,255,255,0.07) !important; border-style: dashed !important;
  border-color: rgba(255,255,255,0.3) !important; color: rgba(255,255,255,0.5);
}
.hs-swatch-custom input[type="color"] {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; padding: 0; border: none;
}
.hs-act-color.active {
  background: rgba(109,40,217,0.8); border-color: rgba(167,139,250,0.45); color: #fff;
  box-shadow: 0 0 10px rgba(109,40,217,0.3);
}

/* Per-action colour accents (override hover/active) */
.hs-act-done  { color: #c4b5fd; border-color: rgba(124,58,237,0.5); background: rgba(124,58,237,0.2); }
.hs-act-done:hover  { background: rgba(124,58,237,0.35); border-color: #a78bfa; color: #ede9fe; }
.hs-act-delete { color: rgba(239,68,68,0.75); }
.hs-act-delete:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.55); color: #fca5a5; }
.hs-act-edit  { color: rgba(99,179,237,0.85); }
.hs-act-edit:hover  { background: rgba(99,179,237,0.15); border-color: rgba(99,179,237,0.5); color: #90cdf4; }
.hs-act-enter { color: rgba(20,184,166,0.85); }
.hs-act-enter:hover { background: rgba(20,184,166,0.15); border-color: rgba(20,184,166,0.5); color: var(--teal); }
.hs-act-resize.resizing { cursor: grabbing; background: rgba(34,197,94,0.2); border-color: rgba(34,197,94,0.8); }
.hs-act-tilt.tilting { cursor: grabbing; background: rgba(251,146,60,0.25); border-color: rgba(251,146,60,0.8); }
.hs-act-rotate.active, .hs-act-tilt.active, .hs-act-resize.active {
  background: rgba(109,40,217,0.8); border-color: rgba(167,139,250,0.45); color: #fff;
  box-shadow: 0 0 10px rgba(109,40,217,0.3);
}

/* ── Rotation ring ── */
.hs-rot-ring {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; pointer-events: none; z-index: 30;
}
.hs-rot-dot {
  position: absolute;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: rgba(9,9,11,0.75);
  border: 1.5px solid rgba(255,255,255,0.55);
  pointer-events: all;
  touch-action: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.hs-rot-dot:hover {
  background: rgba(124,58,237,0.7);
  border-color: #c4b5fd;
  /* scale up without losing the translate — override inline transform with scale via filter trick */
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}
.hs-rot-dot.active {
  background: #7c3aed;
  border-color: #c4b5fd;
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.35);
}

/* ── Tilt dots ── */
.hs-tilt-ring {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; pointer-events: none; z-index: 30;
}
.hs-tilt-dot {
  position: absolute;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: rgba(9,9,11,0.75);
  border: 1.5px solid rgba(255,255,255,0.55);
  pointer-events: all;
  touch-action: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.hs-tilt-dot:hover {
  background: rgba(124,58,237,0.7);
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}
.hs-act-tilt.active { background: rgba(124,58,237,0.25); border-color: rgba(124,58,237,0.6); color: #c4b5fd; }

/* ── Resize handles ── */
.hs-resize-ring {
  position: absolute; top: 50%; left: 50%;
  width: 0; height: 0; pointer-events: none; z-index: 30;
}
.hs-resize-handle {
  position: absolute;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: rgba(9,9,11,0.75);
  border: 1.5px solid rgba(255,255,255,0.55);
  pointer-events: all;
  touch-action: none;
  transition: background 0.12s, border-color 0.12s;
}
.hs-resize-handle:hover {
  background: rgba(124,58,237,0.7);
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}

/* ── Blur brush preview canvas ── */
.blur-preview-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9;
}

/* ── Blur action bar (floating) ── */
.blur-actions {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(9,9,11,0.82); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px; padding: 6px 10px;
  backdrop-filter: blur(10px); z-index: 16; pointer-events: all;
}
.blur-size-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid transparent;
  background: transparent; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; color: rgba(255,255,255,0.45); transition: all .15s;
}
.blur-size-btn:hover { color: rgba(255,255,255,0.8); }
.blur-size-btn.active { border-color: rgba(255,255,255,0.6); color: #fff; }
.blur-actions-sep {
  width: 1px; height: 24px; background: rgba(255,255,255,0.15); margin: 0 2px;
}
.blur-action-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2);
  background: transparent; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: all .15s;
}
.blur-action-btn:disabled { opacity: 0.3; cursor: default; }
.blur-action-clear { color: #f87171; border-color: rgba(248,113,113,0.35); }
.blur-action-clear:not(:disabled):hover { border-color: rgba(248,113,113,0.8); background: rgba(248,113,113,0.12); }
.blur-action-apply { color: #34d399; border-color: rgba(52,211,153,0.35); }
.blur-action-apply:not(:disabled):hover { border-color: rgba(52,211,153,0.8); background: rgba(52,211,153,0.12); }

/* ── Measurement canvas overlay ── */
.measure-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
}

/* ── Measure inline label input ── */
.measure-inline-input {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 4px;
  background: rgba(5,10,25,0.92); border: 1.5px solid #ffb300;
  border-radius: 20px; padding: 5px 6px 5px 12px;
  z-index: 20; pointer-events: all;
  box-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.measure-unit-select {
  background: rgba(255,179,0,0.12); border: 1px solid rgba(255,179,0,0.35);
  color: #ffb300; font-size: 11px; font-weight: 700;
  border-radius: 6px; padding: 3px 5px; outline: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  text-align: center; width: 34px; flex-shrink: 0;
}
.measure-unit-select option { background: #0f172a; color: #ffb300; }
.measure-inline-input input {
  background: none; border: none; outline: none;
  color: #ffb300; font-weight: 700; font-size: 13px;
  width: 70px; caret-color: #ffb300; min-width: 0;
}
.measure-inline-input input::placeholder { color: rgba(255,179,0,0.4); }
.measure-inline-input input::-webkit-inner-spin-button,
.measure-inline-input input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Thumbnail capture ── */
.ss-thumb-panel { padding: 10px 12px; }
.thumb-capture-btn {
  position: absolute; bottom: 28px; left: calc(50% - 44px); transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(109,40,217,0.85); border: 2px solid rgba(167,139,250,0.7);
  color: #fff; cursor: pointer; z-index: 13;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(109,40,217,0.45);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.thumb-capture-btn:hover { background: rgba(109,40,217,1); box-shadow: 0 4px 26px rgba(109,40,217,0.6); }
.thumb-capture-btn:active { transform: translateX(-50%) scale(0.93); }
.thumb-done-btn {
  position: absolute; bottom: 40px; left: calc(50% + 44px); transform: translateX(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(9,9,11,0.55); border: 1.5px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85); cursor: pointer; z-index: 13;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s, transform .1s;
}
.thumb-done-btn:hover { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.6); color: #4ade80; }
.thumb-done-btn:active { transform: translateX(-50%) scale(0.92); }
.thumb-overlay-tile {
  position: absolute; bottom: 108px; left: 50%; transform: translateX(-50%);
  width: 160px; border-radius: 10px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 4px 18px rgba(0,0,0,.6);
  background: #000; z-index: 10; pointer-events: none;
}
.thumb-overlay-tile img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.thumb-overlay-label {
  display: block; padding: 4px 8px; font-size: 10px; color: rgba(255,255,255,0.7);
  text-align: center; background: rgba(0,0,0,0.65);
}

/* ── Guided tour spotlight ── */
.gt-ov {
  position: fixed;
  /* faint, not dark -- the ring on .gt-spotlight is enough to show what's
     in focus; the rest of the screen just needs to be un-clickable and
     dimmed enough to read as inactive, while staying light enough that the
     user can still see what's changing there (e.g. a hotspot appearing) as
     they interact with the real target. */
  background: rgba(0,0,0,0.35);
  z-index: 9095;
  /* auto (not none): these 4 rectangles are sized in JS (_gtSpotlight) to
     frame the spotlight hole, and must actually catch clicks so the rest of
     the screen is inert during the tour -- only the hole (and the card,
     which sits above at z-index 9100) stays interactive. */
  pointer-events: auto;
  transition: top 0.28s cubic-bezier(0.4,0,0.2,1),
              left 0.28s cubic-bezier(0.4,0,0.2,1),
              right 0.28s cubic-bezier(0.4,0,0.2,1),
              bottom 0.28s cubic-bezier(0.4,0,0.2,1),
              width 0.28s cubic-bezier(0.4,0,0.2,1),
              height 0.28s cubic-bezier(0.4,0,0.2,1);
}
.gt-spotlight {
  position: fixed;
  border-radius: 10px;
  border: 2px solid rgba(124,58,237,0.75);
  /* No dark spread here either (see .gt-ov) -- just the ring + glow to mark
     the focus area, on top of an otherwise fully visible screen. pointer-
     events:none so a click inside the hole reaches the real target
     underneath it, not this element; the 4 .gt-ov rectangles
     (pointer-events:auto) are what actually block clicks outside the hole. */
  box-shadow: 0 0 0 4px rgba(124,58,237,0.13),
              0 0 22px rgba(124,58,237,0.22);
  z-index: 9096;
  pointer-events: none;
  display: none;
  transition: top 0.28s cubic-bezier(0.4,0,0.2,1),
              left 0.28s cubic-bezier(0.4,0,0.2,1),
              width 0.28s cubic-bezier(0.4,0,0.2,1),
              height 0.28s cubic-bezier(0.4,0,0.2,1);
}
.gt-spotlight::after {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 14px;
  border: 1.5px solid rgba(124,58,237,0.25);
  animation: gtPulse 2s ease-in-out infinite;
}
@keyframes gtPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.03); }
}

.gt-modal {
  position: fixed;
  z-index: 9100;
  pointer-events: auto;
  background: #16161f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 13px 15px 11px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  overflow: hidden;
}
.gt-modal.gt-anim {
  animation: gtSlideIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes gtSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.gt-modal-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.gt-progress { display: flex; gap: 4px; flex: 1; }
.gt-dot {
  height: 2px; border-radius: 2px; flex: 1;
  background: rgba(255,255,255,0.1); transition: background 0.3s;
}
.gt-dot.done { background: rgba(124,58,237,0.4); }
.gt-dot.active { background: var(--indigo-lt); }

.gt-modal-close {
  flex-shrink: 0; width: 24px; height: 24px;
  background: rgba(255,255,255,0.07); border: none;
  border-radius: 6px; color: rgba(255,255,255,0.4);
  font-size: 14px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.gt-modal-close:hover { background: rgba(255,255,255,0.13); color: #fff; }

.gt-step-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--indigo-lt); margin-bottom: 2px;
}
.gt-title {
  font-size: 15px; font-weight: 700; color: #fff;
  letter-spacing: -0.1px; margin-bottom: 4px; line-height: 1.2;
}
.gt-desc {
  font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.5);
  margin-bottom: 11px;
}

.gt-actions {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.07); padding-top: 10px;
}

/* ── GT interaction hint (animated finger) ── */
.gt-hint {
  position: fixed;
  z-index: 9097;
  pointer-events: none;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.55));
}
.gt-hint-tap  { animation: gtHintTap  1.8s ease-in-out infinite; }
.gt-hint-drag { animation: gtHintDrag 2.6s ease-in-out infinite; }
.gt-hint-drag-arc { animation: gtHintDragArc 2.6s ease-in-out infinite; }
@keyframes gtHintTap {
  0%   { opacity: 0; transform: translateY(0); }
  12%  { opacity: 1; transform: translateY(0); }
  35%  { opacity: 1; transform: translateY(6px); }
  55%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(0); }
}
@keyframes gtHintDrag {
  0%   { opacity: 0; transform: translate(0, 0); }
  10%  { opacity: 1; transform: translate(0, 0); }
  28%  { opacity: 1; transform: translate(0, 6px); }
  42%  { opacity: 1; transform: translate(0, 0); }
  70%  { opacity: 0.8; transform: translate(var(--gt-dx), var(--gt-dy)); }
  84%  { opacity: 0;   transform: translate(var(--gt-dx), var(--gt-dy)); }
  100% { opacity: 0;   transform: translate(0, 0); }
}
/* Same beats as gtHintDrag, but the midpoint (42%) bulges out to
   --gt-arc-dx/--gt-arc-dy instead of settling back to (0,0) -- interpolating
   start -> bulge -> end across smoothed (ease-in-out) keyframes reads as a
   curved sweep rather than a straight line, like an actual brush stroke. */
@keyframes gtHintDragArc {
  0%   { opacity: 0; transform: translate(0, 0); }
  10%  { opacity: 1; transform: translate(0, 0); }
  42%  { opacity: 1; transform: translate(var(--gt-arc-dx), var(--gt-arc-dy)); }
  70%  { opacity: 0.8; transform: translate(var(--gt-dx), var(--gt-dy)); }
  84%  { opacity: 0;   transform: translate(var(--gt-dx), var(--gt-dy)); }
  100% { opacity: 0;   transform: translate(0, 0); }
}
.gt-skip-btn {
  background: none; border: none; font-size: 13px;
  color: rgba(255,255,255,0.3); cursor: pointer;
  padding: 6px 0; transition: color 0.15s; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.gt-skip-btn:hover { color: rgba(255,255,255,0.55); }
.gt-nav { display: flex; gap: 8px; align-items: center; }
.gt-next-btn {
  padding: 9px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, #7c3aed, #5b21b6); color: #fff; border: none; cursor: pointer;
  transition: opacity 0.15s; letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}
.gt-next-btn:active { opacity: 0.82; }
.gt-next-btn.finish { background: linear-gradient(135deg, #059669, #047857); }

/* ── Guided tour topic picker ── */
.gt-menu-overlay {
  position: fixed; inset: 0; z-index: 9200;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.gt-menu-card {
  width: 100%; max-width: 340px;
  background: #16161f;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 13px 15px 15px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.7);
  animation: gtSlideIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.gt-menu-title {
  flex: 1; font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -0.1px;
}
.gt-menu-list {
  display: flex; flex-direction: column; gap: 4px; margin: 4px 0 12px;
}
.gt-menu-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 9px; border-radius: 10px;
  background: none; border: none; cursor: pointer; text-align: left;
  color: rgba(255,255,255,0.82); font-size: 13.5px; font-weight: 500;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.gt-menu-item:hover, .gt-menu-item:active { background: rgba(255,255,255,0.07); }
.gt-menu-item svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--indigo-lt); }
.gt-menu-full-btn {
  width: 100%; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600;
  background: rgba(124,58,237,0.13); color: var(--indigo-lt); border: none; cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.gt-menu-full-btn:hover { background: rgba(124,58,237,0.22); }

/* ── Plan picker overlay ── */
.plan-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px 16px 48px; box-sizing: border-box;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.plan-overlay.open { animation: planOverlayIn 0.2s ease; }
@keyframes planOverlayIn { from { opacity: 0; } to { opacity: 1; } }

.plan-panel {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 16px;
  animation: planPanelIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
  margin: auto;
}
@keyframes planPanelIn { from { opacity:0; transform:scale(0.95) translateY(12px); } to { opacity:1; transform:none; } }

.plan-panel-close {
  position: fixed; top: 16px; right: 16px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5); width: 32px; height: 32px; border-radius: 50%;
  font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; z-index: 1;
}
.plan-panel-close:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* Header area — icon + title + sub, styled like viewer pp-hdr-area */
.plan-panel-head {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 0 4px; text-align: center;
}
.plan-panel-icon {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: rgba(124,58,237,0.14); border: 1px solid rgba(124,58,237,0.28);
  display: flex; align-items: center; justify-content: center; color: var(--indigo-lt);
  margin-bottom: 4px; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.plan-panel-title { font-size: 18px; font-weight: 800; color: #fff; margin: 0; letter-spacing: -.01em; }
.plan-panel-sub { font-size: 13px; color: rgba(255,255,255,0.4); margin: 0; line-height: 1.5; }

/* Highlight banner (upgrade context) */
.plan-msg-banner {
  text-align: center; font-size: 14px; font-weight: 600; color: #f87171;
  padding: 10px 16px; background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2); border-radius: 10px;
}

/* Cards — vertical list, full-width, matching viewer pp-vcard style */
.plan-grid {
  display: flex; flex-direction: column; gap: 14px;
}
.plan-grid-2 { max-width: 100%; }

.pc {
  position: relative; border-radius: 16px; padding: 20px 16px 16px;
  border: 1.5px solid rgba(255,255,255,0.09);
  background: #111118;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pc:hover { border-color: rgba(124,58,237,0.4); background: rgba(124,58,237,0.05); }
.pc-popular {
  border-color: #8b5cf6;
  box-shadow: 0 0 24px rgba(124,58,237,0.12);
}
.pc-popular:hover { box-shadow: 0 0 32px rgba(124,58,237,0.2); }

/* Top row inside card — name left, price right */
.pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }

.pc-pill {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px; padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}
.pc-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.35); padding-top: 2px;
}
.pc-badge-accent { color: var(--indigo-lt); }
.pc-badge-amber  { color: #f59e0b; }

.pc-price {
  font-size: 28px; font-weight: 800; color: #fff;
  letter-spacing: -1px; line-height: 1;
}
.pc-period { font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 400; }
.pc-name { display: none; }

.pc-features {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.pc-features li {
  font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.4;
  padding-left: 18px; position: relative;
}
.pc-features li::before {
  content: '✓'; position: absolute; left: 0;
  color: rgba(124,58,237,0.8); font-size: 12px; font-weight: 700;
}
.pc-btn {
  width: 100%; padding: 12px; border-radius: 10px; font-size: 14px; font-weight: 700;
  border: none; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.55);
  cursor: pointer; transition: all 0.15s; min-height: 44px;
}
.pc-btn:hover { background: rgba(255,255,255,0.13); color: #fff; }
.pc-btn-accent { background: #8b5cf6; color: #fff; }
.pc-btn-accent:hover { background: #7c3aed; }
.pc-btn-amber {
  background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #fff; font-weight: 800;
}
.pc-btn-amber:hover { opacity: 0.88; }

/* First-listing offer banner inside plan picker */
.plan-offer-banner {
  background: linear-gradient(135deg, rgba(109,40,217,.18), rgba(124,58,237,.12));
  border: 1px solid rgba(124,58,237,.3);
  border-radius: 10px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 14px;
  text-align: center;
  letter-spacing: .02em;
}
/* Strikethrough original price when discount active */
.pc-strike {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  text-decoration: line-through;
  margin-top: -2px;
}

/* Subtle "continue free" link below upgrade individual cards */
.plan-free-link {
  background: none; border: none; color: rgba(255,255,255,0.25); font-size: 13px;
  cursor: pointer; padding: 10px; width: 100%; text-align: center;
  text-decoration: underline; text-underline-offset: 3px; transition: color .15s;
}
.plan-free-link:hover { color: rgba(255,255,255,0.5); }

/* Plan type toggle (Individual / Bulk Plans) */
.plan-type-toggle {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 3px; margin-bottom: 18px;
}
.plan-type-btn {
  flex: 1; padding: 7px 12px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: rgba(255,255,255,0.45);
  transition: background 0.15s, color 0.15s;
}
.plan-type-btn--active {
  background: rgba(124,58,237,0.22); color: #c4b5fd;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Bulk plan count selector */
.bulk-count-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.bulk-count-label {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5);
}
.bulk-count-toggle {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px; padding: 3px;
}
.bct-btn {
  padding: 6px 18px; border-radius: 6px; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer;
  background: transparent; color: rgba(255,255,255,0.4);
  transition: background 0.15s, color 0.15s;
}
.bct-btn--active {
  background: rgba(124,58,237,0.25); color: #c4b5fd;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Single-card bulk grid */
.plan-grid-1 {
  display: grid; grid-template-columns: 1fr; max-width: 320px; margin: 0 auto;
}

@media (max-width: 540px) {
  .plan-overlay { padding: 12px 12px 48px; }
  .plan-grid-1  { max-width: 100%; }
}

/* ── Thumbnail viewfinder ── */
.thumb-viewfinder {
  display: none; position: absolute; inset: 0; pointer-events: none; z-index: 11;
}
.viewer-wrap.thumbnail-mode .thumb-viewfinder { display: block; }

/* Orientation crop shading */
.thumb-viewfinder::before,
.thumb-viewfinder::after {
  content: ''; position: absolute;
  background: rgba(0,0,0,0.52); transition: opacity 0.2s; opacity: 0; pointer-events: none;
}
/* Portrait: shade left/right strips */
.thumb-viewfinder.portrait::before { top: 0; bottom: 0; left: 0;  width: var(--thumb-shade-x, 0px); opacity: 1; }
.thumb-viewfinder.portrait::after  { top: 0; bottom: 0; right: 0; width: var(--thumb-shade-x, 0px); opacity: 1; }
/* Landscape on tall viewer (e.g. mobile): shade top/bottom strips */
.thumb-viewfinder.landscape-crop::before { left: 0; right: 0; top: 0;    height: var(--thumb-shade-y, 0px); opacity: 1; }
.thumb-viewfinder.landscape-crop::after  { left: 0; right: 0; bottom: 0; height: var(--thumb-shade-y, 0px); opacity: 1; }

/* L-corner brackets */
.thumb-corner {
  position: absolute; width: 46px; height: 46px; pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(0,0,0,0.7)) drop-shadow(0 0 2px rgba(255,255,255,0.3));
  transition: top .2s, left .2s, right .2s, bottom .2s;
}
.thumb-corner-tl { top: 12px; left: 12px; border-top: 3px solid #fff; border-left: 3px solid #fff; border-radius: 3px 0 0 0; }
.thumb-corner-tr { top: 12px; right: 12px; border-top: 3px solid #fff; border-right: 3px solid #fff; border-radius: 0 3px 0 0; }
.thumb-corner-bl { bottom: 12px; left: 12px; border-bottom: 3px solid #fff; border-left: 3px solid #fff; border-radius: 0 0 0 3px; }
.thumb-corner-br { bottom: 12px; right: 12px; border-bottom: 3px solid #fff; border-right: 3px solid #fff; border-radius: 0 0 3px 0; }

/* ── Orientation toggle panel ── */
.thumb-orient-panel {
  display: none; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  flex-direction: column; gap: 2px; z-index: 12;
  background: rgba(9,9,11,0.45); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 5px 3px; backdrop-filter: blur(10px);
  pointer-events: auto;
}
.viewer-wrap.thumbnail-mode .thumb-orient-panel { display: flex; }
.thumb-orient-btn {
  width: 36px; height: 36px; border-radius: 50%; position: relative;
  background: transparent; border: 1px solid transparent;
  color: rgba(255,255,255,0.5); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 0; transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.thumb-orient-btn:hover { border-color: rgba(124,58,237,0.4); color: var(--indigo-lt); background: rgba(124,58,237,0.12); }
.thumb-orient-btn.active { background: rgba(109,40,217,0.8); border-color: rgba(167,139,250,0.45); color: #fff; box-shadow: 0 0 10px rgba(109,40,217,0.3); }
@media (min-width: 768px) {
  .thumb-orient-panel { gap: 3px; padding: 6px 5px; background: rgba(9,9,11,0.42); }
  .thumb-orient-btn { width: 52px; height: auto; padding: 8px 4px; gap: 4px; border-radius: 50px; }
  .thumb-orient-btn .ssicon-label { display: block; font-size: 9px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; line-height: 1; color: inherit; }
}

/* ── My Showcases screen ── */
.my-showcases-screen {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg, #09090b);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.mss-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.mss-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05); border: none; border-radius: 8px;
  color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500;
  padding: 6px 12px; cursor: pointer; line-height: 1;
}
.mss-back-btn:hover { background: rgba(255,255,255,0.09); }

.mss-title {
  font-size: 16px; font-weight: 700; color: #f4f4f5;
}

.mss-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
}

.mss-create-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(109,40,217,0.12); border: 1px dashed rgba(109,40,217,0.3);
  color: #a78bfa; border-radius: 12px; padding: 12px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer; width: 100%;
  justify-content: center;
}
.mss-create-btn:hover { background: rgba(109,40,217,0.2); }

.hdr-listings-btn {
  margin-right: auto; margin-left: 8px;
  background: rgba(255,255,255,0.06); border: none; border-radius: 8px;
  color: rgba(255,255,255,0.75); font-size: 12px; font-weight: 600;
  padding: 6px 12px; cursor: pointer; line-height: 1;
}
.hdr-listings-btn:hover { background: rgba(255,255,255,0.10); }

/* ── My Listings — stat bar ── */
.mss-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; background: rgba(124,58,237,.1); border: 1px solid rgba(124,58,237,.28); border-radius: 14px; overflow: hidden; margin: 6px 0 18px; }
.mss-stat { padding: 18px 6px; text-align: center; }
.mss-stat + .mss-stat { border-left: 1px solid rgba(255,255,255,.13); }
.mss-stat-n { display: block; font-size: 28px; font-weight: 800; color: #fff; line-height: 1; text-align: center; width: 100%; }
.mss-stat-l { display: block; font-size: 10px; color: rgba(255,255,255,.5); margin-top: 8px; letter-spacing: .06em; text-transform: uppercase; text-align: center; width: 100%; }

/* ── My Listings — cards ── */
.my-listings-grid { display: flex; flex-direction: column; gap: 12px; }
.my-listing-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 14px; }
.my-listings-empty { font-size: 13px; color: rgba(255,255,255,0.35); padding: 32px 0; text-align: center; }
