.browser-tool-page {
  background: #f4f7f9;
  color: #17212b;
  overflow-x: hidden;
}

.browser-tool-page .ad-placement [id^="aswift_"],
.browser-tool-page .ad-placement > .adsbygoogle {
  max-width: 100% !important;
  overflow: hidden !important;
  width: 100% !important;
}

.browser-tool-page .ad-placement {
  align-items: center;
  display: flex;
  justify-content: center;
  position: relative;
}

.browser-tool-page .ad-placement--after-tool {
  border-bottom: 1px solid #e1e8ec;
  border-top: 1px solid #e1e8ec;
  margin-bottom: 38px;
  margin-top: 46px;
  min-height: 150px;
}

.browser-tool-page .ad-placement--after-guide {
  margin-bottom: 16px;
  margin-top: 48px;
  min-height: 150px;
}

.browser-tool {
  margin: 0 auto;
  max-width: 1240px;
  padding: 22px 18px 56px;
}

.browser-tool-header {
  border-bottom: 1px solid #dce4e9;
  margin-bottom: 20px;
  padding: 8px 0 20px;
}

.browser-tool-header h1 {
  color: #102a2e;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

.browser-tool-header p {
  color: #4f5f69;
  font-size: 1.04rem;
  line-height: 1.65;
  margin: 9px 0 0;
  max-width: 820px;
  text-align: left;
}

.local-processing-note {
  align-items: center;
  background: #e9f6ef;
  border: 1px solid #b9ddc8;
  border-radius: 6px;
  color: #155b3d;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 11px;
}

.browser-tool-layout {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.browser-controls,
.browser-workspace {
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 8px;
}

.browser-controls {
  padding: 18px;
}

.browser-workspace {
  min-height: 430px;
  padding: 20px;
}

.control-group {
  border: 0;
  border-bottom: 1px solid #e6ecef;
  margin: 0 0 16px;
  padding: 0 0 16px;
}

.control-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.control-group legend,
.control-heading {
  color: #203039;
  float: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 9px;
  text-transform: uppercase;
  width: auto;
}

.control-label {
  color: #34444e;
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.control-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-stack {
  display: grid;
  gap: 12px;
}

.browser-tool input[type="number"],
.browser-tool input[type="text"],
.browser-tool select,
.browser-tool textarea {
  background: #fff;
  border: 1px solid #b9c5cc;
  border-radius: 6px;
  color: #17212b;
  font: inherit;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}

.browser-tool textarea {
  line-height: 1.5;
  min-height: 132px;
  resize: vertical;
}

.file-summary {
  color: #60717b;
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 9px 0 0;
  overflow-wrap: anywhere;
  text-align: left;
}

.control-help {
  color: #6a7a83;
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  margin-top: 6px;
}

.browser-tool input[type="color"] {
  background: #fff;
  border: 1px solid #b9c5cc;
  border-radius: 6px;
  cursor: pointer;
  height: 42px;
  padding: 4px;
  width: 100%;
}

.browser-tool input[type="range"] {
  accent-color: #087f5b;
  cursor: pointer;
  width: 100%;
}

.range-label {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.range-value {
  color: #087f5b;
  font-size: 0.86rem;
  font-weight: 800;
}

.file-picker {
  align-items: center;
  background: #f7fafb;
  border: 2px dashed #9eb0ba;
  border-radius: 8px;
  color: #354650;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 116px;
  padding: 18px;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}

.file-picker:hover,
.file-picker:focus-within {
  background: #eef7f3;
  border-color: #087f5b;
}

.file-picker strong {
  color: #102a2e;
}

.file-picker span {
  color: #63737d;
  font-size: 0.84rem;
}

.file-picker input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.browser-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.browser-btn {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.94rem;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  text-align: center;
}

.browser-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.browser-btn-primary {
  background: #087f5b;
  color: #fff;
}

.browser-btn-primary:hover {
  background: #066b4c;
  color: #fff;
}

.browser-btn-secondary {
  background: #fff;
  border-color: #aebbc3;
  color: #263740;
}

.browser-btn-secondary:hover {
  background: #f1f5f7;
  color: #17212b;
}

.browser-btn-danger {
  background: #fff5f3;
  border-color: #e8b2a8;
  color: #9b2c20;
}

.browser-btn-block {
  width: 100%;
}

.browser-status {
  background: #f1f5f7;
  border-left: 4px solid #2f80a0;
  border-radius: 4px;
  color: #354650;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-top: 14px;
  padding: 10px 12px;
  text-align: left;
}

.browser-status[data-state="error"] {
  background: #fff1ef;
  border-left-color: #c24130;
  color: #842718;
}

.browser-status[data-state="success"] {
  background: #eaf7ef;
  border-left-color: #087f5b;
  color: #155b3d;
}

.empty-workspace {
  align-items: center;
  color: #667781;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
  padding: 30px;
  text-align: center;
}

.empty-workspace strong {
  color: #253640;
  font-size: 1.1rem;
}

.empty-workspace p {
  margin: 5px 0 0;
  max-width: 480px;
  text-align: center;
}

.result-preview {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
}

.result-preview img {
  background-image:
    linear-gradient(45deg, #e8edef 25%, transparent 25%),
    linear-gradient(-45deg, #e8edef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8edef 75%),
    linear-gradient(-45deg, transparent 75%, #e8edef 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  border: 1px solid #dce4e9;
  border-radius: 6px;
  display: block;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  width: 100%;
}

.result-stats {
  display: grid;
  gap: 9px;
}

.result-stat {
  background: #f5f8fa;
  border-radius: 6px;
  padding: 11px;
}

.result-stat span {
  color: #687983;
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.result-stat strong {
  color: #17212b;
  display: block;
  font-size: 1rem;
  margin-top: 2px;
}

.canvas-stage {
  align-items: center;
  background: #20282d;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  min-height: 430px;
  overflow: hidden;
  padding: 18px;
}

.canvas-stage canvas {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  cursor: grab;
  display: block;
  height: auto;
  max-height: 660px;
  max-width: 100%;
  touch-action: none;
  width: auto;
}

.canvas-stage canvas:active {
  cursor: grabbing;
}

.canvas-stage .empty-workspace {
  color: #c4cfd4;
}

.canvas-stage .empty-workspace strong {
  color: #ffffff;
}

.social-editor-source,
.social-editor-options {
  box-shadow: 0 14px 34px rgba(26, 44, 54, 0.08);
}

.social-studio-page {
  background: #f3effa;
  color: #241b38;
}

.social-studio-page .browser-tool-header {
  border-bottom-color: #d9d0eb;
}

.social-studio-page .browser-tool-header h1 {
  color: #281451;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.72);
}

.social-studio-page .browser-tool-header p {
  color: #625a76;
}

.social-studio-page .local-processing-note {
  background: #eee8ff;
  border-color: #cfc0fa;
  color: #5635a5;
}

.social-studio-page .social-editor-source,
.social-studio-page .social-editor-options {
  background: #fffefe;
  border-color: #dcd3ec;
  box-shadow: 0 18px 42px rgba(62, 39, 104, 0.12);
}

.social-studio-page .control-group {
  border-bottom-color: #e7e0f1;
}

.social-studio-page .control-group legend {
  color: #432575;
}

.social-studio-page .control-label {
  color: #413852;
}

.social-studio-page .social-editor-source .file-picker {
  background: #faf8ff;
  border-color: #ad9bcf;
}

.social-studio-page .social-editor-source .file-picker:hover {
  background: #f2edff;
  border-color: #774bd7;
}

.social-studio-page .editor-tabs {
  background: #eee9f7;
  border-color: #d4c8e8;
}

.social-studio-page .editor-tab {
  color: #655a78;
}

.social-studio-page .editor-tab:hover {
  color: #6b3dd1;
}

.social-studio-page .editor-tab.is-active {
  background: #5d35bb;
  box-shadow: inset 0 -3px 0 #ff7468;
  color: #ffffff;
}

.social-studio-page .editor-panel input[type="range"] {
  accent-color: #7042d2;
}

.social-studio-page .editor-toggle input {
  accent-color: #7042d2;
}

.social-studio-page .browser-btn-primary {
  background: #6438c5;
  border-color: #6438c5;
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(100, 56, 197, 0.24);
}

.social-studio-page .browser-btn-primary:hover {
  background: #4f2ba5;
  border-color: #4f2ba5;
}

.social-studio-page .browser-btn-secondary {
  border-color: #bbaed0;
  color: #43296f;
}

.social-studio-page .browser-status[data-state="success"] {
  background: #e6f8f0;
  border-left-color: #168b68;
  color: #1d5f4d;
}

.social-studio-page .social-editor-workspace {
  background: #161124;
  border-color: #342653;
  box-shadow: 0 22px 52px rgba(38, 22, 68, 0.28);
}

.social-studio-page .social-editor-workspace .canvas-stage {
  background: #0d0a16;
  border-color: #49366f;
}

.social-studio-page .editor-safe-zone {
  border-color: rgba(255, 235, 231, 0.9);
}

.social-studio-page select:focus,
.social-studio-page input:focus,
.social-studio-page textarea:focus,
.social-studio-page button:focus-visible {
  border-color: #7449d0;
  outline: 3px solid rgba(116, 73, 208, 0.18);
  outline-offset: 2px;
}

.social-editor-layout > * {
  min-width: 0;
}

.social-editor-source {
  animation: editor-panel-enter 360ms ease-out both;
}

.social-editor-options {
  animation: editor-panel-enter 420ms 70ms ease-out both;
}

.social-editor-workspace {
  animation: editor-preview-enter 460ms 100ms ease-out both;
  background: #111a21;
  border-color: #2b3b45;
  box-shadow: 0 18px 42px rgba(9, 18, 24, 0.2);
}

.social-editor-workspace > .range-label strong {
  color: #ffffff;
}

.social-editor-workspace > .range-label .range-value {
  color: #5ee0ad;
}

.social-editor-workspace .canvas-stage {
  background: #090f14;
  border: 1px solid #31434e;
}

.social-editor-source .file-picker {
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.social-editor-source .file-picker:hover {
  background: #f4fbf8;
  border-color: #07966d;
  transform: translateY(-2px);
}

.editor-tabs {
  background: #edf2f4;
  border: 1px solid #d5dfe4;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
  padding: 4px;
}

.editor-tab {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #53636c;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  min-height: 38px;
  padding: 7px 4px;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.editor-tab:hover {
  color: #0b7257;
}

.editor-tab.is-active {
  background: #17252d;
  box-shadow: inset 0 -3px 0 #ff6b5f;
  color: #ffffff;
}

.editor-tab:active {
  transform: scale(0.97);
}

.editor-panel {
  animation: editor-control-enter 240ms ease-out both;
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.editor-panel[hidden] {
  display: none;
}

.editor-export-actions {
  border-top: 1px solid #e5ddef;
  margin-top: 22px;
  padding-top: 18px;
}

.editor-panel input[type="range"] {
  accent-color: #078a66;
}

.image-blur-tool {
  background: #f8f6fc;
  border: 1px solid #ddd5eb;
  border-radius: 7px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.image-blur-tool .control-label {
  margin-bottom: 0;
}

.blur-preset-grid {
  background: #eae5f3;
  border: 1px solid #d7cee7;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 3px;
}

.blur-preset {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #655a78;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  min-height: 34px;
  padding: 6px 4px;
}

.blur-preset.is-active {
  background: #6438c5;
  color: #ffffff;
}

.blur-preset:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.subject-protection-controls {
  border-top: 1px solid #ddd5eb;
  display: grid;
  gap: 10px;
  padding-top: 11px;
}

.subject-protection-controls > .control-label {
  color: #432575;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.editor-toggle {
  align-items: center;
  color: #34444e;
  cursor: pointer;
  display: flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 9px;
}

.editor-toggle input {
  accent-color: #078a66;
  height: 18px;
  width: 18px;
}

.canvas-preview-shell {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  max-height: 660px;
  max-width: 100%;
  position: relative;
}

.editor-safe-zone {
  border: 2px dashed rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 0 9999px rgba(7, 15, 20, 0.14);
  inset: 8% 6%;
  pointer-events: none;
  position: absolute;
}

.editor-safe-zone[hidden] {
  display: none;
}

.editor-safe-zone::before,
.editor-safe-zone::after {
  background: rgba(255, 255, 255, 0.56);
  content: "";
  position: absolute;
}

.editor-safe-zone::before {
  height: 1px;
  left: 0;
  right: 0;
  top: 50%;
}

.editor-safe-zone::after {
  bottom: 0;
  left: 50%;
  top: 0;
  width: 1px;
}

.canvas-stage canvas.is-layout-changing {
  animation: editor-canvas-change 380ms ease-out;
}

.canvas-stage canvas.has-text-overlay {
  cursor: move;
}

.canvas-stage.is-media-arriving {
  animation: studio-media-arrival 720ms ease-out;
}

@keyframes studio-media-arrival {
  0% {
    border-color: #ff7468;
    box-shadow: 0 0 0 0 rgba(255, 116, 104, 0.34);
  }
  45% {
    border-color: #8a62df;
    box-shadow: 0 0 0 9px rgba(112, 66, 210, 0.14);
  }
  100% {
    border-color: #49366f;
    box-shadow: 0 0 0 0 rgba(112, 66, 210, 0);
  }
}

@keyframes editor-panel-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes editor-preview-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes editor-control-enter {
  from {
    opacity: 0;
    transform: translateX(-7px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes editor-canvas-change {
  0% {
    opacity: 0.72;
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (min-width: 901px) {
  .social-editor-source {
    grid-column: 1;
    grid-row: 1;
  }

  .social-editor-options {
    grid-column: 1;
    grid-row: 2;
  }

  .social-editor-workspace {
    align-self: start;
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 16px;
  }

  .social-editor-workspace .canvas-stage {
    max-height: calc(100vh - 150px);
  }

  .social-editor-workspace .canvas-stage canvas {
    max-height: calc(100vh - 220px);
  }

  .social-editor-workspace .canvas-preview-shell {
    max-height: calc(100vh - 220px);
  }
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-list:not(:empty) + .empty-workspace,
.download-list:not(:empty) + .empty-workspace {
  display: none;
}

.queue-item {
  align-items: center;
  background: #f7fafb;
  border: 1px solid #dce4e9;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  padding: 9px;
}

.queue-thumb {
  background: #fff;
  border: 1px solid #e0e7eb;
  border-radius: 4px;
  height: 52px;
  object-fit: cover;
  width: 52px;
}

.queue-file {
  min-width: 0;
}

.queue-file strong,
.queue-file span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-file strong {
  color: #203039;
  font-size: 0.9rem;
}

.queue-file span {
  color: #73828b;
  font-size: 0.78rem;
}

.queue-actions {
  display: flex;
  gap: 5px;
}

.queue-action {
  background: #fff;
  border: 1px solid #b9c5cc;
  border-radius: 4px;
  color: #263740;
  cursor: pointer;
  font-size: 0.78rem;
  min-height: 32px;
  padding: 5px 8px;
}

.download-list {
  display: grid;
  gap: 9px;
  margin-top: 15px;
}

.pdf-preview-section {
  border-top: 1px solid #dce4e9;
  margin-top: 22px;
  padding-top: 20px;
}

.pdf-preview-section .empty-workspace {
  min-height: 190px;
  padding: 24px;
}

.pdf-page-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  margin-top: 12px;
}

.pdf-page-card {
  background: #f7fafb;
  border: 2px solid #d7e0e5;
  border-radius: 6px;
  color: #263740;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: 7px;
  position: relative;
  text-align: left;
}

button.pdf-page-card {
  cursor: pointer;
}

button.pdf-page-card:hover {
  border-color: #6696a6;
}

.pdf-page-card[aria-pressed="true"] {
  background: #eaf7ef;
  border-color: #087f5b;
  box-shadow: 0 0 0 2px rgba(8, 127, 91, 0.12);
}

.pdf-page-card.is-selected {
  background: #eaf7ef;
  border-color: #087f5b;
  box-shadow: 0 0 0 2px rgba(8, 127, 91, 0.12);
}

.pdf-page-card[aria-pressed="true"]::after,
.pdf-page-card.is-selected::after {
  align-items: center;
  background: #087f5b;
  border-radius: 4px;
  color: #fff;
  content: "Selected";
  display: flex;
  font-size: 0.65rem;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  position: absolute;
  right: 7px;
  top: 7px;
  width: 54px;
}

.pdf-page-select {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: block;
  padding: 0;
  text-align: left;
  width: 100%;
}

.pdf-page-select:focus-visible {
  outline: 3px solid rgba(47, 128, 160, 0.35);
  outline-offset: 3px;
}

.pdf-page-card[draggable="true"] {
  cursor: grab;
}

.pdf-page-card[draggable="true"]:active {
  cursor: grabbing;
}

.pdf-page-card.is-dragging {
  opacity: 0.45;
}

.pdf-page-card.is-drop-target {
  border-color: #2f80a0;
  box-shadow: 0 0 0 3px rgba(47, 128, 160, 0.16);
}

.pdf-page-image {
  align-items: center;
  aspect-ratio: 3 / 4;
  background: #e7edf0;
  border-radius: 3px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.pdf-page-image img {
  background: #fff;
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.pdf-page-card strong,
.pdf-page-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-page-actions {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.pdf-page-actions .queue-action {
  min-width: 0;
  width: 100%;
}

.pdf-page-placeholder {
  align-items: center;
  color: #6a7982;
  display: flex;
  font-size: 0.78rem;
  font-weight: 700;
  height: 100%;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

.pdf-page-card strong {
  font-size: 0.82rem;
  margin-top: 7px;
}

.pdf-page-card span {
  color: #6a7982;
  font-size: 0.74rem;
  margin-top: 2px;
}

.pdf-preview-note {
  color: #6a7982;
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 12px 0 0;
  text-align: left;
}

.download-item {
  align-items: center;
  background: #edf7f2;
  border: 1px solid #c6e2d2;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.download-item span {
  color: #214735;
  font-size: 0.9rem;
  font-weight: 700;
}

.image-utility-stage,
.qr-preview-stage {
  align-items: center;
  background: #f3f6f8;
  border: 1px solid #dce4e9;
  border-radius: 7px;
  display: flex;
  justify-content: center;
  margin-top: 14px;
  min-height: 360px;
  overflow: auto;
  padding: 18px;
}

.image-utility-stage canvas {
  background-image:
    linear-gradient(45deg, #e4eaed 25%, transparent 25%),
    linear-gradient(-45deg, #e4eaed 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e4eaed 75%),
    linear-gradient(-45deg, transparent 75%, #e4eaed 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  box-shadow: 0 8px 24px rgba(25, 45, 55, 0.12);
  height: auto;
  max-height: 620px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.qr-preview-stage img {
  background: #fff;
  border: 1px solid #d4dde2;
  box-shadow: 0 10px 28px rgba(25, 45, 55, 0.12);
  height: auto;
  max-width: 100%;
}

.qr-template-page .browser-tool-layout {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.qr-template-page .browser-workspace {
  min-height: 720px;
}

.qr-template-page .qr-preview-stage {
  background:
    linear-gradient(45deg, #e9edf0 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(-45deg, #e9edf0 25%, transparent 25%) 0 12px / 24px 24px,
    linear-gradient(45deg, transparent 75%, #e9edf0 75%) 12px -12px / 24px 24px,
    linear-gradient(-45deg, transparent 75%, #e9edf0 75%) -12px 0 / 24px 24px,
    #f8fafb;
  min-height: 650px;
}

.qr-template-page .qr-preview-stage canvas {
  background: #fff;
  box-shadow: 0 18px 42px rgba(19, 33, 42, 0.2);
  cursor: grab;
  display: block;
  height: auto;
  max-height: 860px;
  max-width: 100%;
  touch-action: none;
  user-select: none;
  width: auto;
}

.qr-template-page .qr-preview-stage canvas.is-dragging {
  cursor: grabbing;
}

.qr-template-page .qr-preview-stage canvas[hidden],
.qr-template-page .qr-preview-stage img[hidden] {
  display: none;
}

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

.qr-template-card {
  background: #f7fafb;
  border: 2px solid #d7e0e5;
  border-radius: 7px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  padding: 7px;
  position: relative;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.qr-template-card:hover {
  border-color: #79af9c;
  transform: translateY(-1px);
}

.qr-template-card:has(input:checked) {
  background: #eaf7ef;
  border-color: #087f5b;
  box-shadow: 0 0 0 2px rgba(8, 127, 91, 0.12);
}

.qr-template-card input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.qr-template-card strong {
  color: #293a43;
  font-size: 0.74rem;
  text-align: center;
}

.qr-template-mini {
  background: #fff;
  border-radius: 9px;
  display: block;
  height: 78px;
  overflow: hidden;
  position: relative;
}

.qr-template-mini::before,
.qr-template-mini::after,
.qr-template-mini i,
.qr-template-mini b {
  content: "";
  display: block;
  position: absolute;
}

.qr-template-mini::before {
  background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 50% / 8px 8px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16);
  height: 25px;
  width: 25px;
}

.qr-template-mini::after {
  background: currentColor;
  height: 3px;
  width: 44%;
}

.qr-template-card--plain .qr-template-mini::before {
  height: 42px;
  left: calc(50% - 25px);
  top: 10px;
  width: 42px;
}

.qr-template-card--plain .qr-template-mini::after {
  display: none;
}

.qr-template-card--menu-dark .qr-template-mini { background: linear-gradient(145deg, #090b0e, #252b31); color: #dcff5f; }

.qr-template-card--menu-dark .qr-template-mini::before { right: 10px; top: 24px; }
.qr-template-card--menu-dark .qr-template-mini::after { left: 9px; top: 17px; }
.qr-template-card--menu-dark .qr-template-mini i { background: #dcff5f; border-radius: 10px; bottom: 7px; height: 8px; left: 8px; right: 8px; }
.qr-template-card--menu-dark .qr-template-mini b { border: 2px solid #dcff5f; border-radius: 22px; height: 36px; right: 8px; top: 17px; width: 25px; }

.qr-template-card--menu-light .qr-template-mini { background: #f3eee6; color: #ff665c; }

.qr-template-card--menu-light .qr-template-mini::before { bottom: 8px; right: 8px; }
.qr-template-card--menu-light .qr-template-mini::after { left: 8px; top: 15px; }
.qr-template-card--menu-light .qr-template-mini i { background: linear-gradient(90deg, #7a6759, #d7a37c); border-radius: 7px; height: 24px; left: 8px; right: 8px; top: 33px; }

.qr-template-card--contact .qr-template-mini { background: linear-gradient(135deg, #5222c7, #a036db 55%, #ff6a5d); color: #ffcd70; }
.qr-template-card--contact .qr-template-mini::before { bottom: 7px; right: 7px; }
.qr-template-card--contact .qr-template-mini::after { left: 8px; top: 15px; }
.qr-template-card--contact .qr-template-mini i { background: rgba(24, 11, 52, 0.55); border: 1px solid rgba(255,255,255,.4); border-radius: 8px; inset: 6px; }

.qr-template-card--review .qr-template-mini { background: #ff6b5f; color: #1c1b1a; }
.qr-template-card--review .qr-template-mini::before { bottom: 8px; right: 9px; }
.qr-template-card--review .qr-template-mini::after { bottom: 25px; right: 8px; }
.qr-template-card--review .qr-template-mini i { background: #fff8ef; border-radius: 8px; inset: 6px; }
.qr-template-card--review .qr-template-mini b { background: #1c1b1a; border-radius: 10px; height: 10px; left: 12px; top: 33px; width: 34px; }

.qr-template-card--center .qr-template-mini { background: linear-gradient(#bca58d 0 43%, #151515 43%); color: #7df3c7; }
.qr-template-card--center .qr-template-mini::before { bottom: 10px; right: 9px; }
.qr-template-card--center .qr-template-mini::after { left: 9px; top: 13px; width: 55%; }
.qr-template-card--center .qr-template-mini i { background: #7df3c7; height: 5px; left: 9px; top: 28px; width: 38%; }

.qr-template-card--payment .qr-template-mini { background: radial-gradient(circle at 80% 15%, #4de3c1, transparent 45%), linear-gradient(145deg, #071c33, #005d68); color: #4de3c1; }
.qr-template-card--payment .qr-template-mini::before { left: 12px; top: 29px; }
.qr-template-card--payment .qr-template-mini::after { left: 10px; top: 14px; }
.qr-template-card--payment .qr-template-mini i { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 9px; inset: 22px 6px 6px; }

.compact-file-picker {
  align-items: center;
  background: #f7fafb;
  border: 1px dashed #9eb0ba;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px;
}

.compact-file-picker:hover,
.compact-file-picker:focus-within {
  background: #eef7f3;
  border-color: #087f5b;
}

.compact-file-picker strong,
.compact-file-picker span {
  display: block;
}

.compact-file-picker strong {
  color: #21333b;
  font-size: 0.84rem;
}

.compact-file-picker span {
  color: #6a7a83;
  font-size: 0.72rem;
  text-align: right;
}

.compact-file-picker input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.qr-layer-editor {
  background: linear-gradient(145deg, #eff8f4, #f8fbfc);
  border: 1px solid #c9ded5;
  border-radius: 9px;
  padding: 13px;
}

.qr-layer-editor .range-label:first-child {
  border-bottom: 1px solid #d9e7e1;
  margin-bottom: 10px;
  padding-bottom: 9px;
}

.qr-layer-editor input[type="range"] {
  accent-color: #087f5b;
  cursor: ew-resize;
  width: 100%;
}

.qr-preview-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.qr-preview-actions .control-help {
  margin: 0;
}

.utility-result-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.utility-guide {
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 8px;
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 34px;
  padding: 24px;
}

.utility-guide h2,
.utility-faq h2 {
  color: #19333a;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 5px 0 12px;
}

.utility-guide p,
.utility-guide li,
.utility-faq p {
  color: #52636d;
  line-height: 1.65;
  text-align: left;
}

.utility-guide ol {
  margin: 0;
  padding-left: 21px;
}

.utility-guide li + li {
  margin-top: 7px;
}

.utility-faq {
  border-top: 1px solid #dce4e9;
  margin-top: 34px;
  padding-top: 28px;
}

.utility-faq details {
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 7px;
  margin-top: 9px;
  padding: 13px 15px;
}

.utility-faq summary {
  color: #203039;
  cursor: pointer;
  font-weight: 800;
}

.utility-faq details p {
  margin: 10px 0 0;
}

.browser-tool-content {
  border-top: 1px solid #dce4e9;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  padding-top: 28px;
}

.browser-tool-content article {
  min-width: 0;
}

.browser-tool-content h2 {
  color: #19333a;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0;
}

.browser-tool-content p,
.browser-tool-content li {
  color: #52636d;
  line-height: 1.65;
  text-align: left;
}

.browser-tool-content ul,
.browser-tool-content ol {
  padding-left: 20px;
}

.related-pdf-tools {
  border-top: 1px solid #dce4e9;
  margin-top: 42px;
  padding-top: 32px;
}

.related-pdf-tools-heading {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.related-pdf-tools-heading h2 {
  color: #19333a;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 3px 0 0;
}

.related-pdf-tools-heading p {
  color: #61727c;
  font-size: 0.9rem;
  margin: 0;
  text-align: right;
}

.related-pdf-tools-kicker {
  color: #087f5b;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related-pdf-tools-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.related-pdf-tool {
  background: #fff;
  border: 1px solid #d5e0e5;
  border-radius: 8px;
  color: #17212b;
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 17px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.related-pdf-tool:hover,
.related-pdf-tool:focus-visible {
  border-color: #79af9c;
  box-shadow: 0 10px 24px rgba(19, 53, 47, 0.09);
  color: #17212b;
  transform: translateY(-2px);
}

.related-pdf-tool strong {
  color: #123f35;
  font-size: 1rem;
}

.related-pdf-tool > span:not(.related-pdf-tool-action) {
  color: #63737d;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-top: 7px;
}

.related-pdf-tool-action {
  color: #087f5b;
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: auto;
  padding-top: 14px;
}

.signature-pad {
  background: #fff;
  border: 1px dashed #8fa5b0;
  border-radius: 8px;
  cursor: crosshair;
  display: block;
  height: auto;
  max-width: 100%;
  touch-action: none;
  width: 100%;
}

.barcode-stage {
  align-items: center;
  background: #f6f9fa;
  border: 1px solid #d9e2e6;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  min-height: 430px;
  overflow: auto;
  padding: 32px;
}

.barcode-stage img {
  background: #fff;
  box-shadow: 0 14px 34px rgba(24, 44, 54, 0.13);
  height: auto;
  max-width: 100%;
}

.invoice-builder {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.invoice-controls,
.invoice-workspace,
.word-editor-panel,
.word-results-panel,
.unit-converter-card {
  background: #fff;
  border: 1px solid #d9e2e6;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(24, 44, 54, 0.07);
  padding: 20px;
}

.invoice-items-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.invoice-items {
  display: grid;
  gap: 8px;
}

.invoice-item-row {
  align-items: center;
  background: #f5f8f9;
  border: 1px solid #dce5e8;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 1fr) 70px 90px 90px 34px;
  padding: 8px;
}

.invoice-item-row input {
  min-width: 0;
}

.invoice-item-amount {
  color: #173a34;
  font-size: 0.82rem;
  text-align: right;
}

.invoice-item-remove {
  font-size: 1.2rem;
  line-height: 1;
  padding: 7px;
}

.invoice-preview {
  background: #fff;
  border: 1px solid #d5dfe3;
  box-shadow: 0 14px 34px rgba(24, 44, 54, 0.1);
  margin-top: 18px;
  min-height: 620px;
  padding: 38px;
}

.invoice-preview-heading,
.invoice-addresses {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr 1fr;
}

.invoice-preview-heading {
  border-bottom: 3px solid #087f5b;
  padding-bottom: 18px;
}

.invoice-preview-heading > div:last-child {
  display: grid;
  grid-template-columns: auto 1fr;
  justify-self: end;
  row-gap: 4px;
}

.invoice-preview-heading span,
.invoice-addresses > div > strong,
.invoice-notes > strong {
  color: #087f5b;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.invoice-preview-heading h2 {
  color: #173239;
  margin: 3px 0 0;
}

.invoice-addresses {
  margin: 28px 0;
}

.invoice-addresses p,
.invoice-notes p {
  color: #53656e;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 7px 0 0;
}

.invoice-preview-table {
  border-top: 1px solid #dce4e8;
}

.invoice-preview-row {
  border-bottom: 1px solid #e2e8eb;
  display: grid;
  font-size: 0.82rem;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) 55px 90px 100px;
  padding: 10px 4px;
}

.invoice-preview-row span:not(:first-child) {
  text-align: right;
}

.invoice-preview-row--head {
  background: #eff7f4;
  color: #173a34;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.invoice-total-box {
  display: grid;
  gap: 6px;
  justify-content: end;
  margin: 22px 0;
  min-width: 260px;
}

.invoice-total-box span {
  display: flex;
  gap: 34px;
  justify-content: space-between;
}

.invoice-grand-total {
  border-top: 2px solid #173a34;
  color: #087f5b;
  font-size: 1.12rem;
  margin-top: 5px;
  padding-top: 9px;
}

.word-counter-workspace {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
}

.word-editor-panel textarea {
  min-height: 520px;
  resize: vertical;
}

.word-metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.word-metric-grid > div {
  background: #f2f8f6;
  border: 1px solid #d7e7e1;
  border-radius: 8px;
  padding: 13px;
}

.word-metric-grid span,
.word-metric-grid strong {
  display: block;
}

.word-metric-grid span {
  color: #64747d;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.word-metric-grid strong {
  color: #123f35;
  font-size: 1.35rem;
  margin-top: 4px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyword-list span {
  background: #e5f4ee;
  border-radius: 999px;
  color: #185c4a;
  font-size: 0.78rem;
  padding: 6px 10px;
}

.unit-converter-workspace {
  display: grid;
  justify-items: center;
}

.unit-converter-card {
  max-width: 850px;
  width: 100%;
}

.unit-conversion-grid {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
}

.unit-conversion-grid select {
  margin-bottom: 8px;
}

.unit-conversion-grid input {
  font-size: 1.25rem;
  font-weight: 700;
  min-height: 56px;
}

.unit-swap {
  background: #087f5b;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 1.4rem;
  height: 44px;
  margin-bottom: 6px;
  width: 44px;
}

.conversion-formula {
  background: #eef7f3;
  border-left: 4px solid #087f5b;
  color: #24463f;
  margin-top: 18px;
  padding: 13px 15px;
}

@media (max-width: 900px) {
  .browser-tool-layout,
  .result-preview {
    grid-template-columns: 1fr;
  }

  .qr-template-page .browser-tool-layout {
    grid-template-columns: 1fr;
  }

  .qr-template-page .browser-workspace {
    min-height: 560px;
  }

  .invoice-builder,
  .word-counter-workspace {
    grid-template-columns: 1fr;
  }

  .browser-tool-content {
    grid-template-columns: 1fr;
  }

  .utility-guide {
    grid-template-columns: 1fr;
  }

  .related-pdf-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browser-workspace {
    min-height: 330px;
  }

  .social-editor-source,
  .social-editor-options,
  .social-editor-workspace {
    grid-column: 1;
    grid-row: auto;
  }

  .empty-workspace {
    min-height: 280px;
  }
}

@media (max-width: 520px) {
  .browser-tool {
    padding: 16px 10px 40px;
  }

  .browser-controls,
  .browser-workspace {
    padding: 14px;
  }

  .browser-tool-page .ad-placement--after-tool,
  .browser-tool-page .ad-placement--after-guide {
    margin-bottom: 30px;
    margin-top: 34px;
    min-height: 120px;
  }

  .related-pdf-tools-heading {
    align-items: start;
    flex-direction: column;
    gap: 7px;
  }

  .related-pdf-tools-heading p {
    text-align: left;
  }

  .related-pdf-tools-grid {
    grid-template-columns: 1fr;
  }

  .related-pdf-tool {
    min-height: 140px;
  }

  .control-row {
    grid-template-columns: 1fr;
  }

  .invoice-item-row {
    grid-template-columns: 1fr 1fr;
  }

  .invoice-item-description {
    grid-column: 1 / -1;
  }

  .invoice-item-amount {
    text-align: left;
  }

  .invoice-preview {
    min-height: 0;
    overflow-x: auto;
    padding: 20px 14px;
  }

  .invoice-preview-heading,
  .invoice-addresses {
    grid-template-columns: 1fr;
  }

  .invoice-preview-heading > div:last-child {
    justify-self: start;
  }

  .invoice-preview-row {
    min-width: 560px;
  }

  .word-metric-grid {
    grid-template-columns: 1fr;
  }

  .unit-conversion-grid {
    grid-template-columns: 1fr;
  }

  .unit-swap {
    justify-self: center;
    transform: rotate(90deg);
  }

  .queue-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .queue-thumb {
    height: 44px;
    width: 44px;
  }

  .queue-actions {
    grid-column: 1 / -1;
  }

  .canvas-stage {
    min-height: 280px;
    padding: 8px;
  }

  .image-utility-stage,
  .qr-preview-stage {
    min-height: 270px;
    padding: 10px;
  }

  .qr-template-page .qr-preview-stage {
    min-height: 480px;
  }

  .utility-result-stats {
    grid-template-columns: 1fr;
  }

  .editor-tabs {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    min-width: 0;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-editor-source,
  .social-editor-options,
  .social-editor-workspace,
  .editor-panel,
  .canvas-stage canvas.is-layout-changing {
    animation: none;
  }

  .canvas-stage.is-media-arriving {
    animation: none;
  }

  .social-editor-source .file-picker,
  .editor-tab {
    transition: none;
  }
}

/* Advanced browser workspaces */
.browser-tool--wide { max-width: 1480px; }

.advanced-workbench,
.cleaner-workbench {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
}

.advanced-sidebar,
.advanced-preview-panel,
.cleaner-upload-card,
.cleaner-report-card {
  background: #fff;
  border: 1px solid #d8e3e6;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(24, 51, 57, .08);
  padding: 22px;
}

.advanced-preview-panel { min-width: 0; }
.advanced-preview-heading,
.advanced-preview-actions,
.cleaner-report-heading,
.pdf-editor-stage-toolbar,
.pdf-editor-footer {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.advanced-preview-heading strong,
.advanced-preview-heading span { display: block; }
.advanced-preview-heading span,
.advanced-preview-actions span { color: #667982; font-size: .82rem; }
.preview-legend { align-items: center; color: #60717a; display: flex; font-size: .75rem; gap: 7px; }
.transparency-swatch { background-color: #fff; background-image: linear-gradient(45deg,#dfe5e8 25%,transparent 25%),linear-gradient(-45deg,#dfe5e8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe5e8 75%),linear-gradient(-45deg,transparent 75%,#dfe5e8 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; border: 1px solid #ccd7dc; display: inline-block; height: 22px; width: 22px; }

.transparent-stage {
  align-items: center;
  background-color: #fff;
  background-image: linear-gradient(45deg,#e6ebed 25%,transparent 25%),linear-gradient(-45deg,#e6ebed 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e6ebed 75%),linear-gradient(-45deg,transparent 75%,#e6ebed 75%);
  background-position: 0 0,0 12px,12px -12px,-12px 0;
  background-size: 24px 24px;
  border: 1px solid #d5dfe3;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  margin-top: 14px;
  min-height: 590px;
  overflow: auto;
  padding: 22px;
}

.transparent-stage canvas { box-shadow: 0 14px 34px rgba(24,44,54,.15); height: auto; max-height: 700px; max-width: 100%; width: auto; }
.advanced-preview-actions { margin-top: 14px; }
.model-download-note { background: #f2f8f6; border-left: 4px solid #087f5b; color: #45615a; font-size: .78rem; line-height: 1.5; margin-top: 14px; padding: 10px 12px; }
.file-picker.is-dragging { background: #e5f5ef; border-color: #087f5b; box-shadow: 0 0 0 4px rgba(8,127,91,.1); }

.cleaner-workbench { grid-template-columns: minmax(0, .85fr) minmax(340px, 1.15fr); }
.cleaner-upload-card { align-content: start; display: grid; min-height: 500px; }
.file-picker--large { align-content: center; justify-items: center; min-height: 330px; text-align: center; }
.file-picker--large strong { font-size: 1.1rem; }
.file-picker--large span { text-align: center; }
.file-picker-icon { align-items: center; background: #e3f4ed; border-radius: 50%; color: #087f5b; display: flex !important; font-size: 1.4rem !important; height: 62px; justify-content: center; margin-bottom: 12px; width: 62px; }
.metadata-file-card { align-items: center; background: #f4f8f9; border: 1px solid #d7e2e6; border-radius: 10px; display: grid; gap: 13px; grid-template-columns: 60px minmax(0,1fr) auto; padding: 15px; }
.metadata-file-card strong,
.metadata-file-card span { display: block; overflow-wrap: anywhere; }
.metadata-file-card span { color: #6a7a82; font-size: .78rem; margin-top: 3px; }
.metadata-file-icon { align-items: center; background: #153b36; border-radius: 9px; color: #fff; display: flex; font-size: .73rem; font-weight: 900; height: 60px; justify-content: center; }
.cleaner-report-heading h2 { color: #19333a; font-size: 1.35rem; margin: 3px 0 0; }
.cleaner-local-badge { background: #e4f5ee; border-radius: 999px; color: #087f5b; font-size: .72rem; font-weight: 900; padding: 7px 10px; text-transform: uppercase; }
.cleaner-check-list { display: grid; gap: 11px; margin: 20px 0; }
.cleaner-check-list > div { align-items: start; background: #f7fafb; border: 1px solid #dce5e8; border-radius: 9px; display: grid; gap: 11px; grid-template-columns: 27px minmax(0,1fr); padding: 12px; }
.cleaner-check { align-items: center; background: #daf1e7; border-radius: 50%; color: #087f5b; display: flex; font-weight: 900; height: 25px; justify-content: center; }
.cleaner-check-list strong { color: #23383e; font-size: .86rem; }
.cleaner-check-list p { color: #64767e; font-size: .76rem; line-height: 1.5; margin: 3px 0 0; }
.cleaner-result { background: #eaf7f2; border: 1px solid #c5e5d9; border-radius: 9px; color: #315a4f; margin-top: 14px; padding: 13px; }
.cleaner-result strong,
.cleaner-result span { display: block; }
.cleaner-result span { font-size: .8rem; margin-top: 4px; }
.cleaner-result p { font-size: .76rem; margin: 7px 0 0; }
.cleaner-warning { background: #fff9e7; border: 1px solid #eadb9a; border-radius: 9px; color: #645a2d; font-size: .82rem; line-height: 1.55; margin-top: 18px; padding: 13px 15px; }

.pdf-editor-shell { background: #e9eef0; border: 1px solid #cfdadd; border-radius: 14px; box-shadow: 0 18px 44px rgba(24,44,54,.12); overflow: hidden; }
.pdf-editor-toolbar { align-items: center; background: #153a36; color: #fff; display: grid; gap: 18px; grid-template-columns: minmax(190px,auto) 1fr auto; padding: 12px 16px; }
.pdf-editor-file { cursor: pointer; margin: 0; }
.pdf-editor-file strong,
.pdf-editor-file span { display: block; }
.pdf-editor-file strong { font-size: .82rem; }
.pdf-editor-file span { color: #bdd5cf; font-size: .69rem; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-editor-file input,
.pdf-editor-image input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.pdf-editor-tools { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.pdf-editor-tool { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: 7px; color: #fff; cursor: pointer; font-size: .76rem; font-weight: 800; padding: 8px 12px; }
.pdf-editor-tool:hover,
.pdf-editor-tool.is-active { background: #fff; color: #17443a; }
.pdf-editor-history { display: flex; gap: 6px; }
.pdf-editor-history .queue-action { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.25); color: #fff; }
.pdf-editor-history .queue-action:disabled { opacity: .42; }
.pdf-editor-body { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 760px; }
.pdf-editor-properties { background: #fff; border-right: 1px solid #ced9dd; padding: 18px; }
.property-heading strong { color: #173c36; display: block; margin-top: 4px; }
.property-panel { border-bottom: 1px solid #dfe7ea; color: #5d7078; font-size: .8rem; line-height: 1.55; padding: 16px 0; }
.property-panel textarea { resize: vertical; }
.pdf-editor-page-list { margin-top: 17px; }
.pdf-editor-page-list > div { display: grid; gap: 6px; margin-top: 7px; max-height: 360px; overflow-y: auto; }
.pdf-editor-page-list button { align-items: center; background: #f6f9fa; border: 1px solid #dce5e8; border-radius: 7px; color: #31464e; display: grid; gap: 7px; grid-template-columns: 29px 1fr 7px; padding: 8px; text-align: left; }
.pdf-editor-page-list button span { align-items: center; background: #e1e9ec; border-radius: 5px; display: flex; font-size: .68rem; font-weight: 900; height: 29px; justify-content: center; }
.pdf-editor-page-list button strong { font-size: .76rem; }
.pdf-editor-page-list button em { background: #c8d4d8; border-radius: 50%; height: 7px; width: 7px; }
.pdf-editor-page-list button.is-active { background: #e8f5f0; border-color: #6cac98; color: #0e5e49; }
.pdf-editor-page-list button.is-active em { background: #087f5b; }
.pdf-editor-stage-wrap { min-width: 0; padding: 16px; }
.pdf-editor-stage-toolbar { color: #53666e; font-size: .78rem; margin-bottom: 10px; }
.pdf-editor-stage-toolbar strong { color: #1b343b; }
.pdf-editor-stage { align-items: start; background: #dbe2e5; border: 1px solid #c8d3d7; border-radius: 8px; display: flex; justify-content: center; min-height: 670px; overflow: auto; padding: 22px; }
.pdf-editor-canvas-wrap { box-shadow: 0 12px 30px rgba(20,43,51,.18); position: relative; }
.pdf-editor-canvas-wrap canvas { display: block; }
#pdfEditorOverlay { cursor: default; left: 0; position: absolute; top: 0; touch-action: none; }
#pdfEditorOverlay[data-mode="text"],
#pdfEditorOverlay[data-mode="image"] { cursor: copy; }
#pdfEditorOverlay[data-mode="highlight"] { cursor: crosshair; }
#pdfEditorOverlay[data-mode="draw"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='3' fill='%23d23b3b'/%3E%3C/svg%3E") 12 12, crosshair; }
.pdf-editor-footer { background: #fff; border-top: 1px solid #cedadd; padding: 15px 18px; }
.pdf-editor-footer strong,
.pdf-editor-footer span { display: block; }
.pdf-editor-footer strong { color: #1a353b; }
.pdf-editor-footer span { color: #657780; font-size: .76rem; margin-top: 3px; }

@media (max-width: 980px) {
  .advanced-workbench,
  .cleaner-workbench { grid-template-columns: 1fr; }
  .transparent-stage { min-height: 430px; }
  .pdf-editor-toolbar { grid-template-columns: 1fr; }
  .pdf-editor-tools { justify-content: flex-start; }
  .pdf-editor-body { grid-template-columns: 1fr; }
  .pdf-editor-properties { border-bottom: 1px solid #ced9dd; border-right: 0; }
  .pdf-editor-page-list > div { grid-template-columns: repeat(4,minmax(0,1fr)); max-height: none; }
}

@media (max-width: 560px) {
  .advanced-sidebar,
  .advanced-preview-panel,
  .cleaner-upload-card,
  .cleaner-report-card { padding: 14px; }
  .transparent-stage { min-height: 300px; padding: 9px; }
  .advanced-preview-heading,
  .advanced-preview-actions,
  .cleaner-report-heading,
  .pdf-editor-footer { align-items: flex-start; flex-direction: column; }
  .metadata-file-card { grid-template-columns: 48px minmax(0,1fr); }
  .metadata-file-card .queue-action { grid-column: 1 / -1; }
  .pdf-editor-page-list > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pdf-editor-stage-wrap { padding: 8px; }
  .pdf-editor-stage { min-height: 430px; padding: 8px; }
  .pdf-editor-tools { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pdf-editor-tool { text-align: center; }
}

/* Layered social and print design studios */
.design-studio { background: #dfe6e8; border: 1px solid #cbd6da; border-radius: 14px; box-shadow: 0 20px 50px rgba(21,47,53,.13); overflow: hidden; }
.design-topbar { align-items: center; background: #102f2c; color: #fff; display: grid; gap: 18px; grid-template-columns: minmax(220px,1fr) auto minmax(220px,1fr); padding: 12px 16px; }
.design-document-name { align-items: center; display: flex; gap: 11px; min-width: 0; }
.design-app-mark { align-items: center; background: linear-gradient(145deg,#34d399,#0d9488); border-radius: 8px; display: flex; font-size: .75rem; font-weight: 900; height: 34px; justify-content: center; width: 34px; }
.design-document-name strong,
.design-document-name span { display: block; }
.design-document-name strong { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-document-name div > span { color: #a9c8c1; font-size: .69rem; margin-top: 2px; }
.design-history,
.design-export { align-items: center; display: flex; gap: 7px; }
.design-export { justify-content: flex-end; }
.design-export select { min-height: 39px; width: 105px; }
.design-icon-button { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.19); border-radius: 6px; color: #fff; font-size: .72rem; font-weight: 800; padding: 8px 11px; }
.design-icon-button:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.design-icon-button:disabled { opacity: .38; }
.design-body { display: grid; grid-template-columns: 245px minmax(420px,1fr) 285px; min-height: 760px; }
.design-left-panel,
.design-right-panel { background: #fff; min-width: 0; padding: 17px; }
.design-left-panel { border-right: 1px solid #cdd8dc; }
.design-right-panel { border-left: 1px solid #cdd8dc; }
.design-panel-heading { align-items: end; display: flex; justify-content: space-between; margin: 20px 0 9px; }
.design-panel-heading h2 { color: #20383e; font-size: 1.05rem; margin: 2px 0 0; }
.design-template-list { display: grid; gap: 8px; max-height: 560px; overflow-y: auto; padding-right: 3px; }
.design-template-list > button { align-items: center; background: #f7fafb; border: 1px solid #d8e2e5; border-radius: 9px; color: #243a41; display: grid; gap: 10px; grid-template-columns: 62px minmax(0,1fr); padding: 8px; text-align: left; }
.design-template-list > button:hover,
.design-template-list > button.is-active { background: #ecf8f4; border-color: #65ab95; box-shadow: 0 5px 15px rgba(22,83,68,.08); }
.design-template-list strong,
.design-template-list small { display: block; }
.design-template-list strong { font-size: .78rem; }
.design-template-list small { color: #6b7c84; font-size: .66rem; margin-top: 2px; }
.design-template-preview { background: linear-gradient(145deg,var(--template-a),var(--template-b)); border-radius: 6px; display: block; height: 48px; overflow: hidden; position: relative; }
.design-template-preview i { background: var(--template-c); height: 7px; left: 7px; position: absolute; top: 8px; width: 25px; }
.design-template-preview b { border: 3px solid rgba(255,255,255,.8); border-left: 0; border-right: 0; height: 20px; left: 7px; position: absolute; top: 19px; width: 38px; }
.design-template-preview em { background: rgba(255,255,255,.25); border-radius: 50%; height: 30px; position: absolute; right: -7px; top: -5px; width: 30px; }
.design-safe-note { align-items: start; background: #fff8e7; border: 1px solid #eadca7; border-radius: 8px; display: grid; gap: 9px; grid-template-columns: 12px 1fr; margin-top: 16px; padding: 10px; }
.design-safe-note > span { background: #d19b17; border-radius: 50%; height: 9px; margin-top: 4px; width: 9px; }
.design-safe-note strong { color: #5a4a1f; font-size: .72rem; }
.design-safe-note p { color: #766837; font-size: .66rem; line-height: 1.45; margin: 2px 0 0; }
.design-canvas-column { min-width: 0; padding: 14px; }
.design-canvas-toolbar { align-items: center; color: #4e626a; display: flex; font-size: .73rem; gap: 12px; justify-content: space-between; margin-bottom: 10px; }
.design-canvas-toolbar > div { display: flex; gap: 6px; }
.queue-action--danger { color: #b42318; }
.design-canvas-stage { align-items: center; background: #cfd8dc; background-image: radial-gradient(#aebbc0 1px,transparent 1px); background-size: 18px 18px; border: 1px solid #c1cdd1; border-radius: 8px; display: flex; justify-content: center; min-height: 680px; overflow: auto; padding: 24px; }
.design-canvas-shell { box-shadow: 0 16px 38px rgba(18,41,48,.2); max-height: 650px; max-width: 100%; position: relative; }
.design-canvas-shell canvas { display: block; height: auto; max-height: 650px; max-width: 100%; touch-action: none; width: auto; }
.design-safe-area { border: 2px dashed rgba(255,255,255,.68); bottom: 6%; box-shadow: 0 0 0 1px rgba(15,23,42,.28); left: 6%; pointer-events: none; position: absolute; right: 6%; top: 6%; }
.design-control-tabs { border-bottom: 1px solid #d8e2e5; display: grid; grid-template-columns: repeat(3,1fr); margin: -3px -2px 16px; }
.design-control-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: #66777f; font-size: .75rem; font-weight: 900; padding: 10px 4px; }
.design-control-tabs button.is-active { border-bottom-color: #087f5b; color: #087f5b; }
.design-control-panel { min-width: 0; }
.design-add-grid { display: grid; gap: 7px; grid-template-columns: repeat(2,1fr); }
.design-add-grid button { align-items: center; background: #f4f8f9; border: 1px solid #d8e3e6; border-radius: 8px; color: #253a41; display: flex; flex-direction: column; gap: 4px; min-height: 70px; padding: 8px; }
.design-add-grid button:hover { background: #eaf6f2; border-color: #76b29f; }
.design-add-grid strong { color: #0d6a53; font-size: 1rem; }
.design-add-grid span { font-size: .7rem; font-weight: 800; }
.design-upload-button { align-items: center; background: #fff; border: 1px dashed #91a6ae; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; margin-top: 9px; min-height: 52px; padding: 9px 11px; }
.design-upload-button:hover { background: #eef8f4; border-color: #087f5b; }
.design-upload-button strong,
.design-upload-button span { display: block; }
.design-upload-button strong { color: #284047; font-size: .75rem; }
.design-upload-button span { color: #71828a; font-size: .64rem; text-align: right; }
.design-upload-button input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.design-qr-box { border-top: 1px solid #dce5e8; margin-top: 15px; padding-top: 14px; }
.design-qr-box input { margin-bottom: 8px; }
.design-no-selection { align-items: center; background: #f6f9fa; border: 1px dashed #b5c3c8; border-radius: 9px; color: #697b83; display: flex; flex-direction: column; min-height: 230px; justify-content: center; padding: 24px; text-align: center; }
.design-no-selection strong { color: #354b53; }
.design-no-selection p { font-size: .74rem; line-height: 1.55; margin: 7px 0 0; }
.design-palette-grid { display: grid; gap: 8px; grid-template-columns: repeat(2,1fr); margin-top: 18px; }
.design-palette-grid button { background: linear-gradient(90deg,var(--p1) 0 34%,var(--p2) 34% 67%,var(--p3) 67%); border: 2px solid #fff; border-radius: 7px; box-shadow: 0 0 0 1px #cbd7db; height: 40px; }
.design-palette-grid button:hover { box-shadow: 0 0 0 2px #087f5b; }

@media (max-width: 1180px) {
  .design-body { grid-template-columns: 215px minmax(380px,1fr); }
  .design-right-panel { border-left: 0; border-top: 1px solid #cdd8dc; grid-column: 1 / -1; }
  .design-control-panel { max-width: 760px; }
  .design-canvas-stage { min-height: 590px; }
}

@media (max-width: 780px) {
  .design-topbar { grid-template-columns: 1fr; }
  .design-history,
  .design-export { justify-content: flex-start; }
  .design-body { grid-template-columns: 1fr; }
  .design-left-panel { border-bottom: 1px solid #cdd8dc; border-right: 0; }
  .design-template-list { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: none; }
  .design-canvas-column { padding: 8px; }
  .design-canvas-stage { min-height: 420px; padding: 8px; }
  .design-canvas-toolbar { align-items: flex-start; flex-direction: column; }
  .design-canvas-toolbar > div { flex-wrap: wrap; }
}

@media (max-width: 460px) {
  .design-template-list { grid-template-columns: 1fr; }
  .design-export { align-items: stretch; flex-direction: column; }
  .design-export select { width: 100%; }
}
