/* BiharFast Studio - Photoshop Style Online Photo & Document Editor */
/* Theme: Dark (#090d16), Accents (#34d399, #38bdf8, #a78bfa) */

.studio-page {
  padding-bottom: 80px;
}

/* Studio Hero Header */
.studio-hero {
  padding-top: 36px;
  padding-bottom: 24px;
  text-align: center;
}

.studio-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(100deg, rgb(16 185 129 / 12%), rgb(56 189 248 / 12%));
  border: 1px solid rgb(56 189 248 / 25%);
  color: var(--cyan);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.studio-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.studio-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.studio-hero p {
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  max-width: 680px;
  margin: 0 auto;
}

/* Mobile-First Hindi / Hinglish Status Badges Strip */
.studio-status-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.status-badge .badge-icon {
  font-size: 0.92rem;
  line-height: 1;
}

.status-badge .badge-dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.badge-bpsc {
  background: linear-gradient(135deg, rgb(16 185 129 / 16%), rgb(52 211 153 / 8%));
  border: 1px solid rgb(52 211 153 / 35%);
  color: #6ee7b7;
  box-shadow: 0 2px 12px rgb(16 185 129 / 12%);
}

.badge-limit {
  background: linear-gradient(135deg, rgb(56 189 248 / 16%), rgb(14 165 233 / 8%));
  border: 1px solid rgb(56 189 248 / 35%);
  color: #7dd3fc;
  box-shadow: 0 2px 12px rgb(56 189 248 / 12%);
}

.badge-offline {
  background: linear-gradient(135deg, rgb(167 139 250 / 16%), rgb(139 92 246 / 8%));
  border: 1px solid rgb(167 139 250 / 35%);
  color: #c4b5fd;
  box-shadow: 0 2px 12px rgb(167 139 250 / 12%);
}

/* Header Offline Ready Badge */
.header-offline-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(16 185 129 / 18%), rgb(52 211 153 / 10%));
  border: 1px solid rgb(52 211 153 / 35%);
  color: #6ee7b7;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  box-shadow: 0 0 14px rgb(52 211 153 / 15%);
  user-select: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.header-offline-pill .offline-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.header-offline-pill.is-offline {
  background: linear-gradient(135deg, rgb(56 189 248 / 20%), rgb(14 165 233 / 10%));
  border-color: rgb(56 189 248 / 40%);
  color: #7dd3fc;
  box-shadow: 0 0 14px rgb(56 189 248 / 20%);
}

