@import './studio-ribbon.css';

:root {
  color-scheme: light;
  --paper: #FAF7EE;
  --paper-card: #FFFFFF;
  --paper-hover: #F2EFE6;
  --paper-subtle: #F7F5EE;
  --ink: #23241F;
  --ink-soft: #4B4C47;
  --ink-muted: #74756F;
  --honey: #F4BF36;
  --honey-hover: #E3AD26;
  --honey-soft: #FDEBB9;
  --honey-light: #FFF7DE;
  --clay: #813F29;
  --clay-soft: #F9ECE8;
  --rule: #B9B7AA;
  --rule-light: #E4E2D8;
  --rule-dark: #8F8D80;
  --font-display: system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-ui: system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font: 14px/1.45 var(--font-ui);
  color: var(--ink);
  background: var(--paper);
}

/* Prevent initial layout transitions during page boot and DOM mounting */
body.preload,
body.preload *,
body.preload *::before,
body.preload *::after {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
}

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1, h2, h3, h4, p, figure, ul, ol {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  vertical-align: middle;
}

.icon-span svg {
  display: block;
}

/* ==========================================================================
   Top Navigation Bar (Global Navigation)
   ========================================================================== */
.main-viewport {
  flex: 1;
  height: 100%;
  max-height: 100%;
  background: #FAF7EE;
  padding: 1.5rem 2rem;
  overflow-y: auto;
}

/* View Header */
.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.view-header-title-group {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.view-header-icon {
  width: 44px;
  height: 44px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.view-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.025em;
}
  letter-spacing: -0.03em;
}

.view-subtitle {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

/* Primary Action Buttons */
.btn-primary {
  background: var(--honey);
  color: var(--ink);
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 1px solid #E2AA1F;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
  background: var(--honey-hover);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.6rem 1rem;
  border-radius: 8px;
}

.btn-secondary:hover {
  background: var(--paper-hover);
  border-color: var(--ink-soft);
}

/* ==========================================================================
   Filter & Search Toolbar
   ========================================================================== */
.filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.filter-left-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

.search-input-wrapper {
  position: relative;
  width: 280px;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
  display: inline-flex;
}

.search-input,
.main-viewport .search-input {
  width: 100%;
  height: 38px;
  padding: 0 0.75rem 0 2.25rem;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--honey);
  outline: none;
}

.filter-select,
select.filter-select {
  height: 38px;
  padding: 0 1.85rem 0 0.85rem;
  background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374756F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.75rem center !important;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--ink);
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  cursor: pointer;
}

.filter-select::-ms-expand,
select.filter-select::-ms-expand {
  display: none !important;
}

.filter-select::picker-icon,
select.filter-select::picker-icon,
.filter-select::-webkit-calendar-picker-indicator,
select.filter-select::-webkit-calendar-picker-indicator {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}

.filter-select:hover,
select.filter-select:hover {
  border-color: var(--rule);
}

.view-mode-toggle-group {
  display: inline-flex;
  align-items: center;
  height: 38px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.view-toggle-button {
  height: 100%;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  border-radius: 0;
  background: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.view-toggle-button * {
  pointer-events: none;
}

.view-toggle-button:hover {
  color: var(--ink);
  background: var(--bone, #f6f5f0);
}

.view-toggle-button.active {
  background: var(--honey);
  color: var(--ink);
}

.view-toggle-button.active:hover {
  background: var(--honey);
}

/* ==========================================================================
   Screen Management & In-line Action Controls
   ========================================================================== */
.screen-actions-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.screen-action-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--bone, #f4f3ee);
  border: 1px solid var(--rule-light, #e4e2d8);
  color: var(--ink, #23241f);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.screen-action-icon-btn:hover {
  background: #eae7dd;
  border-color: var(--rule, #b9b7aa);
  color: var(--ink);
}

.screen-action-icon-btn.paused-state {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

.screen-action-icon-btn.paused-state:hover {
  background: #ffedd5;
  border-color: #ea580c;
  color: #9a3412;
}

.screen-group-pill {
  background: #FFFFFF;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.screen-group-pill:hover {
  background: var(--bone, #f4f3ee);
  border-color: var(--rule, #b9b7aa);
}

.screen-group-assign-btn {
  background: transparent;
  border: 1px dashed var(--rule-light, #e4e2d8);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted, #74756f);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.screen-group-assign-btn:hover {
  background: var(--bone, #f4f3ee);
  border-color: var(--rule, #b9b7aa);
  color: var(--ink);
}

/* Screen Overflow Dropdown */
.screen-overflow-dropdown {
  background: #FFFFFF;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.screen-overflow-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink, #23241f);
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.screen-overflow-item .item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted, #74756f);
}

.screen-overflow-item:hover {
  background: var(--bone, #f4f3ee);
  color: var(--ink);
}

.screen-overflow-item:hover .item-icon {
  color: var(--ink);
}

.screen-overflow-item.danger {
  color: #dc2626;
}

.screen-overflow-item.danger .item-icon {
  color: #dc2626;
}

.screen-overflow-item.danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

.screen-overflow-divider {
  height: 1px;
  background: var(--rule-light, #e4e2d8);
  margin: 4px 0;
}

/* Screen Settings Modal */
.confirm-dialog.screen-settings-modal {
  width: 840px !important;
  max-width: 95vw !important;
}

.form-input {
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--rule, #b9b7aa);
  padding: 0 0.85rem;
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif);
  font-size: 0.92rem;
  color: var(--ink, #23241f);
  background: #ffffff;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--honey-hover, #e3ad26);
  box-shadow: 0 0 0 3px var(--honey-soft, #fdebb9);
}

.status-meta-card {
  background: var(--bone, #f6f5f0);
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.status-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.status-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.status-meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted, #74756f);
}

.status-meta-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink, #23241f);
}

.status-meta-value code {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 5px;
  border-radius: 4px;
}

.content-tab-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
}

.content-tab-btn {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted, #74756f);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.content-tab-btn:hover {
  background: var(--bone, #f4f3ee);
  color: var(--ink);
}

.content-tab-btn.active {
  background: var(--honey, #e8a800);
  color: var(--ink, #23241f);
  border-color: rgba(0, 0, 0, 0.1);
}

.content-tab-badge {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

.content-select-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #FFFFFF;
}

.content-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.content-select-card:hover {
  background: var(--bone, #f6f5f0);
}

.content-select-card.selected {
  background: #fefce8;
  border-color: #fef08a;
}

.content-select-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--honey, #e8a800);
}

.content-card-title {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.content-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.selected-content-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0.75rem;
  min-height: 28px;
}

.selected-content-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--bone, #f4f3ee);
  border: 1px solid var(--rule-light, #e4e2d8);
  color: var(--ink);
}

.selected-content-chip .remove-chip-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.selected-content-chip .remove-chip-btn:hover {
  color: #dc2626;
}

/* ==========================================================================
   Templates Section & Cards Grid (Exact Mockup Match)
   ========================================================================== */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-ui);
  line-height: 1.45;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1400px) {
  .templates-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1050px) {
  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .templates-grid {
    grid-template-columns: 1fr;
  }
}

.template-card {
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 10px;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.template-card:has(.popover-menu) {
  z-index: 100;
}

.template-card:hover {
  transform: translateY(-2px);
  border-color: var(--honey);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* 16:9 Thumbnail Canvas Container */
.template-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #1E2024;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
  cursor: pointer;
}

/* Template Miniature Visual Artwork */
.template-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  display: flex;
}

/* Card 1: Welkom (Kantoor) */
.art-welkom {
  background: #1E2024;
  position: relative;
  width: 100%;
  height: 100%;
}
.art-welkom-content {
  position: relative;
  z-index: 3;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 50%;
  height: 100%;
}
.art-welkom-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 4px;
}
.art-welkom-sub {
  font-size: 11px;
  color: #FFFFFF;
  opacity: 0.9;
}
.art-welkom-stripe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 54%;
  background: var(--honey);
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}
.art-welkom-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 51%;
  background: url('/brand/studio-office.jpg') center right / cover no-repeat;
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
}

/* Card 2: Organisatienieuws */
.art-news {
  background: #FFFFFF;
  position: relative;
  width: 100%;
  height: 100%;
}
.art-news-content {
  position: relative;
  z-index: 3;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 52%;
  height: 100%;
}
.art-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #C08D07;
  font-weight: 800;
  font-size: 11px;
  margin-bottom: 6px;
}
.art-news-headline {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.art-news-stripe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  background: var(--honey);
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}
.art-news-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 49%;
  background: url('/brand/homepage-preview.png') center / cover no-repeat;
  clip-path: polygon(27% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
}

/* Card 3: Agenda */
.art-agenda {
  background: #FFFFFF;
  position: relative;
  width: 100%;
  height: 100%;
}
.art-agenda-content {
  position: relative;
  z-index: 3;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 55%;
  height: 100%;
}
.art-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  color: #333333;
}
.art-agenda-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.art-agenda-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--honey);
  flex-shrink: 0;
}
.art-agenda-stripe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  background: var(--honey);
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}
.art-agenda-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 45%;
  background: url('/brand/open-house.svg') center / cover no-repeat;
  clip-path: polygon(27% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
  opacity: 0.95;
}

/* Card 4: Weerbericht */
.art-weather {
  background: #1B2432;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.art-weather-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12px;
}
.art-weather-boxes {
  display: flex;
  gap: 8px;
  z-index: 2;
}
.art-weather-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  flex: 1;
  text-align: center;
}
.art-weather-day {
  font-size: 9px;
  color: #94A3B8;
  margin-bottom: 2px;
}
.art-weather-temp {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}

/* Card 5: Onze doelen */
.art-strategy {
  background: #FFFFFF;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.art-strategy-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.art-strategy-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 3px;
}
.art-strategy-checkitem {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #333333;
}
.art-strategy-checkicon {
  color: var(--honey);
}
.art-strategy-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 54px;
  padding-right: 10px;
}
.art-bar-col {
  width: 10px;
  background: var(--honey);
  border-radius: 2px 2px 0 0;
}

/* Card 6: Social media (LinkedIn) */
.art-social {
  background: #FFFFFF;
  position: relative;
  width: 100%;
  height: 100%;
}
.art-social-content {
  position: relative;
  z-index: 3;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 52%;
  height: 100%;
}
.art-social-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.art-social-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.art-social-badge {
  background: #0077B5;
  color: #FFFFFF;
  border-radius: 3px;
  padding: 3px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
  margin-top: 6px;
  width: fit-content;
}
.art-social-stripe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 52%;
  background: var(--honey);
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}
.art-social-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 49%;
  background: url('/brand/studio-preview.png') center / cover no-repeat;
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
}

/* Card 7: Power BI – KPI Dashboard */
.art-dashboard {
  background: #1A1B20;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.art-dash-top {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.art-dash-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--honey);
  font-weight: 800;
  font-size: 12px;
}
.art-dash-subtitle {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 11px;
}
.art-dash-cards-row {
  display: flex;
  gap: 8px;
}
.art-dash-card-box {
  background: #252830;
  border-radius: 6px;
  padding: 6px 8px;
  flex: 1;
}
.art-dash-metric-label {
  font-size: 8px;
  color: #94A3B8;
}
.art-dash-metric-val {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  margin-top: 1px;
}

/* Card 8: Vacature / Werken bij */
.art-hr {
  background: #FFFFFF;
  position: relative;
  width: 100%;
  height: 100%;
}
.art-hr-content {
  position: relative;
  z-index: 3;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 52%;
  height: 100%;
}
.art-hr-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #813F29;
  font-weight: 800;
  font-size: 11px;
  margin-bottom: 4px;
}
.art-hr-headline {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}
.art-hr-button {
  background: var(--honey);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 8px;
  width: fit-content;
}
.art-hr-stripe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  background: var(--honey);
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 1;
}
.art-hr-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 47%;
  background: url('/brand/studio-office.jpg') center right / cover no-repeat;
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 2;
}

/* Card Body & Details */
.template-card-footer {
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
}

.template-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.template-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-card-category {
  font-size: 0.78rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.template-card-category svg {
  color: var(--ink-muted);
}

.template-card-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.template-card-menu-btn:hover {
  background: var(--paper-hover);
  color: var(--ink);
}

.card-slide-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 5;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(35, 36, 31, 0.78);
  color: #ffffff;
  backdrop-filter: blur(4px);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transition: all 0.15s ease;
}

.card-slide-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.card-screen-counter.interactive {
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.card-screen-counter.interactive:hover {
  background: rgba(244, 191, 54, 0.25) !important;
  color: var(--ink) !important;
}

.workspace-dropdown-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  transition: background 0.12s ease;
}

button.workspace-dropdown-action {
  justify-content: flex-start !important;
  text-align: left !important;
}

.workspace-dropdown-action:hover {
  background: var(--paper-hover, #F5F1E6);
  color: var(--ink);
}

.workspace-dropdown-action svg {
  color: var(--ink-muted);
  flex-shrink: 0;
}

/* Pagination Controls */
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 2.5rem;
}

.pagination-item {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.pagination-item:hover {
  border-color: var(--rule);
}

.pagination-item.active {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--ink);
}

/* ==========================================================================
   List View (Lijstweergave)
   ========================================================================== */
.table-card-wrapper {
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 2rem;
  position: relative;
}

.table-card-wrapper:has(.popover-menu) {
  z-index: 100;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 0.88rem;
}

.data-table thead tr:first-child th:first-child {
  border-top-left-radius: 11px;
}

.data-table thead tr:first-child th:last-child {
  border-top-right-radius: 11px;
}

.data-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 11px;
}

.data-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 11px;
}

.data-table tr:has(.popover-menu) {
  position: relative;
  z-index: 200;
}

.data-table th {
  background: #F8F6F0;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-light);
  font-size: 0.82rem;
}

.data-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--rule-light);
  vertical-align: middle;
  color: var(--ink);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #FAF8F2;
}

.table-thumbnail-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.table-mini-thumb {
  width: 56px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule-light);
  flex-shrink: 0;
  background: var(--ink);
  position: relative;
}

.table-item-name {
  font-weight: 700;
  color: var(--ink);
}

.table-category-cell, .table-orientation-cell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
}

.table-actions-cell {
  text-align: right;
  position: relative;
}

.table-actions-cell:has(.popover-menu) {
  z-index: 250;
}

.popover-container:has(.popover-menu) {
  position: relative;
  z-index: 300;
}

/* ==========================================================================
   The Studio / Designer Component
   ========================================================================== */
.studio-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  background: #FAF7EE;
  overflow: hidden;
}

/* Studio Header */
.studio-top-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--rule-light);
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.studio-left-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.btn-back {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  border: 1px solid var(--rule-light);
  border-radius: 6px;
}

.btn-back:hover {
  background: var(--paper-hover);
  color: var(--ink);
}

.presentation-title-input {
  font-size: 1.1rem;
  font-weight: 700;
  border: 1px solid transparent;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  max-width: 320px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.presentation-title-input:hover {
  border-color: var(--rule-light);
}

.presentation-title-input:focus {
  background: #FFFFFF;
  border-color: var(--honey);
  outline: none;
}

/* Studio Inline Editable Title */
.studio-title-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  max-width: 380px;
}

.studio-title-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}

