/* AF_STUDIO_DETAIL_WORKFLOW_V1_20260802 */
html.af-detail-flow-open { overflow: hidden !important; }

.af-status-badge,
#afStudioWebV27 .af-status-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.af-status-badge.status-draft,
#afStudioWebV27 .af-status-badge.status-draft { color: #2563a8; background: #eaf3ff; }
.af-status-badge.status-review,
#afStudioWebV27 .af-status-badge.status-review { color: #a7600b; background: #fff3d8; }
.af-status-badge.status-waiting,
#afStudioWebV27 .af-status-badge.status-waiting { color: #7350bc; background: #f0eaff; }
.af-status-badge.status-complete,
#afStudioWebV27 .af-status-badge.status-complete { color: #24765a; background: #eaf7f1; }
.af-status-badge.status-failed,
#afStudioWebV27 .af-status-badge.status-failed { color: #b43d4c; background: #fdecef; }

.af-detail-flow-host,
.af-detail-flow-host *,
.af-detail-flow-host *::before,
.af-detail-flow-host *::after { box-sizing: border-box; }

.af-detail-flow-host {
  --af-detail-bg: #f4f5f8;
  --af-detail-surface: #fff;
  --af-detail-text: #171b29;
  --af-detail-muted: #707787;
  --af-detail-line: rgba(26, 31, 49, .09);
  --af-detail-primary: #6256d8;
  --af-detail-primary-soft: #efedff;
  --af-detail-danger: #b43d4c;
  --af-detail-success: #24765a;
  --af-detail-shadow: 0 12px 28px rgba(24, 29, 50, .055), 0 2px 6px rgba(24, 29, 50, .025);
  --af-detail-space-section: 24px;
  --af-detail-space-compact: 16px;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  min-width: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  color: var(--af-detail-text);
  background: radial-gradient(circle at 50% -8%, rgba(102, 86, 216, .055), transparent 28%), var(--af-detail-bg);
  font-family: "AI Factory Rounded", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-weight: 500;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

body.platform-v13-active > #afStudioDetailWorkflowV1.af-detail-flow-host {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.af-detail-flow-host.web.context-actual { left: 220px; }
.af-detail-flow-host.mobile.context-actual,
.af-detail-flow-host.mobile.context-preview { bottom: calc(70px + env(safe-area-inset-bottom)); }

.af-detail-flow-host button,
.af-detail-flow-host input,
.af-detail-flow-host select,
.af-detail-flow-host textarea { font: inherit; }

.af-detail-flow-host button { cursor: pointer; }
.af-detail-flow-host svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.af-detail-flow-shell { min-height: 100%; }

.af-detail-flow-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: max(10px, env(safe-area-inset-top)) 24px 9px;
  border-bottom: 1px solid rgba(26, 31, 49, .055);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.af-detail-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: #252a3a;
  border: 1px solid #e1e3ea;
  border-radius: 13px;
  background: #fff;
}

