@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Geist:wght@100..900&family=Inter:wght@100..900&family=Manrope:wght@200..800&family=Plus+Jakarta+Sans:wght@200..800&display=swap');

:root {
  --ink: #22241F;
  --paper: #FBFBF8;
  --white: #FFFFFF;
  --surface: #FFFFFF;
  --muted: #85877F;
  --line: #E9E9E3;
  --soft: #F3F4ED;
  --lime: #D7F36A;
  --stage: #F0F0EB;
  
  --lime-hover: #D0EE5F;
  --lime-tint: #FBFDEC;
  --soft-hover: #F1F5E2;
  --line-strong: #CDD0C1;
  --accent-olive: #8EA63A;
  --accent-lime-border: #B7CD64;
  --topbar-bg: rgba(251, 251, 248, 0.94);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;

  --shadow-subtle: 0 4px 16px rgba(34, 36, 31, 0.04);
  --shadow-card: 0 8px 24px rgba(35, 35, 26, 0.045);
  --shadow-float: 0 12px 38px rgba(23, 25, 15, 0.09);

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme Tokens */
[data-theme="dark"] {
  --ink: #F2F3EC;
  --paper: #121310;
  --white: #1A1C16;
  --surface: #1A1C16;
  --muted: #9FA197;
  --line: #292B23;
  --soft: #22241D;
  --lime: #D7F36A;
  --stage: #161713;
  
  --lime-hover: #E3FB7C;
  --lime-tint: #242B14;
  --soft-hover: #292C23;
  --line-strong: #3D4034;
  --accent-olive: #A2BD46;
  --accent-lime-border: #4D591F;
  --topbar-bg: rgba(18, 19, 16, 0.94);

  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 12px 38px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Magic UI View Transition Ripple */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) {
  z-index: 1;
}
::view-transition-new(root) {
  z-index: 99999;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* App Shell */
.shell {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar Navigation */
.topbar {
  height: 78px;
  padding: 0 6.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 32px;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.brand-nav-group {
  display: flex;
  align-items: center;
  gap: 44px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -1px;
  color: var(--ink);
  user-select: none;
  cursor: pointer;
}

.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--ink);
  display: grid;
  place-items: center;
  color: var(--paper);
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(34, 36, 31, 0.12);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

[data-theme="dark"] .brand .mark {
  background: var(--lime);
  color: #121310;
}

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

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(125, 125, 125, 0.08);
}

.nav-link.active {
  color: var(--ink);
  font-weight: 700;
  background: rgba(125, 125, 125, 0.12);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Magic UI Animated Theme Toggle Button */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1),
              background 200ms ease,
              border-color 200ms ease,
              box-shadow 200ms ease;
}

.theme-toggle-btn:hover {
  background: var(--soft);
  border-color: var(--line-strong);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.theme-toggle-btn:active {
  transform: translateY(0) scale(0.92);
}

.theme-toggle-btn .sun-icon,
.theme-toggle-btn .moon-icon {
  position: absolute;
  pointer-events: none;
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 300ms ease;
}

/* Light Mode: Show Sun with smooth spring */
.theme-toggle-btn .sun-icon {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}
.theme-toggle-btn .moon-icon {
  transform: scale(0) rotate(90deg);
  opacity: 0;
}

/* Dark Mode: Show Moon with smooth spring */
[data-theme="dark"] .theme-toggle-btn .sun-icon {
  transform: scale(0) rotate(-90deg);
  opacity: 0;
}
[data-theme="dark"] .theme-toggle-btn .moon-icon {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.privacy-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--soft);
}

/* Views & Content */
.view {
  display: none;
  padding: 48px 6.2% 80px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  animation: fadeIn 220ms ease-out forwards;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.page-title {
  margin: 0 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -1.8px;
  margin: 6px 0 8px;
  color: var(--ink);
}

.page-title p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 600px;
}

.back-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: var(--soft);
  border-color: var(--line-strong);
}

/* Hero Section (Home) */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  min-height: 420px;
  margin-bottom: 40px;
}

.hero h1,
.kinetic-text-wrap {
  --hover-padding: calc(1em / 12);
  --text-stroke-width: calc(1em * 125 / 6000);
  font-family: 'Geist', var(--font-display);
  font-size: clamp(38px, 4.8vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-optical-sizing: auto;
  font-weight: 300;
  margin: 16px 0 16px;
  color: var(--ink);
  cursor: default;
  user-select: none;
}

.kinetic-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  white-space: nowrap;
}

.kinetic-char {
  display: inline-block;
  font-weight: 300;
  font-optical-sizing: auto;
  will-change: font-weight, -webkit-text-stroke-width, padding;
  -webkit-text-stroke-color: transparent;
  -webkit-text-stroke-width: var(--text-stroke-width);
  transition: font-weight 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              -webkit-text-stroke-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              -webkit-text-stroke-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding-inline: 0;
}

/* Magic UI exact neighbor cascade weight and stroke rules */
.kinetic-char:hover {
  font-weight: 900 !important;
  -webkit-text-stroke-color: currentColor !important;
  -webkit-text-stroke-width: calc(var(--text-stroke-width) * 2) !important;
  padding-inline: var(--hover-padding) !important;
}

/* 1st previous neighbor */
.kinetic-char:has(+ .kinetic-char:hover) {
  font-weight: 600 !important;
  padding-inline: var(--hover-padding) !important;
}

/* 2nd previous neighbor */
.kinetic-char:has(+ .kinetic-char + .kinetic-char:hover) {
  font-weight: 400 !important;
}