.studio-title-text:hover {
  background: var(--paper-hover, #f3efe6);
  border-color: var(--rule-light, #e5e5df);
}

.studio-title-inline-input {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  background: #ffffff;
  border: 1.5px solid var(--honey, #F4BF36);
  outline: none;
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  width: 100%;
  box-shadow: 0 0 0 3px rgba(244, 191, 54, 0.2);
}

/* Studio Save Split Button Group */
.studio-save-split-group {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.studio-save-split-group .studio-concept-btn {
  padding: 0.45rem 0.8rem !important;
  font-size: 0.85rem !important;
  border-radius: 6px 0 0 6px !important;
  border-right: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FBF0CA;
  color: var(--ink);
  border: 1px solid #E2AA1F;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.studio-save-split-group .studio-concept-btn:hover {
  background: #F6E5A8;
  border-color: #D39B14;
}

.studio-save-split-group .studio-save-btn {
  padding: 0.45rem 0.85rem !important;
  font-size: 0.85rem !important;
  border-radius: 0 !important;
  border-right: none !important;
  border-left: 1px solid rgba(0, 0, 0, 0.15) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.studio-save-split-group .studio-save-caret-btn {
  padding: 0.45rem 0.6rem !important;
  font-size: 0.85rem !important;
  border-radius: 0 6px 6px 0 !important;
  border-left: 1px solid rgba(0, 0, 0, 0.15) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.studio-save-split-group .studio-save-caret-btn:hover,
.studio-save-split-group .studio-save-caret-btn.active {
  background: var(--honey-hover, #e3b02e);
}

.studio-top-bar .btn-presentation-preview,
.studio-top-bar .studio-right-controls .btn-secondary {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.draft-status-indicator {
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.draft-status-indicator.dirty {
  color: var(--clay);
  font-weight: 600;
}

.studio-history-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--paper-hover);
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 2px;
}

.btn-icon-history {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.12s ease, opacity 0.12s ease, color 0.12s ease;
}

.btn-icon-history:hover:not(.disabled):not(:disabled) {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-icon-history.disabled,
.btn-icon-history:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.filmstrip-thumb:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 2px;
}

.studio-right-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

input[type="checkbox"] {
  accent-color: var(--honey);
}

.public-link-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0 0.5rem;
}

.public-link-toggle input {
  accent-color: var(--honey-hover);
  cursor: pointer;
}

/* Studio Main Body (Left Tools Drawer, Center Canvas, Right Inspector) */
.studio-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Left Tools Drawer */
.studio-drawer {
  width: 260px;
  background: #FAF8F2;
  border-right: 1px solid var(--rule-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.18s ease;
  position: relative;
}

.studio-drawer.is-collapsed:not(.is-peek-open) {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border-right: none !important;
}

.studio-drawer.is-peek-open {
  width: 260px !important;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  z-index: 44;
}

/* Left Drawer Toggle Tab Handle - Styled uniformly as a sleek vertical grip pill */
.drawer-toggle-tab {
  position: absolute;
  top: 50%;
  left: 260px;
  transform: translateY(-50%);
  width: 14px;
  height: 64px;
  background: var(--rule-light);
  border: 1px solid var(--rule);
  border-left: none;
  border-radius: 0 7px 7px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 45;
  color: var(--ink-muted);
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05);
  padding: 0;
  margin: 0;
  transition: left 0.18s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.drawer-toggle-tab:hover {
  background: var(--honey-light);
  border-color: var(--honey);
  color: var(--ink);
}

.drawer-toggle-tab.is-collapsed:not(.is-peek-open) {
  left: 0;
  border-left: 1px solid var(--rule);
  background: var(--rule-light);
}

.drawer-toggle-tab.is-peek-open {
  left: 260px !important;
  border-left: none;
}

.drawer-toggle-tab .icon-span,
.inspector-toggle-tab .icon-span,
.shelf-splitter-pill .icon-span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.drawer-toggle-tab svg,
.inspector-toggle-tab svg {
  width: 10px;
  height: 10px;
  display: block;
  pointer-events: none;
  margin: 0 auto;
  flex-shrink: 0;
}

.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule-light);
  background: #FFFFFF;
}

.drawer-tab {
  flex: 1;
  padding: 0.65rem 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.drawer-tab:hover {
  color: var(--ink);
}

.drawer-tab.active {
  color: var(--ink);
  border-bottom-color: var(--honey);
  background: #FAF8F2;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-section-wrapper {
  display: flex;
  flex-direction: column;
}

.drawer-collapsible-header {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 6px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 4px 0;
  margin-bottom: 0.5rem;
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: opacity 0.12s ease;
}

.drawer-collapsible-header:hover .drawer-section-title {
  color: var(--charcoal, #23241F);
}

.drawer-collapsible-header .drawer-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--clay, #74756F);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  text-align: left;
}

.tool-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.tool-button {
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: grab;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.tool-button:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.tool-button:hover {
  border-color: var(--honey);
  background: var(--honey-light);
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

/* Layer Tree List */
.layers-tree {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.layer-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.layer-tree-item:hover {
  border-color: var(--rule);
}

.layer-tree-item.active {
  background: var(--honey-soft);
  border-color: var(--honey);
  font-weight: 700;
}

.layer-tree-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
}

.layer-tree-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Center Workarea (Full-width Canvas) */
.studio-workarea {
  flex: 1;
  background: #EAEBE7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.25rem 0.5rem;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

.canvas-toolbar-row {
  width: 100%;
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.canvas-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.canvas-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.canvas-guide-toggle {
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  color: var(--ink-soft);
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.canvas-guide-toggle:hover {
  background: var(--paper-hover);
  color: var(--ink);
}

.canvas-guide-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--rule);
  border-radius: 4px;
  background: #FFFFFF;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.canvas-guide-toggle input[type="checkbox"]:hover {
  border-color: var(--honey-hover);
}

.canvas-guide-toggle input[type="checkbox"]:checked {
  background: var(--honey);
  border-color: var(--honey-hover);
}

.canvas-guide-toggle input[type="checkbox"]:checked::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg) translate(0.5px, -0.5px);
}

.canvas-guide-toggle input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 1px;
}

.canvas-actions-toolbar {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2px 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.canvas-tool-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.canvas-tool-divider {
  width: 1px;
  height: 18px;
  background: var(--rule-light);
  margin: 0 4px;
}

.btn-canvas-action {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  padding: 3px 5px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  min-width: 26px;
  height: 26px;
}

.btn-canvas-action:hover:not(.disabled):not(:disabled) {
  background: var(--paper-hover);
  border-color: var(--rule-light);
}

.btn-canvas-action.active {
  background: #FAF2D8;
  color: #7A5700;
  border-color: #F4BF36;
}

.btn-canvas-action.disabled,
.btn-canvas-action:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.canvas-align-target-select {
  height: 26px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper-hover);
  border: 1px solid var(--rule-light);
  border-radius: 4px;
  padding: 0 4px;
  cursor: pointer;
  outline: none;
  margin-right: 3px;
  font-family: inherit;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.canvas-align-target-select:hover {
  background: #FFF;
  border-color: var(--rule-dark);
}

.canvas-align-target-select:focus-visible {
  border-color: var(--clay);
}

/* Canvas Selection Marquee */
.canvas-selection-marquee {
  position: absolute;
  border: 1.5px dashed var(--clay);
  background: rgba(129, 63, 41, 0.08);
  pointer-events: none;
  z-index: 999;
}

/* Menu shortcut label */
.slide-context-menu .menu-shortcut {
  margin-left: auto;
  padding-left: 14px;
  font-size: 0.72rem;
  color: #8F8E85;
  font-family: inherit;
  font-weight: 500;
}

/* Clipboard Drawer Tab */
.clipboard-drawer-view {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clipboard-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  background: #FFFFFF;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  color: var(--ink-soft);
}

.clipboard-empty-state svg {
  width: 32px;
  height: 32px;
  stroke: var(--clay);
  opacity: 0.6;
}

.clipboard-card {
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.12s ease;
}

.clipboard-card:hover {
  border-color: var(--rule);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.clipboard-card.current {
  border-left: 3px solid var(--honey);
}

.clipboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.clipboard-card-time {
  font-size: 0.68rem;
  color: #8F8E85;
  font-weight: 400;
}

.clipboard-card-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.clipboard-item-chip {
  display: inline-block;
  padding: 2px 6px;
  background: var(--paper-hover);
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--rule-light);
}

.clipboard-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 0.74rem;
}

.btn-icon-subtle {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-subtle:hover {
  background: var(--paper-hover);
  color: var(--clay);
}

.canvas-meta-info {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.canvas-aspect-select {
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  color: var(--ink);
}

/* Visual Canvas (Responsive container-fit to prevent any toolbar/timeline overlap) */
.canvas-stage-wrapper {
  width: 100%;
  flex: 1 1 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 1.5rem 1.75rem;
  overflow: visible;
  container-type: size;
}

.canvas-stage {
  position: relative;
  aspect-ratio: 16/9;
  width: min(100cqw, calc(100cqh * (16 / 9)));
  height: min(100cqh, calc(100cqw * (9 / 16)));
  min-width: 320px;
  min-height: 180px;
  max-width: 1400px;
  background: #FAF7EE;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  overflow: visible;
  user-select: none;
  transition: outline 0.15s ease;
}

.canvas-stage.portrait {
  aspect-ratio: 9/16;
  min-width: 180px;
  min-height: 320px;
  width: min(100cqw, calc(100cqh * (9 / 16)));
  height: min(100cqh, calc(100cqw * (16 / 9)));
  max-width: 600px;
}

.canvas-stage.drag-over {
  outline: 3px dashed var(--honey);
  outline-offset: -3px;
}

/* TV Safe Margin Gridlines Overlay */
.tv-safe-guides-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
}

.tv-safe-line {
  position: absolute;
  pointer-events: none;
}

/* 2 Horizontal safe margin gridlines (5% from top and 5% from bottom) */
.tv-safe-line-top {
  top: 5%;
  left: -14px;
  right: -14px;
  height: 0;
  border-top: 1.5px dashed rgba(180, 83, 9, 0.7);
}

.tv-safe-line-bottom {
  bottom: 5%;
  left: -14px;
  right: -14px;
  height: 0;
  border-top: 1.5px dashed rgba(180, 83, 9, 0.7);
}

/* 2 Vertical safe margin gridlines (5% from left and 5% from right) */
.tv-safe-line-left {
  left: 5%;
  top: -14px;
  bottom: -14px;
  width: 0;
  border-left: 1.5px dashed rgba(180, 83, 9, 0.7);
}

.tv-safe-line-right {
  right: 5%;
  top: -14px;
  bottom: -14px;
  width: 0;
  border-left: 1.5px dashed rgba(180, 83, 9, 0.7);
}

/* TV Safe Margin Badge - Positioned outside the actual canvas margin area */
.tv-safe-badge {
  position: absolute;
  top: -24px;
  left: 5%;
  font-size: 0.68rem;
  font-weight: 700;
  color: #813F29;
  background: rgba(250, 247, 238, 0.96);
  border: 1px solid rgba(129, 63, 41, 0.35);
  padding: 1px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

/* Smart Alignment & Snapping Guidelines */
.canvas-snap-guides-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  overflow: visible;
}

.canvas-snap-guide {
  position: absolute;
  pointer-events: none;
}

.canvas-snap-guide-v {
  top: -10px;
  bottom: -10px;
  width: 0;
  border-left: 1.5px dashed #2563EB;
  box-shadow: 0 0 2px rgba(37, 99, 235, 0.4);
}

.canvas-snap-guide-h {
  left: -10px;
  right: -10px;
  height: 0;
  border-top: 1.5px dashed #2563EB;
  box-shadow: 0 0 2px rgba(37, 99, 235, 0.4);
}

/* Canvas Center Snap Lines (Crimson / Deep Coral) */
.canvas-snap-guide.snap-guide-center {
  border-color: #E11D48;
  border-style: solid;
  border-width: 1.5px;
  box-shadow: 0 0 4px rgba(225, 29, 72, 0.5);
}

/* TV Safe Margin Snap Lines (Amber / Warm Ochre) */
.canvas-snap-guide.snap-guide-safe {
  border-color: #D97706;
  border-style: dashed;
  box-shadow: 0 0 3px rgba(217, 119, 6, 0.4);
}

/* Stage Edge Snap Lines (Solid Royal Blue) */
.canvas-snap-guide.snap-guide-edge {
  border-color: #2563EB;
  border-style: solid;
  border-width: 1.5px;
  box-shadow: 0 0 4px rgba(37, 99, 235, 0.5);
}

/* Interactive Canvas Layer Elements */
.canvas-layer {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: visible;
  cursor: move;
  touch-action: none;
  border-radius: 2px;
  user-select: none;
  box-sizing: border-box;
  transition: box-shadow 0.15s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.canvas-text-wrapper {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.canvas-layer:active {
  cursor: grabbing;
}

.canvas-layer.selected {
  outline: 2.5px solid var(--honey);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(35, 36, 31, 0.12), 0 4px 14px rgba(244, 191, 54, 0.35);
}

/* Resize Handles on Selected Canvas Layer (Yellow with white, larger, 8 directions) */
.resize-handle {
  position: absolute;
  width: 13px;
  height: 13px;
  background: #FFFFFF;
  border: 2.5px solid var(--honey);
  border-radius: 3px;
  z-index: 50;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(35, 36, 31, 0.25);
  transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.1s ease;
}

.resize-handle:hover {
  background: var(--honey);
  border-color: #FFFFFF;
}

/* 4 Corner Handles (Diagonal scaling) */
.resize-handle.handle-nw {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}

.resize-handle.handle-ne {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.resize-handle.handle-se {
  bottom: -7px;
  right: -7px;
  cursor: nwse-resize;
}

.resize-handle.handle-sw {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

/* 4 Edge Handles (Width-only & Height-only scaling) */
.resize-handle.handle-n {
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.resize-handle.handle-n:hover {
  transform: translateX(-50%) scale(1.15);
}

.resize-handle.handle-s {
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.resize-handle.handle-s:hover {
  transform: translateX(-50%) scale(1.15);
}

.resize-handle.handle-w {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.resize-handle.handle-w:hover {
  transform: translateY(-50%) scale(1.15);
}

.resize-handle.handle-e {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.resize-handle.handle-e:hover {
  transform: translateY(-50%) scale(1.15);
}

/* Rotation Stem & Grip Handle on Selected Canvas Layer */
.rotate-handle-stem {
  position: absolute;
  top: -18px;
  left: 50%;
  width: 1.5px;
  height: 18px;
  background: var(--honey, #F4BF36);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 55;
}

.rotate-handle {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--honey, #F4BF36);
  transform: translateX(-50%);
  cursor: grab;
  z-index: 60;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(35, 36, 31, 0.25);
  transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.1s ease;
}

.rotate-handle:hover {
  background: var(--honey, #F4BF36);
  border-color: #FFFFFF;
  transform: translateX(-50%) scale(1.18);
}

.rotate-handle.is-rotating {
  cursor: grabbing;
  background: var(--honey, #F4BF36);
  border-color: #FFFFFF;
  transform: translateX(-50%) scale(1.15);
}

.rotate-angle-tooltip {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: #23241F;
  color: #FAF7EE;
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif) !important;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 130;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

/* Corner Radius Drag Handles for Shapes (Live corners) */
.corner-radius-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #FFFFFF;
  border: 2px solid #2563EB;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: crosshair;
  z-index: 55;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(35, 36, 31, 0.25);
  transition: transform 0.1s ease, background-color 0.1s ease, border-color 0.1s ease;
}

.corner-radius-handle:hover,
.corner-radius-handle.is-dragging {
  background: #2563EB;
  border-color: #FFFFFF;
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.corner-radius-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #23241F;
  color: #FAF7EE;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 130;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

/* Individual Corner Inputs in Inspector */
.corners-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  align-items: center;
}

.corner-field-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.corner-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--clay, #74756F);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.corner-field-input {
  width: 100%;
  padding: 4px 6px;
  font-size: 0.8rem;
  text-align: center;
  border-radius: 4px;
  border: 1px solid var(--rule, #E2DDD3);
  background: #FFFFFF;
}

.corner-field-input:focus {
  outline: none;
  border-color: var(--honey, #F4BF36);
}

/* Floating Inline Formatting Toolbar above Selected Element */
.canvas-inline-toolbar {
  position: fixed !important;
  top: 0;
  left: 0;
  transform: none !important;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid rgba(35, 36, 31, 0.16);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16), 0 1px 4px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 4px 6px;
  z-index: 120;
  cursor: default;
  user-select: none;
  white-space: nowrap;
  pointer-events: auto;
  transition: opacity 0.15s ease-out;
  animation: inlineToolbarFadeIn 0.15s ease-out;
  width: max-content;
  min-width: max-content;
  max-width: none;
  box-sizing: border-box;
}

.canvas-inline-toolbar > * {
  flex-shrink: 0 !important;
}

@keyframes inlineToolbarFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inline-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #23241F;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
  flex-shrink: 0;
}

.inline-toolbar-btn:hover {
  background: #F3F1E7;
  border-color: #E2DFD2;
}

.inline-toolbar-btn.is-active {
  background: #F4BF36;
  color: #23241F;
  border-color: #D9A41E;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(244, 191, 54, 0.4);
}

.inline-toolbar-divider {
  width: 1px;
  height: 18px;
  background: #E2DFD2;
  margin: 0 2px;
  flex-shrink: 0;
}

.inline-font-select {
  height: 26px;
  width: 135px;
  min-width: 135px;
  max-width: 135px;
  flex: 0 0 135px;
  box-sizing: border-box;
  padding: 0 6px;
  border: 1px solid #D5D3C8;
  border-radius: 4px;
  background: #FAF7EE;
  font-size: 0.82rem;
  color: #23241F;
  cursor: pointer;
  font-weight: 600;
  outline: none;
}

.inline-font-select:hover {
  border-color: #B9B7AA;
}

.inline-font-select option {
  background: #FFFFFF;
  color: #23241F;
  padding: 6px 8px;
}

.inline-size-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #D5D3C8;
  border-radius: 4px;
  background: #FAF7EE;
  height: 26px;
  overflow: hidden;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.inline-size-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 100%;
  border: none;
  background: transparent;
  color: #23241F;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  flex: 0 0 20px;
  box-sizing: border-box;
  padding: 0;
}

.inline-size-btn:hover {
  background: #EAE6D9;
}

.inline-size-input {
  width: 34px;
  min-width: 34px;
  max-width: 34px;
  height: 100%;
  border: none;
  border-left: 1px solid #E2DFD2;
  border-right: 1px solid #E2DFD2;
  background: transparent;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #23241F;
  -moz-appearance: textfield;
  padding: 0;
  outline: none;
  flex: 0 0 34px;
  box-sizing: border-box;
}

.inline-size-input::-webkit-outer-spin-button,
.inline-size-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inline-toolbar-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid #D5D3C8;
  background: #FAF7EE;
  color: #23241F;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
  user-select: none;
}

.inline-toolbar-action-btn:hover {
  background: #EAE6D9;
  border-color: #B9B7AA;
}

.inline-toolbar-action-btn.is-active {
  background: #F4BF36;
  border-color: #D9A41E;
  color: #23241F;
  box-shadow: 0 1px 3px rgba(244, 191, 54, 0.4);
}

.inline-toolbar-select {
  height: 26px;
  padding: 0 6px;
  border: 1px solid #D5D3C8;
  border-radius: 4px;
  background: #FAF7EE;
  font-size: 0.78rem;
  color: #23241F;
  cursor: pointer;
  font-weight: 600;
  outline: none;
  flex-shrink: 0;
}

.inline-toolbar-select:hover {
  border-color: #B9B7AA;
}

.inline-color-label-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  color: #6B7280;
  font-weight: 600;
}

.canvas-table-edge-btn {
  position: absolute;
  width: 22px;
  height: 22px;
  background: #F4BF36;
  color: #23241F;
  border: 1px solid #D9A41E;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.canvas-layer.is-selected .canvas-table-edge-btn {
  opacity: 1;
  pointer-events: auto;
}

.canvas-table-edge-btn:hover {
  transform: scale(1.15);
  background: #E5A817;
}

.canvas-table-edge-col {
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
}

.canvas-table-edge-row {
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
}

.table-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.3em;
  box-sizing: border-box;
}

.table-cell.is-editing {
  outline: 2px solid #F4BF36 !important;
  background: #FFFDF0 !important;
  border-radius: 3px;
  cursor: text;
  white-space: pre-wrap;
}

.inline-color-input {
  width: 22px;
  height: 22px;
  border: 1px solid #D5D3C8;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  overflow: hidden;
}

.inline-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.inline-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Custom App-Branded Color Picker Trigger & Popover */
.color-checker-bg {
  background-image: linear-gradient(45deg, #E0DFD5 25%, transparent 25%),
                    linear-gradient(-45deg, #E0DFD5 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #E0DFD5 75%),
                    linear-gradient(-45deg, transparent 75%, #E0DFD5 75%);
  background-size: 8px 8px;
  background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.color-picker-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-hover);
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  height: 32px;
  transition: all 0.12s ease;
  user-select: none;
}

.color-picker-trigger:hover {
  background: #FFFFFF;
  border-color: var(--rule-dark);
}

.color-trigger-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.color-trigger-fill {
  width: 100%;
  height: 100%;
}

.color-trigger-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.inline-color-trigger {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #C4C2B6;
  padding: 0;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.inline-color-trigger:hover {
  transform: scale(1.1);
  border-color: var(--clay);
}

.inline-color-trigger-fill {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.inline-color-trigger-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-sans, system-ui, sans-serif);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  color: #FFFFFF;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 1px 2px rgba(0, 0, 0, 0.95);
}

.inline-color-trigger-glyph svg {
  width: 12px;
  height: 12px;
  stroke: #FFFFFF;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}

/* App Instant Floating Tooltip */
.app-instant-tooltip {
  position: fixed;
  z-index: 999999;
  background: #1E1F1A;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.08s ease, transform 0.08s ease;
  font-family: var(--font-sans, system-ui, sans-serif);
}

.app-instant-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Color Picker Popover */
.custom-color-picker-popover {
  position: fixed;
  z-index: 99999;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(35, 36, 31, 0.2), 0 4px 12px rgba(35, 36, 31, 0.08);
  width: 250px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-ui);
  user-select: none;
  transition: opacity 0.15s ease-out;
  animation: contextFadeIn 0.12s ease-out;
}

.color-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule-light);
}

.color-picker-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.color-picker-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.color-picker-btn-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  background: transparent;
  transition: all 0.12s ease;
}

.color-picker-btn-icon:hover {
  background: var(--paper-hover);
  border-color: var(--rule-light);
}

.color-picker-btn-icon.active {
  background: #FAF2D8;
  color: #7A5700;
  border-color: #F4BF36;
}

.color-wheel-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  touch-action: none;
}

.color-wheel-canvas {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

.color-wheel-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 2px 5px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.color-sliders-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.color-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-slider-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
  width: 48px;
  flex-shrink: 0;
}

.color-slider-input {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  border-radius: 6px;
  border: 1px solid var(--rule-light);
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.color-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #FFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.color-slider-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #FFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.color-system-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule-light);
  gap: 2px;
  margin-top: 2px;
}

.color-system-tab {
  flex: 1;
  padding: 3px 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.color-system-tab:hover {
  color: var(--ink);
  background: var(--paper-hover);
}

.color-system-tab.active {
  color: #7A5700;
  border-bottom-color: #F4BF36;
  background: #FAF2D8;
  font-weight: 700;
}

.color-system-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.color-input-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.color-hex-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.color-input-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.color-input-field label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.color-sys-input {
  width: 100%;
  height: 25px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  background: var(--paper-hover);
  border: 1px solid var(--rule-light);
  border-radius: 4px;
  padding: 0 2px;
  outline: none;
}

.color-sys-input:focus {
  border-color: var(--clay);
  background: #FFF;
}

.color-presets-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--rule-light);
  gap: 3px;
}

.color-picker-auto-row {
  padding-top: 6px;
  border-top: 1px solid var(--rule-light);
  display: flex;
}

.color-picker-auto-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--sand-soft);
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.color-picker-auto-btn:hover {
  background: var(--honey-soft);
  border-color: var(--honey);
  color: var(--ink);
}

.color-picker-auto-btn.is-active {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--ink);
  font-weight: 700;
}

.color-preset-swatch {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.18);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease;
}

.color-preset-swatch:hover {
  transform: scale(1.25);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* Color Dropper Overlay & Magnifying Loupe */
.stage-dropper-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  cursor: none !important;
  background: transparent;
  user-select: none;
}

.color-dropper-loupe {
  position: fixed;
  top: 0;
  left: 0;
  width: 108px;
  height: 108px;
  pointer-events: none;
  z-index: 100002;
  transform: translate(-54px, -54px);
  will-change: left, top;
}

.dropper-loupe-circle {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: #FAF7EE;
  border: none;
  box-shadow: 0 0 0 3px #FFFFFF, 0 0 0 4.5px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.dropper-loupe-viewport {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}

/* Crosshair Reticle (Horizontal & Vertical hairline + center pixel indicator) */
.dropper-loupe-reticle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dropper-reticle-line {
  position: absolute;
}

.dropper-reticle-h {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-0.5px);
}

.dropper-reticle-v {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.9);
  transform: translateX(-0.5px);
}

.dropper-reticle-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-4px, -4px);
  border: 1px solid #FFFFFF;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
}

/* Value badge below or above loupe */
.dropper-loupe-badge {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1E2022;
  color: #FFFFFF;
  padding: 3px 9px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.dropper-badge-swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dropper-badge-text {
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.05em;
}

.stage-dropper-active {
  cursor: crosshair !important;
}

.stage-dropper-active * {
  cursor: crosshair !important;
}

/* Translucent inline text properties bar and color picker when dropper is active */
.stage-dropper-active .canvas-inline-toolbar,
.stage-dropper-active .custom-color-picker-popover {
  opacity: 0.10;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
}

/* Inspector Text Style Button Group */
.text-style-button-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FAF7EE;
  border: 1px solid #D5D3C8;
  border-radius: 6px;
  padding: 3px 5px;
}

.text-style-btn {
  flex: 1;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #23241F;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
}

.text-style-btn:hover {
  background: #EDE9DC;
}

.text-style-btn.is-active {
  background: #F4BF36;
  border-color: #D9A41E;
  color: #23241F;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(244, 191, 54, 0.4);
}

/* Shape Content Element */
.canvas-shape-content {
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-sizing: border-box;
  transition: background-color 0.12s ease;
}

/* Inline Shape Toolbar */
.inline-shape-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #23241F;
  padding: 0 4px;
  letter-spacing: 0.02em;
  user-select: none;
}

.inline-rotation-presets {
  display: flex;
  align-items: center;
  gap: 2px;
}

.inline-rotate-btn {
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 28px;
  height: 24px;
  padding: 0 4px;
  border-radius: 4px;
}

.inline-rotate-btn:hover {
  background: rgba(244, 191, 54, 0.2);
  color: #D39E18;
}

/* Inline Shape Stroke Width Input & Controls */
.inline-number-input {
  width: 44px;
  height: 26px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid var(--rule, #E2DDD3);
  font-size: 0.76rem;
  font-weight: 600;
  color: #23241F;
  background: #FAF7EE;
  text-align: center;
}

.inline-number-input:focus {
  outline: none;
  border-color: var(--honey, #F4BF36);
  background: #FFFFFF;
}

.inline-toolbar-unit {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--clay, #74756F);
  margin-left: 2px;
  user-select: none;
}

.inline-toolbar-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: #23241F;
  cursor: pointer;
}

.inline-toolbar-icon-btn:hover {
  background: rgba(35, 36, 31, 0.08);
}

.inline-toolbar-icon-btn.is-active {
  background: rgba(244, 191, 54, 0.25);
  border-color: #F4BF36;
  color: #D39E18;
}

.inline-rotate-btn.is-active {
  background: #F4BF36;
  color: #23241F;
  border-color: rgba(35, 36, 31, 0.2);
}

/* Inspector Rotation Presets Group */
.rotation-presets-group {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #FAF7EE;
  border: 1px solid #D5D3C8;
  border-radius: 6px;
  padding: 2px 3px;
}

.rotation-preset-btn {
  border: none;
  background: transparent;
  color: #23241F;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

.rotation-preset-btn:hover {
  background: rgba(244, 191, 54, 0.25);
  color: #D39E18;
}

.rotation-preset-btn.is-active {
  background: #F4BF36;
  color: #23241F;
  font-weight: 700;
}

/* =========================================================
   Unified Bottom Shelf (Tabs: Slides Filmstrip vs Timeline)
   Concept 1: Unified Shelf, Concept 2: Smart Tracks, Concept 3: Resizable Splitter
   ========================================================= */
.studio-bottom-shelf {
  width: 100%;
  background: #FAF8F2;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.05);
  min-height: 105px;
  max-height: 420px;
  z-index: 35;
  transition: height 0.18s ease;
  overflow: visible;
}

.studio-bottom-shelf.is-resizing {
  transition: none !important;
}

.studio-bottom-shelf.is-collapsed:not(.is-peek-open) {
  height: 38px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.studio-bottom-shelf.is-collapsed:not(.is-peek-open) .shelf-content {
  display: none !important;
}

/* Hide timeline playback controls & right controls when collapsed and not in peek-open mode */
.studio-bottom-shelf.is-collapsed:not(.is-peek-open) .shelf-header-center,
.studio-bottom-shelf.is-collapsed:not(.is-peek-open) .shelf-header-right {
  display: none !important;
}

.studio-bottom-shelf.is-peek-open {
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  z-index: 40;
}

/* Splitter Handle for resizing (Concept 3) with Clickable Collapse/Expand */
.shelf-splitter {
  position: absolute;
  top: -7px;
  left: 0;
  right: 0;
  height: 14px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.shelf-splitter-pill {
  width: 52px;
  height: 14px;
  background: var(--rule-light);
  border: 1px solid var(--rule);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-sizing: border-box;
  color: var(--ink-muted);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.shelf-splitter:hover .shelf-splitter-pill,
.shelf-splitter:active .shelf-splitter-pill,
.shelf-splitter-pill:hover {
  background: var(--honey-light);
  border-color: var(--honey);
  color: var(--ink);
}

.shelf-splitter-pill svg {
  width: 10px;
  height: 10px;
  display: block;
  pointer-events: none;
  margin: 0 auto;
  flex-shrink: 0;
}

/* Shelf Top Header */
.shelf-header {
  height: 38px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  padding: 0 0.85rem 0 0;
  background: #FFFFFF;
  border-bottom: 1px solid var(--rule-light);
  flex-shrink: 0;
  gap: 0.75rem;
}

/* Same visual style as drawer-tabs */
.shelf-tabs-group {
  display: flex;
  align-items: stretch;
  height: 100%;
  background: transparent;
  border: none;
  padding: 0;
  gap: 0;
}

.shelf-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.15rem;
  height: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.shelf-tab-btn:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.02);
}

.shelf-tab-btn.active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--honey);
  background: #FAF8F2;
  box-shadow: none;
}

/* Secondary Mode Switcher Pill on Right */
.shelf-pill-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #FFFFFF;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--rule-light);
}

.shelf-pill-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted);
  border-radius: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shelf-pill-btn:hover {
  color: var(--ink);
  background: var(--paper-hover);
}

.shelf-pill-btn.active {
  background: var(--honey);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.shelf-header-center {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shelf-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.shelf-hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Slide Context Menu */
.slide-context-menu {
  position: fixed;
  z-index: 2000;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  padding: 4px;
  min-width: 225px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: contextFadeIn 0.1s ease-out;
}

@keyframes contextFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.slide-context-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.slide-context-item > svg,
.slide-context-item .icon-span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.slide-context-item:hover {
  background: var(--paper-hover);
  color: var(--ink);
}

.slide-context-item.danger {
  color: var(--clay);
}

.slide-context-item.danger:hover {
  background: #FDF2F0;
  color: #B91C1C;
}

.slide-context-divider {
  height: 1px;
  background: var(--rule-light);
  margin: 3px 0;
}

/* Shelf Content Viewport */
.shelf-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

/* Filmstrip Inside Bottom Shelf */
.studio-bottom-shelf .studio-filmstrip {
  height: 100%;
  width: 100%;
  border-top: none;
  background: transparent;
  padding: 0.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  flex-shrink: 0;
}

/* Timeline Inside Bottom Shelf */
.shelf-timeline-container {
  width: 100%;
  height: 100%;
  display: flex;
  background: #FFFFFF;
  overflow: hidden;
}

/* Smart Track Header Items (Concept 2) */
.smart-track-header {
  height: 30px;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule-light);
  font-size: 0.75rem;
  background: #FFFFFF;
  gap: 0.35rem;
  box-sizing: border-box;
  flex-shrink: 0;
}

.track-count-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-muted);
  background: #F4F1E8;
  padding: 1px 5px;
  border-radius: 10px;
}

