/* ==========================================================================
   HiroWa Design System - Screen Lightbox & Interactive Mockup Viewer Component
   Left Sidebar Navigation + Standardized Device Frame Shell
   ========================================================================== */

/* Fullscreen Root Container (Active only in prototype view mode) */
.prototype-viewer-container,
.hirowa-screen-lightbox {
  display: none !important;
}

body[data-detail-mode="prototype"] .prototype-viewer-container,
body[data-detail-mode="prototype"] .hirowa-screen-lightbox,
body.is-standalone-prototype .hirowa-screen-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex !important;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Crystal Backdrop */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(3px) saturate(115%);
  -webkit-backdrop-filter: blur(3px) saturate(115%);
  z-index: 1;
}

[data-theme="dark"] .lightbox-backdrop {
  background: rgba(8, 10, 14, 0.88);
  backdrop-filter: blur(3px) saturate(120%);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
}

/* ==========================================================================
   1. Lightbox Top Header Bar (Height: 60px - 1:1 with modals.css)
   ========================================================================== */
.lightbox-header {
  position: relative;
  z-index: 20;
  height: 60px;
  min-height: 60px;
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

[data-theme="dark"] .lightbox-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 17, 23, 0.7);
}

.lightbox-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--active-accent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--active-accent) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--active-accent) 30%, transparent);
  flex-shrink: 0;
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lightbox-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
}

[data-theme="dark"] .lightbox-tool-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.lightbox-tool-btn:hover {
  background: var(--bg-alt);
  border-color: var(--active-accent);
  color: var(--active-accent);
  transform: scale(1.05);
}

[data-theme="dark"] .lightbox-tool-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--active-accent);
  color: #ffffff;
}

.lightbox-tool-btn:active {
  transform: scale(0.95);
}

.lightbox-tool-btn.active {
  background: color-mix(in srgb, var(--active-accent) 15%, transparent);
  border-color: var(--active-accent);
  color: var(--active-accent);
}

.lightbox-close-btn {
  background: color-mix(in srgb, var(--active-accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--active-accent) 30%, transparent);
  color: var(--active-accent);
  margin-left: 0.35rem;
}

[data-theme="dark"] .lightbox-close-btn {
  background: color-mix(in srgb, var(--active-accent) 20%, transparent);
  border-color: color-mix(in srgb, var(--active-accent) 45%, transparent);
  color: var(--active-accent);
}

.lightbox-close-btn:hover {
  background: var(--active-accent);
  color: #ffffff;
  border-color: var(--active-accent);
  transform: scale(1.05);
}

.header-accent-picker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.fab-accent-indicator {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--active-accent);
  border: 1.5px solid var(--surface);
  transition: background-color 0.25s ease;
  pointer-events: none;
}

.header-accent-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  bottom: auto !important;
  left: auto;
  min-width: 185px;
  width: 185px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16), 0 0 20px var(--active-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  box-sizing: border-box;
}

