.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.studio-action {
  grid-template-columns: minmax(0, 1fr);
}

.studio-action-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.studio-action-controls .analyze-button {
  min-width: 0;
  flex: 1 1 auto;
}

.daily-limit-badge {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: .04em;
  opacity: .78;
}

.analyze-button > b {
  margin-left: 9px;
}

.new-research-link {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 8px 2px;
  border: 0;
  background: transparent;
  color: #d9e9dc;
  font-size: 13px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.new-research-link:hover,
.new-research-link:focus-visible {
  color: #fff;
}

.new-research-link:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 419px) {
  .studio-action-controls {
    flex-wrap: wrap;
    gap: 4px;
  }

  .studio-action-controls .analyze-button {
    flex-basis: 100%;
  }

  .new-research-link {
    margin-inline: auto;
  }
}

.studio-settings {
  display: grid;
  place-items: center;
}

.studio-settings svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.studio-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.prompt-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border: 1px solid rgba(169, 214, 111, .48);
  border-radius: 999px;
  background: rgba(169, 214, 111, .12);
  color: #d6efb5;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .75px;
  white-space: nowrap;
}

.hero-copy .speed-headline > span,
.hero-copy .speed-headline > em {
  display: block;
  white-space: normal;
  font-size: 1em;
  line-height: inherit;
  letter-spacing: inherit;
}

.closing .speed-claim {
  font-size: clamp(44px, 5vw, 76px);
  line-height: .94;
  letter-spacing: -.045em;
}

.closing .speed-claim > span,
.closing .speed-claim > em {
  display: block;
  white-space: normal;
}

@media (max-width: 680px) {
  .closing .speed-claim {
    font-size: clamp(32px, 8.4vw, 40px);
  }
}

@media (max-width: 360px) {
  .closing .speed-claim {
    font-size: clamp(25px, 7.8vw, 30px);
  }
}

footer p a {
  text-decoration: underline;
  text-underline-offset: .2em;
}

.optional-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #d9e4dd !important;
  font-size: 10px !important;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .8px !important;
}

.briefing-toggle {
  width: 100%;
  min-height: 58px;
  padding: 0;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.briefing-toggle small {
  color: #b7c8be;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.briefing-toggle i {
  margin-left: auto;
  color: var(--lime);
  font-size: 22px;
  font-style: normal;
  transition: transform .2s ease;
}

.briefing.open .briefing-toggle i {
  transform: rotate(45deg);
}

.briefing-body[hidden] {
  display: none;
}

@media (max-width: 819px) {
  .briefing textarea {
    min-height: 180px;
    max-height: 55dvh;
    resize: none;
    overflow-y: auto;
  }

}

.task-progress {
  position: relative;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.task-progress[hidden] {
  display: none;
}

.task-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.task-progress-head strong {
  flex: 0 0 auto;
  color: #d6efb5;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.task-progress-track {
  position: relative;
  height: 8px;
  margin-top: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}

.task-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8fbe59, #c7eb91);
  box-shadow: 0 0 16px rgba(169, 214, 111, .35);
  transition: width .25s ease;
}

.task-progress.indeterminate .task-progress-track i {
  width: 38%;
  animation: task-scan 1.35s ease-in-out infinite;
}

.task-progress.complete .task-progress-track i {
  width: 100%;
}

.task-progress.failed {
  border-color: rgba(255, 157, 144, .45);
  background: rgba(151, 45, 35, .22);
}

.task-progress.failed .task-progress-track i {
  background: #ff9d90;
  box-shadow: none;
}

.task-progress > p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  color: #c4d2ca;
  font-size: 12px;
  line-height: 1.45;
}

.task-progress time {
  margin-left: auto;
  color: #fff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.task-pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(169, 214, 111, .45);
  animation: task-pulse 1.4s ease-out infinite;
}

.task-progress.complete .task-pulse {
  animation: none;
}

.task-progress.failed .task-pulse {
  background: #ff9d90;
  animation: none;
}

@keyframes task-scan {
  from { transform: translateX(-115%); }
  to { transform: translateX(275%); }
}