.track-shared-chips {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  max-width: 130px;
}

.track-item-pill {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: #FAF7EE;
  border: 1px solid var(--rule-light);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
  cursor: pointer;
}

.track-item-pill:hover,
.track-item-pill.active {
  border-color: var(--honey);
  background: var(--honey-light);
  color: var(--ink);
  font-weight: 700;
}

.track-more-pill {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.timeline-metrics-chips {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-metric-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  color: var(--ink-soft);
}

.timeline-metric-chip.total-time {
  background: #FFF8E1;
  border-color: rgba(244, 191, 54, 0.6);
  color: #7A5306;
}

.timeline-metric-chip.auto-dur {
  background: #E8F5E9;
  border-color: #A5D6A7;
  color: #1B5E20;
}

.timeline-header-center {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-timeline-play {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--honey);
  color: var(--ink);
  border: 1px solid var(--honey-dark);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timeline-play:hover {
  background: #ECC230;
  transform: translateY(-1px);
}

.btn-timeline-control {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-timeline-control:hover {
  background: var(--paper-hover);
  border-color: var(--rule);
  color: var(--ink);
}

.timeline-timecode {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: #FFFFFF;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--rule-light);
  letter-spacing: 0.05em;
}

.timeline-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Timeline Body */
.timeline-body {
  display: flex;
  min-height: 70px;
  max-height: 140px;
  overflow: hidden;
  background: #FFFFFF;
}

/* Left Track Headers */
.timeline-left-col {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--rule-light);
  display: flex;
  flex-direction: column;
  background: #FAF8F2;
  overflow: hidden;
}

.timeline-tracks-header {
  height: 28px;
  padding: 0 0.6rem;
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-light);
  background: #F4F1E8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-sizing: border-box;
  flex-shrink: 0;
}

.timeline-tracks-list {
  flex: 1;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
  box-sizing: border-box;
}

.timeline-track-header-item {
  height: 48px;
  padding: 3px 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1px solid var(--rule-light);
  font-size: 0.75rem;
  gap: 0.45rem;
  box-sizing: border-box;
  background: #FFFFFF;
  cursor: grab;
  user-select: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.track-order-btns {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.btn-track-order {
  width: 14px;
  height: 14px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: all 0.1s ease;
}

.btn-track-order:hover:not(:disabled) {
  color: var(--ink);
  background: #EAE8DE;
}

.btn-track-order:disabled,
.btn-track-order.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.track-header-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.track-header-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.35rem;
}

.track-header-row-bottom {
  display: flex;
  align-items: center;
  width: 100%;
}

.timeline-track-header-item:active {
  cursor: grabbing;
}

.timeline-track-header-item.layer-is-dragging {
  opacity: 0.4;
  background: #FAF7EE;
}

.timeline-track-header-item:hover {
  background: #FAF7EE;
}

.timeline-track-header-item.active {
  background: #FFFDF5;
  border-left: 3px solid var(--honey);
}

.track-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--ink);
}

.track-group-tag {
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 3px;
  background: #FDF3D6;
  color: #7A5306;
  border: 1px solid rgba(244, 191, 54, 0.4);
  white-space: nowrap;
  font-weight: 500;
}

.track-mode-select {
  font-size: 0.68rem;
  padding: 1px 4px;
  border: 1px solid var(--rule-light);
  border-radius: 4px;
  background: #FFFFFF;
  color: var(--ink-soft);
  max-width: 90px;
  height: 20px;
  flex-shrink: 0;
}

/* Right Ruler & Lanes */
.timeline-lanes-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  background: #FCFAF5;
}

.timeline-lanes-wrapper.is-fit {
  overflow-x: hidden;
}

.timeline-lanes-wrapper.is-zoomed {
  overflow-x: auto;
}

.timeline-scroll-content {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100%;
  box-sizing: border-box;
}

.timeline-ruler {
  height: 28px;
  border-bottom: 1px solid var(--rule-light);
  background: #F4F1E8;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  user-select: none;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
}

.ruler-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid rgba(185, 183, 170, 0.4);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding-left: 4px;
  padding-top: 4px;
  pointer-events: none;
}

.ruler-tick.ruler-tick-end {
  left: auto !important;
  right: 0 !important;
  border-left: none !important;
  border-right: 1px solid rgba(185, 183, 170, 0.4);
  padding-left: 0;
  padding-right: 4px;
  text-align: right;
}

.ruler-subtick {
  position: absolute;
  bottom: 0;
  height: 8px;
  border-left: 1px solid rgba(185, 183, 170, 0.25);
  pointer-events: none;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  height: 100%;
  width: 2px;
  background: #DC2626;
  z-index: 70;
  pointer-events: none;
  box-shadow: 0 0 3px rgba(220, 38, 38, 0.45);
}

.timeline-playhead::before {
  content: '';
  position: absolute;
  top: 0;
  left: -6px;
  width: 14px;
  height: 16px;
  background: #DC2626;
  clip-path: polygon(0% 0%, 100% 0%, 100% 60%, 50% 100%, 0% 60%);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* Lanes List */
.timeline-lanes-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 24px;
  box-sizing: border-box;
}

.timeline-lane-row {
  height: 48px;
  position: relative;
  border-bottom: 1px solid var(--rule-light);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.timeline-lane-row.layer-is-dragging {
  opacity: 0.4;
  background: rgba(244, 191, 54, 0.05);
}

.timeline-lane-row.active {
  background: rgba(244, 191, 54, 0.08);
}

/* Timeline Reorder Placeholder */
.timeline-reorder-placeholder {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  background: rgba(245, 158, 11, 0.12);
  border: 2px dashed #F59E0B;
  border-radius: 4px;
  box-sizing: border-box;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  animation: timelinePlaceholderPulse 1.2s infinite ease-in-out;
  transition: none !important;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes timelinePlaceholderPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.timeline-delay-line {
  position: absolute;
  height: 2px;
  border-top: 2px dashed rgba(185, 183, 170, 0.7);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-delay-dur {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--clay);
  background: var(--paper, #FAF7EE);
  border: 1px solid var(--rule);
  padding: 0 4px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  pointer-events: none;
}

.timeline-delay-line.timeline-overlap-line {
  border-top: 2px dashed #D97706;
}

.timeline-delay-line.timeline-overlap-line .timeline-delay-dur {
  color: #B45309;
  background: #FEF3C7;
  border-color: #FDE68A;
}

.timeline-block {
  position: absolute;
  top: 2px;
  bottom: 2px;
  height: calc(100% - 4px);
  border-radius: 4px;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
  gap: 0;
}

.timeline-block:hover {
  border-color: #94A3B8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.timeline-block.selected {
  border-color: #475569;
  background: #F8FAFC;
  box-shadow: 0 0 0 1.5px #475569, 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-block-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-block-dur {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--clay);
  background: rgba(129, 63, 41, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

/* Right Property Inspector & Layers Sidebar */
.studio-inspector {
  width: 340px;
  background: #FFFFFF;
  border-left: 1px solid var(--rule-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  transition: width 0.18s ease;
}

.studio-inspector.is-collapsed:not(.is-peek-open) {
  width: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border-left: none !important;
}

.studio-inspector.is-peek-open {
  width: 340px !important;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  z-index: 44;
}

/* Right Inspector Toggle Tab Handle - Styled uniformly as a sleek vertical grip pill */
.inspector-toggle-tab {
  position: absolute;
  top: 50%;
  right: 340px;
  transform: translateY(-50%);
  width: 14px;
  height: 64px;
  background: var(--rule-light);
  border: 1px solid var(--rule);
  border-right: none;
  border-radius: 7px 0 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  box-sizing: border-box;
  cursor: pointer;
  z-index: 45;
  color: var(--ink-muted);
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.05);
  padding: 0;
  margin: 0;
  transition: right 0.18s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.inspector-toggle-tab:hover {
  background: var(--honey-light);
  border-color: var(--honey);
  color: var(--ink);
}

.inspector-toggle-tab.is-collapsed:not(.is-peek-open) {
  right: 0;
  border-right: 1px solid var(--rule);
  background: var(--rule-light);
}

.inspector-toggle-tab.is-peek-open {
  right: 340px !important;
  border-right: none;
}

/* Inspector Stackable Panels: Top Segmented Nav */
.inspector-top-nav {
  display: flex;
  align-items: center;
  background: #FAF8F2;
  border-bottom: 1px solid var(--rule-light);
  padding: 0.3rem 0.5rem;
  gap: 0.4rem;
  flex-shrink: 0;
}

.inspector-nav-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inspector-nav-btn:hover {
  background: #FFFFFF;
  color: var(--ink);
  border-color: var(--rule-light);
}

.inspector-nav-btn.is-active {
  background: #FFFFFF;
  color: var(--ink);
  border-color: var(--rule);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-weight: 700;
}

.studio-inspector.hide-properties .inspector-scroll-area {
  display: none !important;
}

.studio-inspector.hide-properties .layers-timeline-panel {
  flex: 1 1 100% !important;
  min-height: 0 !important;
  height: 100% !important;
}

.studio-inspector.hide-layers .layers-timeline-panel {
  display: none !important;
}

.studio-inspector.hide-layers .inspector-scroll-area {
  flex: 1 1 100% !important;
  min-height: 0 !important;
  height: 100% !important;
  border-bottom: none !important;
}

/* Top Section: Properties / Settings */
.inspector-scroll-area {
  flex: 1 1 50%;
  min-height: 200px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid var(--rule-light);
}

.inspector-section-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspector-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.inspector-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
}

.inspector-field label {
  font-weight: 600;
  color: var(--ink-soft);
}

.inspector-field input, .inspector-field select, .inspector-field textarea {
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  font-size: 0.85rem;
  background: #FFFFFF;
}

.inspector-field input[type="color"] {
  height: 34px;
  padding: 2px;
  cursor: pointer;
}

.inspector-actions-row {
  display: flex;
  gap: 0.4rem;
}

.inspector-actions-row button {
  flex: 1;
  padding: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  background: #FAF8F2;
  cursor: pointer;
  transition: all 0.15s ease;
}

.inspector-actions-row button:hover {
  background: var(--honey-soft);
  border-color: var(--honey);
}

.inspector-actions-row button.btn-danger {
  color: #B91C1C;
  border-color: #FECACA;
  background: #FEF2F2;
}

.inspector-actions-row button.btn-danger:hover {
  background: #FEE2E2;
  border-color: #B91C1C;
}

/* Bottom Section: Layers & Slide Timeline Panel */
.layers-timeline-panel {
  flex: 1 1 50%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  background: #FAF8F2;
  overflow: hidden;
}

.layers-timeline-header {
  padding: 0.75rem 1rem;
  background: #FFFFFF;
  border-bottom: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.layers-timeline-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.layers-timeline-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.layers-timeline-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Layer Group Row (Flat collapsible row with caret) */
.layer-timeline-item.layer-group-row {
  background: #FDFBF7;
  border: 1px solid var(--rule-light);
  border-left: 3px solid var(--clay);
  font-weight: 600;
}

.layer-timeline-item.layer-group-row:hover {
  background: #FAF7EE;
  border-color: var(--rule);
  border-left-color: var(--clay);
}

.layer-timeline-item.layer-group-row.active {
  background: #FFFDF5;
  border-color: var(--honey);
  border-left-color: var(--honey);
  box-shadow: 0 0 0 1px var(--honey);
}

.layer-timeline-item.layer-group-row.drag-into-target {
  background: #FFF8E1;
  border: 2px dashed var(--honey) !important;
}

.btn-group-caret {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.1s ease;
  flex-shrink: 0;
}

.btn-group-caret:hover {
  background: var(--paper-hover);
  color: var(--ink);
}

.layer-group-count {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 2px;
}

.btn-icon-subtle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--rule-light);
  background: #FFFFFF;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-icon-subtle:hover {
  background: var(--paper-hover);
  border-color: var(--honey);
  color: var(--ink);
}

.layer-group-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.layer-group-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Individual Layer Item */
.layer-timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
  gap: 0.5rem;
  position: relative;
  overflow: visible;
  user-select: none;
}

/* Indented Child Layer inside a Group */
.layer-timeline-item.is-grouped-child {
  margin-left: 1.25rem;
  width: calc(100% - 1.25rem);
  box-sizing: border-box;
  background: #FFFFFF;
  border-left: 3px solid var(--honey);
}

.layer-timeline-item.is-grouped-child:hover {
  background: #FCFAF5;
  border-color: var(--rule);
  border-left-color: var(--honey-dark);
}

.layer-timeline-item.is-grouped-child.active {
  background: #FFFDF5;
  border-color: var(--honey);
  border-left-color: var(--honey);
  box-shadow: 0 0 0 1px var(--honey);
}
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
  gap: 0.5rem;
  position: relative;
  overflow: visible;
}

.layer-timeline-item.layer-is-dragging {
  opacity: 0.35;
}

.layer-timeline-item.drop-target-above {
  border-top: 2.5px solid var(--honey) !important;
}

.layer-timeline-item.drop-target-below {
  border-bottom: 2.5px solid var(--honey) !important;
}

.layer-timeline-item:has(.layer-overflow-menu) {
  z-index: 100;
}

.layer-timeline-item:hover {
  border-color: var(--rule);
}

.layer-timeline-item.active {
  background: var(--honey-soft);
  border-color: var(--honey);
  font-weight: 700;
}

.layer-main-col {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.layer-name-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  min-width: 0;
}

.layer-index-indicator {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.layer-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--ink);
  cursor: text;
}

.layer-meta-subrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.layer-item-end {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.layer-anim-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: #EAE8E0;
  color: var(--ink-soft);
  white-space: nowrap;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.layer-anim-badge.group-badge {
  background: #FDF3D6;
  color: #7A5306;
  border: 1px solid rgba(244, 191, 54, 0.4);
}

.inline-rename-input {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--honey);
  border-radius: 4px;
  padding: 1px 6px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.25);
}