[data-theme="dark"] .header-accent-popover {
  background: rgba(22, 27, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.header-accent-popover.is-open {
  display: flex !important;
  animation: headerAccentIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes headerAccentIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.header-accent-popover .fab-popover-header {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin: 0;
}

.header-accent-popover .fab-accent-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-accent-popover .fab-accent-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.header-accent-popover .fab-accent-btn:hover {
  background: var(--bg-alt);
  border-color: var(--border);
}

.header-accent-popover .fab-accent-btn.active {
  background: color-mix(in srgb, var(--active-accent) 12%, transparent);
  border-color: color-mix(in srgb, var(--active-accent) 30%, transparent);
  color: var(--active-accent);
  font-weight: 600;
}

.header-accent-popover .fab-accent-btn-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-accent-popover .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.header-accent-popover .accent-check-icon {
  font-size: 0.8rem;
  color: var(--active-accent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.header-accent-popover .fab-accent-btn.active .accent-check-icon {
  opacity: 1;
}

/* Header View Popover (Matches Case Study FAB View Switcher) */
.header-view-picker-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.header-view-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  bottom: auto !important;
  left: auto;
  min-width: 210px;
  width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16), 0 0 20px var(--active-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  box-sizing: border-box;
}

[data-theme="dark"] .header-view-popover {
  background: rgba(22, 27, 34, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.header-view-popover.is-open {
  display: flex !important;
  animation: headerAccentIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.header-view-popover .fab-popover-header {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
  margin: 0;
}

.header-view-popover .fab-detail-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-view-popover .fab-detail-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.header-view-popover .fab-detail-btn:hover {
  background: var(--bg-alt);
  border-color: var(--border);
  color: var(--fg);
}

.header-view-popover .fab-detail-btn.active {
  background: color-mix(in srgb, var(--active-accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--active-accent) 35%, transparent);
  color: var(--active-accent);
  font-weight: 600;
}

/* ==========================================================================
   2. Main Workstage: Left Sidebar + Central Viewport
   ========================================================================== */
.lightbox-stage-body {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Left-hand Navigation Sidebar */
.lightbox-left-sidebar {
  width: 340px;
  height: 100%;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 15;
  scrollbar-width: none;
  flex-shrink: 0;
}

/* Canvas Viewport & Footer Column (Canvas-width only) */
.lightbox-viewport-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.lightbox-left-sidebar::-webkit-scrollbar {
  display: none;
}

[data-theme="dark"] .lightbox-left-sidebar {
  background: rgba(14, 17, 23, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-section-block {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-block-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Screen Selection List */
.sidebar-screens-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-screen-nav-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .sidebar-screen-nav-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-screen-nav-item:hover {
  background: var(--surface);
  border-color: var(--border-dotted);
  transform: translateX(2px);
}

.sidebar-screen-nav-item.active {
  background: var(--surface);
  border-color: var(--active-accent);
  box-shadow: 0 0 0 1px var(--active-accent), 0 4px 14px var(--active-glow);
}

.screen-item-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-screen-nav-item.active .screen-item-number {
  color: var(--active-accent);
  background: color-mix(in srgb, var(--active-accent) 15%, transparent);
  border-color: var(--active-accent);
}

.screen-item-text-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.screen-item-heading {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.2;
}

.screen-item-desc {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.3;
}

/* Variant Switcher Section */
.variant-segmented-container {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.variant-pill-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .variant-pill-option {
  background: rgba(255, 255, 255, 0.04);
}

.variant-pill-option:hover {
  color: var(--fg);
  border-color: var(--border-dotted);
}

.variant-pill-option.active {
  background: color-mix(in srgb, var(--active-accent) 15%, transparent);
  border-color: var(--active-accent);
  color: var(--active-accent);
  font-weight: 600;
}

/* Screen Context / Metadata Box */
.screen-info-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .screen-info-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.screen-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--active-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.screen-info-goal-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.35;
}

.screen-info-explanation {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Live Flow / Journey Decision Simulator */
.journey-branch-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.branch-pill-btn {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md, 8px);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  box-sizing: border-box;
}

.branch-pill-btn i {
  font-size: 1.25rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.branch-pill-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.branch-pill-title {
  font-family: var(--font-display, var(--font-body));
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--fg);
  line-height: 1.25;
}

.branch-pill-desc {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.35;
}

.branch-pill-btn:hover {
  background: var(--bg-alt);
  border-color: var(--border-dotted, var(--border));
  transform: translateY(-1px);
}

.branch-pill-btn.active {
  background: color-mix(in srgb, var(--active-accent) 12%, transparent);
  border-color: var(--active-accent);
  box-shadow: 0 0 16px var(--active-glow);
}

.branch-pill-btn.active .branch-pill-title {
  color: var(--active-accent);
}

[data-theme="dark"] .branch-pill-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .branch-pill-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .branch-pill-btn.active {
  background: color-mix(in srgb, var(--active-accent) 18%, transparent);
  border-color: var(--active-accent);
}

.btn-journey-restart {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md, 8px);
  border: 1px dashed var(--border);
  background: var(--bg-alt);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-journey-restart:hover {
  background: var(--surface);
  border-color: var(--active-accent);
  color: var(--active-accent);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-journey-restart {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .btn-journey-restart:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--active-accent);
}

/* ==========================================================================
   3. Central Viewport & Standardized Device Frame Shell
   ========================================================================== */
.lightbox-center-viewport {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow: hidden;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='11' fill='rgba(0,136,255,0.25)' stroke='%23FFFFFF' stroke-width='2'/%3E%3Ccircle cx='18' cy='18' r='3.5' fill='%23FFFFFF'/%3E%3C/svg%3E") 18 18, pointer !important;
}

/* Mockup Canvas Wrapper */
.mockup-canvas-wrapper {
  height: min(calc(100vh - 140px), 780px);
  max-height: 100%;
  width: auto;
  aspect-ratio: 402 / 874;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Standardized iPhone Device Shell */
.iphone-device-shell {
  width: 100%;
  height: 100%;
  background: #0E121A;
  border-radius: 46px;
  padding: 10px;
  box-shadow: 
    0 0 0 2.5px rgba(255, 255, 255, 0.12),
    0 0 0 5.5px #151922,
    0 30px 80px -20px rgba(0, 0, 0, 0.9),
    0 0 40px var(--active-glow);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Clean Mode (Borderless minimal framing) */
.hirowa-screen-lightbox[data-frame-mode="clean"] .iphone-device-shell {
  background: transparent;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.hirowa-screen-lightbox[data-frame-mode="clean"] .iphone-shell-status-bar,
.hirowa-screen-lightbox[data-frame-mode="clean"] .iphone-shell-dynamic-island,
.hirowa-screen-lightbox[data-frame-mode="clean"] .iphone-shell-home-bar {
  display: none;
}

/* Integrated Native iOS Status Bar (Part of Device Shell) */
.iphone-shell-status-bar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 50;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: #0B3859;
  font-variant-numeric: tabular-nums;
}

.shell-status-time {
  margin-left: 6px;
  line-height: 1;
}

.shell-status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-right: 4px;
}

.ios-status-icon {
  display: inline-block;
  vertical-align: middle;
}

/* Dynamic Island Notch */
.iphone-shell-dynamic-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 24px;
  background: #000000;
  border-radius: 20px;
  z-index: 55;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Screen Viewport Body for Iframe */
.iphone-screen-viewport {
  width: 100%;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
  padding-top: 44px; /* Clearance for native status bar */
  padding-bottom: 24px; /* Clearance for home swipe bar */
  box-sizing: border-box;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='11' fill='rgba(0,136,255,0.25)' stroke='%23FFFFFF' stroke-width='2'/%3E%3Ccircle cx='18' cy='18' r='3.5' fill='%23FFFFFF'/%3E%3C/svg%3E") 18 18, pointer !important;
}

.hirowa-screen-lightbox[data-frame-mode="clean"] .iphone-screen-viewport {
  border-radius: var(--radius-lg);
  padding-top: 0;
  padding-bottom: 0;
}

.screen-viewport-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: transparent;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='11' fill='rgba(0,136,255,0.25)' stroke='%23FFFFFF' stroke-width='2'/%3E%3Ccircle cx='18' cy='18' r='3.5' fill='%23FFFFFF'/%3E%3C/svg%3E") 18 18, pointer !important;
}

/* Mobile Touch Tap Visual Feedback Ripple */
.touch-tap-ripple {
  position: absolute;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--active-accent, #0088FF) 45%, transparent) 0%, rgba(255, 255, 255, 0.55) 45%, transparent 70%);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 16px var(--active-glow, rgba(0, 136, 255, 0.5)), inset 0 0 8px rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 9999999;
  animation: tapRippleAnim 0.45s cubic-bezier(0.1, 0.8, 0.25, 1) forwards;
}

@keyframes tapRippleAnim {
  0% {
    transform: scale(0.4);
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

/* Integrated Native iOS Home Swipe Indicator (Part of Device Shell) */
.iphone-shell-home-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: #04070E;
  border-radius: 100px;
  z-index: 50;
  pointer-events: none;
  opacity: 0.85;
}

/* Navigation Chevrons */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--fg);
  font-size: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 20;
}

[data-theme="dark"] .lightbox-nav-btn {
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.lightbox-nav-btn:hover {
  background: var(--active-accent);
  border-color: var(--active-accent);
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 20px var(--active-glow);
}

.lightbox-nav-prev {
  left: 1.5rem;
}

.lightbox-nav-next {
  right: 1.5rem;
}

/* ==========================================================================
   4. Simplified Footer (Height: 50px)
   ========================================================================== */
.lightbox-footer {
  position: relative;
  z-index: 20;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  padding: 0 1.5rem;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

[data-theme="dark"] .lightbox-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 17, 23, 0.85);
}

.footer-controls-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-btn-choice {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

[data-theme="dark"] .footer-btn-choice {
  background: rgba(255, 255, 255, 0.04);
}

.footer-btn-choice:hover {
  color: var(--fg);
  border-color: var(--active-accent);
}

.footer-btn-choice.active {
  color: var(--active-accent);
  border-color: var(--active-accent);
  background: color-mix(in srgb, var(--active-accent) 15%, transparent);
  font-weight: 600;
}

.footer-keyboard-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-keyboard-hint kbd {
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: inherit;
  font-family: inherit;
}

[data-theme="dark"] .footer-keyboard-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

/* Responsive Layout */
@media (max-width: 900px) {
  .lightbox-left-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .footer-keyboard-hint {
    display: none;
  }
}

/* ==========================================================================
   5. Capture Popover, Feedback Toast & Flash Overlay
   ========================================================================== */
.footer-capture-wrapper {
  position: relative;
}

.footer-capture-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.footer-capture-btn:hover,
.footer-capture-btn.active {
  background: var(--surface-hover);
  border-color: var(--active-accent);
  color: var(--active-accent);
}

.capture-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  top: auto;
  right: auto;
  width: 275px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-popover);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom left;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.capture-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.capture-popover-header {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 8px 4px 8px;
}

.capture-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
  width: 100%;
}

.capture-option-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
}

.capture-option-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(125, 125, 125, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--active-accent);
  flex-shrink: 0;
}

.capture-option-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.capture-option-title {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-display);
}

.capture-option-sub {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.25;
}

.screenshot-flash-overlay {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.25s ease-out;
}

.screenshot-flash-overlay.flashing {
  opacity: 0.85;
  transition: none;
}

.theme-transition-circle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999999;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

/* ==========================================================================
   Desktop Browser Frame Support & Direct Full-Space Viewport
   ========================================================================== */
.hirowa-screen-lightbox.is-desktop-mode .lightbox-center-viewport {
  padding: 0.75rem 1rem 0.75rem 0.5rem;
  align-items: stretch;
  justify-content: stretch;
}

.hirowa-screen-lightbox.is-desktop-mode .mockup-canvas-wrapper,
.mockup-canvas-wrapper.is-desktop-frame {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: unset;
  display: flex;
  flex: 1;
}

.desktop-full-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.desktop-full-viewport iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #FFFFFF;
}

.desktop-device-shell {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 
    0 24px 60px -12px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 30px var(--active-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.desktop-browser-titlebar {
  height: 38px;
  background: color-mix(in srgb, var(--surface) 92%, #000);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  gap: 12px;
}

.browser-traffic-lights {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 60px;
}

.traffic-light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.traffic-light.red { background: #FF5F56; border: 1px solid #E0443E; }
.traffic-light.yellow { background: #FFBD2E; border: 1px solid #DEA123; }
.traffic-light.green { background: #27C93F; border: 1px solid #1AAB29; }

.browser-address-bar {
  flex: 1;
  max-width: 480px;
  height: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  user-select: none;
}

.browser-address-bar .browser-url {
  color: var(--fg);
  font-weight: 500;
}

.desktop-browser-viewport {
  flex: 1;
  width: 100%;
  height: calc(100% - 38px);
  position: relative;
  overflow: hidden;
  background: #FFF;
}

.desktop-browser-viewport iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Clean Mode for Desktop Frame */
.hirowa-screen-lightbox[data-frame-mode="clean"] .desktop-device-shell {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.hirowa-screen-lightbox[data-frame-mode="clean"] .desktop-browser-titlebar {
  display: none;
}
.hirowa-screen-lightbox[data-frame-mode="clean"] .desktop-browser-viewport {
  height: 100%;
}

