.experience-lab .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.experience-lab {
  padding-top: 100px;
  padding-bottom: 100px;
}
.experience-lab [hidden] {
  display: none !important;
}
.experience-lab .section-heading {
  align-items: flex-end;
  margin-bottom: 36px;
}
.experience-lab .section-heading > p {
  max-width: 350px;
  font-size: 17px;
  line-height: 1.8;
}
.idea-form {
  margin-bottom: 36px;
}
.idea-input-row {
  display: flex;
  min-height: 62px;
  background: #fff;
  border: 1px solid #c9cbc3;
  transition: border-color 0.2s;
}
.idea-input-row:focus-within {
  border-color: #ee693e;
  box-shadow: 0 0 0 1px #ee693e;
}
.idea-input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 16px 22px;
  background: transparent;
  color: #20271f;
  font: 500 17px/1.5 var(--sans);
  letter-spacing: -0.025em;
}
.idea-input-row input:focus {
  outline: none;
}
.idea-input-row input::placeholder {
  color: #93968c;
}
.idea-input-row > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  border: 0;
  background: #f36e40;
  color: #182016;
  padding: 14px 22px;
  font: 600 15px var(--sans);
  cursor: pointer;
}
.idea-input-row > button > span:last-child {
  font-size: 23px;
}
.idea-input-row > button:hover:not(:disabled) {
  background: #ff885b;
}
.idea-input-row > button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.idea-under {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.idea-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.idea-suggestions button {
  border: 1px solid #d3d5cc;
  border-radius: 30px;
  padding: 8px 13px;
  color: #65695f;
  background: transparent;
  font: 12px var(--sans);
  cursor: pointer;
}
.idea-suggestions button:hover:not(:disabled) {
  border-color: #6b7561;
  color: #263522;
  background: #e9ece3;
}
.idea-under > button {
  border: 0;
  padding: 10px 0 10px 12px;
  background: none;
  color: #65695f;
  font: 12px var(--sans);
  white-space: nowrap;
  cursor: pointer;
}
.creation-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin: -12px 0 22px;
  color: #58604f;
  font-size: 13px;
}
.creation-progress > button {
  margin-left: auto;
  border: 0;
  background: none;
  color: #6b7065;
  padding: 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.creation-indicator {
  display: inline-block;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  border: 1.5px solid #afb4a7;
  border-top-color: #576548;
  border-radius: 50%;
  animation: lab-spin 0.9s linear infinite;
}
@keyframes lab-spin {
  to {
    transform: rotate(360deg);
  }
}
.creation-status {
  margin: 0 0 20px;
  font-size: 13px;
  color: #656e5b;
  line-height: 1.7;
}
.creation-status:empty {
  display: none;
}
.creation-status.is-error,
.image-error {
  color: #9a3e25;
}
.experience-lab .lab-result {
  display: block;
  padding: 0;
  min-height: 0;
  background: none;
  border: 0;
}
.image-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.comparison-card {
  min-width: 0;
}
.comparison-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 32px;
}
.comparison-card h3 {
  margin: 0;
  font: 500 17px/1.2 var(--sans);
  color: #767c6e;
  letter-spacing: -0.035em;
}
.nextline-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 600;
  color: #283520;
  letter-spacing: -0.065em;
}
.nextline-card h3 > span {
  color: #ef6a3c;
  font-weight: 400;
}
#preview-status {
  color: #6a725f;
  font-size: 12px;
}
.comparison-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #e3e6dd;
  cursor: zoom-in;
}
.nextline-card .comparison-frame {
  box-shadow: 0 18px 45px -25px #23351d70;
}
.comparison-frame:disabled {
  cursor: default;
}
.comparison-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.comparison-frame:focus-visible {
  outline: 3px solid #f36e40;
  outline-offset: 5px;
}
.comparison-frame .image-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  background: #17211080;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.comparison-frame:not(:disabled):hover .image-zoom,
.comparison-frame:focus-visible .image-zoom {
  opacity: 1;
}
.comparison-pending {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 28px;
  color: #68745d;
  font: 14px/1.7 var(--sans);
  text-align: center;
}
.comparison-pending .creation-indicator {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
}
.nextline-card:has(.comparison-pending:not([hidden])) .comparison-frame {
  background: linear-gradient(125deg, #dce2d3, #edf0e8, #dee5d5);
  background-size: 200% 200%;
  animation: lab-wash 6s ease-in-out infinite alternate;
}
@keyframes lab-wash {
  to {
    background-position: 100% 100%;
  }
}
.comparison-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-height: 38px;
  padding-top: 14px;
}
.comparison-card footer a,
.comparison-card footer button {
  border: 0;
  background: none;
  padding: 0;
  font: 12px/1.6 var(--sans);
  color: #68715f;
  text-decoration: none;
  cursor: pointer;
}
.comparison-card footer a:hover,
.comparison-card footer button:hover {
  color: #e3653b;
}
.image-error {
  flex: 1 0 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}