.layer-overflow-container {
  position: relative;
  display: inline-flex;
}

.layer-overflow-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 1000;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  min-width: 145px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.layer-overflow-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.layer-overflow-item > svg,
.layer-overflow-item .icon-span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.layer-overflow-item:hover {
  background: var(--paper-hover);
}

.layer-overflow-item.danger {
  color: var(--clay);
}

.layer-overflow-item.danger:hover {
  background: #FDF3F1;
}

/* Layer & Group State Modifiers */
.layer-timeline-item.is-hidden {
  opacity: 0.55;
  background: #F7F5EE;
}

.layer-timeline-item.is-hidden .layer-item-title,
.layer-timeline-item.is-hidden .layer-group-title-text {
  text-decoration: line-through;
  color: var(--ink-muted);
}

.layer-timeline-item.drag-over {
  border-top: 2px solid var(--honey);
}

.btn-layer-action {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.btn-layer-action:hover {
  background: var(--paper-hover);
  color: var(--ink);
}

.btn-layer-action.active-hidden {
  color: var(--clay);
}

/* Playlist Presentation Ordering Cards */
.playlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0;
}

.playlist-presentation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.playlist-pres-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.playlist-index-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--honey-light);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.playlist-pres-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playlist-pres-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.playlist-pres-meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.playlist-pres-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Bottom Slide Strip (Filmstrip) */
.studio-filmstrip {
  height: 105px;
  background: #FAF8F2;
  border-top: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  flex-shrink: 0;
}

.filmstrip-thumb {
  width: 120px;
  height: 75px;
  background: #FFFFFF;
  border: 2px solid var(--rule-light);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.filmstrip-thumb.is-dragging {
  opacity: 0.35;
  transform: scale(0.96);
}

.filmstrip-skeleton-placeholder {
  width: 120px;
  height: 75px;
  border: 2px dashed var(--honey);
  background: rgba(244, 191, 54, 0.16);
  border-radius: 6px;
  flex-shrink: 0;
  box-sizing: border-box;
  animation: skeletonPulse 1.2s infinite ease-in-out;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes skeletonPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

.filmstrip-thumb-name {
  font-weight: 600;
  font-size: 0.68rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75px;
}

.filmstrip-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--rule);
}

.filmstrip-thumb.active {
  border-color: var(--honey);
  box-shadow: 0 0 0 1px var(--honey);
}

.filmstrip-thumb-preview {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.filmstrip-thumb-info {
  height: 20px;
  background: #FAF8F2;
  border-top: 1px solid var(--rule-light);
  font-size: 0.68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.4rem;
  color: var(--ink-soft);
}

.btn-add-slide {
  width: 100px;
  height: 75px;
  border: 1px dashed var(--rule);
  background: #FFFFFF;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.btn-add-slide:hover {
  background: var(--honey-light);
  border-color: var(--honey);
  color: var(--ink);
}

/* ==========================================================================
   Modals & Dropdown Panels
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 36, 31, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid var(--rule-light);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  width: 520px;
  max-width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--rule-light);
  background: #FAF8F2;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* Dropdown Menu (e.g. User Profile, Notifications, 3-dots) */
.popover-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  min-width: 220px;
  padding: 0.4rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.popover-menu.popover-dropup {
  top: auto;
  bottom: calc(100% + 8px);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.16);
}

.popover-item {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 6px;
  color: var(--ink);
  text-align: left;
}

.popover-item:hover {
  background: var(--paper-hover);
}

.popover-divider {
  height: 1px;
  background: var(--rule-light);
  margin: 0.3rem 0;
}

/* ==========================================================================
   Fullscreen Player Styles
   ========================================================================== */
.screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
}

.screen .scene {
  width: min(100vw, 177.77vh);
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}

.screen .player-controls {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.65rem;
  z-index: 1000;
}

.screen:fullscreen .player-controls {
  display: none;
}

/* ==========================================================================
   In-App New Presentation Dialog & Playlist Styles
   ========================================================================== */
.modal-dialog.modal-lg {
  width: 620px;
  max-width: 95vw;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-form-col-span-2 {
  grid-column: span 2;
}

.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-label-hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: normal;
}

.modal-input, .modal-select {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #FFFFFF;
  font-size: 0.9rem;
  color: var(--ink);
  font-family: var(--font-ui);
}

.modal-input:focus, .modal-select:focus {
  border-color: var(--honey-hover);
  outline: none;
  box-shadow: 0 0 0 2px var(--honey-soft);
}

.toggle-pill-group {
  display: flex;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}

.toggle-pill-btn {
  flex: 1;
  padding: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0;
  color: var(--ink-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.view-toggle-button * {
  pointer-events: none;
}

.toggle-pill-btn.active {
  background: var(--honey);
  color: var(--ink);
  font-weight: 700;
}

.ratio-preview-card {
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 0.75rem;
  background: #FAF8F2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ratio-box {
  background: var(--ink);
  color: var(--honey);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
  flex-shrink: 0;
}

.template-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-height: 140px;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  background: #FAF8F2;
}

.template-pick-item {
  border: 2px solid var(--rule-light);
  border-radius: 6px;
  padding: 0.5rem 0.4rem;
  background: #FFFFFF;
  cursor: pointer;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.template-pick-item:hover {
  border-color: var(--honey);
}

.template-pick-item.active {
  border-color: var(--honey);
  background: var(--honey-light);
  color: var(--ink);
  font-weight: 700;
}

.playlists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.playlist-card {
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.playlist-card:hover {
  border-color: var(--rule);
  box-shadow: 0 4px 16px rgba(35, 36, 31, 0.06);
}

.playlist-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.playlist-card-title {
  font-family: var(--font-display, inherit);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.playlist-card-desc {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.playlist-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.playlist-status-badge.published {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.playlist-status-badge.concept {
  background: #fff8e1;
  color: #b45309;
  border: 1px solid #fde68a;
}

.playlist-status-badge.draft-modified {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.playlist-status-badge.draft-modified::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b45309;
}

.playlist-stack-preview {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--paper, #faf8f2);
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  max-height: 140px;
  overflow-y: auto;
}

.playlist-stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  padding: 0.2rem 0;
}

.playlist-stack-item + .playlist-stack-item {
  border-top: 1px dashed var(--rule-light);
  padding-top: 0.35rem;
}

.playlist-stack-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.playlist-stack-title {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-stack-meta {
  font-size: 0.72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.playlist-index-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.playlist-card-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.playlist-card-meta strong {
  color: var(--ink);
  font-weight: 600;
}

.playlist-screen-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  background: rgba(244, 191, 54, 0.15);
  border: 1px solid rgba(244, 191, 54, 0.45);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.playlist-screen-pill:hover {
  background: var(--honey, #F4BF36);
  border-color: var(--honey, #F4BF36);
  color: #000;
}

.playlist-screen-pill.disabled {
  background: var(--paper-hover, #f0eee6);
  border-color: var(--rule-light);
  color: var(--ink-muted);
  cursor: default;
}

.playlist-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule-light);
}

/* Playlist Staging Editor Modal */
.playlist-editor-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.playlist-staging-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.35;
  background: #fff8e1;
  color: #b45309;
  border: 1px solid #fde68a;
}

.playlist-drag-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.playlist-drag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: #ffffff;
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
  user-select: none;
}

.playlist-drag-item:hover {
  border-color: var(--rule);
  background: #fbfbf9;
}

.playlist-drag-item.is-dragging {
  opacity: 0.35;
  background: #f1f5f9;
  border-style: dashed;
}

.playlist-drag-placeholder {
  height: 44px;
  border: 2px dashed var(--honey, #F4BF36);
  background: rgba(244, 191, 54, 0.12);
  border-radius: 8px;
  margin: 3px 0;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.playlist-drag-grip {
  cursor: grab;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  padding: 2px 4px;
}

.playlist-drag-grip:active {
  cursor: grabbing;
}

.playlist-summary-bar {
  background: var(--paper, #faf8f2);
  border: 1px solid var(--rule-light);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 0.82rem;
  color: var(--ink);
}

.playlist-summary-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.playlist-summary-metric strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.playlist-summary-metric span {
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Playlist Screens Inspection Modal */
.playlist-screens-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.playlist-screens-table th,
.playlist-screens-table td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--rule-light);
}

.playlist-screens-table th {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--paper, #faf8f2);
}

.screen-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.screen-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.screen-status-dot.offline {
  background: #94a3b8;
}

/* Canvas Group Overlay & Selection */
.canvas-group-overlay {
  position: absolute;
  box-sizing: border-box;
  outline: 2px dashed var(--honey);
  outline-offset: 4px;
  pointer-events: auto;
  cursor: move;
  z-index: 200;
  border-radius: 4px;
}

.canvas-group-overlay .group-overlay-label {
  position: absolute;
  top: -24px;
  left: -2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--honey);
  color: #23241F;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px 4px 0 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.canvas-group-overlay .group-overlay-label svg {
  width: 12px;
  height: 12px;
}

.canvas-group-overlay .rotate-handle-stem {
  position: absolute;
  top: -24px;
  left: 50%;
  width: 1.5px;
  height: 24px;
  background: var(--honey);
  transform: translateX(-50%);
  pointer-events: none;
}

.canvas-group-overlay .rotate-handle {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--honey);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
  cursor: grab;
  z-index: 45;
  transition: transform 0.1s ease, background 0.1s ease;
}

.canvas-group-overlay .rotate-handle:hover,
.canvas-group-overlay .rotate-handle.is-rotating {
  cursor: grabbing;
  background: var(--honey);
  transform: translateX(-50%) scale(1.25);
}

.canvas-stage.is-preview-mode {
  overflow: hidden !important;
}

/* Layer Outside Stage Warning Indicator */
.layer-outside-warning-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #D97706;
  margin-left: 6px;
  flex-shrink: 0;
  cursor: help;
  transition: transform 0.15s ease;
}

.layer-outside-warning-badge:hover {
  transform: scale(1.2);
}

.layer-outside-warning-badge svg {
  width: 14px;
  height: 14px;
  stroke: #D97706;
}

.layer-timeline-item.is-outside-stage {
  border-left: 2.5px solid #D97706 !important;
}

.inspector-outside-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  color: #92400E;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.inspector-outside-warning-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inspector-outside-warning svg {
  width: 18px;
  height: 18px;
  stroke: #D97706;
  flex-shrink: 0;
}

/* ==========================================================================
   Workspace Media Library & Modal
   ========================================================================== */
.modal-dialog.modal-xl {
  width: 920px;
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.media-library-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.media-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.media-filter-tabs {
  display: inline-flex;
  background: #EAE8DE;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.media-filter-tab {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.media-filter-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.media-filter-tab.is-active {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.media-search-input {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #FFFFFF;
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--ink);
  width: 220px;
}

.media-search-input:focus {
  border-color: var(--honey-hover);
  outline: none;
  box-shadow: 0 0 0 2px var(--honey-soft);
}

.media-dropzone {
  border: 2px dashed var(--rule);
  border-radius: 10px;
  background: #FAF8F2;
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.media-dropzone:hover,
.media-dropzone.is-dragover {
  border-color: var(--honey);
  background: #FFFDF7;
}

.media-dropzone-icon {
  width: 36px;
  height: 36px;
  color: var(--ink-muted);
}

.media-dropzone-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.media-dropzone-hint {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1rem;
}

.media-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.media-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--ink);
}

.media-card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #EFECE3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(35, 36, 31, 0.85);
  color: #FFFFFF;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.media-card-body {
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: #FFFFFF;
}

.media-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-meta {
  font-size: 0.7rem;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
}

.media-card-actions {
  display: flex;
  gap: 6px;
  padding: 0.4rem 0.75rem 0.6rem;
  background: #FFFFFF;
  border-top: 1px solid #F0EEE6;
}

.media-empty-card {
  grid-column: 1 / -1;
  background: #FAF8F2;
  border: 1px dashed var(--rule);
  border-radius: 10px;
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Dynamic Widgets (Weather, QR, Clock) Styles
   ========================================================================== */
.weather-search-container {
  position: relative;
  width: 100%;
}

.weather-location-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  max-height: 200px;
  overflow-y: auto;
  margin-top: 3px;
}

.weather-location-item {
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-bottom: 1px solid #F0EEE6;
}

.weather-location-item:last-child {
  border-bottom: none;
}

.weather-location-item:hover {
  background: var(--honey-soft);
}

.weather-location-name {
  font-weight: 700;
}

.weather-location-sub {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.token-cheatsheet {
  background: #FAF8F2;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.4;
}

.token-cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px 8px;
}

.token-cheatsheet code {
  font-family: ui-monospace, monospace;
  background: #EAE8DE;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 700;
  color: var(--ink);
}

.appstore-mode-tabs {
  display: flex;
  background: #EAE8DE;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  margin-bottom: 0.5rem;
}

.appstore-mode-tab {
  flex: 1;
  text-align: center;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.appstore-mode-tab.is-active {
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Searchable Font Picker Popover & Typography
   ========================================================================== */
.font-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.font-picker-trigger:hover,
.font-picker-trigger:focus {
  border-color: var(--honey-hover);
  box-shadow: 0 0 0 2px var(--honey-soft);
}

.font-picker-trigger-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-picker-trigger-chevron {
  color: var(--ink-muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.font-picker-popover {
  position: fixed;
  z-index: 10000;
  width: 320px;
  max-width: 90vw;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popoverFadeIn 0.15s ease;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.font-picker-header {
  padding: 0.75rem 0.85rem 0.5rem;
  border-bottom: 1px solid #F0EEE6;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #FAF8F2;
}

.font-picker-search {
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  background: #FFFFFF;
  color: var(--ink);
}

.font-picker-search:focus {
  border-color: var(--honey-hover);
  outline: none;
  box-shadow: 0 0 0 2px var(--honey-soft);
}

.font-picker-categories {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.font-picker-category-chip {
  background: transparent;
  border: 1px solid var(--rule-light);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.1s ease;
}

.font-picker-category-chip:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.font-picker-category-chip.is-active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.font-picker-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.4rem 0;
}

.font-picker-item {
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #FAF8F2;
  transition: background-color 0.1s ease;
}

.font-picker-item:hover {
  background-color: var(--honey-soft);
}

.font-picker-item.is-selected {
  background-color: #FAF5E6;
  border-left: 3px solid var(--honey);
}

.font-picker-item-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.font-picker-item-category {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  background: #EAE8DE;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ==========================================================================
   Vrije Tijdlijn (Interactive Sequencer) & Animation Engine Styles
   ========================================================================== */
.timeline-block.freeform-block {
  display: flex;
  align-items: center;
  position: absolute;
  top: 2px;
  bottom: 2px;
  height: calc(100% - 4px);
  border-radius: 4px;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  user-select: none;
  touch-action: none;
}

.timeline-block.freeform-block:hover {
  border-color: #94A3B8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.timeline-block.freeform-block.selected {
  border-color: #475569;
  background: #F8FAFC;
  box-shadow: 0 0 0 1.5px #475569, 0 2px 8px rgba(0, 0, 0, 0.1);
  outline: none;
  z-index: 10;
}

.timeline-trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9px;
  z-index: 5;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  background: rgba(0, 0, 0, 0.04);
}

.timeline-trim-handle::after {
  content: '';
  width: 2px;
  height: 16px;
  background: rgba(35, 36, 31, 0.45);
  border-radius: 1px;
}

.timeline-trim-handle.trim-left {
  left: 0;
  border-radius: 5px 0 0 5px;
}

.timeline-trim-handle.trim-right {
  right: 0;
  width: 12px;
  cursor: col-resize;
  border-radius: 0 5px 5px 0;
}

.timeline-trim-handle:hover,
.timeline-trim-handle.is-dragging {
  background: rgba(255, 255, 255, 0.85);
}

/* Timeline Zoom Controls in Shelf Header */
.timeline-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light);
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(35, 36, 31, 0.04);
}

.timeline-zoom-label {
  display: none;
}

.btn-timeline-zoom {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  padding: 0;
}

.btn-timeline-zoom:hover:not(:disabled) {
  background: var(--paper-hover);
  color: var(--ink);
}

.btn-timeline-zoom:active:not(:disabled) {
  background: var(--paper-active, #E8E2D2);
  transform: scale(0.94);
}

.btn-timeline-zoom:disabled {
  opacity: 0.3;
  cursor: default;
}

.btn-timeline-zoom-level {
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  transition: all 0.12s ease;
}

.btn-timeline-zoom-level:hover {
  background: #FEF3C7;
  color: #92400E;
}

.timeline-block-body {
  flex: 1;
  height: 100%;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

.timeline-block-body:active {
  cursor: grabbing;
}

.timeline-drag-tooltip {
  position: fixed;
  z-index: 99999;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -130%);
}

.animation-checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background: #FAF8F2;
  border: 1px solid var(--rule);
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
}

.animation-checkbox-pill.is-active {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.animation-checkbox-pill input {
  display: none;
}

/* ==========================================================================
   Studio Presentation Preview Fullscreen Modal
   ========================================================================== */
.studio-presentation-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 17, 23, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  animation: previewFadeIn 0.22s ease-out forwards;
}

.studio-presentation-preview-modal.closing {
  animation: previewFadeOut 0.2s ease-in forwards;
}

@keyframes previewFadeIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes previewFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.985); }
}

.preview-floating-header {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  box-sizing: border-box;
  background: rgba(26, 28, 35, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #FAF7EE;
  z-index: 10;
}

.preview-meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  background: var(--honey, #F4BF36);
  color: #23241F;
  border-radius: 4px;
}

.preview-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #FFFFFF;
}

.preview-slide-indicator {
  font-size: 0.8rem;
  color: #9CA3AF;
}

.preview-center-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-preview-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FAF7EE;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.btn-preview-ctrl:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.preview-timecode {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: #E5E7EB;
  min-width: 90px;
  text-align: center;
}

.preview-progress-bar {
  width: 140px;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.preview-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--honey, #F4BF36);
  border-radius: 3px;
  transition: width 0.08s linear;
}

.btn-preview-close {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-preview-close:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #FFFFFF;
}

.preview-stage-viewport {
  flex: 1;
  width: 100%;
  height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  overflow: hidden;
}

.preview-stage-viewport .canvas-stage {
  max-width: 92vw;
  max-height: calc(88vh - 56px);
  width: min(92vw, calc((88vh - 56px) * 16 / 9));
  aspect-ratio: 16 / 9;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.preview-stage-viewport .canvas-stage.portrait {
  width: min(calc((88vh - 56px) * 9 / 16), 92vw);
  aspect-ratio: 9 / 16;
}

/* ==========================================================================
   Quick-Transition Motion Badges & Popover
   ========================================================================== */
.timeline-motion-badges-group {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.timeline-motion-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid var(--rule-light);
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
  line-height: 1.2;
}

.timeline-motion-badge:hover {
  border-color: var(--honey-dark);
  background: #FFFDF5;
  transform: translateY(-0.5px);
}

.timeline-motion-badge.in {
  background: #FEF3C7;
  color: #92400E;
  border-color: rgba(245, 158, 11, 0.4);
}

.timeline-motion-badge.idle {
  background: #EEF2FF;
  color: #4338CA;
  border-color: rgba(99, 102, 241, 0.35);
}

.timeline-motion-badge.out {
  background: #FEE2E2;
  color: #991B1B;
  border-color: rgba(239, 68, 68, 0.35);
}

.timeline-motion-badge.empty {
  color: var(--ink-muted);
  border-style: dashed;
  background: transparent;
  font-weight: 500;
}

.timeline-motion-badge.empty:hover {
  border-color: var(--honey);
  color: var(--ink);
  background: #FFFDF5;
}

/* 3-Phase Lane Block Interior */
.timeline-block-in-phase {
  height: 100%;
  background: repeating-linear-gradient(
    -45deg,
    #E2E8F0,
    #E2E8F0 3px,
    #F1F5F9 3px,
    #F1F5F9 6px
  );
  border-right: 1px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 4px;
}

.timeline-block-active-phase {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1E293B;
  min-width: 0;
  background: #FFFFFF;
}

.timeline-block.selected .timeline-block-active-phase {
  background: #F8FAFC;
}

.timeline-idle-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.5px 3px;
  border-radius: 3px;
  background: #E0E7FF;
  color: #3730A3;
  letter-spacing: 0.02em;
  animation: timelineIdlePulse 1.8s infinite ease-in-out;
}

@keyframes timelineIdlePulse {
  0%, 100% { opacity: 0.7; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.03); }
}

.timeline-block-out-phase {
  height: 100%;
  background: repeating-linear-gradient(
    45deg,
    #E2E8F0,
    #E2E8F0 3px,
    #F1F5F9 3px,
    #F1F5F9 6px
  );
  border-left: 1px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 0 4px;
}

.timeline-block-in-phase:hover,
.timeline-block-out-phase:hover {
  filter: brightness(0.95);
}

/* Disable select and edit interactions in playback and presentation preview */
.canvas-stage.playback-active,
.canvas-stage.playback-active *,
.preview-stage-viewport .canvas-stage,
.preview-stage-viewport .canvas-stage * {
  pointer-events: none !important;
  user-select: none !important;
  cursor: default !important;
}

/* Quick-Transition Popover */
.timeline-transition-popover {
  position: fixed !important;
  z-index: 100050 !important;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--ink);
  animation: popoverFadeIn 0.16s ease-out forwards;
}

