.photo-studio-page {
  display: grid;
  gap: 18px;
  max-width: 1500px;
}

.photo-studio-head { align-items: flex-start; }
.photo-studio-head .eyebrow-mini { display: block; margin-bottom: 6px; color: #9ddfd7; }

.photo-studio-private {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(79, 218, 204, .25);
  border-radius: 999px;
  color: #8ee9df;
  background: rgba(50, 183, 171, .08);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.photo-studio-private .line-icon { width: 17px; height: 17px; }

.photo-studio-card {
  padding: clamp(16px, 2.4vw, 26px);
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(85, 204, 193, .07), transparent 30%),
    radial-gradient(circle at 0 100%, rgba(144, 91, 232, .08), transparent 32%),
    var(--panel, var(--surface));
}

.photo-studio-drop {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  width: 100%;
  min-height: 330px;
  padding: 36px 20px;
  border: 1px dashed rgba(118, 229, 216, .38);
  border-radius: 20px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(79, 218, 204, .055), rgba(139, 92, 246, .07)), rgba(7, 7, 12, .5);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.photo-studio-drop > .line-icon {
  width: 62px;
  height: 62px;
  padding: 16px;
  margin-bottom: 5px;
  border: 1px solid rgba(103, 227, 214, .3);
  border-radius: 19px;
  color: #7ce7dc;
  background: rgba(67, 201, 188, .1);
}

.photo-studio-drop:hover,
.photo-studio-drop:focus-visible,
.photo-studio-drop.is-dragging {
  border-color: #65ded1;
  outline: none;
  background: linear-gradient(135deg, rgba(79, 218, 204, .11), rgba(139, 92, 246, .12));
  box-shadow: 0 0 0 4px rgba(79, 218, 204, .055);
}

.photo-studio-drop.is-dragging { transform: scale(.995); }
.photo-studio-drop strong { font-size: clamp(19px, 2vw, 25px); }
.photo-studio-drop span { color: var(--text-2); font-size: 14px; }
.photo-studio-drop small { margin-top: 8px; color: var(--text-3); }

.photo-studio-working {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 7, 12, .48);
}

.photo-studio-working > div { display: grid; gap: 4px; }
.photo-studio-working small { color: var(--text-3); }

.photo-studio-error {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 94, 126, .3);
  border-radius: 14px;
  color: #ffb7c8;
  background: rgba(120, 24, 49, .13);
}

.photo-studio-error .line-icon { flex: 0 0 auto; width: 21px; height: 21px; }
.photo-studio-error p { margin: 4px 0 0; color: var(--text-2); }

.photo-studio-drop[hidden],
.photo-studio-working[hidden],
.photo-studio-error[hidden],
.photo-studio-workspace[hidden] { display: none !important; }

.photo-studio-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, .72fr);
  gap: 18px;
}

.photo-studio-preview-column,
.photo-studio-controls {
  min-width: 0;
}

.photo-studio-preview-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.photo-studio-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.photo-studio-meta > div { display: grid; gap: 2px; min-width: 0; }
.photo-studio-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-studio-meta span { color: var(--text-3); font-size: 11px; }

.photo-studio-canvas-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 480px;
  max-height: 76vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-color: #08090d;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.032) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.032) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.032) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.032) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.photo-studio-canvas-shell canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 76vh;
}

.photo-studio-preview-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: #fff;
  background: rgba(8, 8, 13, .74);
  box-shadow: 0 5px 20px rgba(0,0,0,.22);
  backdrop-filter: blur(9px);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
}

.photo-studio-original {
  position: absolute;
  right: 13px;
  bottom: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 37px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  color: #fff;
  background: rgba(10, 9, 16, .77);
  backdrop-filter: blur(9px);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  touch-action: none;
}

.photo-studio-original:hover,
.photo-studio-original:focus-visible { border-color: rgba(115, 231, 219, .55); outline: none; }
.photo-studio-original:active { transform: translateY(1px); }
.photo-studio-original .line-icon { width: 16px; height: 16px; }

.photo-studio-preview-note {
  margin: 0 3px;
  color: var(--text-3);
  font-size: 10.5px;
  line-height: 1.45;
}