.image-error:empty {
  display: none;
}
.image-detail,
.comparison-detail {
  margin: auto;
  padding: 22px;
  border: 0;
  color: #283322;
  background: #f3f4ef;
  max-height: 94dvh;
  overflow: auto;
}
.image-detail {
  width: min(850px, 94vw);
}
.image-detail::backdrop,
.comparison-detail::backdrop {
  background: #11180eda;
  backdrop-filter: blur(8px);
}
.image-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.image-detail-header h2 {
  margin: 0;
  font: 500 20px/1.4 var(--sans);
  letter-spacing: -0.04em;
}
.image-detail-header button {
  flex-shrink: 0;
  border: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  background: none;
  color: inherit;
  font-size: 30px;
  cursor: pointer;
}
.image-detail > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(94dvh - 110px);
  object-fit: contain;
}
.comparison-detail {
  width: min(740px, 94vw);
  padding: 28px;
}
.comparison-detail p {
  font-size: 14px;
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.comparison-detail h3 {
  font-size: 14px;
  margin: 26px 0 10px;
}
.comparison-detail .method-prompt {
  white-space: pre-wrap;
  background: #e8ebe1;
  padding: 18px;
  max-height: 260px;
  overflow: auto;
  word-break: normal;
}
.comparison-detail .method-note {
  color: #727a69;
  font-size: 12px;
  border-top: 1px solid #d5d9cd;
  padding-top: 16px;
}
@media (max-width: 900px) {
  .experience-lab {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .image-comparison {
    gap: 26px;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  }
}
@media (max-width: 620px) {
  .experience-lab {
    padding-top: 60px;
    padding-bottom: 60px;
  }
  .experience-lab .section-heading {
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 26px;
  }
  .experience-lab .section-heading > p {
    font-size: 14px;
    line-height: 1.7;
  }
  .idea-form {
    margin-bottom: 30px;
  }
  .idea-input-row {
    min-height: 54px;
  }
  .idea-input-row input {
    font-size: 16px;
    padding: 13px 12px;
  }
  .idea-input-row > button {
    gap: 8px;
    padding: 12px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .idea-input-row > button > span:last-child {
    font-size: 18px;
  }
  .idea-under {
    align-items: flex-start;
    gap: 8px;
  }
  .idea-suggestions {
    gap: 6px;
  }
  .idea-suggestions button {
    padding: 7px 10px;
    font-size: 11px;
  }
  .idea-under > button {
    padding-top: 7px;
    padding-left: 0;
    font-size: 11px;
  }
  .image-comparison {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .baseline-card {
    width: 68%;
    justify-self: end;
  }
  .comparison-card header {
    min-height: 24px;
    margin-bottom: 12px;
  }
  .nextline-card h3 {
    font-size: 28px;
  }
  .baseline-card h3 {
    font-size: 15px;
  }
  .comparison-card footer {
    min-height: 26px;
    padding-top: 10px;
  }
  .creation-progress {
    gap: 8px;
    font-size: 12px;
  }
  .comparison-detail {
    padding: 20px;
  }
  .image-detail-header h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .experience-lab *,
  .experience-lab *::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Actual in-progress images remain clearly marked until completion. */
.comparison-pending {
  background: #171a17;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}
.comparison-pending.over-image {
  background: #0009;
}
.comparison-pending .creation-indicator {
  border-color: #ffffff50;
  border-top-color: #fff;
}
.comparison-frame img,
#image-detail-image {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}
.idea-suggestions button[aria-pressed="true"] {
  background: #e1e5d9;
  border-color: #7b856f;
  color: #303c25;
}
.image-prompt {
  padding-top: 22px;
}
.prompt-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.prompt-heading h4 {
  margin: 0;
  color: #4f5a45;
  font: 500 13px/1.5 var(--sans);
}
.prompt-heading > span {
  flex-shrink: 0;
  color: #89917e;
  font: 11px/1.5 var(--mono);
}
.prompt-copy {
  margin: 0;
  color: #717869;
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  text-align: left;
}
.nextline-prompt .prompt-copy {
  max-height: 174px;
  overflow: hidden;
  mask-image: linear-gradient(#000 62%, transparent);
}
.nextline-prompt .prompt-copy.expanded {
  max-height: 430px;
  overflow-y: auto;
  mask-image: none;
}
#expand-prompt {
  border: 0;
  background: none;
  padding: 10px 0 0;
  color: #536147;
  font: 12px/1.5 var(--sans);
  cursor: pointer;
}
.comparison-card footer:has(.image-error:empty):has(button[hidden]) {
  display: none;
}
@media (max-width: 620px) {
  .image-prompt {
    padding-top: 16px;
  }
  .prompt-heading {
    flex-wrap: wrap;
    gap: 4px 10px;
  }
  .prompt-heading h4 {
    font-size: 12px;
  }
  .nextline-prompt .prompt-copy {
    max-height: 130px;
  }
}