.header-offline-pill.is-offline .offline-pulse-dot {
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

@media (max-width: 800px) {
  .header-offline-pill {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 0.7rem;
    gap: 6px;
  }
}

@media (max-width: 440px) {
  .header-offline-pill {
    padding: 3px 8px;
    font-size: 0.65rem;
    gap: 5px;
  }
  .header-offline-pill .offline-pulse-dot {
    width: 6px;
    height: 6px;
  }
}

/* App Main Container (2-Column Photoshop Workspace) */
.studio-workspace-container {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto 60px;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 24px;
  align-items: start;
}

/* Left Column: Live Canvas & Workspace */
.workspace-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  min-height: 640px;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.file-info-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.info-chip {
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.info-chip strong {
  color: var(--ink);
}

.info-chip.badge-green {
  background: rgb(52 211 153 / 10%);
  border-color: rgb(52 211 153 / 30%);
  color: var(--green);
}

.info-chip.badge-cyan {
  background: rgb(56 189 248 / 10%);
  border-color: rgb(56 189 248 / 30%);
  color: var(--cyan);
}

.viewport-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.icon-btn:hover:not(:disabled) {
  background: rgb(56 189 248 / 18%);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
}

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

/* Canvas Viewport */
.canvas-viewport {
  flex: 1;
  min-height: 440px;
  background: #060910;
  background-image: 
    linear-gradient(45deg, #0e1422 25%, transparent 25%), 
    linear-gradient(-45deg, #0e1422 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #0e1422 75%), 
    linear-gradient(-45deg, transparent 75%, #0e1422 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border-radius: 14px;
  border: 1px solid rgb(255 255 255 / 6%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
  padding: 24px;
}

/* Dropzone when no file selected */
.dropzone-overlay {
  text-align: center;
  padding: 40px 24px;
  border: 2px dashed rgb(56 189 248 / 35%);
  border-radius: 16px;
  background: rgb(18 25 40 / 60%);
  width: 100%;
  max-width: 520px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.dropzone-overlay:hover, .dropzone-overlay.drag-over {
  border-color: var(--green);
  background: rgb(52 211 153 / 8%);
  transform: scale(1.01);
  box-shadow: 0 0 30px rgb(52 211 153 / 15%);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(52 211 153 / 15%), rgb(56 189 248 / 15%));
  border: 1px solid rgb(56 189 248 / 30%);
  color: var(--cyan);
}

.dropzone-icon svg {
  width: 32px;
  height: 32px;
}

.dropzone-title {
  font-size: 1.15rem;
  font-weight: 750;
  margin: 0 0 6px;
  color: var(--ink);
}

.dropzone-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 18px;
}

.dropzone-badge-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.format-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgb(255 255 255 / 8%);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Canvas Element inside Viewport */
.canvas-wrapper {
  position: relative;
  display: none;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 12px 40px rgb(0 0 0 / 70%);
  transition: transform 0.15s ease-out;
  transform-origin: center center;
}

#studioCanvas {
  display: block;
  max-width: 100%;
  max-height: 520px;
  height: auto;
  border-radius: 4px;
  background: #fff;
}

/* Bottom Action Bar on Left Column */
.workspace-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  margin-top: 16px;
}

.output-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.output-size-pill {
  font-weight: 700;
  color: var(--green);
  background: rgb(52 211 153 / 10%);
  border: 1px solid rgb(52 211 153 / 25%);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

.output-size-pill.warning {
  color: var(--amber);
  background: rgb(245 158 11 / 10%);
  border-color: rgb(245 158 11 / 25%);
}

.bottom-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-secondary {
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover:not(:disabled) {
  background: rgb(255 255 255 / 12%);
  border-color: rgb(255 255 255 / 25%);
}

.btn-primary {
  background: var(--button-gradient);
  border: none;
  color: #04221d;
  font-weight: 750;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgb(16 185 129 / 30%);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgb(16 185 129 / 45%);
}

.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Right Column: Tabbed Control Panel */
.controls-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 92px;
  overflow: hidden;
}

/* Tabs Navigation Header */
.tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgb(10 14 24 / 95%);
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 14px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  text-align: center;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tab-btn:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 3%);
}

.tab-btn.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
  background: rgb(56 189 248 / 8%);
}

.tab-btn.active svg {
  opacity: 1;
  color: var(--green);
  transform: scale(1.1);
}

/* Tab Panes */
.tab-content {
  padding: 22px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeInPane 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Control Elements */
.control-section {
  margin-bottom: 22px;
}

.control-section:last-child {
  margin-bottom: 0;
}

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.control-label .val-tag {
  color: var(--cyan);
  font-family: ui-monospace, monospace;
  font-weight: 600;
  font-size: 0.8rem;
}

/* Preset Chips */
.presets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.preset-chip {
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.16s ease;
}

.preset-chip:hover {
  border-color: var(--cyan);
  color: var(--ink);
  background: rgb(56 189 248 / 10%);
}

.preset-chip.active {
  background: linear-gradient(135deg, rgb(52 211 153 / 22%), rgb(56 189 248 / 22%));
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 12px rgb(52 211 153 / 20%);
}

/* Custom Range Sliders */
.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.custom-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / 12%);
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgb(56 189 248 / 60%);
  border: 2px solid #fff;
  transition: transform 0.1s ease;
}

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

.range-val-input {
  width: 66px;
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-family: ui-monospace, monospace;
  text-align: right;
}