.af-detail-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.af-detail-brand > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(145deg, #11162a, #7265e9);
  box-shadow: 0 7px 16px rgba(48, 39, 145, .17), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.af-detail-brand strong {
  overflow: hidden;
  color: #1c2130;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.af-detail-flow-topbar > small {
  margin-left: auto;
  color: var(--af-detail-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.af-detail-flow-main {
  width: min(calc(100% - 48px), 1000px);
  margin: 0 auto;
  padding: 38px 0 52px;
}

.af-detail-heading { max-width: 820px; }
.af-detail-heading > p {
  margin: 0 0 8px;
  color: var(--af-detail-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.af-detail-heading h1 {
  margin: 0;
  color: var(--af-detail-text);
  font-size: clamp(30px, 3.3vw, 42px);
  line-height: 1.17;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.af-detail-heading > span {
  display: block;
  margin-top: 11px;
  color: var(--af-detail-muted);
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.af-detail-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 24px 0 14px;
}

.af-detail-progress > span {
  color: var(--af-detail-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.af-detail-progress b { color: var(--af-detail-primary); font-size: 14px; }
.af-detail-progress > div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e3ea;
}

.af-detail-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(145deg, #6558e6, #897eff);
  transition: width .18s ease;
}

.af-detail-card {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--af-detail-line);
  border-radius: 24px;
  background: var(--af-detail-surface);
  box-shadow: var(--af-detail-shadow);
}

.af-detail-selected {
  min-height: 150px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
  padding: 24px;
  overflow: hidden;
  color: #fff;
  border-radius: 21px;
  background: radial-gradient(circle at 88% 18%, rgba(132, 113, 255, .58), transparent 28%), linear-gradient(145deg, #0e1322 0%, #1c2140 62%, #5447bd 145%);
}

.af-detail-selected > svg {
  width: 58px;
  height: 58px;
  padding: 16px;
  color: #ffd16e;
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
}

.af-detail-selected span { min-width: 0; }
.af-detail-selected small,
.af-detail-selected strong,
.af-detail-selected p { display: block; }
.af-detail-selected small { color: rgba(255, 255, 255, .65); font-size: 10px; }
.af-detail-selected strong { margin-top: 5px; font-size: 23px; line-height: 1.3; }
.af-detail-selected p { margin: 7px 0 0; color: rgba(255, 255, 255, .72); font-size: 12px; line-height: 1.58; }

.af-detail-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.af-detail-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.af-detail-field.full { grid-column: 1 / -1; }
.af-detail-field > span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #343a4b;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.af-detail-field > span b,
.af-detail-field > span em {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
}
.af-detail-field > span b { color: var(--af-detail-primary); background: var(--af-detail-primary-soft); }
.af-detail-field > span em { color: var(--af-detail-muted); background: #f0f1f4; }

.af-detail-field input,
.af-detail-field select,
.af-detail-field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  color: #222737;
  border: 1px solid #dfe2ea;
  border-radius: 14px;
  outline: 0;
  background: #fafbfc;
  font-size: 15px;
}

.af-detail-field input,
.af-detail-field select {
  height: 54px;
  min-height: 54px;
  padding: 0 15px;
}

.af-detail-field textarea {
  min-height: 138px;
  padding: 14px 15px;
  line-height: 1.65;
  resize: vertical;
}

.af-detail-field input::placeholder,
.af-detail-field textarea::placeholder { color: #8a90a0; opacity: 1; }
.af-detail-field input:focus,
.af-detail-field select:focus,
.af-detail-field textarea:focus {
  border-color: rgba(98, 86, 216, .72);
  box-shadow: 0 0 0 4px rgba(98, 86, 216, .10);
}

.af-detail-field [aria-invalid="true"] { border-color: var(--af-detail-danger); background: #fffafb; }
.af-detail-error {
  min-height: 18px;
  color: var(--af-detail-danger);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.af-detail-error:empty { display: none; }

.af-detail-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.af-detail-media {
  min-width: 0;
  min-height: 168px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px 12px;
  overflow: hidden;
  color: var(--af-detail-text);
  border: 1px dashed #cfd3df;
  border-radius: 18px;
  background: #fafbfc;
  text-align: center;
  cursor: pointer;
}

.af-detail-media.has-file { border-style: solid; border-color: rgba(98, 86, 216, .32); background: var(--af-detail-primary-soft); }
.af-detail-media input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.af-detail-media > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--af-detail-primary);
  border-radius: 13px;
  background: #fff;
}
.af-detail-media strong,
.af-detail-media small { max-width: 100%; overflow-wrap: anywhere; }
.af-detail-media strong { font-size: 12px; line-height: 1.5; }
.af-detail-media small { color: var(--af-detail-muted); font-size: 10px; line-height: 1.5; }

.af-detail-choice-grid,
.af-detail-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.af-detail-choice,
.af-detail-output {
  min-width: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  color: #343a4b;
  border: 1px solid #dfe2ea;
  border-radius: 16px;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.af-detail-choice.active,
.af-detail-output.active {
  color: var(--af-detail-primary);
  border-color: rgba(98, 86, 216, .5);
  background: var(--af-detail-primary-soft);
  box-shadow: 0 0 0 3px rgba(98, 86, 216, .07);
}

.af-detail-choice-grid + .af-detail-field { margin-top: 18px; }
.af-detail-output { justify-content: flex-start; text-align: left; }
.af-detail-output > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--af-detail-primary);
  border-radius: 10px;
  background: #fff;
  font-size: 20px;
}
.af-detail-output strong { min-width: 0; overflow-wrap: anywhere; }

.af-detail-fixed-result {
  min-height: 118px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(98, 86, 216, .13);
  border-radius: 19px;
  background: linear-gradient(145deg, #f8f7ff, #f0edff);
}
.af-detail-fixed-result > svg {
  width: 48px;
  height: 48px;
  padding: 13px;
  color: #fff;
  border-radius: 15px;
  background: linear-gradient(145deg, #171c31, #6d60e1);
}
.af-detail-fixed-result small,
.af-detail-fixed-result strong { display: block; }
.af-detail-fixed-result small { color: var(--af-detail-muted); font-size: 10px; }
.af-detail-fixed-result strong { margin-top: 5px; font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }

.af-detail-review { margin: 0; }
.af-detail-review > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 58px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--af-detail-line);
}
.af-detail-review > div:last-child { border-bottom: 0; }
.af-detail-review dt { color: var(--af-detail-muted); font-size: 11px; }
.af-detail-review dd {
  min-width: 0;
  margin: 0;
  color: var(--af-detail-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.af-detail-review button {
  padding: 7px 9px;
  color: var(--af-detail-primary);
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.af-detail-help {
  min-height: 50px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin-top: var(--af-detail-space-compact);
  padding: 13px 14px;
  color: #5d5227;
  border-radius: 15px;
  background: #fff6d9;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}
.af-detail-help svg { width: 18px; height: 18px; margin-top: .05em; color: #8a7629; }
.af-detail-help span { min-width: 0; overflow-wrap: anywhere; }
.af-detail-help.success { color: var(--af-detail-success); background: #eaf7f1; }
.af-detail-help.success svg { color: var(--af-detail-success); }

.af-detail-actions {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: 12px;
}
.af-detail-actions.single { grid-template-columns: 1fr; }
.af-detail-actions button {
  min-width: 0;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.af-detail-actions .secondary { color: #303548; border: 1px solid #dfe2ea; background: #fff; }
.af-detail-actions .primary { color: #fff; border: 0; background: linear-gradient(145deg, #6558e6, #897eff); box-shadow: 0 13px 30px rgba(78, 64, 214, .23); }
.af-detail-actions .primary:disabled { color: #8f94a2; background: #e1e3e9; box-shadow: none; cursor: default; }

.af-detail-flow-host button:focus-visible,
.af-detail-flow-host input:focus-visible,
.af-detail-flow-host select:focus-visible,
.af-detail-flow-host textarea:focus-visible,
.af-detail-media:focus-within { outline: 3px solid rgba(98, 86, 216, .22); outline-offset: 2px; }

@media (max-width: 1100px) {
  .af-detail-flow-host.web.context-actual { left: 0; }
  .af-detail-flow-main { width: min(calc(100% - 40px), 960px); }
}

@media (max-width: 760px) {
  .af-detail-flow-host {
    --af-detail-space-section: 18px;
    --af-detail-space-compact: 14px;
  }
  .af-detail-flow-topbar {
    min-height: 58px;
    padding: max(8px, env(safe-area-inset-top)) 16px 7px;
  }
  .af-detail-close { width: 38px; height: 38px; }
  .af-detail-brand > span { width: 34px; height: 34px; }
  .af-detail-brand strong { font-size: 11px; }
  .af-detail-flow-topbar > small { font-size: 9px; }
  .af-detail-flow-main {
    width: 100%;
    padding: 20px 16px 26px;
  }
  .af-detail-heading > p { margin-bottom: 7px; font-size: 9px; }
  .af-detail-heading h1 { font-size: 27px; line-height: 1.2; }
  .af-detail-heading > span { margin-top: 9px; font-size: 13px; line-height: 1.58; }
  .af-detail-progress { gap: 12px; margin: var(--af-detail-space-section) 0 12px; }
  .af-detail-card { padding: 18px; border-radius: 20px; }
  .af-detail-selected { min-height: 132px; grid-template-columns: 50px minmax(0, 1fr); padding: 18px; }
  .af-detail-selected > svg { width: 50px; height: 50px; padding: 13px; }
  .af-detail-selected strong { font-size: 19px; }
  .af-detail-selected p { font-size: 11px; }
  .af-detail-field-grid { grid-template-columns: 1fr; gap: 16px; }
  .af-detail-field.full { grid-column: auto; }
  .af-detail-field input,
  .af-detail-field select { height: 54px; min-height: 54px; }
  .af-detail-field textarea { min-height: 132px; }
  .af-detail-media-grid { grid-template-columns: 1fr; gap: 10px; }
  .af-detail-media {
    min-height: 92px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: start;
    align-content: center;
    column-gap: 12px;
    padding: 14px;
    text-align: left;
  }
  .af-detail-media > span { grid-row: 1 / 3; }
  .af-detail-media strong,
  .af-detail-media small { grid-column: 2; }
  .af-detail-media strong { align-self: end; }
  .af-detail-media small { align-self: start; }
  .af-detail-choice-grid,
  .af-detail-output-grid { grid-template-columns: 1fr; gap: 9px; }
  .af-detail-choice,
  .af-detail-output { min-height: 56px; }
  .af-detail-review > div {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    padding: 12px 0;
  }
  .af-detail-review dt { grid-column: 1; }
  .af-detail-review dd { grid-column: 1; font-size: 12px; }
  .af-detail-review button { grid-column: 2; grid-row: 1 / 3; }
  .af-detail-help { min-height: 48px; }
  .af-detail-actions { grid-template-columns: minmax(100px, .72fr) minmax(0, 1.28fr); }
  .af-detail-actions button { min-height: 52px; padding-right: 10px; padding-left: 10px; }
}

@media (max-width: 350px) {
  .af-detail-flow-main { padding-right: 12px; padding-left: 12px; }
  .af-detail-flow-topbar { padding-right: 12px; padding-left: 12px; }
  .af-detail-brand strong { max-width: 112px; }
  .af-detail-card { padding: 16px; }
  .af-detail-heading h1 { font-size: 25px; }
  .af-detail-actions button { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .af-detail-flow-host *,
  .af-detail-flow-host *::before,
  .af-detail-flow-host *::after { scroll-behavior: auto !important; transition: none !important; }
}