/* 1st next neighbor */
.kinetic-char:hover + .kinetic-char {
  font-weight: 600 !important;
  padding-inline: var(--hover-padding) !important;
}

/* 2nd next neighbor */
.kinetic-char:hover + .kinetic-char + .kinetic-char {
  font-weight: 400 !important;
}

.hero p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 24px;
}

.upload-zone {
  min-height: 200px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-2xl);
  background: var(--soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.upload-zone:hover {
  border-color: var(--accent-olive);
  background: var(--soft-hover);
}

.upload-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--white);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-subtle);
  color: var(--ink);
}

.upload-zone strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.upload-zone small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Aceternity UI 3D Card Container & Body */
.mock-wrap {
  height: 340px;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1100px;
  user-select: none;
}

.mock-card-body {
  width: 100%;
  height: 100%;
  position: relative;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.photo-preview {
  width: 82%;
  height: 270px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #D6E5DF 0%, #B5D1C1 38%, #668776 39%, #41624F 62%, #253B36 100%);
  box-shadow: 0 25px 55px rgba(37, 40, 32, 0.16), 0 10px 20px rgba(0, 0, 0, 0.06);
  transform-style: preserve-3d;
  transform: translateZ(40px);
  transition: transform 0.25s ease-out, box-shadow 0.3s ease;
}

[data-theme="dark"] .photo-preview {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hero-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 280px at 50% 50%, rgba(255, 255, 255, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: overlay;
  z-index: 5;
}

.photo-artwork {
  width: 100%;
  height: 100%;
  position: relative;
}

.photo-artwork .sun {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #F4DF9A;
  position: absolute;
  right: 21%;
  top: 17%;
}

.photo-artwork .mountain {
  position: absolute;
  bottom: 37%;
  left: -5%;
  width: 115%;
  height: 45%;
  background: #849E8B;
  clip-path: polygon(0 100%, 20% 22%, 36% 75%, 59% 0, 78% 75%, 92% 28%, 100% 100%);
}

.photo-artwork .mountain.back {
  bottom: 25%;
  background: #587665;
  opacity: 0.85;
  clip-path: polygon(0 100%, 20% 40%, 40% 73%, 65% 0, 83% 67%, 100% 36%, 100% 100%);
}

.photo-artwork .water {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 36%;
  background: linear-gradient(180deg, #6B9A91, #254944);
}

.float-badge {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-float);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
  z-index: 10;
}

.float-badge.a { 
  left: 0; 
  top: 35px; 
  transform: translateZ(85px);
}

.float-badge.b { 
  right: 0; 
  bottom: 30px; 
  transform: translateZ(105px);
}

.tiny-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--ink);
}

/* Home Category Feature Cards */
.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.cat-feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  position: relative;
}

.cat-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
}

.cat-feature-card.highlight {
  border-color: var(--accent-lime-border);
  background: var(--white);
}

[data-theme="dark"] .cat-feature-card.highlight {
  background: #1C1F16;
}

.cat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cat-icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--ink);
  transition: background-color var(--transition-fast);
}

.cat-feature-card:hover .cat-icon-tile {
  background: var(--lime-tint);
}

.cat-pill-badge {
  font-size: 11px;
  font-weight: 700;
  color: #121310;
  background: var(--lime);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.cat-feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.4px;
  color: var(--ink);
  margin-bottom: 6px;
}

.cat-feature-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.cat-card-footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

/* EDIT CATEGORY: Tool Rows List */
.tool-rows-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-row-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: all var(--transition-normal);
  cursor: pointer;
  text-align: left;
  position: relative;
}

.tool-row-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
  background: var(--soft);
}

.tool-row-card:active {
  transform: translateY(0);
}

.tool-row-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.tool-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--ink);
  flex-shrink: 0;
  transition: background-color var(--transition-fast);
}

.tool-row-card:hover .tool-icon-box {
  background: var(--lime-tint);
}

.tool-row-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tool-row-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-row-header strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.tool-number-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 7px;
  border-radius: 6px;
}

.tool-row-info p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.tool-row-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.tool-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--soft);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.tool-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
  transition: all var(--transition-fast);
}

.tool-row-card:hover .tool-arrow {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(3px);
}

/* ============================================================== */
/* WORKSPACE LAYOUT (STAGE + SETTINGS PANEL)                      */
/* ============================================================== */
.workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.stage-container {
  min-height: 540px;
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: var(--topbar-bg);
}

