/* demo.css — designer.tool Web Demo v1.0.0 */
/* Based on popup.css - Liquid Glass UI */
/* Individual pages version - no navbar */

:root {
  /* Force normal color scheme */
  color-scheme: normal !important;

  /* Theme Variables */
  --ui-bg-rgb: 2, 2, 2;
  --ui-bg-alpha: 0.20;
  --ui-blur: 40px;
  --ui-fg-rgb: 232, 232, 232;
  --ui-main-radius: 12px;
  --ui-cards-radius: 12px;
  --ui-field-radius: 12px;

  /* Derived Colors */
  --app-bg: rgba(var(--ui-bg-rgb), var(--ui-bg-alpha));
  --glass-bg: rgba(var(--ui-bg-rgb), var(--ui-bg-alpha));
  --surface: rgba(var(--ui-bg-rgb), 0.12);
  --surface-2: rgba(var(--ui-bg-rgb), 0.18);
  --surface-3: rgba(var(--ui-bg-rgb), 0.24);
  --surface-hover: rgba(var(--ui-bg-rgb), 0.26);
  --fg: rgb(var(--ui-fg-rgb));
  --muted: rgba(var(--ui-fg-rgb), 0.68);
  --border: rgba(var(--ui-fg-rgb), 0.20);
  --accent: #6366f1;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.22);

  /* Radii */
  --radius-card: var(--ui-cards-radius);
  --radius-field: 9999px;
  --radius-tab: 6px;
  --radius-badge: 6px;

  /* Blur effect */
  --blur: blur(var(--ui-blur));

  /* Primary colors */
  --primary: rgba(var(--ui-fg-rgb), 0.15);
  --primary-press: rgba(var(--ui-fg-rgb), 0.25);
  --danger: rgba(239, 68, 68, 0.85);
  --danger-hover: rgba(239, 68, 68, 1);

  /* Spacing & Typography */
  --pad-card: 8px;
  --h-field: 36px;
  --font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --h1: 16px;
  --label: 12px;
  --panel-pad: 0px;
  --gap-lg: 12px;
  --gap-md: 8px;
  --gap-section: 16px;
  --scrollbar-thumb: rgba(var(--ui-fg-rgb), 0.22);
  --scrollbar-thumb-hover: rgba(var(--ui-fg-rgb), 0.38);

  /* Animations */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.22, .61, .36, 1);

  color: var(--fg);
}

/* Base reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  width: 420px;
  height: 650px;
  background: rgb(10, 10, 10) !important;
  color-scheme: dark !important;
}

body {
  margin: 0;
  padding: 0;
  width: 420px;
  height: 650px;
  background: rgb(10, 10, 10) !important;
  color: var(--fg);
  font: var(--font);
  overflow: hidden;
  position: relative;
  color-scheme: dark !important;
}

.hidden { display: none !important; }

/* ===== Demo Toast ===== */
.demo-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: calc(100% - 40px);
  padding: 14px 20px;
  background: rgba(99, 102, 241, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.demo-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ===== Main Layout ===== */
main#main {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: opacity 0.2s var(--ease-out);
  color: var(--fg);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  background: transparent;
}

.card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: grid;
  gap: var(--gap-md);
  grid-auto-rows: min-content;
  min-width: 0;
  max-width: 100%;
}

section.card {
  gap: var(--gap-section);
}

/* Page titles */
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 10px 0;
  padding: 0;
  text-align: left;
  letter-spacing: -0.02em;
}