@keyframes task-pulse {
  0% { box-shadow: 0 0 0 0 rgba(169, 214, 111, .45); }
  70% { box-shadow: 0 0 0 7px rgba(169, 214, 111, 0); }
  100% { box-shadow: 0 0 0 0 rgba(169, 214, 111, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .task-progress.indeterminate .task-progress-track i,
  .task-pulse {
    animation-duration: 3s;
  }
}

.story-optional {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  margin: 0 3px;
  padding: 3px 7px;
  border: 1px solid #b9caa6;
  border-radius: 999px;
  background: #edf3e3;
  color: #496a3f;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .65px;
  text-transform: uppercase;
  vertical-align: 1px;
}

.results-head h2 em {
  display: block;
  margin-top: 7px;
  color: #709b43;
  font-style: normal;
}

.result-rationale {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid currentColor;
  color: inherit;
  opacity: .78;
}

.result-rationale strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.editable-result {
  cursor: text;
  caret-color: currentColor;
}

.editable-result:focus {
  outline: none;
}

.autosave-field {
  --autosave-feedback-right: -13px;
}

.autosave-rich-field .editable-result {
  padding-right: 38px;
}

.autosave-rich-field {
  --autosave-feedback-top: 16px;
}

.result-rationale-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.result-card .result-rationale-details {
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 1;
}

.result-card .result-rationale-details > summary {
  min-height: 44px;
  padding: 7px 0;
  list-style: none;
  cursor: pointer;
  font-size: inherit;
}

.result-card .result-rationale-details > summary::-webkit-details-marker {
  display: none;
}

.result-card .result-rationale-details > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.result-card .result-rationale-details[open] > summary::after {
  content: "−";
}

.result-card .result-rationale-details > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.result-edit-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.result-rationale > .result-edit-status {
  margin: 0 0 12px;
}

.result-edit-status[hidden] {
  display: none;
}

.result-edit-status small {
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.result-edit-status button {
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}

.result-edit-status button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.result-rationale p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.65;
}

.result-card .result-link {
  color: inherit;
  font-weight: 750;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

.result-card .result-link:hover,
.result-card .result-link:focus-visible {
  text-decoration-thickness: 2px;
}

.device-code-copy {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}

.method-panel .device-code-copy strong {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  user-select: all;
  -webkit-user-select: all;
  -webkit-touch-callout: default;
  cursor: text;
}

.method-panel .device-code-copy button {
  flex: 0 0 auto;
  min-height: 48px;
  padding-inline: 13px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 359px) {
  .device-code-copy {
    align-items: stretch;
    flex-direction: column;
  }
}

.download-all {
  height: 52px;
  min-height: 52px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  font-weight: 800;
}

.download-all b {
  color: var(--lime);
  font-size: 20px;
}

.download-all:disabled {
  opacity: .5;
  cursor: wait;
}

.workshop-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 9px;
}

.workshop-action {
  position: relative;
  display: inline-flex;
}

.workshop-actions button span {
  color: inherit;
  font-size: inherit;
  letter-spacing: inherit;
}

.workshop-action > small[role="tooltip"] {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 12;
  width: max-content;
  max-width: min(280px, 80vw);
  padding: 8px 10px;
  border-radius: 9px;
  background: #173d31;
  color: #fff;
  box-shadow: 0 8px 24px #173d3133;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s, transform .16s;
}

.workshop-action > button:hover + small,
.workshop-action > button:focus-visible + small {
  opacity: 1;
  transform: translateY(0);
}

.folder-action {
  display: none;
}

.save-all {
  height: 52px;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid #315c4c;
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.save-all b { color: #709b43; font-size: 18px; }
.save-all:disabled { opacity: .45; cursor: wait; }

.workshop-status {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 1001;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #d6ddcf;
  border-radius: 999px;
  background: #fffef9ee;
  color: var(--ink);
  box-shadow: 0 14px 45px #173d3133;
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  transform: translateX(-50%);
  animation: drag-status-in .2s ease-out;
}

.workshop-status[hidden] { display: none; }
.workshop-status i { width: 20px; height: 20px; display: inline-flex; flex:0 0 20px; align-items:center; justify-content:center; font-style:normal; line-height:1; }
.workshop-status.waiting i { border: 2px solid #d6dfcd; border-top-color: #709b43; border-radius: 50%; animation: drag-spin .7s linear infinite; }
.workshop-status.success i::before { content: "✓"; color: #709b43; font-size: 21px; line-height:1; transform:translateY(-1px); }
.workshop-status.cancelled i::before { content: "×"; color: #9d5b43; font-size: 24px; font-weight: 500; line-height:1; transform:translateY(-1px); }

@keyframes drag-spin { to { transform: rotate(360deg); } }
@keyframes drag-status-in { from { opacity: 0; transform: translate(-50%,-8px) scale(.96); } }

@media (min-width: 1000px), (any-hover: hover) and (any-pointer: fine) {
  .folder-action:not([hidden]) { display: inline-flex; }
}

.precision-pointer .folder-action:not([hidden]) { display: inline-flex; }

.optimized-grid {
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: none;
  gap: 8px;
}

.optimized-card {
  position: relative;
  flex: 0 0 74px;
  width: 74px;
  padding: 4px;
  border-radius: 10px;
}

.optimized-card img {
  border-radius: 7px;
}

.connection.degraded i {
  background: #d49252;
  box-shadow: 0 0 0 4px #d492521f;
}

.connection.unavailable {
  border-color: #c5635b;
  color: #8f302a;
}

.connection.unavailable i {
  background: #c64038;
  box-shadow: 0 0 0 4px #c6403820;
}

.provider-status {
  margin: 13px 0 0;
  color: #365d4e;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.provider-status.connected::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #71a747;
}

.budget-warning {
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid #e2aaa5;
  border-radius: 9px;
  background: #fff1ef;
  color: #8d302a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.method.budget-exhausted {
  border-color: #d59791;
  background: #fff3f1;
}

.method.budget-exhausted small {
  color: #9b4038;
  font-weight: 750;
}

.job-stack {
  overflow: hidden;
  border: 1px solid #d5dbce;
  border-radius: 18px;
  background: rgba(255, 254, 249, .72);
}

.job-stack > summary {
  min-height: 70px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.job-stack > summary::-webkit-details-marker {
  display: none;
}

.job-stack > summary > span {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.job-stack > summary small {
  color: #73866f;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: 1.1px;
}

.job-stack > summary strong {
  font-size: 16px;
  line-height: 1.3;
}

.job-stack > summary > b {
  min-width: 31px;
  height: 31px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e1eccf;
  color: #476b38;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.job-stack > summary > i {
  color: #709b43;
  font-size: 23px;
  font-style: normal;
  line-height: 1;
  transition: transform .2s ease;
}

.job-stack[open] > summary > i {
  transform: rotate(45deg);
}

.job-list {
  min-width: 0;
  max-height: 344px;
  padding: 0 10px 10px;
  display: grid;
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

.job-list.is-swiping,
.job-list.is-swipe-animating {
  will-change: transform, opacity;
  user-select: none;
}

.job-list.is-swiping {
  cursor: grabbing;
}

@media (max-width: 819px) {
  .job-list {
    max-height: none;
    overflow-x: clip;
    overflow-y: visible;
    touch-action: pan-y;
  }
}

.job-entry {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 76px;
  padding: 11px 12px;
  border: 1px solid #dde1d7;
  border-radius: 12px;
  background: #fffef9;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "copy action";
  align-items: center;
  gap: 12px;
  overflow: hidden;
  text-align: left;
}

.job-entry.has-preview {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-areas: "preview copy action";
}

.job-entry-preview {
  grid-area: preview;
  display: block;
  width: 46px;
  height: 46px;
  border: 1px solid #d8ded1;
  border-radius: 50%;
  background: #e8ebe2;
  object-fit: cover;
}

.job-entry:hover,
.job-entry:focus-visible {
  border-color: #83a866;
  background: #f7faef;
  outline: none;
}

.job-entry.is-selected,
.job-entry[aria-current="true"] {
  border-color: #5f8f42;
  background: #edf5df;
  box-shadow: none;
}

.job-entry:disabled {
  cursor: wait;
  opacity: .58;
}

.job-entry > span {
  grid-area: copy;
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.job-entry-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.job-entry-meta > small:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-publication-state {
  flex: none;
  padding: 3px 6px;
  border-radius: 999px;
  background: #dfeccb;
  color: #315f4b !important;
  font-size: 9px !important;
  font-weight: 850;
  line-height: 1 !important;
}

.job-publication-state.is-dirty {
  background: #f8dfc9;
  color: #8a421d !important;
}

.job-entry strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.job-entry small {
  color: #718077;
  font-size: 11px;
  line-height: 1.4;
}

.job-entry .job-image-input,
.result-input-audit {
  color: #55704f;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.job-entry .job-savings {
  color: #315f4b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-input-audit {
  margin-top: 10px;
}

.job-entry > b {
  grid-area: action;
  flex: 0 0 auto;
  max-width: 100px;
  padding: 7px 9px;
  border-radius: 999px;
  background: #edf3e4;
  color: #4c6d43;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-entry > .job-selection-indicator {
  background: #315f4b;
  color: #fff;
}

.job-empty {
  margin: 0;
  padding: 14px 12px 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.job-stack-pagination {
  min-height: 46px;
  padding: 5px 2px 0;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
}

.job-stack-pagination button {
  width: 38px;
  height: 38px;
  border: 1px solid #d5dbce;
  border-radius: 50%;
  background: #fffef9;
  color: var(--ink);
  font-weight: 850;
}

.job-stack-pagination button:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.job-stack-pagination span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

@media (min-width: 820px) {
  .hero {
    min-height: auto;
  }
}

@media (min-width: 820px) and (max-width: 999px) {

  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .job-list {
    max-height: none;
    overflow-x: clip;
    overflow-y: visible;
  }

  .hero-copy {
    max-width: 680px;
    padding-bottom: 0;
  }

  .studio,
  .job-stack {
    width: 100%;
    max-width: none;
  }
}

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    align-items: stretch;
    align-content: start;
    column-gap: 54px;
    row-gap: 46px;
  }

  .hero-copy {
    width: min(100%, 1180px);
    max-width: 1180px;
    padding-bottom: 0;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    text-align: center;
  }

  .hero-left {
    min-width: 0;
    min-height: 0;
    grid-column: 1;
    grid-row: 2;
    align-self: stretch;
    display: flex;
    align-items: flex-start;
  }

  .hero-copy h1 {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(48px, 5.2vw, 76px);
    letter-spacing: -4px;
  }

  .hero-copy .trust-line {
    justify-content: center;
    margin-bottom: 0;
  }

  .studio {
    height: 100%;
    grid-column: 2;
    grid-row: 2;
  }

  .job-stack {
    width: 100%;
    height: auto;
  }

  .job-stack[open] {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .job-stack[open] .job-list {
    min-height: 0;
    height: 100%;
    max-height: none;
  }

  .download-all {
    min-width: 150px;
    justify-self: end;
  }

  .save-all { min-width: 170px; }
  .workshop-actions { justify-content: flex-end; }

  .optimized-card {
    flex-basis: 82px;
    width: 82px;
  }

}

@media (max-width: 999px) {
  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-left {
    display: contents;
  }

  .hero-copy {
    order: 1;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .hero-copy .trust-line {
    justify-content: center;
  }

  .studio {
    order: 2;
  }

  .job-stack {
    order: 3;
    margin-top: 18px;
  }
}

/* Runde Icon-Bedienelemente bleiben auch in engen Flex-Layouts echte Kreise. */
.studio-settings,
.preview button,
.dialog-head button,
.job-stack-pagination button {
  box-sizing: border-box;
  flex: none;
  aspect-ratio: 1;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  line-height: 1;
}

.preview button svg,
.dialog-head button svg,
.job-stack-pagination button svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview button svg {
  width: 15px;
  height: 15px;
}

.dialog-head button svg {
  width: 21px;
  height: 21px;
}

html.modal-open,
body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.modal-open {
  position: fixed;
  right: 0;
  left: 0;
  width: 100%;
}

.setup-dialog {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.setup-dialog::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.setup-dialog .dialog-content {
  overflow: visible;
}

/* Bildwerkstatt und finales Feedback tauschen ihre bisherigen Flächen. */
.result-layout > .image-workshop {
  min-width: 0;
  height: auto;
  margin-top: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 820px) {
  /* The labeled delivery select needs a stable text rail; below this breakpoint the cards stack. */
  .result-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  }

  .result-layout > .image-workshop {
    grid-area: feedback;
  }
}

.result-layout > .image-workshop header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.result-layout > .image-workshop h3 {
  margin: 7px 0 10px;
  font-size: clamp(20px, 2vw, 26px);
}

.result-layout > .image-workshop .workshop-actions {
  width: 100%;
  margin-top: 18px;
}

.result-layout > .image-workshop .workshop-action {
  flex: 1 1 120px;
}

.result-layout > .image-workshop .download-all,
.result-layout > .image-workshop .save-all {
  width: 100%;
  min-width: 0;
}

.result-layout > .image-workshop .optimized-grid {
  box-sizing: border-box;
  width: 100%;
  max-height: none;
  margin-top: 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr));
  gap: 8px;
  align-content: start;
  overflow: visible;
}

.result-layout > .image-workshop .optimized-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  flex: none;
}

.result-layout > .image-workshop .optimized-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

button.sortable-image-remove {
  position: absolute;
  z-index: 9;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #d5ddce;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  box-shadow: 0 4px 12px #173d3126;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

button.sortable-image-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

button.sortable-image-remove:disabled,
.excluded-optimized-image:disabled {
  opacity: .45;
  cursor: wait;
}

.excluded-optimized-images {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #cfd8c8;
}

.excluded-optimized-images > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#excluded-optimized-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.excluded-optimized-image {
  width: 92px;
  min-height: 44px;
  padding: 5px;
  border: 1px solid #cfd8c8;
  border-radius: 12px;
  background: #f5f6ef;
  color: var(--green);
  text-align: left;
}

.excluded-optimized-image img {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  opacity: .58;
  filter: saturate(.55);
}

.excluded-optimized-image span {
  display: block;
  padding: 6px 2px 2px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.sortable-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e9df;
}

.sortable-image-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: inherit;
}

.sortable-image-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: visible;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.image-slot-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: inherit;
  background: linear-gradient(110deg, #e2e7dc 18%, #eef1e8 34%, #e2e7dc 50%);
  background-size: 220% 100%;
  animation: image-slot-loading 1.1s linear infinite;
}

.preview.is-loading .image-slot-placeholder,
.optimized-card.is-loading .image-slot-placeholder {
  height: 100%;
}

.sortable-image-tile.is-loading .sortable-image-frame {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}

@keyframes image-slot-loading { to { background-position-x: -220%; } }

@media (prefers-reduced-motion: reduce) {
  .image-slot-placeholder { animation: none; }
}

.sortable-image-card[data-sortable="true"] [data-sort-handle] {
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.sortable-image-card[data-sortable="true"] [data-sort-handle] img {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.sortable-image-position {
  position: absolute;
  z-index: 4;
  left: 7px;
  bottom: 7px;
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #f7f8f2e8;
  color: var(--green);
  box-shadow: 0 1px 5px #173d3124;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.optimized-image-feedback {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef3e4;
  color: #55704f;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.65);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.optimized-image-feedback[data-state="saving"] {
  animation: optimized-save-pulse .8s ease-in-out infinite alternate;
}

.optimized-image-feedback[data-state="saved"] {
  background: var(--green);
  color: #fff;
  animation: optimized-save-check .5s cubic-bezier(.2, 1.7, .45, 1) both;
}

.optimized-image-feedback[data-state="error"] {
  background: #fff0e8;
  color: #a63f35;
  animation: optimized-save-check .35s ease-out both;
}

@keyframes optimized-save-pulse {
  to { opacity: .5; transform: translate(-50%, -50%) scale(.82); }
}

@keyframes optimized-save-check {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-18deg); }
  70% { transform: translate(-50%, -50%) scale(1.18) rotate(3deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .optimized-image-feedback { animation: none !important; transform: translate(-50%, -50%); }
}

.sortable-image-card[data-sortable="true"] {
  position: relative;
  isolation: isolate;
  transition: opacity .15s, transform .15s, box-shadow .15s;
}
.sortable-image-card.is-press-selected {
  z-index: 3;
  opacity: 1;
  box-shadow: 0 0 0 4px #6f9f43;
}
.sortable-image-grid.is-drag-active .sortable-image-card:not(.is-dragging):not(.is-drop-target) { opacity: .58; }
.sortable-image-card.is-dragging {
  z-index: 3;
  opacity: 1;
  box-shadow: 0 0 0 4px #6f9f43, 0 14px 28px #173d3133;
  transform: scale(.96) rotate(-1deg);
}
.sortable-image-card.is-dragging::after {
  content: "Ausgewählt";
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 5px 15px #173d3140;
  font-size: 10px;
  font-weight: 900;
  pointer-events: none;
}
.sortable-image-card.is-dragging [data-sort-handle] { cursor: grabbing; }
.sortable-image-card.is-drop-target {
  z-index: 2;
  opacity: 1;
  box-shadow: none;
  transition: none;
}
.sortable-image-card.is-drop-target::before {
  content: "";
  position: absolute;
  z-index: 7;
  border-radius: 999px;
  background: #659a35;
  box-shadow: 0 0 0 3px #f5f4ed, 0 3px 12px #173d3140;
  pointer-events: none;
}
.sortable-image-card.is-drop-target::after {
  content: attr(data-drop-label);
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 5px 15px #173d3140;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
  pointer-events: none;
}
.sortable-image-card.is-drop-before[data-drop-axis="horizontal"]::before,
.sortable-image-card.is-drop-after[data-drop-axis="horizontal"]::before {
  top: -5px;
  bottom: -5px;
  width: 5px;
}
.sortable-image-card.is-drop-before[data-drop-axis="horizontal"]::before { left: 1px; }
.sortable-image-card.is-drop-after[data-drop-axis="horizontal"]::before { right: 1px; }
.sortable-image-card.is-drop-before[data-drop-axis="vertical"]::before,
.sortable-image-card.is-drop-after[data-drop-axis="vertical"]::before {
  left: -5px;
  right: -5px;
  height: 5px;
}
.sortable-image-card.is-drop-before[data-drop-axis="vertical"]::before { top: 1px; }
.sortable-image-card.is-drop-after[data-drop-axis="vertical"]::before { bottom: 1px; }

.sortable-image-position.is-order-preview {
  background: #dfeeca;
  box-shadow: 0 0 0 2px #f5f4ed, 0 0 0 4px #78a94d;
}

.feedback-card {
  margin-top: 12px;
  padding: 22px;
}

.feedback-details > summary {
  color: #b7cabf;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.feedback-details > summary strong {
  font-size: inherit;
}

.feedback-details .result-value {
  max-width: 1050px;
  margin: 18px 0 4px;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.55;
  letter-spacing: -.2px;
}

/* Keep the divider rules full-width while aligning their copy with the result tiles. */
.promise {
  display: block;
  padding: 0;
}

.promise-inner {
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.support-edit-banner {
  position: sticky;
  top: 68px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 13px var(--frontend-content-inset);
  border-bottom: 1px solid #9dbc68;
  background: #eaf4d6;
  color: #174d3e;
  box-shadow: 0 8px 24px rgba(23, 77, 62, .12);
}

.support-edit-banner > div { min-width: 0; margin-right: auto; }
.support-edit-banner span, .support-edit-banner strong, .support-edit-banner small { display: block; }
.support-edit-banner span { font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.support-edit-banner strong { margin-top: 3px; font-size: 15px; }
.support-edit-banner small { margin-top: 3px; color: #587264; font-size: 12px; overflow-wrap: anywhere; }
.support-edit-banner nav { display: flex; gap: 8px; }
.support-edit-banner a { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid #174d3e; border-radius: 999px; color: #174d3e; font-size: 13px; font-weight: 850; text-decoration: none; white-space: nowrap; }
.support-edit-banner a:last-child { background: #174d3e; color: white; }
.support-edit-banner[hidden] { display: none !important; }
.support-edit-active { scroll-padding-top: 160px; }

@media (max-width: 760px) {
  .support-edit-banner { position: relative; align-items: stretch; flex-direction: column; gap: 10px; }
  .support-edit-banner nav { display: grid; grid-template-columns: 1fr; }
  .support-edit-banner a { width: 100%; }
}

@media (min-width: 820px) {
  .support-edit-banner { top: 78px; }
}