.stage-hint {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage-topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stage-tool-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.stage-tool-btn:hover {
  color: var(--ink);
  background: var(--soft);
}

.stage-viewport {
  flex: 1;
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.canvas-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  overflow: hidden;
  background: #111;
}

.canvas-wrapper canvas {
  display: block;
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.stage-footer {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  background: var(--topbar-bg);
  gap: 14px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-info strong {
  color: var(--ink);
  font-size: 12px;
  display: block;
}

.action-btn-sm {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.action-btn-sm:hover {
  background: var(--soft);
  border-color: var(--line-strong);
}

/* Settings Panels */
.settings-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.settings-panel h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 4px;
}

.settings-panel .sub {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.input-text, .input-select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 0 12px;
  font-size: 12px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-text:focus, .input-select:focus {
  border-color: var(--ink);
}

.select-input, select.input-select {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--white);
  background-image: 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='%23777777' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding: 0 32px 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.select-input:hover, select.input-select:hover {
  border-color: var(--ink);
}

.select-input:focus, select.input-select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--lime-tint);
}

.select-input option, select.input-select option {
  background-color: var(--white);
  color: var(--ink);
  font-size: 12.5px;
  padding: 6px 10px;
}

[data-theme="dark"] .select-input,
[data-theme="dark"] select.input-select {
  background-color: #1e221b;
  border-color: #383c33;
  color: #f2f3ec;
  background-image: 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='%23aaaaaa' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

[data-theme="dark"] .select-input option,
[data-theme="dark"] select.input-select option {
  background-color: #1e221b;
  color: #f2f3ec;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.input-row .input-text {
  font-weight: 600;
  text-align: center;
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-unit .input-text,
.input-with-unit input[type="number"],
.input-with-unit input[type="text"] {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 0 28px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  text-align: left;
}

.input-with-unit .input-text:focus,
.input-with-unit input[type="number"]:focus,
.input-with-unit input[type="text"]:focus {
  border-color: var(--ink);
  background: var(--white);
  box-shadow: 0 0 0 2px var(--lime-tint);
}

.input-with-unit .unit {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
  text-transform: uppercase;
}

.link-btn {
  width: 34px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  transition: all var(--transition-fast);
}

.link-btn.active {
  background: var(--lime-tint);
  border-color: var(--accent-lime-border);
  color: var(--ink);
}

/* Sliders */
.slider-group {
  margin-bottom: 14px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.slider-header strong {
  color: var(--ink);
}

.range-slider {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

/* Presets */
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.preset-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-card:hover {
  border-color: var(--accent-lime-border);
  background: var(--lime-tint);
}

.preset-card.active {
  border-color: var(--accent-lime-border);
  background: var(--lime-tint);
  position: relative;
}

.preset-card strong {
  font-size: 11px;
  display: block;
  color: var(--ink);
}

.preset-card small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

/* Buttons */
.btn-primary {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.btn-secondary:hover {
  background: var(--soft);
  border-color: var(--line-strong);
}

.btn-group-row {
  display: flex;
  gap: 8px;
}

.btn-group-row button {
  flex: 1;
}

/* Crop Overlay & Mouse Controls */
.crop-canvas-wrapper {
  cursor: crosshair;
  user-select: none;
  touch-action: none;
}

.crop-overlay {
  position: absolute;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  cursor: move;
  display: block;
  box-sizing: border-box;
  touch-action: none;
  user-select: none;
}

/* Rule of Thirds Grid */
.crop-grid-line {
  position: absolute;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.35);
}
.crop-grid-h1 { top: 33.333%; left: 0; right: 0; height: 1px; }
.crop-grid-h2 { top: 66.666%; left: 0; right: 0; height: 1px; }
.crop-grid-v1 { left: 33.333%; top: 0; bottom: 0; width: 1px; }
.crop-grid-v2 { left: 66.666%; top: 0; bottom: 0; width: 1px; }

/* Live Dimension Badge inside crop box */
.crop-dim-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 15, 15, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.3px;
}

/* 8 Interactive Resize Handles */
.crop-handle {
  position: absolute;
  width: 11px;
  height: 11px;
  background: #ffffff;
  border: 1.5px solid #111111;
  border-radius: 2px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
  z-index: 10;
  transition: transform 0.1s ease, background-color 0.1s ease;
  box-sizing: border-box;
}

.crop-handle:hover,
.crop-handle.active {
  transform: scale(1.3);
  background: var(--accent-lime, #bbf7d0);
  border-color: #000000;
}

.crop-handle.tl { top: -5.5px; left: -5.5px; cursor: nwse-resize; }
.crop-handle.tc { top: -5.5px; left: calc(50% - 5.5px); cursor: ns-resize; }
.crop-handle.tr { top: -5.5px; right: -5.5px; cursor: nesw-resize; }
.crop-handle.ml { top: calc(50% - 5.5px); left: -5.5px; cursor: ew-resize; }
.crop-handle.mr { top: calc(50% - 5.5px); right: -5.5px; cursor: ew-resize; }
.crop-handle.bl { bottom: -5.5px; left: -5.5px; cursor: nesw-resize; }
.crop-handle.bc { bottom: -5.5px; left: calc(50% - 5.5px); cursor: ns-resize; }
.crop-handle.br { bottom: -5.5px; right: -5.5px; cursor: nwse-resize; }

/* Drag Tip Banner */
.drag-tip-banner {
  background: var(--lime-tint);
  border: 1px solid var(--accent-lime-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--ink);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

/* Format Validation Alert Banners */
.alert-banner-danger {
  background: #fef2f2;
  border: 1px solid #f87171;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px;
  color: #b91c1c;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

[data-theme="dark"] .alert-banner-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fca5a5;
}

.alert-banner-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: #15803d;
  font-weight: 500;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-theme="dark"] .alert-banner-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(134, 239, 172, 0.35);
  color: #86efac;
}


/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastSlideUp 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Floating Global History Bar (Undo / Redo) */
.floating-history-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-float);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.floating-history-bar.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.floating-history-bar:hover {
  border-color: var(--ink);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16);
}

.history-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.history-btn:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.history-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.history-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.history-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 850px) {
  .topbar {
    padding: 0 5%;
    gap: 16px;
  }
  .brand-nav-group {
    gap: 20px;
  }
  .view {
    padding: 32px 5% 60px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .workspace-layout {
    grid-template-columns: 1fr;
  }
  .category-cards-grid {
    grid-template-columns: 1fr;
  }
  .floating-history-bar {
    bottom: 16px;
    padding: 4px 8px;
  }
  .tool-tag {
    display: none;
  }
}

/* ============================================================== */
/* ADVANCED COMPRESS CONTROLS                                     */
/* ============================================================== */
.segmented-control {
  display: flex;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.segment-btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
}

.segment-btn:hover {
  color: var(--ink);
}

.segment-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .segment-btn.active {
  background: #2A2D25;
  color: #F2F3EC;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.input-with-select {
  display: flex;
  align-items: stretch;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
  transition: border-color var(--transition-fast);
  margin-top: 6px;
}

.input-with-select:focus-within {
  border-color: var(--ink);
}

.input-with-select .text-input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  background: transparent;
  outline: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.input-with-select .unit-select {
  border: none;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft);
  padding: 0 14px;
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  width: auto;
  outline: none;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--soft-hover);
}

.chip-btn.active {
  background: var(--lime-tint);
  border-color: var(--accent-lime-border);
  color: #121310;
}

.calibrated-status-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calibrated-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.calibrated-row strong {
  color: var(--ink);
  font-weight: 600;
}

.calibrated-row strong.highlight-text {
  color: #2F6F3E;
  font-weight: 700;
}

[data-theme="dark"] .calibrated-row strong.highlight-text {
  color: var(--lime);
}

.calibrating-pulse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-style: italic;
  font-weight: 500;
  animation: pulseOpacity 1.2s ease-in-out infinite alternate;
}