@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.popover-header {
  height: 38px;
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF8F2;
  border-bottom: 1px solid var(--rule-light);
  font-weight: 700;
  color: var(--ink);
}

.popover-title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.btn-popover-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-popover-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.popover-tabs {
  display: flex;
  border-bottom: 1px solid var(--rule-light);
  background: #F4F1E8;
  padding: 2px 4px 0 4px;
  gap: 2px;
}

.popover-tab-btn {
  flex: 1;
  padding: 6px 4px;
  background: transparent;
  border: none;
  border-radius: 5px 5px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.popover-tab-btn:hover {
  color: var(--ink);
}

.popover-tab-btn.active {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.04);
}

.popover-body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 360px;
  overflow-y: auto;
}

.popover-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.popover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.popover-grid-btn {
  padding: 5px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--rule-light);
  background: #FFFFFF;
  color: var(--ink-soft);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.12s ease;
}

.popover-grid-btn:hover {
  border-color: var(--honey-dark);
  background: #FFFDF5;
}

.popover-grid-btn.active {
  border-color: var(--honey);
  background: #FEF3C7;
  color: #7A5306;
}

.popover-direction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.popover-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.popover-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--honey);
}

.popover-slider-val {
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--clay);
  min-width: 32px;
  text-align: right;
}

.popover-footer {
  padding: 0.6rem 0.85rem;
  background: #FAF8F2;
  border-top: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-popover-test {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--honey);
  background: #FEF3C7;
  color: #7A5306;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-popover-test:hover {
  background: #FDE68A;
  box-shadow: 0 1px 4px rgba(244, 191, 54, 0.3);
}

.btn-popover-done {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--rule-light);
  background: #FFFFFF;
  color: var(--ink);
  cursor: pointer;
}

.btn-popover-done:hover {
  background: #FAF7EE;
}

/* Styled Text Inspector Styles */
.styled-text-tabs {
  display: flex;
  background: #F1EFE6;
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 0.75rem;
}

.styled-text-tab-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #18181B;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.styled-text-tab-btn:hover {
  color: #000000;
}

.styled-text-tab-btn.active {
  background: #FFFFFF;
  color: #000000;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.styled-text-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.styled-text-preset-card {
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  transition: all 0.15s ease;
}

.styled-text-preset-card:hover {
  border-color: var(--honey);
  background: #FFFDF5;
}

.styled-text-preset-card.active {
  border-color: var(--honey);
  background: #FFFDF5;
  outline: 2px solid var(--honey);
}

.styled-text-preset-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.styled-text-preset-card-desc {
  font-size: 0.68rem;
  color: #64748B;
  line-height: 1.25;
}

.inspector-field textarea.styled-text-code-area,
.styled-text-code-area {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, 'Cascadia Code', Consolas, 'SFMono-Regular', Menlo, monospace !important;
  font-size: 0.78rem !important;
  line-height: 1.5 !important;
  background: #FFFFFF !important;
  color: #18181B !important;
  border: 1px solid var(--rule-light) !important;
  border-radius: 6px !important;
  padding: 8px 10px !important;
  resize: vertical;
  min-height: 220px;
  white-space: pre;
  tab-size: 2;
}

.inspector-field textarea.styled-text-code-area:focus,
.styled-text-code-area:focus {
  outline: none;
  border-color: var(--honey) !important;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.2) !important;
}

.styled-text-snippet-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.35rem;
}

.styled-text-snippet-btn {
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 500;
  background: #F4F3ED;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}

.styled-text-snippet-btn:hover {
  background: #E8E6DC;
  border-color: #64748B;
}

/* ==========================================================================
   Phase 2 & 3 Core Narrowcasting Elements Styles
   ========================================================================== */

/* 1. Ticker / Lichtkrant */
.canvas-ticker-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.65em;
  padding: 0.25em 0.75em;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.75em;
  margin-right: 0.5em;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ticker-marquee-track {
  flex: 1;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.ticker-marquee-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  will-change: transform;
}

.ticker-scroll-left {
  animation: tickerScrollLeft linear infinite;
}

.ticker-scroll-right {
  animation: tickerScrollRight linear infinite;
}

@keyframes tickerScrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes tickerScrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.ticker-item-separator {
  display: inline-block;
  margin: 0 1.2em;
  opacity: 0.6;
  font-weight: 400;
}

/* 2. Countdown / Aftelklok */
.canvas-countdown-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4%;
  box-sizing: border-box;
}

.countdown-title {
  font-weight: 700;
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
  margin-bottom: 0.5em;
  text-align: center;
}

.countdown-cards-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
}

.countdown-card {
  flex: 1;
  max-width: 85px;
  background: #FAF8F2;
  border: none;
  border-radius: 6px;
  padding: 0.4em 0.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.countdown-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.3em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.5em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.65;
  margin-top: 0.2em;
}

.countdown-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.2em;
  padding: 0.4em 0.8em;
  background: #FAF8F2;
  border: none;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.countdown-finished-msg {
  font-weight: 800;
  font-size: 1.1em;
  text-align: center;
  padding: 0.5em;
  color: #10B981;
}

/* 3. Announcement / Mededelingen-banner */
.canvas-announcement-container {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  padding: 4% 5%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.06);
}

.announcement-header {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.4em;
}

.announcement-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 0.6em;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.announcement-title {
  font-weight: 800;
  font-size: 0.9em;
  letter-spacing: -0.01em;
}

.announcement-body {
  font-size: 0.72em;
  line-height: 1.35;
  word-break: break-word;
}

/* 4. Table / Menukaart & Prijslijst */
.canvas-table-container {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  padding: 3.5%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.06);
  background: #FFFFFF;
}

.table-widget-title {
  font-weight: 800;
  font-size: 0.95em;
  margin-bottom: 0.4em;
  padding-bottom: 0.3em;
  border-bottom: 2px solid var(--honey);
}

.table-widget-table {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.table-widget-header {
  display: flex;
  align-items: center;
  padding: 0.3em 0.4em;
  font-size: 0.6em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule-light);
}

.table-widget-row {
  display: flex;
  align-items: center;
  padding: 0.35em 0.4em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 0.72em;
}

.table-widget-row.zebra {
  background: rgba(0, 0, 0, 0.02);
}

.table-col-1 {
  flex: 1.2;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-col-2 {
  flex: 1.8;
  font-size: 0.88em;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.5em;
}

.table-col-3 {
  flex: 0.8;
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #7A5306;
}

/* 5. Progress / Voortgangsbalk */
.canvas-progress-container {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  padding: 4% 5%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #FFFFFF;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.06);
}

.progress-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4em;
}

.progress-title {
  font-weight: 800;
  font-size: 0.85em;
}

.progress-readout {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75em;
  color: var(--ink-soft);
}

.progress-track {
  width: 100%;
  height: 1.3em;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 0.65em;
  font-weight: 800;
  color: #FFFFFF;
  transition: width 0.4s ease;
  min-width: 1.3em;
}

.progress-fill.animated {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1.5rem 1.5rem;
  animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
  0% { background-position: 1.5rem 0; }
  100% { background-position: 0 0; }
}

/* 6. Opening Hours / Openingstijden */
.canvas-opening-hours-container {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  padding: 4%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.opening-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--rule-light);
}

.opening-title {
  font-weight: 800;
  font-size: 0.85em;
}

.opening-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.58em;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.opening-status-pill.open {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.opening-status-pill.closed {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.opening-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.opening-status-pill.open .opening-status-dot {
  animation: openingPulse 1.5s infinite;
}

@keyframes openingPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.opening-schedule-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.opening-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68em;
  padding: 1px 4px;
}

.opening-day-row.is-today {
  background: rgba(244, 191, 54, 0.18);
  font-weight: 700;
  border-radius: 4px;
  color: #7A5306;
}

.opening-day-name {
  display: flex;
  align-items: center;
  gap: 4px;
}

.opening-day-hours {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.inspector-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
}

.inspector-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.inspector-table-row-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.inspector-table-row-item input {
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
}

.inspector-schedule-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--rule-light);
  font-size: 0.75rem;
}

.inspector-schedule-day {
  width: 70px;
  font-weight: 600;
  flex-shrink: 0;
}

.inspector-schedule-inputs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.inspector-schedule-inputs input[type="time"] {
  font-size: 0.72rem;
  padding: 0.2rem 0.3rem;
  width: 72px;
}




.canvas-stage { container-type: inline-size; }
.canvas-stage.office-scene::before, .canvas-stage.office-scene::after { content:''; position:absolute; inset:0; pointer-events:none; }
.canvas-stage.office-scene::before { background:var(--office-edge,#ffce29); clip-path:polygon(70% 0,100% 0,100% 100%,48% 100%); }
.canvas-stage.office-scene::after { background:url('/brand/studio-office.jpg') center right / cover; clip-path:polygon(73% 0,100% 0,100% 100%,51% 100%); }
:host(.rich-scene) .canvas-stage { position:absolute; inset:0; width:100%; height:100%; min-width:0; min-height:0; max-width:none; overflow:hidden; box-shadow:none; border:0; border-radius:0; pointer-events:none; }
:host(.rich-scene) .canvas-layer { border:0; pointer-events:none; }
:host(.rich-scene) .canvas-table-edge-btn { display:none; }
.brand-wizard button { border:1px solid var(--rule); padding:.48rem .75rem; }
.brand-wizard button.primary { background:var(--honey); }

@media (max-width: 760px) {
  #app:has(.studio-container) { overflow-y:auto; height:100dvh; }
  .studio-container { overflow:visible; height:auto; }
  .studio-top-bar, .studio-left-controls, .studio-right-controls, .canvas-toolbar-row { flex-wrap:wrap; height:auto; gap:.4rem; }
  .studio-body { display:flex; flex-direction:column; overflow:visible; }
  .studio-workarea { order:-1; flex:none; padding:.5rem; min-height:0; }
  .canvas-stage-wrapper { height:auto; min-height:0; aspect-ratio:16/9; flex:none; padding:.25rem; }
  .canvas-stage { min-width:0; min-height:0; }
  .studio-inspector, .studio-drawer { width:100%; height:18rem; max-height:50vh; }
  .studio-bottom-shelf { flex:none; }
  .drawer-toggle-tab, .inspector-toggle-tab { display:none; }
  .studio-drawer.is-collapsed:not(.is-peek-open), .studio-inspector.is-collapsed:not(.is-peek-open) { width:100% !important; }
}

/* Workspace filters size to their contents inside the Studio toolbar. */
.main-viewport .filter-select { width: auto; }

/* Studio History Drawer */
@keyframes studioSlideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.studio-history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 430px;
  max-width: 92vw;
  height: 100vh;
  background: #ffffff;
  z-index: 10001;
  box-shadow: -6px 0 28px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  animation: studioSlideInRight 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.studio-history-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--rule-light, #e5e5e5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-subtle, #fbfbf9);
}

.studio-history-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.studio-history-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(244, 191, 54, 0.15);
  border: 1px solid rgba(244, 191, 54, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #1f2937);
  flex-shrink: 0;
}

.studio-history-header-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: var(--ink, #1f2937);
}

.btn-studio-history {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.65rem !important;
  min-width: 34px;
}

.btn-studio-history svg {
  width: 15px;
  height: 15px;
  display: block;
}

.studio-history-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink, #1f2937);
  margin: 0;
}

.studio-history-subtitle {
  font-size: 0.78rem;
  color: var(--ink-muted, #64748b);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 270px;
}

.studio-history-close-btn {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-muted, #64748b);
  padding: 4px 6px;
  border-radius: 6px;
}

.studio-history-close-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink, #1f2937);
}

.studio-history-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.studio-history-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ink-muted, #64748b);
  font-size: 0.88rem;
}