/* Text Inputs and Selects */
.input-text, .input-select {
  width: 100%;
  background: rgb(15 20 32 / 90%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 0.88rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.input-text:focus, .input-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgb(56 189 248 / 15%);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.input-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.field-sublabel {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgb(255 255 255 / 6%);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgb(255 255 255 / 15%);
  border-radius: 24px;
  transition: 0.25s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--green);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Alert Notification in Tab */
.tab-alert {
  background: rgb(56 189 248 / 10%);
  border: 1px solid rgb(56 189 248 / 25%);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #bce9ff;
  line-height: 1.5;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tab-alert.success {
  background: rgb(52 211 153 / 10%);
  border-color: rgb(52 211 153 / 25%);
  color: #a7f3d0;
}

.tab-alert.warning {
  background: rgb(245 158 11 / 10%);
  border-color: rgb(245 158 11 / 25%);
  color: #fde68a;
}

/* Crop Buttons Group */
.aspect-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.aspect-btn {
  background: rgb(255 255 255 / 5%);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 0.75rem;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.aspect-btn:hover {
  background: rgb(56 189 248 / 12%);
  border-color: var(--cyan);
  color: var(--ink);
}

.aspect-btn.active {
  background: rgb(52 211 153 / 18%);
  border-color: var(--green);
  color: var(--green);
}

/* PDF Multi-Page Document Compiler Styles */
.pdf-pages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
}

.pdf-empty-state {
  padding: 20px 14px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgb(255 255 255 / 2%);
  line-height: 1.5;
}

.pdf-page-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.pdf-page-card:hover {
  background: rgb(255 255 255 / 7%);
  border-color: rgb(56 189 248 / 30%);
}

.pdf-page-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(56 189 248 / 15%);
  color: var(--cyan);
  white-space: nowrap;
}

.pdf-page-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #000;
  flex-shrink: 0;
}

.pdf-page-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdf-page-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-page-meta {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

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

.pdf-page-action-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.pdf-page-action-btn:hover:not(:disabled) {
  background: rgb(56 189 248 / 20%);
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
}

.pdf-page-action-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.pdf-page-action-btn.btn-remove:hover {
  background: rgb(239 68 68 / 20%);
  border-color: #ef4444;
  color: #fca5a5;
}

/* PDF Progress Bar */
.pdf-progress-box {
  background: rgb(15 23 42 / 70%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.pdf-progress-bar {
  width: 100%;
  height: 7px;
  background: rgb(255 255 255 / 10%);
  border-radius: 999px;
  overflow: hidden;
}

.pdf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  border-radius: 999px;
  transition: width 0.25s ease-out;
}

.pdf-progress-text {
  font-size: 0.75rem;
  color: var(--cyan);
  margin-top: 6px;
  text-align: center;
  font-weight: 600;
}

/* PDF Mode Switcher */
.pdf-mode-switcher .aspect-btn.active {
  background: linear-gradient(135deg, rgb(52 211 153 / 18%), rgb(56 189 248 / 18%));
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgb(56 189 248 / 20%);
}

/* PDF to JPG Extracted Pages */
.pdf-extracted-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.pdf-extract-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.pdf-extract-card:hover {
  background: rgb(255 255 255 / 7%);
  border-color: rgb(56 189 248 / 30%);
}

.pdf-extract-thumb {
  width: 52px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgb(0 0 0 / 50%);
}

.pdf-extract-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pdf-extract-title {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--ink);
}

.pdf-extract-meta {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.pdf-extract-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.pdf-extract-actions .aspect-btn {
  padding: 6px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.pdf-extract-actions .btn-send-resizer {
  background: linear-gradient(135deg, rgb(16 185 129 / 20%), rgb(52 211 153 / 10%));
  border-color: rgb(52 211 153 / 40%);
  color: var(--green);
  font-weight: 700;
}

.pdf-extract-actions .btn-send-resizer:hover {
  background: var(--green);
  color: #090d16;
  border-color: var(--green);
}

/* SEO Content & Guides Section */
.studio-seo-section {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.guide-header {
  text-align: center;
  margin-bottom: 40px;
}

.guide-header .eyebrow {
  margin-bottom: 10px;
}

.guide-header h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.guide-header p {
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto;
  font-size: 1rem;
}

/* Feature & Trust Grid */
.trust-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 50px;
}

.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.trust-card:hover {
  transform: translateY(-3px);
  border-color: rgb(56 189 248 / 35%);
}

.trust-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(52 211 153 / 15%), rgb(56 189 248 / 15%));
  border: 1px solid rgb(56 189 248 / 30%);
  color: var(--cyan);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.trust-card h3 {
  font-size: 1.1rem;
  font-weight: 750;
  margin: 0 0 8px;
  color: var(--ink);
}

.trust-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

/* SEO Spec Table */
.spec-table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 50px;
  overflow-x: auto;
}

.spec-table-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.spec-table-card .table-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.seo-table th {
  padding: 12px 16px;
  background: rgb(255 255 255 / 4%);
  color: var(--cyan);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.seo-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgb(255 255 255 / 6%);
  color: var(--muted);
}

.seo-table tr:hover td {
  background: rgb(255 255 255 / 2%);
}

.seo-table td strong {
  color: var(--ink);
}

.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 650;
}

.tag-badge.badge-green {
  background: rgb(52 211 153 / 15%);
  color: var(--green);
}

.tag-badge.badge-blue {
  background: rgb(56 189 248 / 15%);
  color: var(--cyan);
}

/* Detailed Guide Articles */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.guide-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  display: flex;
  flex-direction: column;
}