/* Section blocks */
.section-block {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.section-title {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  padding: 0;
}

/* View sections */
#trackView,
#clipView,
#colorView,
#imagesView {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
  flex: 0 0 auto;
  overflow: visible;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

/* Site header compact */
.site-header-compact {
  position: absolute;
  top: var(--gap-md);
  right: calc(var(--gap-lg) - 2px);
  display: flex;
  align-items: center;
  gap: 4px;
  height: auto;
  margin: 0;
  padding: 0;
  z-index: 10;
}

.site-hostname {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  line-height: 1.2;
}

.icon-btn-compact {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.2s var(--ease-io), color 0.2s var(--ease-io);
  flex-shrink: 0;
}

.icon-btn-compact:hover {
  background: var(--surface-hover);
  color: var(--fg);
}

.icon-btn-compact .icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* ===== TimeTracker Page ===== */
.ttk-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ttk-section {
  display: block;
  margin-bottom: 0;
}

.ttk-title {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
  padding: 0;
}

.ttk-task-card {
  min-height: 0;
  margin-bottom: 12px;
}

.ttk-form,
.ttk-running {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* Form/Running toggle */
.ttk-task-card:not(.is-running) .ttk-running {
  display: none;
}

.ttk-task-card.is-running .ttk-form {
  display: none;
}

.ttk-task-card.is-running .ttk-running {
  display: flex;
}

/* Running Task Card */
.running-card {
  background: linear-gradient(135deg, rgba(var(--ui-fg-rgb), 0.04) 0%, rgba(var(--ui-fg-rgb), 0.02) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.running-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.running-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
}

.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 0.3; }
  100% { opacity: 0; transform: scale(1.4); }
}

.running-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.running-timer {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
}

.running-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.running-task-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.4;
}

.running-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.running-tags .tag {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(var(--ui-fg-rgb), 0.08);
  border: 1px solid rgba(var(--ui-fg-rgb), 0.12);
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
}

.running-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-running {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-running .ico {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-running .ico svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.btn-running-danger {
  background: var(--danger);
  color: white;
  border: 1px solid transparent;
}

.btn-running-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ===== Inputs ===== */
input, select, textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: var(--h-field);
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  outline: none;
  background: rgba(var(--ui-fg-rgb), 0.08);
  color: var(--fg);
  transition: box-shadow .25s var(--ease-io), border-color .25s var(--ease-io), background .25s var(--ease-io);
  font: inherit;
  box-sizing: border-box;
}

select {
  padding-right: 36px;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

textarea {
  min-height: 120px;
  resize: vertical;
  border-radius: var(--radius-card);
  padding: 16px 20px;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

/* Datetime inputs */
.datetime-row {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.datetime-input {
  flex: 1;
  min-width: 0;
  height: var(--h-field);
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  font-size: 14px;
}

.datetime-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .2);
}

.date-input { flex: 1.2; }
.time-input { flex: 0.8; }

.datetime-input::-webkit-calendar-picker-indicator {
  filter: brightness(0) invert(1);
  cursor: pointer;
  opacity: 0.8;
}

/* Refresh datetime button */
.btn-datetime-refresh {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.btn-datetime-refresh svg {
  width: 18px;
  height: 18px;
  color: var(--fg);
  opacity: 0.7;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.btn-datetime-refresh:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, .3);
}

.btn-datetime-refresh:hover svg {
  opacity: 1;
  transform: rotate(180deg);
}

/* ===== Buttons ===== */
.btn {
  height: var(--h-field);
  padding: 0 20px;
  border-radius: var(--radius-field);
  border: 1px solid transparent;
  background: rgba(var(--ui-fg-rgb), 0.08);
  color: var(--fg);
  cursor: pointer;
  transition: transform .18s var(--ease-io), background .2s var(--ease-io), border-color .2s var(--ease-io), box-shadow .2s var(--ease-io);
  font-weight: 500;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  box-shadow: 0 10px 24px rgba(8, 12, 24, 0.24);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(8, 12, 24, 0.24);
}

.btn.primary {
  background: rgba(var(--ui-fg-rgb), 0.12);
  border-color: rgba(var(--ui-fg-rgb), 0.3);
  font-weight: 600;
}

.btn.primary:hover {
  background: rgba(var(--ui-fg-rgb), 0.18);
  border-color: rgba(var(--ui-fg-rgb), 0.46);
}

.btn.secondary {
  background: var(--surface);
  border-color: var(--border);
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
}

.btn.ghost:hover {
  background: var(--surface-hover);
}

/* Rows */
.row {
  display: flex;
  gap: var(--gap-md);
  align-items: center;
  flex-wrap: wrap;
}

.row.compact {
  display: flex;
  gap: var(--gap-md);
  align-items: center;
}

.row.project-action {
  display: flex;
  gap: var(--gap-md);
  align-items: center;
  flex-wrap: wrap;
}

.row.project-action select {
  flex: 1 1 140px;
  min-width: 120px;
}

.row.project-action .btn {
  flex: 0 0 auto;
  margin-left: auto;
}

.full-width { width: 100%; }

/* Status */
.status { color: var(--muted); font-size: 12px; margin-top: 4px; }
.status:empty { display: none; }
.toast-inline { transition: opacity 0.2s var(--ease-out); opacity: 1; }
.toast-inline.hidden { opacity: 0; }

/* ===== Stats / Dashboard ===== */
.stats-card {
  padding: 10px 14px 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: rgba(var(--ui-bg-rgb), 0.15);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.stats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
}

.stats-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.stats-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.stats-tab.is-active {
  color: var(--fg);
  background: var(--surface-2);
  border-color: var(--border);
}

.stats-view {
  display: none;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.stats-view.is-active {
  display: flex;
}

.stats-view[hidden] {
  display: none !important;
}

.stats-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.stats-content--today {
  justify-content: flex-start;
  gap: 12px;
}

/* Client-based today view */
.today-clients-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-group {
  border-radius: var(--ui-field-radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg);
}

.client-name { flex: 1; }
.client-total { font-variant-numeric: tabular-nums; color: var(--accent); }

.task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}

.task-item:last-child { border-bottom: none; }
.task-name { flex: 1; color: var(--fg); }
.task-duration { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--muted); }

.today-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: var(--ui-field-radius);
  border: 2px solid var(--accent);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
}