.studio-history-item {
  border: 1px solid var(--rule-light, #e5e5e5);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  background: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.studio-history-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.studio-history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.studio-history-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink, #1f2937);
}

.studio-history-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.studio-history-badge.published {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.studio-history-badge.concept {
  background: #fff8e1;
  color: #b45309;
  border: 1px solid #fde68a;
}

.studio-history-badge.auto-save {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.studio-history-badge.restored {
  background: #ede7f6;
  color: #512da8;
  border: 1px solid #d1c4e9;
}

.studio-history-meta {
  font-size: 0.78rem;
  color: var(--ink-muted, #64748b);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.studio-history-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px dashed #cbd5e1;
}

.studio-history-label-text {
  font-weight: 600;
  color: var(--ink, #1f2937);
}

.studio-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f1f5f9;
}

.studio-history-action-btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--rule-light, #e5e5e5);
  background: #ffffff;
  color: var(--ink, #1f2937);
  transition: all 0.12s ease;
}

.studio-history-action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.studio-history-action-btn.restore {
  background: rgba(244, 191, 54, 0.15);
  border-color: rgba(244, 191, 54, 0.4);
  color: #854d0e;
}

.studio-history-action-btn.restore:hover {
  background: var(--honey, #F4BF36);
  border-color: var(--honey, #F4BF36);
  color: #000000;
}

.draft-status-indicator {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.draft-status-indicator:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.news-card {
  width:100%; height:100%; box-sizing:border-box; padding:2.6% 3.2%;
  display:flex; flex-direction:column; gap:.35em; overflow:hidden; container-type:size;
  text-align:left; background:var(--news-paper, #fff); color:inherit;
  border-radius:.4em;
}
.news-source {
  flex:none; padding:0 0 .5em; border-bottom:1px solid #b6c7d7;
  color:#274f6c; font-size:min(.68em, 5cqh); font-weight:700; letter-spacing:.035em;
}
.news-stories { display:grid; grid-template-columns:1fr; gap:3cqw; flex:1; min-height:0; }
.news-stories:has(.news-related) { grid-template-columns:1.18fr 1fr; }
.news-lead,.news-story { display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden; }
.news-lead { gap:min(.24em, 1.5cqh); }
.news-lead img {
  width:100%; height:44%; flex:none; object-fit:cover; border-radius:.2em; pointer-events:none;
}
.news-card strong,.news-card p {
  display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere;
}
.news-lead strong {
  flex:none; -webkit-line-clamp:3; font-size:min(1.12em, 7.2cqh, 5.5cqw); line-height:1.08;
}
.news-lead p {
  flex:none; -webkit-line-clamp:2; font-size:min(.68em, 4.4cqh, 3.8cqw); margin:0; line-height:1.2;
}
.news-card small {
  flex:none; opacity:.75; font-size:min(.57em, 3.6cqh, 3.3cqw); line-height:1.15;
}
.news-related {
  display:grid; grid-template-rows:repeat(var(--news-rows), minmax(0, 1fr)); min-height:0;
  border-left:1px solid #d8e2eb; padding-left:3cqw;
}
.news-story { justify-content:center; gap:.12em; }
.news-story + .news-story { border-top:1px solid #d8e2eb; }
.news-story strong {
  flex:none; -webkit-line-clamp:2;
  font-size:min(.81em, 5.6cqh, 3.9cqw, calc(32cqh / var(--news-rows))); line-height:1.12;
}
.news-stories[data-display="list"] { grid-template-rows:repeat(var(--news-rows), minmax(0, 1fr)); gap:0; }
.news-stories[data-display="list"] .news-story strong {
  font-size:min(.97em, 7cqh, 5cqw, calc(34cqh / var(--news-rows)));
}
.news-stories[data-display="feature"] .news-lead { justify-content:center; }
.weather-full-panel { display:grid; grid-template-columns:3fr 2fr; align-items:center; gap:3%; width:86%; padding:3%; box-sizing:border-box; border-radius:1.2cqw; background:#629fea; color:white; font-size:min(2.2cqw,5cqh); text-align:left; }
.weather-full-panel strong,.weather-full-panel small { display:block; }
.weather-full-panel .weather-now { font-size:min(11cqw,27cqh); font-weight:300; }
.weather-days { border-left:1px solid #397dc3; padding-left:10%; }
.weather-days div { display:flex; justify-content:space-between; align-items:center; padding:4% 0; font-size:min(3cqw,8cqh); }
.news-three-cards { background:#f2f8f4; color:#191919; border-radius:0; }
.news-three-cards .news-source { display:flex; align-items:center; justify-content:space-between; border:0; color:inherit; font-size:min(3cqw,6cqh); }
.news-three-cards .news-source span { font-size:.65em; font-weight:400; }
.news-three-cards .news-stories { grid-template-columns:repeat(3,minmax(0,1fr)); gap:2cqw; }
.news-three-cards .news-lead { background:white; border-radius:1cqw; box-shadow:0 .2cqw .6cqw #18342633; gap:1cqh; }
.news-three-cards .news-lead img { height:44%; border-radius:0; }
.news-three-cards .news-lead strong,.news-three-cards .news-lead p,.news-three-cards .news-lead small { margin:0 2cqw; }
.news-three-cards .news-lead strong { margin-top:2cqh; font-size:min(1.7cqw,5cqh); }
.news-three-cards .news-lead p { font-size:min(1.2cqw,3.6cqh); line-height:1.35; -webkit-line-clamp:6; }
.news-stories[data-display="feature"] .news-lead:has(img) {
  display:grid; grid-template-columns:42% 1fr; grid-template-rows:auto auto auto;
  align-content:center; align-items:center; column-gap:3cqw;
}
.news-stories[data-display="feature"] img { grid-row:1 / span 3; height:min(75cqh, 42cqw); }
.news-stories[data-display="feature"] strong { font-size:min(1.7em, 10cqh, 6cqw); }
.news-stories[data-display="feature"] p { font-size:min(.88em, 5.8cqh, 4.5cqw); -webkit-line-clamp:3; }
.news-stories[data-display="feature"] small { font-size:min(.68em, 4.4cqh, 3.7cqw); }
@container (max-aspect-ratio: 1/1) {
  .news-stories[data-display="feature"] .news-lead:has(img) { display:flex; }
  .news-stories[data-display="feature"] img { height:42cqh; }
  .news-stories:has(.news-related) { grid-template-columns:1fr; grid-template-rows:1fr 1fr; }
  .news-related { border-left:0; border-top:1px solid #d8e2eb; padding-left:0; }
  .news-lead img { height:36%; }
}
castibee-radar { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:hidden; }
castibee-radar img { width:100%; min-height:0; flex:1; object-fit:contain; pointer-events:none; }
castibee-radar small { font-size:.6em; }
.news-dialog { max-width:min(28rem,90vw); border:1px solid var(--rule-light); padding:1.5rem; border-radius:12px; }
.news-dialog::backdrop { background:#16161170; }
.news-dialog[open],.news-dialog form,.news-options,.news-dialog label,.news-options label { display:grid; gap:.5rem; }
.news-options label:has(input[type=checkbox]) { display:flex; align-items:center; }
.news-layout-choice { display:grid; grid-template-columns:6rem 1fr; align-items:center; gap:.75rem; text-align:left; }
.news-layout-choice .scene { width:6rem; aspect-ratio:16/9; pointer-events:none; }
.news-dialog h2,.news-dialog h3 { margin:.3rem 0; }
.news-bulletin {
  color:#f7fafc;
  background:linear-gradient(135deg,#102d48,#091929 76%);
  gap:min(.34em,2cqh);
}
.news-bulletin .news-source {
  display:flex; justify-content:space-between; align-items:center; gap:1em;
  color:#fff; border-color:#426780; text-transform:uppercase; letter-spacing:.09em;
}
.news-bulletin .news-source span {
  min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  text-transform:none; letter-spacing:0; color:#b7def6;
}
.news-bulletin .news-stories { animation:bulletin-in .42s ease-out both; }
.news-bulletin .news-related,.news-bulletin .news-story + .news-story { border-color:#426780; }
.bulletin-footer {
  display:flex; align-items:center; gap:.6em; min-width:0;
  padding:.22em .5em; background:#224861; color:#fff; font-size:min(.64em,4.6cqh);
}
.bulletin-footer strong { flex:none; color:#b7def6; }
.bulletin-footer span { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bulletin-footer small { font-size:.8em; white-space:nowrap; }
.bulletin-progress { height:max(2px,.48cqh); flex:none; background:#426780; }
.bulletin-progress::before {
  display:block; height:100%; content:''; background:#7fd0f8; transform-origin:left;
  animation:bulletin-progress var(--bulletin-time) linear both;
}
@keyframes bulletin-in { from { opacity:.4; transform:translateY(.14em); } to { opacity:1; transform:none; } }
@keyframes bulletin-progress { from { transform:scaleX(0); } to { transform:scaleX(1); } }
@media (prefers-reduced-motion:reduce) {
  .news-bulletin .news-stories { animation:none; }
  .bulletin-progress { display:none; }
}

/* Overview View Sections */
.overview-section {
  margin-bottom: 2.25rem;
}
.overview-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
}
.overview-section-title,
.overview-section-header h2 {
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif) !important;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}
.overview-section-subtitle {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0.25rem 0 0 0;
}
.overview-empty-card {
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.overview-empty-card.success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}
.overview-empty-card.neutral {
  background: #FAF7EE;
  border: 1px solid var(--rule-light);
}
.overview-empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.overview-empty-icon.success {
  background: #22C55E;
  color: #FFFFFF;
}
.overview-empty-icon.neutral {
  background: var(--rule-light);
  color: var(--ink-muted);
}
.overview-empty-title {
  font-weight: 700;
  font-size: 0.95rem;
}
.overview-empty-title.success {
  color: #166534;
}
.overview-empty-title.neutral {
  color: var(--ink);
}
.overview-empty-desc {
  font-size: 0.82rem;
  margin-top: 2px;
}
.overview-empty-desc.success {
  color: #15803D;
}
.overview-empty-desc.neutral {
  color: var(--ink-muted);
}

/* ==========================================================================
   Castibee UI/UX: Toast Notification Engine & Confirmation Dialogs
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  max-width: 420px;
  width: calc(100vw - 3rem);
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.88rem;
  line-height: 1.4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--rule-light, #e4e2d8);
  background: #ffffff;
  color: var(--ink, #23241f);
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.toast-hiding {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-item.toast-success {
  border-left: 4px solid #16a34a;
}
.toast-item.toast-success .toast-icon {
  color: #16a34a;
}

.toast-item.toast-error {
  border-left: 4px solid #dc2626;
  background: #fffcfc;
}
.toast-item.toast-error .toast-icon {
  color: #dc2626;
}

.toast-item.toast-info {
  border-left: 4px solid var(--honey, #f59e0b);
}
.toast-item.toast-info .toast-icon {
  color: #d97706;
}

.toast-item.toast-warning {
  border-left: 4px solid #f59e0b;
  background: #fffdfa;
}
.toast-item.toast-warning .toast-icon {
  color: #d97706;
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-weight: 650;
  font-size: 0.88rem;
  color: var(--ink, #23241f);
  margin-bottom: 2px;
}

.toast-message {
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.82rem;
  color: var(--ink-soft, #4b4c47);
  word-break: break-word;
}

.toast-close-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--ink-muted, #74756f);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.toast-close-btn:hover {
  color: var(--ink, #23241f);
  background: var(--paper-hover, #f2efe6);
}

/* Confirmation Dialog */
.confirm-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 36, 31, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  padding: 1.5rem;
  animation: confirmFadeIn 0.15s ease-out;
}

.confirm-dialog {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--rule-light, #e4e2d8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  width: 480px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  animation: confirmZoomIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes confirmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirmZoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirm-dialog-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.confirm-dialog-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.confirm-dialog-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.confirm-dialog-icon-badge.danger {
  background: #fef2f2;
  color: #dc2626;
}
.confirm-dialog-icon-badge.warning {
  background: #fffbeb;
  color: #d97706;
}
.confirm-dialog-icon-badge.info {
  background: var(--paper-hover, #f2efe6);
  color: var(--ink, #23241f);
}

.confirm-dialog-title {
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif) !important;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink, #23241f);
  margin: 0;
}

.confirm-dialog-body {
  padding: 1.5rem;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.92rem;
  color: var(--ink-soft, #4b4c47);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.confirm-warning-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  color: #92400e;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.confirm-warning-box-title {
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #78350f;
}

.confirm-warning-box-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: #92400e;
}

.confirm-dialog-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--rule-light, #e4e2d8);
  background: var(--paper, #faf8f2);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  background: #b91c1c !important;
  border-color: #991b1b !important;
  color: #ffffff !important;
}
.btn-danger span,
.btn-danger:hover span {
  color: #ffffff !important;
}

.btn-warning-action {
  background: #d97706;
  color: #ffffff;
  border: 1px solid #b45309;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.btn-warning-action:hover {
  background: #b45309;
}

.confirm-dialog-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--rule, #b9b7aa);
  background: #ffffff;
  color: var(--ink, #23241f);
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.confirm-dialog-textarea:focus {
  outline: none;
  border-color: var(--honey-hover, #e3ad26);
  box-shadow: 0 0 0 3px var(--honey-soft, #fdebb9);
}

/* Dynamic Placeholder Variables Engine Styles */
.unresolved-token {
  color: #D9383A !important;
  background: rgba(217, 56, 58, 0.12) !important;
  padding: 0 4px !important;
  border-radius: 3px !important;
  font-weight: 600 !important;
  display: inline !important;
  vertical-align: baseline !important;
  line-height: inherit !important;
  white-space: nowrap !important;
  border: 1px dashed rgba(217, 56, 58, 0.4) !important;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.canvas-toolbar-btn-variables {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--paper, #faf8f2);
  border: 1px solid var(--rule, #b9b7aa);
  color: var(--ink, #23241f);
  cursor: pointer;
  transition: all 0.15s ease;
}
.canvas-toolbar-btn-variables:hover {
  background: var(--paper-hover, #f2efe6);
  border-color: var(--ink-soft, #4b4c47);
}
.canvas-toolbar-btn-variables.active {
  background: var(--honey-soft, #fdebb9);
  border-color: var(--honey, #ffce29);
  color: #78350f;
}

.canvas-toolbar-btn-variables-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--paper, #faf8f2);
  border: 1px solid var(--rule, #b9b7aa);
  color: var(--ink-soft, #4b4c47);
  cursor: pointer;
  transition: all 0.15s ease;
}
.canvas-toolbar-btn-variables-toggle:hover {
  background: var(--paper-hover, #f2efe6);
  color: var(--ink, #23241f);
}
.canvas-toolbar-btn-variables-toggle.active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

/* Variable Manager Dialog */
.variable-manager-dialog {
  width: 90vw;
  max-width: 840px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  animation: confirmFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.variable-manager-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper, #faf8f2);
}

.variable-manager-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.variable-manager-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
}

.variable-manager-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink, #23241f);
  margin: 0;
}

.variable-manager-subtitle {
  font-size: 0.82rem;
  color: var(--ink-soft, #74756f);
  margin: 2px 0 0 0;
}

.variable-manager-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.variable-manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.variable-search-input {
  flex: 1;
  max-width: 320px;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--rule, #b9b7aa);
  background: #ffffff;
  color: var(--ink, #23241f);
}
.variable-search-input:focus {
  outline: none;
  border-color: var(--honey-hover, #e3ad26);
  box-shadow: 0 0 0 3px var(--honey-soft, #fdebb9);
}

.variable-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.variable-section-header {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft, #74756f);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.variable-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  overflow: hidden;
}

.variable-table th {
  background: var(--paper, #faf8f2);
  color: var(--ink-soft, #4b4c47);
  font-weight: 650;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  font-size: 0.8rem;
}

.variable-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  color: var(--ink, #23241f);
  vertical-align: middle;
}
.variable-table tr:last-child td {
  border-bottom: none;
}
.variable-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

.variable-token-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  background: var(--paper-hover, #f2efe6);
  padding: 2px 6px;
  border-radius: 4px;
  color: #92400e;
  font-weight: 600;
  user-select: all;
}

.variable-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.variable-badge.presentation {
  background: #f3e8ff;
  color: #6b21a8;
}
.variable-badge.template {
  background: #e0e7ff;
  color: #3730a3;
}
.variable-badge.workspace {
  background: #e0f2fe;
  color: #0369a1;
}
.variable-badge.company {
  background: #fef3c7;
  color: #92400e;
}
.variable-badge.system {
  background: #f1f5f9;
  color: #475569;
}

.variable-action-btn {
  background: transparent;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink, #23241f);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.variable-action-btn:hover {
  background: var(--paper-hover, #f2efe6);
  border-color: var(--rule, #b9b7aa);
}
.variable-action-btn.danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Quick-Insert Inline Autocomplete Popover */
.variable-insert-popover {
  position: fixed;
  z-index: 10000;
  background: #ffffff;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: 320px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
}

.variable-popover-header {
  padding: 6px 10px;
  background: var(--paper, #faf8f2);
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  font-size: 0.74rem;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--ink-soft, #74756f);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.variable-popover-list {
  overflow-y: auto;
  max-height: 240px;
  padding: 4px;
}

.variable-popover-item {
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: background 0.1s ease;
}
.variable-popover-item:hover,
.variable-popover-item.active {
  background: var(--honey-soft, #fdebb9);
}

.variable-popover-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.variable-popover-item-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #92400e;
}

.variable-popover-item-val {
  font-size: 0.78rem;
  color: var(--ink-soft, #74756f);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Variable Conflict Resolution Dialog */
.variable-conflict-dialog {
  width: 90vw;
  max-width: 680px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  animation: confirmFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.conflict-item-card {
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--paper, #faf8f2);
}

.conflict-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.conflict-options-group {
  display: flex;
  gap: 0.75rem;
}

.conflict-option-card {
  flex: 1;
  border: 1px solid var(--rule, #b9b7aa);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}
.conflict-option-card.selected {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.conflict-option-label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink-soft, #4b4c47);
}
.conflict-option-val {
  font-size: 0.86rem;
  color: var(--ink, #23241f);
  font-weight: 500;
  word-break: break-word;
}

/* Text Styling Enhancements: Auto Font Size, Fit to Container, Auto Contrast Color */
.btn-auto-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 7px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #D5D3C8;
  background: #FAF7EE;
  color: #74756F;
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1;
}

.btn-auto-toggle:hover {
  background: #EDE9DC;
  color: #23241F;
}

.btn-auto-toggle.is-active {
  background: #F4BF36;
  border-color: #D9A41E;
  color: #23241F;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(244, 191, 54, 0.3);
}

.inspector-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #D5D3C8;
  border-radius: 4px;
  background: #FAF7EE;
  color: #23241F;
  cursor: pointer;
  padding: 0;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.inspector-icon-btn:hover {
  background: #EDE9DC;
  border-color: #B5B2A4;
}

.inspector-icon-btn:active {
  background: #E2DFD2;
}

.inline-size-btn.is-active {
  background: #F4BF36 !important;
  color: #23241F !important;
  font-weight: 700;
}

.inline-size-btn svg {
  display: block;
  width: 12px;
  height: 12px;
}

.inline-color-auto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid #D5D3C8;
  border-radius: 4px;
  background: #FAF7EE;
  color: #74756F;
  cursor: pointer;
  transition: all 0.12s ease;
  margin-left: 2px;
}

.inline-color-auto-btn:hover {
  background: #EDE9DC;
  color: #23241F;
}

.inline-color-auto-btn.is-active {
  background: #F4BF36;
  border-color: #D9A41E;
  color: #23241F;
  font-weight: 700;
}


/* Microsoft 365 Agenda & Room Status Widget */
.canvas-m365-agenda-container {
  width: 100%;
  height: 100%;
  padding: 1.1em 1.25em;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(35, 36, 31, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}
.m365-w-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
  padding-bottom: 0.55em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}
.m365-w-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5em;
  min-width: 0;
}
.m365-w-dot {
  width: 0.55em;
  height: 0.55em;
  border-radius: 999px;
  flex-shrink: 0;
}
.m365-w-title {
  font-size: 1.15em;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m365-w-badges {
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-shrink: 0;
}
.m365-w-range {
  font-size: 0.72em;
  font-weight: 600;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  opacity: 0.85;
}
.m365-w-status {
  font-size: 0.72em;
  font-weight: 700;
  padding: 0.2em 0.65em;
  border-radius: 999px;
}
.m365-w-status.free {
  background: #dcfce7;
  color: #15803d;
}
.m365-w-status.busy {
  background: #fee2e2;
  color: #b91c1c;
}
.m365-w-list {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  overflow: hidden;
  flex: 1;
}
.m365-w-row {
  display: grid;
  grid-template-columns: 0.22em auto 1fr;
  align-items: center;
  gap: 0.75em;
  padding: 0.5em 0.65em;
  border-radius: 0.45em;
  background: rgba(0, 0, 0, 0.03);
}
.m365-w-row.is-now {
  background: rgba(24, 51, 104, 0.08);
}
.m365-w-bar {
  width: 100%;
  height: 1.6em;
  border-radius: 999px;
}
.m365-w-row-time {
  font-size: 0.82em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35em;
  opacity: 0.85;
}
.m365-w-date-chip {
  font-size: 0.85em;
  padding: 0.1em 0.4em;
  border-radius: 0.3em;
  background: rgba(0, 0, 0, 0.07);
}
.m365-w-row-body {
  min-width: 0;
}
.m365-w-subj {
  font-size: 0.92em;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.m365-w-loc {
  font-size: 0.74em;
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m365-w-now-tag {
  font-size: 0.68em;
  font-weight: 800;
  padding: 0.1em 0.4em;
  border-radius: 0.25em;
  background: #16a34a;
  color: #ffffff;
  letter-spacing: 0.03em;
}
/* Cards layout */
.m365-w-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6em;
  overflow: hidden;
}
.m365-w-card {
  padding: 0.65em 0.75em;
  border-radius: 0.45em;
  background: rgba(0, 0, 0, 0.035);
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  min-width: 0;
}
.m365-w-card.is-now {
  background: rgba(24, 51, 104, 0.08);
}
.m365-w-card-time {
  font-size: 0.75em;
  font-weight: 700;
  opacity: 0.78;
  display: flex;
  align-items: center;
  gap: 0.35em;
  flex-wrap: wrap;
}
.m365-w-card-title {
  font-size: 0.92em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Timeline layout */
.m365-w-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  overflow: hidden;
}
.m365-w-tl-row {
  display: grid;
  grid-template-columns: 4.5em 1.2em 1fr;
  align-items: center;
  gap: 0.5em;
}
.m365-w-tl-time {
  font-size: 0.8em;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  opacity: 0.82;
}
.m365-w-tl-date {
  font-size: 0.78em;
  opacity: 0.65;
}
.m365-w-tl-axis {
  display: flex;
  justify-content: center;
}
.m365-w-tl-node {
  width: 0.65em;
  height: 0.65em;
  border-radius: 999px;
  border: 2px solid #183368;
}
.m365-w-tl-card {
  padding: 0.45em 0.65em;
  border-radius: 0.4em;
  background: rgba(0, 0, 0, 0.03);
  min-width: 0;
}
.m365-w-meta {
  font-size: 0.74em;
  opacity: 0.68;
}
/* Room Status layout */
.m365-w-room {
  display: flex;
  flex-direction: column;
  gap: 0.65em;
  height: 100%;
}
.m365-w-room-hero {
  padding: 0.9em 1em;
  border-radius: 0.55em;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}
.m365-w-room-hero.free {
  background: linear-gradient(135deg, #15803d, #16a34a);
}
.m365-w-room-hero.busy {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}
.m365-w-room-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5em;
}
.m365-w-room-name {
  font-size: 0.95em;
  font-weight: 700;
  opacity: 0.95;
}
.m365-w-room-pill {
  font-size: 0.72em;
  font-weight: 800;
  padding: 0.18em 0.55em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.04em;
}
.m365-w-room-subj {
  font-size: 1.25em;
  font-weight: 800;
  line-height: 1.2;
}
.m365-w-room-until {
  font-size: 0.85em;
  opacity: 0.9;
}
.m365-w-room-next {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  overflow: hidden;
}
.m365-w-next-label {
  font-size: 0.7em;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.55;
}
.m365-w-next-row {
  display: flex;
  align-items: center;
  gap: 0.65em;
  font-size: 0.85em;
  padding: 0.35em 0.5em;
  border-radius: 0.35em;
  background: rgba(0, 0, 0, 0.03);
}
.m365-w-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0.8;
}
.m365-w-empty-inline,
.m365-widget-empty {
  font-size: 0.85em;
  opacity: 0.7;
  padding: 0.5em 0;
}
.m365-widget-empty-title {
  font-weight: 700;
  margin-bottom: 0.2em;
}

/* M365 Agenda Loading Placeholder & Spinner */
.stage-drop-preview-ghost {
  position: absolute;
  pointer-events: none;
  border: 2px dashed #183368;
  background: rgba(24, 51, 104, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #183368;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: opacity 0.15s ease;
}
.m365-w-loading {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  height: 100%;
}
.m365-w-loading-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.72em;
  font-weight: 700;
  padding: 0.22em 0.65em;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}
.m365-w-spinner {
  width: 0.9em;
  height: 0.9em;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.14);
  border-top-color: #183368;
  animation: m365Spin 0.8s linear infinite;
}
@keyframes m365Spin {
  to { transform: rotate(360deg); }
}
.m365-w-skel-list {
  display: flex;
  flex-direction: column;
  gap: 0.55em;
}
.m365-w-skel-row {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 0.75em;
  align-items: center;
  padding: 0.55em 0.65em;
  border-radius: 0.45em;
  background: rgba(0, 0, 0, 0.03);
}
.m365-w-skel-time,
.m365-w-skel-bar {
  height: 0.95em;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.09);
  animation: m365Pulse 1.3s ease-in-out infinite;
}
.m365-w-skel-bar.short {
  width: 68%;
}
.m365-w-loading-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: auto;
}
.m365-w-loading-bar-fill {
  width: 45%;
  height: 100%;
  border-radius: 999px;
  animation: m365BarSlide 1.2s infinite ease-in-out;
}
@keyframes m365BarSlide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(120%); }
  100% { transform: translateX(250%); }
}
@keyframes m365Pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.95; }
}

/* ==========================================================================
   Screen Detail & Telemetry Overview Styles
   ========================================================================== */

.screen-name-link {
  color: var(--ink, #23241F);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.screen-name-link:hover {
  color: #c89100;
  border-bottom-color: #c89100;
}

.screen-detail-view {
  padding-bottom: 3rem;
  font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

.detail-loading-state,
.detail-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 2rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 12px;
  margin-top: 1rem;
}

.detail-loading-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(244, 191, 54, 0.2);
  border-top-color: var(--honey, #F4BF36);
  border-radius: 50%;
  animation: detailSpin 0.7s linear infinite;
  margin-bottom: 1rem;
}

@keyframes detailSpin {
  to { transform: rotate(360deg); }
}

.detail-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-muted, #74756f);
  margin-bottom: 0.4rem;
}

.screen-back-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink-muted, #74756f);
  font-weight: 600;
  font-family: var(--font-ui, inherit);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.screen-back-btn:hover {
  color: var(--ink, #23241F);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--rule, #b9b7aa);
}

.breadcrumb-current {
  color: var(--ink, #23241F);
  font-weight: 600;
}

.detail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-title-group {
  display: flex;
  flex-direction: column;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.screen-detail-view h1,
.screen-detail-view h2,
.screen-detail-view h3,
.detail-header h1,
.detail-title {
  font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif) !important;
  font-style: normal !important;
}

.detail-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--ink, #23241F);
  margin: 0;
  letter-spacing: -0.02em;
}

.detail-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.detail-status-pill.active {
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.detail-status-pill.paused {
  background: rgba(194, 65, 12, 0.1);
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.25);
}

.detail-status-pill.standby {
  background: rgba(117, 116, 107, 0.1);
  color: var(--clay, #75746b);
  border: 1px solid rgba(117, 116, 107, 0.2);
}

.detail-actions-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-resume-accent {
  background: #c2410c !important;
  color: #ffffff !important;
  border-color: #c2410c !important;
}

.btn-resume-accent:hover {
  background: #9a3412 !important;
}

/* KPI Cards Grid */
.detail-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
  .detail-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .detail-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.detail-kpi-card {
  background: #ffffff;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.detail-kpi-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.kpi-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted, #74756f);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(244, 191, 54, 0.15);
  color: #b48300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-card-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink, #23241F);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.kpi-card-subtitle {
  font-size: 0.78rem;
  color: var(--ink-muted, #74756f);
  margin-top: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Split Rows & Cards */
.detail-split-row {
  display: grid;
  grid-template-columns: 62% 38%;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.detail-split-row.equal {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 1100px) {
  .detail-split-row,
  .detail-split-row.equal {
    grid-template-columns: 1fr;
  }
}

.detail-card {
  background: #ffffff;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.detail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.detail-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink, #23241F);
  margin: 0;
}

.detail-card-subtitle {
  font-size: 0.8rem;
  color: var(--ink-muted, #74756f);
  margin: 3px 0 0 0;
}

/* Chart Mode Toggle */
.chart-mode-toggle {
  display: inline-flex;
  background: #f0eee6;
  padding: 3px;
  border-radius: 8px;
}

.chart-toggle-btn {
  border: none;
  background: transparent;
  font-family: var(--font-ui, inherit);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--ink-muted, #74756f);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chart-toggle-btn.active {
  background: #ffffff;
  color: var(--ink, #23241F);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Telemetry SVG Chart */
.telemetry-svg-container {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 250px;
  display: flex;
}

.telemetry-svg {
  width: 100%;
  height: 100%;
  display: block;
  flex: 1;
}

.telemetry-chart-dot {
  cursor: pointer;
  transition: r 0.15s ease, fill 0.15s ease, stroke-width 0.15s ease;
}

.telemetry-chart-dot:hover {
  r: 5.5;
  fill: #1f201d;
  stroke: #ffffff;
  stroke-width: 2.5;
}

.telemetry-chart-tooltip {
  position: absolute;
  transform: translate(-50%, -125%);
  background: #1f201d;
  color: #ffffff;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-ui, inherit);
}

.telemetry-chart-tooltip.visible {
  opacity: 1;
}

/* Live Content Mirror Card */
.mirror-card {
  display: flex;
  flex-direction: column;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}

.live-pulsing-dot {
  width: 7px;
  height: 7px;
  background-color: #10B981;
  border-radius: 50%;
  animation: livePulse 1.4s infinite ease-in-out;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mirror-display-bezel {
  background: #181916;
  border: 3px solid #2e2f29;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  margin-bottom: 0.5rem;
}

.mirror-screen-surface {
  flex: 1;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}

.mirror-slide-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  box-sizing: border-box;
}

.mirror-brand-mark svg {
  width: 28px;
  height: 22px;
  color: var(--honey, #F4BF36);
}

.mirror-slide-headline {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  margin: auto 0;
  text-align: center;
}

.mirror-slide-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.slide-indicator {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
}

.mirror-standby-content {
  text-align: center;
  padding: 1rem;
}

.mirror-standby-bee svg {
  width: 36px;
  height: 28px;
  color: var(--honey, #F4BF36);
  margin-bottom: 0.4rem;
}

.mirror-standby-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.mirror-standby-sub {
  font-size: 0.76rem;
  color: #b9b7aa;
  margin-top: 2px;
}

.mirror-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule-light, #e4e2d8);
  font-size: 0.8rem;
}

.mirror-info-col {
  display: flex;
  flex-direction: column;
}

.mirror-info-label {
  font-size: 0.72rem;
  color: var(--ink-muted, #74756f);
  text-transform: uppercase;
  font-weight: 600;
}

.mirror-info-val {
  font-weight: 600;
  color: var(--ink, #23241F);
  margin-top: 1px;
}

/* Active Content List */
.content-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
}

.content-source-tag.schedule {
  background: rgba(244, 191, 54, 0.15);
  color: #926600;
  border: 1px solid rgba(244, 191, 54, 0.35);
}

.content-source-tag.fallback {
  background: #f0eee6;
  color: var(--ink-soft, #4b4c47);
  border: 1px solid var(--rule-light, #e4e2d8);
}

.active-content-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.active-content-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  background: #faf9f5;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
}

.content-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--rule-light, #e4e2d8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: var(--ink-soft, #4b4c47);
}

.content-row-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-row-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink, #23241F);
}

.content-row-meta {
  font-size: 0.78rem;
  color: var(--ink-muted, #74756f);
}

.content-row-weight {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #23241F);
}

.weight-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(244, 191, 54, 0.2);
  color: #8f6500;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Hardware & Network Health */
.health-badge.ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}

.hardware-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.25rem;
  margin-bottom: 1.15rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.74rem;
  color: var(--ink-muted, #74756f);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink, #23241F);
  margin-top: 1px;
}

.storage-telemetry-box {
  padding: 0.9rem 1rem;
  background: #faf9f5;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
}

.storage-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.storage-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink, #23241F);
}

.storage-usage {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted, #74756f);
}

.storage-progress-bar {
  height: 8px;
  background: #e5e3d8;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.45rem;
}

.storage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F4BF36 0%, #e8a800 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Telemetry Audit Table */
.telemetry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.telemetry-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--rule-light, #e4e2d8);
  color: var(--ink-muted, #74756f);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.telemetry-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(185, 183, 170, 0.15);
  color: var(--ink, #23241F);
}

.telemetry-table tbody tr:hover {
  background-color: #faf9f5;
}

.audit-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.audit-status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.audit-status-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

/* Lifetime Statistics Card */
.lifetime-card {
  margin-bottom: 1.5rem;
}

.lifetime-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(244, 191, 54, 0.15);
  color: #8f6500;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.lifetime-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

@media (max-width: 1100px) {
  .lifetime-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .lifetime-stats-grid {
    grid-template-columns: 1fr;
  }
}

.lifetime-stat-box {
  background: #faf9f5;
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lifetime-stat-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.lifetime-stat-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--rule-light, #e4e2d8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #23241F);
  flex-shrink: 0;
}

.lifetime-stat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lifetime-stat-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-muted, #74756f);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 2px;
}

.lifetime-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink, #23241F);
  line-height: 1.25;
  word-break: break-word;
}

.lifetime-stat-sub {
  font-size: 0.72rem;
  color: var(--ink-muted, #74756f);
  margin-top: 3px;
}

.highlight-uptime {
  color: #047857;
  font-weight: 700;
}

/* Media Library View & Picker Styling */
.media-disabled-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted, #74756f);
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px dashed var(--rule-light, #d5d3c8);
  white-space: nowrap;
}

/* Media Library Unified Single-Line Toolbar */
.media-library-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  margin-bottom: 1.25rem !important;
  box-sizing: border-box !important;
}

.media-picker-viewport .media-library-toolbar {
  margin-bottom: 0.85rem !important;
}

.media-toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  flex-wrap: nowrap !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.media-toolbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}

.media-toolbar-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
}

/* Search input wrapper & icon */
.media-search-wrapper,
.media-library-view .search-input-wrapper {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  width: 260px !important;
  min-width: 180px !important;
  max-width: 320px !important;
  flex: 0 1 260px !important;
}

.media-search-wrapper .search-icon,
.media-library-view .search-input-wrapper .search-icon {
  position: absolute !important;
  left: 0.75rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 16px !important;
  height: 16px !important;
  color: var(--ink-muted, #74756f) !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2 !important;
}

.media-search-input,
.media-library-view input.search-input,
.media-library-view .search-input-wrapper input {
  width: 100% !important;
  height: 38px !important;
  padding-left: 2.35rem !important;
  padding-right: 0.75rem !important;
  font-size: 0.86rem !important;
  font-family: inherit !important;
  border-radius: 8px !important;
  border: 1px solid var(--rule-light, #e4e2d8) !important;
  background: #ffffff !important;
  color: var(--ink, #23241f) !important;
  box-sizing: border-box !important;
  outline: none !important;
}

.media-search-input:focus,
.media-library-view input.search-input:focus,
.media-library-view .search-input-wrapper input:focus {
  border-color: var(--honey, #f4bf36) !important;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.2) !important;
}

/* File type dropdown - positioned right next to search box */
.media-type-select,
.media-library-view select.filter-select {
  width: auto !important;
  min-width: 155px !important;
  max-width: 250px !important;
  height: 38px !important;
  flex: 0 0 auto !important;
  padding: 0 2rem 0 0.85rem !important;
  font-size: 0.86rem !important;
  font-family: inherit !important;
  border: 1px solid var(--rule-light, #e4e2d8) !important;
  border-radius: 8px !important;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374756F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.75rem center !important;
  color: var(--ink, #23241f) !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

.media-type-select:hover,
.media-library-view select.filter-select:hover {
  border-color: var(--rule, #b9b7aa) !important;
}

.media-type-select:focus,
.media-library-view select.filter-select:focus {
  outline: none !important;
  border-color: var(--honey, #f4bf36) !important;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.2) !important;
}

/* Media Table Row Actions Horizontal Alignment */
.media-table .media-th-actions,
.media-table .media-td-actions {
  text-align: right !important;
  white-space: nowrap !important;
  width: 1% !important;
  min-width: 130px !important;
}

.media-row-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.35rem !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

/* Reports & Statistics Title Period Dropdown */
.view-title-with-period {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

.view-title-dash {
  color: var(--ink-muted, #74756f) !important;
  font-weight: 400 !important;
  margin: 0 0.15rem !important;
  user-select: none !important;
}

.reports-period-dropdown-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

.reports-period-dropdown-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
  height: 38px !important;
  padding: 0 0.75rem !important;
  font-family: inherit !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--ink, #23241F) !important;
  background: #ffffff !important;
  border: 1.5px solid var(--rule-light, #d5d3c8) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

.reports-period-dropdown-btn:hover {
  border-color: var(--honey, #f4bf36) !important;
  background: #fdfaf3 !important;
}

.reports-period-dropdown-btn:focus-visible {
  outline: none !important;
  border-color: var(--honey, #f4bf36) !important;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.25) !important;
}

.reports-period-dropdown-btn[aria-expanded="true"] {
  border-color: var(--honey, #f4bf36) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.2) !important;
}

.reports-period-dropdown-btn .period-btn-chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  color: var(--ink-soft, #4B4C47) !important;
  transition: transform 0.2s ease !important;
}

.reports-period-dropdown-btn .period-btn-chevron svg {
  width: 14px !important;
  height: 14px !important;
}

.reports-period-dropdown-btn[aria-expanded="true"] .period-btn-chevron {
  transform: rotate(180deg) !important;
}

.reports-period-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  min-width: 250px !important;
  background: #ffffff !important;
  border: 1px solid var(--rule-light, #dedbd2) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  padding: 0.4rem !important;
  z-index: 1050 !important;
}

.reports-period-dropdown-menu[hidden] {
  display: none !important;
}

.reports-period-menu-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.reports-period-menu-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0.5rem 0.65rem !important;
  border: none !important;
  border-radius: 6px !important;
  background: transparent !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  color: var(--ink, #23241F) !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: background 0.1s ease !important;
  box-sizing: border-box !important;
}

.reports-period-menu-item:hover {
  background: #fbf8f0 !important;
}

.reports-period-menu-item.is-active {
  background: rgba(244, 191, 54, 0.25) !important;
  font-weight: 700 !important;
  color: var(--ink, #23241F) !important;
}

.reports-period-menu-item .item-check {
  display: inline-flex !important;
  align-items: center !important;
  color: var(--ink, #23241F) !important;
}

.reports-period-menu-item .item-check svg {
  width: 14px !important;
  height: 14px !important;
}

.reports-period-custom-section {
  border-top: 1px solid var(--rule-light, #e8e6dc) !important;
  margin-top: 0.4rem !important;
  padding: 0.6rem 0.4rem 0.2rem !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
}

.reports-period-custom-section[hidden] {
  display: none !important;
}

.period-custom-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.2rem !important;
}

.period-custom-field-label {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: var(--ink-muted, #74756f) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.period-custom-input {
  width: 100% !important;
  height: 34px !important;
  font-size: 0.82rem !important;
}

/* Reports & Statistics Inline Range Button Group & Custom Range */
.reports-range-group {
  display: inline-flex !important;
  align-items: center !important;
  height: 38px !important;
  background: #ffffff !important;
  border: 1px solid var(--rule-light, #d5d3c8) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  flex-shrink: 0 !important;
}

.reports-range-btn {
  height: 100% !important;
  padding: 0 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  color: var(--ink-muted, #74756f) !important;
  background: #ffffff !important;
  border: none !important;
  border-right: 1px solid var(--rule-light, #d5d3c8) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
}

.reports-range-btn:last-child {
  border-right: none !important;
}

.reports-range-btn:hover {
  color: var(--ink, #23241f) !important;
  background: var(--paper-hover, #f2efe6) !important;
}

.reports-range-btn.active {
  background: var(--honey, #f4bf36) !important;
  color: var(--ink, #23241f) !important;
  font-weight: 700 !important;
}

.reports-custom-range-inputs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.reports-custom-range-inputs[hidden],
.reports-custom-range-inputs.is-hidden {
  display: none !important;
}

.reports-custom-range-label {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--ink-muted, #74756f) !important;
}

.reports-datetime-input {
  height: 38px !important;
  padding: 0 0.65rem !important;
  font-size: 0.82rem !important;
  font-family: inherit !important;
  border: 1px solid var(--rule-light, #d5d3c8) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: var(--ink, #23241f) !important;
  box-sizing: border-box !important;
  outline: none !important;
}

.reports-datetime-input:focus {
  border-color: var(--honey, #f4bf36) !important;
  box-shadow: 0 0 0 2px rgba(244, 191, 54, 0.2) !important;
}

.reports-custom-apply-btn {
  height: 38px !important;
  padding: 0 0.75rem !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}






/* ==========================================================================
   Slide Master & Default Layouts (Castibee Modern Branding)
   ========================================================================== */
.studio-master-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1.15rem;
  background: var(--honey-light, #FFF7DE);
  border-bottom: 1.5px solid var(--honey, #F4BF36);
  color: var(--ink, #23241F);
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.studio-master-banner-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.studio-master-banner-info svg {
  width: 16px;
  height: 16px;
  color: var(--clay, #813F29);
  flex-shrink: 0;
}

.studio-master-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif);
  font-weight: 700;
}

.filmstrip-thumb.is-master-root {
  border-color: var(--honey, #F4BF36);
  background: var(--honey-light, #FFF7DE);
}

.filmstrip-thumb.is-master-root .filmstrip-thumb-name {
  font-weight: 800;
  color: var(--ink, #23241F);
}

.filmstrip-master-divider {
  width: 2px;
  height: 64px;
  background: var(--rule-light, #E4E2D8);
  margin: 0 0.35rem;
  flex-shrink: 0;
  border-radius: 2px;
}

.canvas-layer.is-master-inherited {
  pointer-events: none !important;
  user-select: none;
}

/* Interactive Image Placeholder on Canvas */
.canvas-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--paper-subtle, #F7F5EE);
  border: 2px dashed var(--rule, #B9B7AA);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.canvas-layer:hover .canvas-image-placeholder {
  border-color: var(--honey, #F4BF36);
  background: var(--honey-light, #FFF7DE);
}

.canvas-image-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  text-align: center;
}

.canvas-image-placeholder-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light, #E4E2D8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft, #4B4C47);
}

.canvas-image-placeholder-icon svg {
  width: 20px;
  height: 20px;
}

.canvas-image-placeholder-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink, #23241F);
}

.canvas-image-placeholder-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.canvas-placeholder-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 6px !important;
  cursor: pointer;
}

.canvas-placeholder-btn svg {
  width: 14px;
  height: 14px;
}

/* Add Slide + Layout Picker Group */
.btn-add-slide-group {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px dashed var(--rule, #B9B7AA);
  background: #FFFFFF;
}

.btn-add-slide-group .btn-add-slide {
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.btn-add-slide-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  border: none;
  border-left: 1px solid var(--rule-light, #E4E2D8);
  background: var(--paper-subtle, #F7F5EE);
  color: var(--ink, #23241F);
  cursor: pointer;
}

.btn-add-slide-caret:hover {
  background: var(--honey-light, #FFF7DE);
}

.master-layout-picker-popover {
  width: 492px;
  max-width: calc(100vw - 24px);
  background: #FFFFFF;
  border: 1px solid var(--rule-light, #E4E2D8);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  padding: 0.65rem;
  z-index: 2500;
  font-family: var(--font-ui, system-ui, -apple-system, sans-serif);
}

.master-layout-picker-header {
  padding: 0.25rem 0.35rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted, #74756F);
  border-bottom: 1px solid var(--rule-light, #E4E2D8);
  margin-bottom: 0.55rem;
}

.master-layout-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  max-height: 60vh;
  overflow-y: auto;
}

.master-layout-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0.4rem;
  border: 1.5px solid var(--rule-light, #E4E2D8);
  border-radius: 8px;
  background: var(--paper-subtle, #F7F5EE);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.master-layout-card:hover {
  border-color: var(--honey, #F4BF36);
  background: var(--honey-light, #FFF7DE);
  transform: translateY(-1px);
}

.master-layout-card-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--rule-light, #E4E2D8);
  position: relative;
  pointer-events: none;
}

.master-layout-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink, #23241F);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact icon-only image placeholder inside miniature filmstrip & layout picker previews */
.canvas-image-placeholder.is-mini-preview {
  border-width: 1px;
  border-radius: 4px;
  padding: 0;
}

.canvas-image-placeholder-mini-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28%;
  height: 28%;
  min-width: 16px;
  min-height: 16px;
  max-width: 34px;
  max-height: 34px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--rule-light, #E4E2D8);
  color: var(--ink-soft, #4B4C47);
}

.canvas-image-placeholder-mini-icon svg {
  width: 65%;
  height: 65%;
}

/* ==========================================================================
   Studio Chrome — Soft Castibee Dark Mode
   ========================================================================== */
:root[data-theme="dark"] .studio-container {
  background: #222421;
  color: #F2F0E6;
}

:root[data-theme="dark"] .studio-ribbon-bar,
:root[data-theme="dark"] .ribbon-tab-strip,
:root[data-theme="dark"] .ribbon-content-pane {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .ribbon-btn,
:root[data-theme="dark"] .ribbon-select {
  color: #F2F0E6 !important;
  background-color: transparent !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .ribbon-select {
  background-color: #272925 !important;
}

:root[data-theme="dark"] .ribbon-btn:hover {
  background: #363A34 !important;
}

:root[data-theme="dark"] .ribbon-btn.active {
  background: rgba(244, 191, 54, 0.2) !important;
  color: #F4BF36 !important;
  border-color: #F4BF36 !important;
}

:root[data-theme="dark"] .ribbon-tab-button {
  color: #C9C6BA !important;
  background: transparent !important;
}

:root[data-theme="dark"] .ribbon-tab-button:hover {
  color: #F2F0E6 !important;
  background: #363A34 !important;
}

:root[data-theme="dark"] .ribbon-tab-button.active {
  background: #222421 !important;
  color: #F4BF36 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .studio-left-drawer,
:root[data-theme="dark"] .studio-inspector,
:root[data-theme="dark"] .studio-bottom-shelf,
:root[data-theme="dark"] .drawer-tabs,
:root[data-theme="dark"] .drawer-content,
:root[data-theme="dark"] .inspector-top-nav,
:root[data-theme="dark"] .shelf-header,
:root[data-theme="dark"] .layers-timeline-panel,
:root[data-theme="dark"] .layers-timeline-header,
:root[data-theme="dark"] .layers-panel-header {
  background: #272925 !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .drawer-tab {
  background: transparent !important;
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .drawer-tab:hover {
  background: #363A34 !important;
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .drawer-tab.active {
  background: #2D302B !important;
  color: #F4BF36 !important;
  border-bottom-color: #F4BF36 !important;
}

:root[data-theme="dark"] .drawer-collapsible-header,
:root[data-theme="dark"] .drawer-section-wrapper {
  background: transparent !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .drawer-section-title,
:root[data-theme="dark"] .layers-timeline-title,
:root[data-theme="dark"] .layers-panel-title,
:root[data-theme="dark"] .layers-timeline-panel h4 {
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .drawer-toggle-tab,
:root[data-theme="dark"] .inspector-toggle-tab {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .studio-workarea {
  background: #1D1F1C !important;
}

:root[data-theme="dark"] .studio-tool-card,
:root[data-theme="dark"] .tool-card,
:root[data-theme="dark"] .template-preset-card,
:root[data-theme="dark"] .clipboard-item,
:root[data-theme="dark"] .filmstrip-thumb,
:root[data-theme="dark"] .btn-add-slide-group,
:root[data-theme="dark"] .btn-add-slide-caret,
:root[data-theme="dark"] .master-layout-picker-popover,
:root[data-theme="dark"] .master-layout-card,
:root[data-theme="dark"] .template-card-footer {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .studio-tool-card:hover,
:root[data-theme="dark"] .tool-card:hover,
:root[data-theme="dark"] .template-preset-card:hover,
:root[data-theme="dark"] .clipboard-item:hover {
  background: #363A34 !important;
  border-color: #F4BF36 !important;
}

/* Studio Timeline Dark Mode */
:root[data-theme="dark"] .shelf-timeline-container,
:root[data-theme="dark"] .timeline-left-col,
:root[data-theme="dark"] .timeline-lanes-wrapper,
:root[data-theme="dark"] .timeline-scroll-content {
  background: #222421 !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .timeline-ruler,
:root[data-theme="dark"] .timeline-track-header-item,
:root[data-theme="dark"] .timeline-lane-row {
  background: #272925 !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .timeline-metric-chip,
:root[data-theme="dark"] .timeline-timecode {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .studio-master-banner {
  background: rgba(244, 191, 54, 0.14) !important;
  color: #F2F0E6 !important;
  border-bottom-color: #F4BF36 !important;
}

:root[data-theme="dark"] .inspector-field input,
:root[data-theme="dark"] .inspector-field select,
:root[data-theme="dark"] .inspector-field textarea,
:root[data-theme="dark"] .drawer-content input {
  background: #222421 !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .inspector-nav-btn {
  background: transparent !important;
  color: #C9C6BA !important;
  border-color: transparent !important;
}

:root[data-theme="dark"] .inspector-nav-btn:hover {
  background: #363A34 !important;
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .inspector-nav-btn.is-active {
  background: #363A34 !important;
  color: #F4BF36 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .studio-inspector-layers,
:root[data-theme="dark"] .inspector-layers-list,
:root[data-theme="dark"] .layer-timeline-item,
:root[data-theme="dark"] .layer-timeline-item.layer-group-row {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .layer-timeline-item:hover {
  background: #363A34 !important;
}

:root[data-theme="dark"] .layer-timeline-item.active {
  background: rgba(244, 191, 54, 0.18) !important;
  border-color: #F4BF36 !important;
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .shelf-tab-btn {
  background: transparent !important;
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .shelf-tab-btn:hover {
  background: #363A34 !important;
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .shelf-tab-btn.active {
  background: #363A34 !important;
  color: #F4BF36 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .filmstrip-thumb-info,
:root[data-theme="dark"] .btn-add-slide {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .filmstrip-thumb.active {
  border-color: #F4BF36 !important;
}

:root[data-theme="dark"] .btn-add-slide:hover {
  background: #363A34 !important;
}

/* Keep slide canvas & miniature previews faithful to slide colors in Dark Mode */
:root[data-theme="dark"] .canvas-stage,
:root[data-theme="dark"] .canvas-stage.preview-stage {
  color: #23241F;
}


/* Drawer Tool Buttons, Clipboard Empty State, Layers Action Buttons & Timeline Controls/Clips */
:root[data-theme="dark"] .tool-buttons-grid button,
:root[data-theme="dark"] .clipboard-empty-state,
:root[data-theme="dark"] .layers-timeline-actions button,
:root[data-theme="dark"] .shelf-header button:not(.active),
:root[data-theme="dark"] .timeline-zoom-group,
:root[data-theme="dark"] .timeline-zoom-group button,
:root[data-theme="dark"] .timeline-header-left,
:root[data-theme="dark"] .timeline-header-tracks {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .tool-buttons-grid button:hover,
:root[data-theme="dark"] .layers-timeline-actions button:hover,
:root[data-theme="dark"] .shelf-header button:not(.active):hover,
:root[data-theme="dark"] .timeline-zoom-group button:hover {
  background: #363A34 !important;
  border-color: #F4BF36 !important;
}

:root[data-theme="dark"] .timeline-zoom-label {
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .timeline-block,
:root[data-theme="dark"] .timeline-block.freeform-block,
:root[data-theme="dark"] .timeline-block-body,
:root[data-theme="dark"] .timeline-block-active-phase {
  background: #343832 !important;
  color: #F2F0E6 !important;
  border-color: #4D5248 !important;
}

:root[data-theme="dark"] .timeline-block.selected,
:root[data-theme="dark"] .timeline-block.freeform-block.selected {
  background: rgba(244, 191, 54, 0.22) !important;
  border-color: #F4BF36 !important;
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .timeline-block-badge,
:root[data-theme="dark"] .timeline-block-dur {
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .timeline-tracks-header {
  background: #272925 !important;
  color: #C9C6BA !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .timeline-block-in-phase,
:root[data-theme="dark"] .timeline-block-out-phase {
  background: repeating-linear-gradient(
    -45deg,
    #2D302B,
    #2D302B 4px,
    #3B3F38 4px,
    #3B3F38 8px
  ) !important;
  color: #C9C6BA !important;
  border-color: #4D5248 !important;
}

/* Variable & Placeholder Manager Dialog Dark Mode */
:root[data-theme="dark"] .variable-manager-dialog {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .variable-manager-header,
:root[data-theme="dark"] .variable-manager-footer {
  background: #272925 !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .variable-manager-title,
:root[data-theme="dark"] .variable-section-header {
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .variable-manager-subtitle {
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .variable-manager-header-icon,
:root[data-theme="dark"] .studio-history-close-btn {
  background: #363A34 !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .variable-search-input {
  background: #222421 !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .variable-section {
  background: #272925 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .variable-table th {
  background: #222421 !important;
  color: #C9C6BA !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .variable-table td {
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .variable-token-code {
  background: #363A34 !important;
  color: #F4BF36 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .variable-action-btn,
:root[data-theme="dark"] .variable-badge.system {
  background: #363A34 !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .variable-action-btn:hover {
  background: #454941 !important;
}

:root[data-theme="dark"] .toast-item {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .toast-message {
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .toast-close-btn {
  color: #9A988E !important;
}

/* Uniform Padded Toolbar Container & Comprehensive Media Browser Dark Mode (Sidebar + Studio) */
.media-library-toolbar {
  background: var(--paper-card, #ffffff);
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 10px !important;
  padding: 0.85rem 1.25rem !important;
}

.media-search-wrapper,
.media-library-view .search-input-wrapper {
  width: 340px !important;
  max-width: 380px !important;
  min-width: 220px !important;
  flex: 1 1 280px !important;
}

:root[data-theme="dark"] .media-library-toolbar,
:root[data-theme="dark"] .media-breadcrumbs-bar,
:root[data-theme="dark"] .media-breadcrumb,
:root[data-theme="dark"] .media-folder-card,
:root[data-theme="dark"] .media-file-card,
:root[data-theme="dark"] .media-card,
:root[data-theme="dark"] .media-empty-card,
:root[data-theme="dark"] .media-dropzone,
:root[data-theme="dark"] .media-upload-drawer,
:root[data-theme="dark"] .media-modal,
:root[data-theme="dark"] .media-modal-card,
:root[data-theme="dark"] .media-lightbox-card,
:root[data-theme="dark"] .media-lightbox-header,
:root[data-theme="dark"] .media-lightbox-footer,
:root[data-theme="dark"] .media-context-menu {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .media-search-input,
:root[data-theme="dark"] .media-library-view input.search-input,
:root[data-theme="dark"] .media-library-view .search-input-wrapper input,
:root[data-theme="dark"] .media-type-select,
:root[data-theme="dark"] .media-library-view select.filter-select,
:root[data-theme="dark"] .media-picker-viewport select.filter-select,
:root[data-theme="dark"] .media-modal select.filter-select {
  background-color: #272925 !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .media-filter-tab,
:root[data-theme="dark"] .media-disabled-badge {
  background: #363A34 !important;
  color: #C9C6BA !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .media-filter-tab.is-active {
  background: #F4BF36 !important;
  color: #1A1B18 !important;
  border-color: #F4BF36 !important;
}

:root[data-theme="dark"] .media-thumb-box,
:root[data-theme="dark"] .media-card-thumb-wrap,
:root[data-theme="dark"] .media-table-thumb,
:root[data-theme="dark"] .media-folder-icon-wrap {
  background: #222421 !important;
  border-color: #383B35 !important;
}

:root[data-theme="dark"] .media-table th,
:root[data-theme="dark"] .media-list-table th {
  background: #272925 !important;
  color: #C9C6BA !important;
  border-bottom-color: #383B35 !important;
}

:root[data-theme="dark"] .media-table td,
:root[data-theme="dark"] .media-list-table td {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-bottom-color: #383B35 !important;
}

:root[data-theme="dark"] .media-table tr.selected td,
:root[data-theme="dark"] .media-list-table tr.selected td {
  background: rgba(244, 191, 54, 0.14) !important;
}

:root[data-theme="dark"] .media-table tr:hover td,
:root[data-theme="dark"] .media-folder-card:hover,
:root[data-theme="dark"] .media-file-card:hover,
:root[data-theme="dark"] .media-card:hover {
  background: #363A34 !important;
}

.modal-title,
.media-modal h1,
.media-modal h2,
.media-modal h3,
.media-picker-viewport h1,
.media-picker-viewport h2,
.media-picker-viewport h3 {
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif) !important;
}

:root[data-theme="dark"] .media-card-title,
:root[data-theme="dark"] .media-file-card-title,
:root[data-theme="dark"] .media-folder-name,
:root[data-theme="dark"] .media-dropzone-title,
:root[data-theme="dark"] .media-modal h2,
:root[data-theme="dark"] .media-modal h3 {
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .media-card-meta,
:root[data-theme="dark"] .media-file-card-meta,
:root[data-theme="dark"] .media-folder-meta,
:root[data-theme="dark"] .media-dropzone-hint,
:root[data-theme="dark"] .media-breadcrumb-item,
:root[data-theme="dark"] .media-modal p,
:root[data-theme="dark"] .media-modal label {
  color: #C9C6BA !important;
}

/* Media File Card Overflow Header & Context Menu (Light + Dark Mode) */
.media-file-card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.media-file-card-header-row .media-file-card-title {
  flex: 1;
  min-width: 0;
}

.media-card-more-btn {
  flex-shrink: 0;
  padding: 2px 5px !important;
  min-width: auto !important;
}

.media-context-menu {
  background: var(--paper-card, #ffffff);
  color: var(--ink, #23241f);
  border: 1px solid var(--rule-light, #e4e2d8);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  padding: 0.35rem;
  font-family: var(--font-ui, system-ui, -apple-system, 'Inter', 'Segoe UI', sans-serif);
  font-size: 0.85rem;
}

.media-context-item {
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink, #23241f);
  transition: background-color 0.15s ease;
}

.media-context-item:hover {
  background: var(--paper-hover, #f2efe6);
}

.media-context-item.danger {
  color: #dc2626;
}

:root[data-theme="dark"] .media-context-menu {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .media-context-item {
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .media-context-item:hover {
  background: #363A34 !important;
}

:root[data-theme="dark"] .media-context-item.danger {
  color: #f87171 !important;
}

/* Screens Page: Group Pill, Action Buttons & Overflow Menu Dark Mode */
:root[data-theme="dark"] .screen-group-pill,
:root[data-theme="dark"] .screen-action-icon-btn {
  background: #363A34 !important;
  color: #F2F0E6 !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .screen-group-pill:hover,
:root[data-theme="dark"] .screen-action-icon-btn:hover {
  background: #454941 !important;
  border-color: #5A5F55 !important;
}

:root[data-theme="dark"] .screen-group-assign-btn {
  color: #C9C6BA !important;
  border-color: #454941 !important;
}

:root[data-theme="dark"] .screen-group-assign-btn:hover {
  background: #363A34 !important;
  color: #F2F0E6 !important;
  border-color: #5A5F55 !important;
}

:root[data-theme="dark"] .screen-overflow-dropdown {
  background: #2D302B !important;
  color: #F2F0E6 !important;
  border-color: #383B35 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .screen-overflow-item {
  color: #F2F0E6 !important;
}

:root[data-theme="dark"] .screen-overflow-item .item-icon {
  color: #C9C6BA !important;
}

:root[data-theme="dark"] .screen-overflow-item:hover {
  background: #363A34 !important;
}

:root[data-theme="dark"] .screen-overflow-item.danger {
  color: #f87171 !important;
}

:root[data-theme="dark"] .screen-overflow-item.danger .item-icon {
  color: #f87171 !important;
}

:root[data-theme="dark"] .screen-overflow-item.danger:hover {
  background: rgba(239, 68, 68, 0.14) !important;
}

:root[data-theme="dark"] .screen-overflow-divider {
  background: #383B35 !important;
}