.guide-article .article-badge {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.guide-article h3 {
  font-size: 1.2rem;
  font-weight: 750;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.35;
}

.guide-article p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 0 16px;
}

.step-list {
  padding-left: 20px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.8;
}

.step-list li strong {
  color: var(--ink);
}

/* FAQ Accordion */
.faq-section {
  max-width: 900px;
  margin: 0 auto;
}

.faq-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 10px;
}

.faq-subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 0.95rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgb(56 189 248 / 35%);
  box-shadow: 0 8px 30px rgb(0 0 0 / 25%);
}

.faq-question {
  padding: 18px 20px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--cyan);
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
  border-top: 1px solid rgb(255 255 255 / 4%);
  padding-top: 14px;
}

.faq-answer p:first-child {
  margin-top: 0;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer code {
  background: rgb(255 255 255 / 8%);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--green);
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

/* Hidden elements */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  
  .controls-card {
    position: static;
    top: auto;
  }

  .tab-content {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .studio-workspace-container {
    width: min(100% - 20px, 560px);
  }

  .workspace-card {
    padding: 16px;
    min-height: auto;
  }

  /* Sticky Compact Canvas Preview when photo is loaded */
  .workspace-card.has-file {
    position: sticky;
    top: 68px;
    z-index: 25;
    padding: 10px 12px;
    border-radius: 16px;
    margin-bottom: 14px;
    background: rgb(9 13 22 / 96%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgb(56 189 248 / 30%);
    box-shadow: 0 12px 36px rgb(0 0 0 / 80%);
  }

  .workspace-card.has-file .workspace-topbar {
    padding-bottom: 6px;
    margin-bottom: 6px;
    gap: 6px;
  }

  .workspace-card.has-file .file-info-tags {
    gap: 4px;
  }

  .workspace-card.has-file .info-chip {
    padding: 2px 6px;
    font-size: 0.68rem;
  }

  .workspace-card.has-file .viewport-controls {
    gap: 4px;
  }

  .workspace-card.has-file .viewport-controls .icon-btn {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
    border-radius: 6px;
  }

  .workspace-card.has-file #zoomLevelTag {
    display: none;
  }

  .workspace-card.has-file .canvas-viewport {
    min-height: 140px;
    max-height: 185px;
    padding: 6px;
    border-radius: 10px;
  }

  .workspace-card.has-file #studioCanvas {
    max-height: 170px;
    object-fit: contain;
  }

  .workspace-card.has-file .workspace-bottombar {
    padding-top: 8px;
    margin-top: 8px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .workspace-card.has-file .output-meta {
    font-size: 0.76rem;
    gap: 6px;
  }

  .workspace-card.has-file .output-size-pill {
    padding: 2px 8px;
    font-size: 0.76rem;
  }

  .workspace-card.has-file #targetStatusText {
    display: none;
  }

  .workspace-card.has-file .bottom-action-buttons {
    width: auto;
    display: flex;
    gap: 6px;
  }

  .workspace-card.has-file .bottom-action-buttons .btn-primary,
  .workspace-card.has-file .bottom-action-buttons .btn-secondary {
    padding: 7px 12px;
    font-size: 0.78rem;
    flex: none;
  }

  .canvas-viewport {
    min-height: 280px;
    padding: 16px;
  }

  .tabs-nav {
    grid-template-columns: repeat(4, 1fr);
  }

  .tab-btn {
    padding: 10px 2px;
    font-size: 0.7rem;
  }

  .tab-btn svg {
    width: 16px;
    height: 16px;
  }

  .dropzone-overlay {
    padding: 28px 16px;
  }

  .dropzone-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
  }

  .dropzone-icon svg {
    width: 26px;
    height: 26px;
  }

  .dropzone-title {
    font-size: 1rem;
  }

  .input-row, .input-row-3 {
    grid-template-columns: 1fr;
  }

  .workspace-bottombar {
    flex-direction: column;
    align-items: stretch;
  }

  .bottom-action-buttons {
    width: 100%;
  }

  .btn-primary, .btn-secondary {
    flex: 1;
    justify-content: center;
  }

  .spec-table-card {
    padding: 18px 14px;
  }

  .seo-table th, .seo-table td {
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  .trust-card, .guide-article {
    padding: 20px;
  }
}