@keyframes pulseOpacity {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

.radio-pill-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.radio-pill {
  position: relative;
  cursor: pointer;
  display: block;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
}

.radio-pill span {
  display: block;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--muted);
  transition: all var(--transition-fast);
}

.radio-pill input:checked + span {
  border-color: var(--accent-lime-border);
  background: var(--lime-tint);
  color: #121310;
}

[data-theme="dark"] .radio-pill input:checked + span {
  background: #25281E;
  color: #F2F3EC;
}

.summary-stat-box {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.savings-pill {
  font-size: 11px;
  font-weight: 700;
  background: var(--lime);
  color: #121310;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.stat-detail-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.stat-detail-line strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

/* ============================================================== */
/* KEYBOARD SHORTCUTS & MODAL DIALOG                             */
/* ============================================================== */

/* Shortcuts Toggle Button in Header */
.shortcuts-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shortcuts-toggle-btn:hover {
  background: var(--soft-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.shortcuts-btn-icon {
  font-size: 13px;
}

.shortcuts-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modal Dialog Card */
.modal-dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.05);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 24px;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

.modal-header p {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0 0 0;
}

.modal-close-btn {
  background: var(--soft);
  border: 1px solid var(--line);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--soft-hover);
  color: var(--ink);
  transform: scale(1.08);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Enhanced Multi-Suite Shortcuts Modal */
.shortcuts-dialog {
  max-width: 680px;
  max-height: 88vh;
}

.shortcuts-tabs-bar {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.shortcuts-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px 8px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.shortcuts-tabs::-webkit-scrollbar {
  display: none;
}

.shortcuts-tab-btn {
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  user-select: none;
}

.shortcuts-tab-btn:hover:not(.active) {
  background: var(--soft-hover);
  color: var(--ink);
}

.shortcuts-tab-btn.active {
  background: var(--lime);
  color: #121310;
  border-color: var(--accent-lime-border);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(227, 255, 77, 0.28);
}

.shortcuts-search-wrap {
  position: relative;
  padding: 0 20px 12px 20px;
}

.shortcuts-search-icon {
  position: absolute;
  left: 32px;
  top: 10px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.shortcuts-search-input {
  width: 100%;
  padding: 8px 32px 8px 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 12.5px;
  color: var(--ink);
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition-fast);
}

.shortcuts-search-input:focus {
  border-color: var(--accent-lime-border);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--lime-tint);
}

.shortcuts-search-clear {
  position: absolute;
  right: 28px;
  top: 7px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  display: none;
  line-height: 1;
}

.shortcuts-search-clear:hover {
  color: var(--ink);
}

.shortcuts-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  max-height: calc(88vh - 190px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.shortcuts-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcuts-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.shortcuts-category-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.shortcuts-category-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  letter-spacing: 0.3px;
}

.shortcuts-rows-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  gap: 12px;
}

.shortcut-row .then {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 2px;
}

.keys-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.keys-wrap .or {
  font-size: 11px;
  color: var(--muted);
  margin: 0 3px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-bottom: 2px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.shortcut-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shortcut-pill:hover {
  background: var(--lime-tint);
  border-color: var(--accent-lime-border);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.shortcut-pill .pill-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shortcut-pill .pill-icon {
  font-size: 13px;
}

.shortcut-pill .pill-arrow {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.5;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.shortcut-pill:hover .pill-arrow {
  opacity: 1;
  transform: translate(2px, -2px);
  color: var(--ink);
}

.shortcut-pill kbd {
  background: var(--lime);
  color: #121310;
  border-color: var(--accent-lime-border);
}

.shortcuts-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  gap: 6px;
}

.shortcuts-footer-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.shortcuts-footer-hint kbd {
  background: var(--soft);
  border-color: var(--line);
  color: var(--ink);
  font-size: 10.5px;
  padding: 0 4px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

/* Floating Sequence HUD Pill */
.shortcut-sequence-hud {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  pointer-events: none;
  background: rgba(18, 19, 16, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(227, 255, 77, 0.2);
  z-index: 10000;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.shortcut-sequence-hud.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.shortcut-sequence-hud.flash-success {
  background: #E3FF4D;
  color: #121310;
  border-color: #CBE635;
  box-shadow: 0 16px 36px rgba(227, 255, 77, 0.45);
}

.shortcut-sequence-hud kbd {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.shortcut-sequence-hud.flash-success kbd {
  background: rgba(18, 19, 16, 0.12);
  color: #121310;
  border-color: rgba(18, 19, 16, 0.25);
}

@media (max-width: 680px) {
  .shortcuts-rows-grid {
    grid-template-columns: 1fr;
  }
  .shortcuts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shortcuts-footer-hint {
    display: none;
  }
  .shortcuts-btn-text {
    display: none;
  }
}

@media (max-width: 440px) {
  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

/* Convert Suite & Modern Chips */
.chip-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.chip-btn:hover {
  background: var(--lime-tint);
  border-color: var(--accent-lime-border);
}

.chip-btn.active {
  background: var(--lime);
  color: #121310;
  border-color: var(--accent-lime-border);
}

.metric-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

/* Transparent Canvas Checkerboard */
.checkerboard-bg {
  background-color: #ffffff;
  background-image: linear-gradient(45deg, #f0f2f5 25%, transparent 25%),
                    linear-gradient(-45deg, #f0f2f5 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #f0f2f5 75%),
                    linear-gradient(-45deg, transparent 75%, #f0f2f5 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.code-textarea {
  width: 100%;
  height: 90px;
  font-family: 'SF Mono', Monaco, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}

.code-textarea:focus {
  outline: none;
  border-color: var(--accent-lime-border);
}

/* ============================================================== */
/* PDF EXTRACT & DOCUMENT WORKSPACE STYLES                        */
/* ============================================================== */
.pdf-extract-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 380px;
  width: 100%;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--paper);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  padding: 32px;
}

.pdf-extract-dropzone:hover, .pdf-extract-dropzone.drag-over {
  border-color: var(--ink);
  background: var(--soft);
  transform: scale(1.005);
}

.pdf-extract-dropzone-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--lime-tint);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 4px;
}

.pdf-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  width: 100%;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px;
}

.pdf-page-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-fast);
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
}

.pdf-page-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.pdf-page-card.selected {
  border-color: #2d6a4f;
  background: var(--lime-tint);
}

.pdf-page-thumb-wrap {
  width: 100%;
  height: 230px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
}

.pdf-page-thumb-wrap canvas,
.pdf-page-thumb-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pdf-page-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
}

.pdf-page-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.pdf-page-card-actions button {
  flex: 1;
  padding: 5px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pdf-page-card-actions button:hover {
  background: var(--soft);
  border-color: var(--ink);
}

[data-theme="dark"] .pdf-page-thumb-wrap {
  background: #141611;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .pdf-page-card-actions button {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .pdf-page-card-actions button:hover {
  background: var(--soft);
  border-color: var(--line-strong);
}

.pdf-page-card-actions button.primary-action {
  background: var(--lime-tint);
  border-color: var(--accent-lime-border);
  color: #2d6a4f;
  font-weight: 600;
}

.pdf-page-card-actions button.primary-action:hover {
  background: var(--lime);
}

/* Delete PDF Pages Card Styles */
.pdf-page-card.delete-marked {
  border-color: #ef4444;
  background: #fef2f2;
}

[data-theme="dark"] .pdf-page-card.delete-marked {
  border-color: #991b1b;
  background: #251212;
}

.pdf-page-card.delete-marked .pdf-page-thumb-wrap::after {
  content: "✕ REMOVED";
  position: absolute;
  inset: 0;
  background: rgba(185, 28, 28, 0.45);
  backdrop-filter: blur(1.5px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.pdf-page-card-actions button.danger-action {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.pdf-page-card-actions button.danger-action:hover {
  background: #fecaca;
  border-color: #ef4444;
}

[data-theme="dark"] .pdf-page-card-actions button.danger-action {
  background: #3b1717;
  border-color: #7f1d1d;
  color: #fca5a5;
}

[data-theme="dark"] .pdf-page-card-actions button.danger-action:hover {
  background: #4c1d1d;
}

/* ============================================================== */
/* PDF MERGE WORKSPACE STYLES                                     */
/* ============================================================== */
.pdf-merge-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-height: 520px;
  overflow-y: auto;
  padding: 4px;
}

.pdf-merge-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-subtle);
}

.pdf-merge-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.pdf-merge-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.pdf-merge-order-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pdf-merge-thumb {
  width: 48px;
  height: 60px;
  border-radius: 6px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pdf-merge-thumb canvas,
.pdf-merge-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pdf-merge-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pdf-merge-info strong {
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-merge-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.pdf-merge-card {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-subtle);
}

.pdf-merge-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.pdf-merge-card-order {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.pdf-merge-thumb-wrap {
  width: 50px;
  height: 64px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.pdf-merge-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdf-merge-thumb-fallback {
  font-size: 24px;
}

.pdf-merge-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.pdf-merge-card-name {
  font-size: 13.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-merge-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.pdf-merge-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn-sm {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.icon-btn-sm:hover:not(:disabled) {
  background: var(--soft);
  border-color: var(--ink);
}

.icon-btn-sm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-btn-sm.danger:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.preset-option-card:hover {
  border-color: var(--ink) !important;
}

.preset-option-card.active {
  border-color: var(--ink) !important;
  background: var(--soft) !important;
}

/* ==========================================================================
   Aceternity UI Vertical Floating Dock (Left Edge, Centered Vertically)
   Pure PixKit Web Design System Tokens + Liquid Droplet Escape Physics
   ========================================================================== */
.floating-dock-wrapper {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  pointer-events: none;
  user-select: none;
  transform-origin: left center;
  overflow: visible !important;
}

/* Water Droplet Liquid Escape Physics on Page Entrance */
.floating-dock-wrapper.droplet-escape {
  animation: droplet-escape-wrapper 1.28s cubic-bezier(0.18, 0.89, 0.32, 1) forwards;
  will-change: transform, opacity;
}

/* Immediate skip override when user has already visited/opened the site */
html.dock-intro-seen .floating-dock-wrapper.droplet-escape {
  animation: none !important;
  opacity: 1 !important;
  transform: translateY(-50%) translateX(0) !important;
}
html.dock-intro-seen .floating-dock-wrapper::before,
html.dock-intro-seen .floating-dock-wrapper.droplet-escape::before {
  display: none !important;
}
html.dock-intro-seen .floating-dock-container {
  animation: none !important;
}
html.dock-intro-seen .floating-dock-item {
  animation: none !important;
  opacity: 1 !important;
}

.floating-dock-wrapper.droplet-escape::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  height: 42px;
  background: var(--line);
  border-radius: 0 100% 100% 0;
  pointer-events: none;
  animation: droplet-surface-bridge 1.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: width, transform, opacity;
}

[data-theme="dark"] .floating-dock-wrapper.droplet-escape::before {
  background: var(--line-strong);
}

.floating-dock-wrapper.droplet-escape .floating-dock-container {
  min-height: 0 !important;
  animation: droplet-vertical-unfurl 1.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center center;
  overflow: visible !important;
}

.floating-dock-wrapper.droplet-escape .floating-dock-item {
  animation: droplet-icon-emerge 0.52s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.floating-dock-wrapper.droplet-escape #dock-btn-home {
  animation-delay: 0.40s;
}

.floating-dock-wrapper.droplet-escape #dock-btn-recent {
  animation-delay: 0.52s;
}

.floating-dock-wrapper.droplet-escape #dock-btn-settings {
  animation-delay: 0.64s;
}

/* Keyframes: 1. Liquid droplet body pulling away, stretching, snapping & settling */
@keyframes droplet-escape-wrapper {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(-85px) scaleX(0.22) scaleY(1.45);
    filter: blur(2px);
  }
  16% {
    opacity: 1;
    /* Droplet clinging to the screen edge: pulling out with severe horizontal stretch & vertical squash */
    transform: translateY(-50%) translateX(-34px) scaleX(1.72) scaleY(0.58);
    filter: blur(0px);
  }
  36% {
    /* SNAP! Surface tension breaks off the bezel, catapults forward into space with vertical elongating */
    transform: translateY(-50%) translateX(16px) scaleX(0.72) scaleY(1.42);
  }
  54% {
    /* Liquid elastic recoil: bounces back slightly, flattening horizontally */
    transform: translateY(-50%) translateX(-5px) scaleX(1.22) scaleY(0.86);
  }
  72% {
    /* Second harmonic fluid oscillation */
    transform: translateY(-50%) translateX(3px) scaleX(0.93) scaleY(1.08);
  }
  88% {
    transform: translateY(-50%) translateX(-1px) scaleX(1.02) scaleY(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
    filter: blur(0px);
  }
}

/* Keyframes: 2. Surface tension bridge connecting the droplet to the bezel before snap */
@keyframes droplet-surface-bridge {
  0% {
    opacity: 0;
    width: 0px;
    transform: translateY(-50%) scaleY(1.4);
  }
  14% {
    opacity: 0.9;
    /* Stretching neck attached to the left screen bezel */
    width: 24px;
    transform: translateY(-50%) scaleY(0.52);
  }
  32% {
    /* Pinch-off moment: neck becomes ultra-thin thread */
    opacity: 0.95;
    width: 32px;
    transform: translateY(-50%) scaleY(0.18);
  }
  36% {
    /* SNAP! Detached from screen edge! */
    opacity: 0;
    width: 6px;
    transform: translateY(-50%) scaleY(0);
  }
  100% {
    opacity: 0;
    width: 0px;
    transform: translateY(-50%) scaleY(0);
  }
}

/* Keyframes: 3. Vertical expansion of the droplet pill into full dock */
@keyframes droplet-vertical-unfurl {
  0% {
    height: 48px;
    max-height: 48px;
    padding: 6px 10px;
    gap: 0px;
    border-radius: 9999px;
  }
  34% {
    /* Dense, rounded liquid droplet ball during flight */
    height: 50px;
    max-height: 50px;
    padding: 6px 10px;
    gap: 0px;
  }
  64% {
    /* Fluid rushes into vertical dock pillar with natural overshoot */
    height: 195px;
    max-height: 195px;
    padding: 12px 10px;
    gap: 13px;
  }
  82% {
    /* Height spring recoil */
    height: 175px;
    max-height: 175px;
    gap: 11px;
  }
  100% {
    height: 180px;
    max-height: 180px;
    padding: 12px 10px;
    gap: 12px;
  }
}

/* Keyframes: 4. Staggered icon emergence inside the liquid */
@keyframes droplet-icon-emerge {
  0% {
    opacity: 0;
    transform: scale(0.15) translateY(10px);
    filter: blur(1px);
  }
  62% {
    opacity: 1;
    transform: scale(1.24) translateY(-2px);
    filter: blur(0px);
  }
  82% {
    transform: scale(0.92) translateY(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.floating-dock-container {
  pointer-events: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  min-width: 64px;
  min-height: 180px;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(34, 36, 31, 0.08), 0 2px 8px rgba(34, 36, 31, 0.04), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  transition: border-color var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
  touch-action: none;
  cursor: grab;
  overflow: visible !important;
}

.floating-dock-container.is-dragging {
  cursor: grabbing !important;
}

/* Hide native container CSS background ONLY during active elastic stretch (Stage 3 drag and spring recoil) */
.floating-dock-container.is-dragging,
.floating-dock-container.is-recoiling {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

[data-theme="dark"] .floating-dock-container {
  background: rgba(26, 28, 22, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .floating-dock-container.is-dragging,
[data-theme="dark"] .floating-dock-container.is-recoiling {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Dynamic Elastic SVG Canvas */
.dock-elastic-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible !important;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.floating-dock-container.is-dragging .dock-elastic-canvas,
.floating-dock-container.is-recoiling .dock-elastic-canvas {
  opacity: 1;
}

.dock-elastic-path {
  fill: rgba(255, 255, 255, 0.90);
  stroke: var(--line);
  stroke-width: 1px;
  filter: drop-shadow(0 12px 32px rgba(34, 36, 31, 0.09)) drop-shadow(0 2px 8px rgba(34, 36, 31, 0.04));
  transition: fill var(--transition-normal), stroke var(--transition-normal);
}

[data-theme="dark"] .dock-elastic-path {
  fill: rgba(26, 28, 22, 0.90);
  stroke: var(--line);
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.dock-elastic-backdrop {
  display: none !important;
}

/* Hide tooltips and suppress clicks during active elastic drag */
.floating-dock-wrapper.dock-is-dragging .dock-tooltip {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.dock-is-dragging,
body.dock-is-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

.floating-dock-item {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  margin: 0;
  outline: none;
  transform-origin: center center;
  will-change: width, height, transform;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-dock-item:hover {
  color: var(--ink);
  background: var(--soft-hover);
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(34, 36, 31, 0.06);
}

.floating-dock-item.active {
  color: #121310;
  background: var(--lime);
  border-color: var(--accent-lime-border);
  box-shadow: 0 4px 14px rgba(215, 243, 106, 0.45);
}

[data-theme="dark"] .floating-dock-item:hover {
  color: var(--ink);
  background: var(--soft-hover);
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .floating-dock-item.active {
  color: #121310;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 18px rgba(215, 243, 106, 0.4);
}

[data-theme="dark"] .floating-dock-item:hover {
  color: var(--ink);
  background: var(--soft-hover);
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .floating-dock-item.active {
  color: #121310;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 18px rgba(215, 243, 106, 0.4);
}

.dock-icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: transform 0.12s ease-out;
}

.dock-icon-inner svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s ease;
}

/* Aceternity Tooltip Badge (Pops to the right) */
.dock-tooltip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 10px 25px -4px rgba(34, 36, 31, 0.2);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s;
  z-index: 10001;
}

/* Triangular caret pointing back to the icon */
.dock-tooltip::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--ink);
}

[data-theme="dark"] .dock-tooltip {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .dock-tooltip::before {
  border-right-color: var(--surface);
}

.floating-dock-item:hover .dock-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   Dedicated Recent Files View Page (#recent-view)
   ========================================================================== */
.recent-page-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.recent-page-header-actions .back-btn {
  font-size: 12.5px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.recent-page-btns-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.recent-page-btns-row .btn-secondary,
.recent-page-btns-row .btn-primary {
  width: auto !important;
  white-space: nowrap;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.recent-page-btns-row .btn-secondary svg,
.recent-page-btns-row .btn-primary svg {
  flex-shrink: 0;
}

/* Recent Files Controls Bar (Category Filter Pills & Search Bar) */
.recent-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.recent-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recent-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.recent-filter-pill:hover {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line-strong);
}

.recent-filter-pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .recent-filter-pill {
  background: #1C1F16;
  border-color: rgba(255, 255, 255, 0.1);
  color: #A3A39A;
}

[data-theme="dark"] .recent-filter-pill:hover {
  background: #25291D;
  color: #FBFBF8;
}

[data-theme="dark"] .recent-filter-pill.active {
  background: var(--lime);
  color: #121310;
  border-color: var(--lime);
}

.recent-filter-pill .pill-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(125, 125, 125, 0.15);
  font-weight: 700;
}

.recent-filter-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: currentColor;
}

[data-theme="dark"] .recent-filter-pill.active .pill-count {
  background: rgba(0, 0, 0, 0.25);
  color: #121310;
}

/* Recent Files Search Input */
.recent-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 250px;
  max-width: 320px;
  width: 100%;
}

.recent-search-icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
  display: grid;
  place-items: center;
}

.recent-search-input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 36px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.recent-search-input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(212, 245, 61, 0.25);
}

[data-theme="dark"] .recent-search-input {
  background: #1C1F16;
  border-color: rgba(255, 255, 255, 0.1);
  color: #FBFBF8;
}

[data-theme="dark"] .recent-search-input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(212, 245, 61, 0.15);
}

.recent-search-clear {
  position: absolute;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--soft);
  border: none;
  color: var(--muted);
  font-size: 13px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.recent-search-clear.visible {
  display: flex;
}

.recent-search-clear:hover {
  background: var(--line);
  color: var(--ink);
}

/* Category Badge on Card */
.recent-cat-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* No Search Results Empty State */
.recent-empty-search-state {
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius-2xl);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  box-shadow: var(--shadow-subtle);
}

[data-theme="dark"] .recent-empty-search-state {
  background: #1C1F16;
  border-color: rgba(255, 255, 255, 0.15);
}

.recent-empty-search-icon {
  font-size: 38px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.recent-empty-search-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.recent-empty-search-desc {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.recent-active-session-banner {
  background: var(--white);
  border: 1px solid var(--accent-lime-border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-normal);
  gap: 16px;
}

[data-theme="dark"] .recent-active-session-banner {
  background: #1C1F16;
  border-color: rgba(215, 243, 106, 0.35);
}

.recent-active-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.recent-active-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: var(--stage);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.recent-active-icon-fallback {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--ink);
  flex-shrink: 0;
}

.recent-active-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.recent-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #121310;
  background: var(--lime);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  width: fit-content;
  letter-spacing: 0.3px;
}

.recent-active-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #121310;
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.recent-active-filename {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-active-meta {
  font-size: 12px;
  color: var(--muted);
}

.recent-active-actions {
  flex-shrink: 0;
}

/* Recent Files Grid */
.recent-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.recent-file-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 155px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.recent-file-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.recent-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.recent-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-fmt-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.recent-fmt-badge.lime {
  background: var(--lime);
  color: #121310;
  border-color: var(--accent-lime-border);
}

.recent-time-ago {
  font-size: 11px;
  color: var(--muted);
}

.recent-card-delete-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.recent-card-delete-btn:hover {
  color: #E53935;
  background: rgba(229, 57, 53, 0.08);
}

.recent-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.recent-card-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--stage);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.recent-card-icon-tile {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--ink);
  flex-shrink: 0;
}

.recent-card-texts {
  min-width: 0;
  flex: 1;
}

.recent-card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.recent-card-meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.recent-card-footer span:last-child {
  transition: transform var(--transition-fast);
}

.recent-file-card:hover .recent-card-footer span:last-child {
  transform: translateX(3px);
  color: var(--lime-hover);
}

/* Recent Files Empty State */
.recent-empty-state {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  padding: 64px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  box-shadow: var(--shadow-subtle);
}

.recent-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.85;
}

.recent-empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.recent-empty-desc {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.recent-empty-workflows {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.recent-empty-pill {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.recent-empty-pill:hover {
  background: var(--lime);
  color: #121310;
  border-color: var(--accent-lime-border);
}

/* ==========================================================================
   Dedicated Studio Settings View Page (#settings-view)
   ========================================================================== */
.settings-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .settings-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.settings-panel-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.settings-panel-card:hover {
  border-color: var(--accent-lime-border, rgba(215, 243, 106, 0.4));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.settings-panel-card.full-width {
  grid-column: 1 / -1;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--soft);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

.settings-card-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.settings-card-header p {
  font-size: 12px;
  color: var(--muted);
}

.settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.settings-row-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.settings-row-label strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.settings-help {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 2px;
}

.settings-row-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.settings-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill, 9999px);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.settings-action-btn:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .settings-action-btn {
  background: #1c1d18;
  border-color: #2e3028;
  color: #f0f2ea;
}

[data-theme="dark"] .settings-action-btn:hover {
  background: #D7F36A;
  color: #0c0d0e;
  border-color: #D7F36A;
}

.settings-theme-pills {
  display: flex;
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 4px;
}

.settings-pill-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.settings-pill-btn.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .settings-pill-btn.active {
  background: #2A2D23;
  color: #FFFFFF;
}

.privacy-bullet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}

.bullet-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  color: #121310;
  font-weight: 800;
  font-size: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   Studio Settings Real-Time Active Users Counter & Speed Counter
   ========================================================================== */
.settings-presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.settings-presence-pill:hover {
  border-color: rgba(204, 255, 0, 0.4);
  transform: translateY(-1px);
}

.settings-presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.55);
  animation: presenceDotPulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes presenceDotPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.settings-presence-unit {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: lowercase;
}

.settings-presence-rate {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

/* Speed Counter Tabular Slots with Velocity Blur */
.speed-counter-number {
  display: inline-flex;
  align-items: center;
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-height: 18px;
  letter-spacing: -0.01em;
}

.speed-digit-slot {
  display: inline-block;
  overflow: hidden;
  height: 18px;
  line-height: 18px;
  position: relative;
  width: 9.5px;
  text-align: center;
}

.speed-digit-char {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.18s ease;
  will-change: transform, filter, opacity;
}

.speed-digit-char.racing-in,
.speed-digit-char.racing-in-right {
  transform: translateX(120%) scaleX(1.3);
  filter: blur(3.5px);
  opacity: 0;
}

.speed-digit-char.racing-in-left {
  transform: translateX(-120%) scaleX(1.3);
  filter: blur(3.5px);
  opacity: 0;
}

.speed-digit-char.active {
  transform: translateX(0) scaleX(1);
  filter: blur(0px);
  opacity: 1;
}

.speed-digit-char.racing-out,
.speed-digit-char.racing-out-left {
  transform: translateX(-120%) scaleX(1.3);
  filter: blur(3.5px);
  opacity: 0;
}

.speed-digit-char.racing-out-right {
  transform: translateX(120%) scaleX(1.3);
  filter: blur(3.5px);
  opacity: 0;
}

@media (max-width: 900px) {
  .floating-dock-wrapper {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .recent-page-header-actions {
    align-items: flex-start !important;
    width: 100%;
    margin-top: 12px;
  }
  .recent-page-btns-row {
    width: 100%;
    flex-wrap: wrap;
  }
  .recent-page-btns-row .btn-secondary,
  .recent-page-btns-row .btn-primary {
    flex: 1;
    min-width: 140px;
  }
  .recent-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .recent-search-wrap {
    max-width: 100%;
    min-width: 100%;
  }
}