.today-grand-total strong { color: var(--fg); }
.today-grand-total span { color: var(--accent); font-variant-numeric: tabular-nums; }

/* Week navigation */
.week-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--ui-field-radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.week-nav-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.week-nav-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.week-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.week-label { font-size: 13px; font-weight: 600; color: var(--fg); }
.week-total { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Demo chart placeholder */
.chart-wrap {
  position: relative;
  padding: 10px;
  border: 0;
  border-radius: var(--ui-field-radius);
  background: var(--surface-2);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.demo-chart-placeholder {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 120px;
  gap: 8px;
  padding: 0 10px;
}

.demo-chart-placeholder.weekly {
  gap: 16px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(99, 102, 241, 0.5) 100%);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 8px;
  transition: height 0.3s var(--ease-out);
}

.chart-bar span {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
}

.chart-bar.active {
  background: linear-gradient(180deg, #10b981 0%, rgba(16, 185, 129, 0.5) 100%);
}

/* ===== Clip View (website.saver) ===== */
.og-card {
  padding: 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.og-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-2);
}

.og-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.og-title a {
  color: var(--fg);
  text-decoration: none;
}

.og-title a:hover {
  text-decoration: underline;
}

.og-url, .og-desc, .og-site {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.og-desc {
  line-height: 1.4;
}

.clip-info-container {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.clip-actions {
  display: flex;
  gap: var(--gap-md);
  justify-content: flex-end;
}

.clip-info-panel {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
  padding: 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--surface);
}

.clip-info-panel.hidden {
  display: none;
}

/* ===== Color View (color.piper) ===== */
.color-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-history-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.color-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 4px;
}

.color-swatch:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-label {
  font-size: 9px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: 600;
}

.color-empty {
  font-size: 12px;
  color: var(--muted);
}

.color-detected {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* ===== Images View (image.saver) ===== */
.image-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.image-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
}

.image-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.image-preview {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.image-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-size {
  font-size: 11px;
  color: var(--muted);
}

.image-download {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s var(--ease-io);
  flex-shrink: 0;
}

.image-download:hover {
  background: var(--surface-hover);
  border-color: var(--fg);
}

.image-download svg {
  width: 16px;
  height: 16px;
  stroke: var(--fg);
}

.image-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 12px 0;
}

.image-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--muted);
}

.image-error.hidden { display: none; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

/* ===== Responsive for iframe embedding ===== */
@media (max-width: 420px) {
  html, body {
    width: 100%;
  }
}