/* Specific Optimizations for 360px - 430px Mobile Devices */
@media (max-width: 440px) {
  .studio-workspace-container {
    width: calc(100% - 14px);
    margin-bottom: 40px;
  }

  .studio-hero h1 {
    font-size: 1.85rem;
  }

  .studio-status-strip {
    gap: 6px;
    margin-top: 14px;
  }

  .status-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  .status-badge .badge-icon {
    font-size: 0.82rem;
  }

  .tab-btn {
    padding: 8px 1px;
    font-size: 0.65rem;
  }

  .tab-btn svg {
    width: 15px;
    height: 15px;
  }

  .workspace-card.has-file {
    padding: 8px 10px;
    top: 65px;
  }

  .workspace-card.has-file .canvas-viewport {
    min-height: 125px;
    max-height: 160px;
    padding: 4px;
  }

  .workspace-card.has-file #studioCanvas {
    max-height: 148px;
  }

  .workspace-card.has-file .file-info-tags {
    font-size: 0.65rem;
  }

  .tab-content {
    padding: 14px 12px;
  }

  /* Thumb-friendly range sliders for precise mobile touches */
  .custom-range {
    height: 8px;
  }

  .custom-range::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    box-shadow: 0 0 12px rgb(56 189 248 / 65%);
  }

  .custom-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
  }

  .preset-chip {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  .aspect-btn {
    padding: 7px 6px;
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   Cornerstone SEO Tool Guide Sections (Cheat-Sheets, Steps, Fixes, FAQs, Related)
   ========================================================================== */
.studio-guide-section {
  padding-block: 48px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 40px;
}

.guide-block {
  margin-bottom: 40px;
}

.guide-heading {
  font-size: 1.45rem;
  font-weight: 800;
  color: #f1f5fb;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-lead {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Cheat Sheet Table */
.spec-table-container {
  overflow-x: auto;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  background: rgba(16, 26, 43, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.spec-table th {
  background: rgba(15, 23, 42, 0.9);
  color: #f1f5fb;
  font-weight: 750;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.spec-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.table-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(52, 211, 153, 0.15);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.table-tag.blue {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.step-card {
  background: rgba(16, 26, 43, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 16px;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.step-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f1f5fb;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

/* Rejection Fixes Grid */
.fixes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.fix-card {
  background: rgba(16, 26, 43, 0.65);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 18px 16px;
}

.fix-card.solved {
  border-color: rgba(52, 211, 153, 0.3);
}

.fix-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 750;
  color: #fb7185;
  margin-bottom: 8px;
}

.fix-card.solved .fix-title {
  color: var(--green);
}

.fix-text {
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

/* Related Tools Bar */
.related-tools-box {
  background: linear-gradient(145deg, rgba(16, 26, 43, 0.7), rgba(9, 13, 22, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  padding: 24px 20px;
  margin-top: 40px;
}

.related-tools-header {
  margin-bottom: 16px;
}

.related-tools-header h3 {
  font-size: 1.15rem;
  font-weight: 750;
  color: #f1f5fb;
  margin: 0 0 4px;
}

.related-tools-header p {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0;
}

.related-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.related-tool-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  transition: all 0.2s ease;
}

.related-tool-pill:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--cyan);
  transform: translateY(-2px);
}

.related-tool-icon {
  font-size: 1rem;
}