.photo-studio-controls {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 8, 13, .34);
}

.photo-studio-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.photo-studio-section-head h3 { margin: 2px 0 0; font-size: 16px; }
.photo-studio-section-head .eyebrow-mini { color: #9edfd7; }
.photo-studio-text-button { padding: 4px; border: 0; color: var(--text-3); background: transparent; cursor: pointer; font: inherit; font-size: 11px; }
.photo-studio-text-button:hover { color: #9ce8df; }

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

.photo-preset {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: rgba(8, 8, 13, .52);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.photo-preset:hover { border-color: color-mix(in srgb, var(--preset-accent) 45%, var(--line)); transform: translateY(-1px); }
.photo-preset.is-active { border-color: var(--preset-accent); background: color-mix(in srgb, var(--preset-accent) 9%, rgba(8, 8, 13, .52)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--preset-accent) 22%, transparent); }
.photo-preset canvas { display: block; width: 100%; aspect-ratio: 1.73; border-radius: 7px; background: #0b0a10; }
.photo-preset > span { display: grid; gap: 1px; padding: 0 3px 2px; min-width: 0; }
.photo-preset strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.photo-preset small { overflow: hidden; color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.photo-preset > i { position: absolute; top: 11px; right: 11px; padding: 3px 6px; border-radius: 999px; color: #06231f; background: #86eadf; box-shadow: 0 3px 10px #0006; font-size: 8px; font-style: normal; font-weight: 900; text-transform: uppercase; }

.photo-studio-strength,
.photo-studio-manual,
.photo-studio-honest-note {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 11, 18, .48);
}

.photo-studio-strength { padding: 12px; }
.photo-studio-strength label,
.photo-studio-adjust { display: grid; gap: 7px; }
.photo-studio-strength span,
.photo-studio-adjust > span { display: flex; justify-content: space-between; color: var(--text-2); font-size: 11px; font-weight: 700; }
.photo-studio-strength b,
.photo-studio-adjust b { color: #91e8df; font-variant-numeric: tabular-nums; }
.photo-studio-strength input,
.photo-studio-adjust input { width: 100%; accent-color: #67ded2; }

.photo-studio-manual summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
}

.photo-studio-manual summary::-webkit-details-marker { display: none; }
.photo-studio-manual summary > span { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 12px; font-weight: 800; }
.photo-studio-manual summary .line-icon { width: 16px; height: 16px; color: #a794ee; }
.photo-studio-manual summary small { color: var(--text-3); font-size: 9.5px; }
.photo-studio-manual[open] summary { border-bottom: 1px solid var(--line); }

.photo-studio-adjustments { display: grid; gap: 11px; padding: 13px; }
.photo-studio-adjustments .button { justify-self: start; margin-top: 2px; }
.photo-studio-honest-note { padding: 11px 12px; color: var(--text-3); font-size: 10px; line-height: 1.5; }

.photo-studio-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 9, 16, .58);
}

.photo-studio-actions > div:first-child { display: grid; gap: 2px; }
.photo-studio-actions > div:first-child strong { font-size: 12px; }
.photo-studio-actions > div:first-child span { color: var(--text-3); font-size: 10px; }
.photo-studio-actions > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-studio-actions .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; }

@media (max-width: 1120px) {
  .photo-studio-workspace { grid-template-columns: 1fr; }
  .photo-studio-canvas-shell { min-height: 420px; }
  .photo-preset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .photo-studio-head { align-items: stretch; flex-direction: column; }
  .photo-studio-private { width: fit-content; }
  .photo-studio-card { padding: 12px; }
  .photo-studio-drop { min-height: 250px; }
  .photo-studio-canvas-shell { min-height: 300px; border-radius: 13px; }
  .photo-preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-studio-actions { align-items: stretch; flex-direction: column; }
  .photo-studio-actions > div:last-child { display: grid; grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .photo-preset-grid { grid-template-columns: 1fr; }
  .photo-studio-canvas-shell { min-height: 240px; }
  .photo-studio-original { left: 13px; right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-studio-drop,
  .photo-preset { transition: none; }
}
