/* ReklamAI - Stage (Sozdanie). 1:1 port of Pencil frame c4naQ0.
   Loaded AFTER studio.css on /create. Owns the top bar + intake only;
   studio.css still drives the generation/result flow. Class prefix stg-
   so nothing collides with the flow's .st-*/.ra-* rules.
   Literal Pencil values (no custom props) to stay decoupled from studio.css. */

body.studio-shell { background: #FBFAF7; }

/* hide legacy service controls reklamai.js still needs */
.stg-svc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stg-ico { display: block; flex: none; }

/* brand bar + top bar */
.stg-brandbar { height: 3px; background: linear-gradient(90deg, #F8743E, #F1581E 50%, #E04E18); }

.stg-top {
  position: sticky; top: 0; z-index: 60;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; background: #FBFAF7; border-bottom: 1px solid #DCD8D0;
}
.stg-logo { display: flex; align-items: center; gap: 10px; }
.stg-glyph { position: relative; width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(180deg, #F8743E, #F1581E 55%, #E04E18); }
.stg-glyph .b1, .stg-glyph .b2 { position: absolute; width: 11px; height: 14px; border-radius: 2px; }
.stg-glyph .b1 { left: 6.5px; top: 6px; background: rgba(255,255,255,0.48); }
.stg-glyph .b2 { left: 11.5px; top: 8px; background: #FFFFFF; }
.stg-glyph .dot { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #F1581E; left: 14.5px; top: 13.5px; z-index: 2; }
.stg-word { font-family: "Inter", system-ui, sans-serif; font-size: 16px; font-weight: 600; color: #28241E; letter-spacing: -0.2px; }

.stg-marker { display: flex; align-items: center; gap: 12px; }
.stg-step { display: flex; align-items: center; gap: 6px; }
.stg-step .lbl { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 1px; color: #8E887D; }
.stg-step .pdot { width: 6px; height: 6px; border-radius: 50%; background: #F1581E; display: none; }
.stg-step .tick { width: 12px; height: 12px; color: #2F9D5B; display: none; }
.stg-step.is-active .pdot { display: block; }
.stg-step.is-active .lbl { color: #28241E; }
.stg-step.is-done .tick { display: block; }
.stg-step.is-done .lbl { color: #615C53; }
.stg-conn { width: 24px; height: 1px; background: #DCD8D0; flex: none; }

.stg-right { display: flex; align-items: center; gap: 20px; }
.stg-links { display: flex; align-items: center; gap: 20px; }
.stg-links a { font-family: "Inter", system-ui, sans-serif; font-size: 14px; font-weight: 500; color: #615C53; }
.stg-links a:hover { color: #28241E; }
.stg-credits {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 9999px;
  background: rgba(251,250,247,0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid #DCD8D0; box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(40,36,30,0.08);
  font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 600; color: #403C35;
}
.stg-credits .stg-ico { color: #F1581E; }
button.stg-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: #EAE7E0; border: 1px solid #DCD8D0;
  font-family: "Inter", system-ui, sans-serif; font-size: 14px; font-weight: 600; color: #615C53;
  transition: border-color 0.2s, background 0.2s;
}
.stg-avatar:hover { border-color: #C5C0B6; }
.stg-avatar:focus-visible { outline: 2px solid #F1581E; outline-offset: 2px; }

/* stage panel + dropzone */
.stg-intake { display: block; }
.stg-panel {
  position: relative; width: 100%;
  min-height: calc(100vh - 64px - 96px);
  border-radius: 16px; background: #F4F2ED;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 32px 124px;
}
.stg-dropzone {
  width: 560px; max-width: 100%; min-height: 360px;
  border-radius: 16px; background: #FBFAF7; border: 1.5px solid #C5C0B6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center; padding: 40px 32px; cursor: pointer;
  transition: border-color 0.25s cubic-bezier(0.16,1,0.3,1), background 0.25s, transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.stg-dropzone:hover, .stg-dropzone:focus-visible { border-color: #F1581E; outline: none; }
.stg-dropzone.is-dragover { border-color: #F1581E; background: #FCEFE7; transform: scale(1.004); }

.stg-dz-glyph { position: relative; width: 56px; height: 64px; flex: none; }
.stg-dz-glyph .b1 { position: absolute; left: 0; top: 4px; width: 38px; height: 50px; border-radius: 6px; background: #F7CDB4; }
.stg-dz-glyph .b2 { position: absolute; left: 16px; top: 10px; width: 38px; height: 50px; border-radius: 6px; background: #FFFFFF; border: 1.5px solid #C5C0B6; }
.stg-dz-glyph .dot { position: absolute; left: 28px; top: 30px; width: 9px; height: 9px; border-radius: 50%; background: #F1581E; }
.stg-dz-head { font-family: "Inter", system-ui, sans-serif; font-size: 22px; font-weight: 600; color: #28241E; letter-spacing: -0.3px; }
.stg-dz-sub { font-family: "Inter", system-ui, sans-serif; font-size: 15px; color: #615C53; }
.stg-dz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 8px;
  background: #EAE7E0; border: 1px solid #DCD8D0;
  font-family: "Inter", system-ui, sans-serif; font-size: 14px; font-weight: 600; color: #28241E;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.stg-dz-btn:hover { border-color: #C5C0B6; }

/* dropzone empty / done states. reklamai.js toggles the `hidden` attribute. */
.stg-dropzone [hidden] { display: none !important; }
.ra-dz-empty { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ra-dz-done { display: flex; align-items: center; gap: 15px; text-align: left; width: 100%; max-width: 460px; }
.stg-dz-thumb { width: 56px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; border: 1px solid #C5C0B6; background: #EAE7E0; }
.stg-dz-info { flex: 1; min-width: 0; }
.stg-dz-name { display: block; font-family: "Inter", system-ui, sans-serif; font-size: 15px; font-weight: 600; color: #28241E; }
.stg-dz-ok { display: block; font-family: "Inter", system-ui, sans-serif; font-size: 13px; color: #2F9D5B; margin-top: 2px; }
button.stg-dz-clear { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid #DCD8D0; color: #8E887D; cursor: pointer; }
.stg-dz-clear:hover { border-color: #F1581E; color: #B83E12; }

/* command bar */
.stg-cmdbar {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: min(920px, calc(100% - 56px));
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  background: #FFFFFF; border: 1px solid #DCD8D0;
  box-shadow: 0 8px 24px -2px rgba(40,36,30,0.15);
}
button.stg-up {
  flex: none; width: 52px; height: 52px; border-radius: 10px;
  background: #EAE7E0; border: 1px solid #DCD8D0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  cursor: pointer; color: #615C53; transition: border-color 0.2s;
}
.stg-up:hover { border-color: #C5C0B6; }
.stg-up .cap { font-family: "Inter", system-ui, sans-serif; font-size: 9px; color: #8E887D; }
.stg-up img { width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }

.stg-brief { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stg-brief-input {
  flex: 1; min-width: 0; border: none; background: transparent; resize: none;
  font-family: "Inter", system-ui, sans-serif; font-size: 15px; line-height: 1.4; color: #28241E;
  height: 22px; padding: 0; outline: none; overflow: hidden;
}
.stg-brief-input::placeholder { color: #8E887D; }
.stg-aichip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 9999px; background: #FCEFE7;
  font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600; color: #F1581E;
}

.stg-roles { display: flex; align-items: center; gap: 6px; }
.stg-role { padding: 6px 10px; border-radius: 9999px; background: #FCEFE7;
  border: 1px solid #F1581E; font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600;
  color: #B83E12; white-space: nowrap; }

button.stg-gear { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #EAE7E0;
  display: grid; place-items: center; color: #615C53; cursor: pointer; border: none; transition: background 0.2s; }
.stg-gear:hover { background: #e2ded5; }

button.stg-cta {
  flex: none; min-width: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 52px; padding: 0 20px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, #F8743E, #F1581E 55%, #E04E18);
  border: 1px solid transparent; border-image: linear-gradient(180deg, #FFD9C4, #E26A38 55%, #B83E12) 1;
  box-shadow: 0 1px 0 rgba(255,217,196,0.65), 0 6px 16px -2px rgba(241,88,30,0.32);
  transition: transform 0.15s cubic-bezier(0.16,1,0.3,1), box-shadow 0.15s;
}
.stg-cta:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,217,196,0.65), 0 10px 22px -4px rgba(241,88,30,0.4); }
.stg-cta:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.stg-cta .t { font-family: "Inter", system-ui, sans-serif; font-size: 15px; font-weight: 600; color: #FFFFFF; white-space: nowrap; }
.stg-cta .c { font-family: "JetBrains Mono", monospace; font-size: 10px; color: rgba(255,255,255,0.76); }

/* responsive */
@media (max-width: 920px) {
  .stg-marker, .stg-links { display: none; }
}
@media (max-width: 720px) {
  .stg-panel { padding: 32px 16px; min-height: auto; }
  .stg-cmdbar { position: static; transform: none; width: 100%; margin-top: 28px; flex-wrap: wrap; }
  .stg-brief { order: -1; flex-basis: 100%; }
  .stg-roles { flex: 1; flex-wrap: wrap; }
  .stg-cta { flex: 1; }
  .stg-dropzone { min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .stg-cta, .stg-dropzone { transition: none; }
  .stg-cta:hover { transform: none; }
}

/* ── FAILED / OUT-OF-CREDITS states (Pencil fkPWG / x0ZWy) ──────────
   reklamai.js sets body.ra-flow-failed; credits sub-variant
   body.ra-flow-failed-credits set by a small JS discriminator.
   The whole .st-flow collapses into one centered white card. */
.stg-fail-topup { display: none; }
body.ra-flow-failed .st-flow { background: #FFFFFF; border: 1px solid #DCD8D0; border-radius: 16px; max-width: 480px; margin: 48px auto; padding: 40px 36px; text-align: center; box-shadow: 0 30px 70px -34px rgba(40,36,30,0.26); }
/* disc above title (on header, first child) */
body.ra-flow-failed .st-flow-head { display: block; max-width: none; margin: 0; }
body.ra-flow-failed .st-flow-head::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%; background-color: #EAE7E0; background-repeat: no-repeat; background-position: center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23F1581E' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 7v6'/%3E%3Ccircle cx='12' cy='17' r='0.7' fill='%23F1581E' stroke='none'/%3E%3C/svg%3E"); }
body.ra-flow-failed-credits .st-flow-head::before { background-color: #FBEFD6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%23C98A12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20L12 3z'/%3E%3Cpath d='M12 10v4'/%3E%3Ccircle cx='12' cy='17.5' r='0.7' fill='%23C98A12' stroke='none'/%3E%3C/svg%3E"); }
/* hide generating chrome, keep title + substatus */
body.ra-flow-failed .st-steps, body.ra-flow-failed .flow-prog-dot, body.ra-flow-failed .flow-prog-count,
body.ra-flow-failed .flow-track, body.ra-flow-failed .flow-eta,
body.ra-flow-failed .flow-receipt, body.ra-flow-failed .flow-overline,
body.ra-flow-failed .ra-result-director-summary { display: none !important; }
body.ra-flow-failed .flow-prog, body.ra-flow-failed .flow-prog-row { display: block; }
body.ra-flow-failed [data-flow-main-title] { font-family: "Inter", system-ui, sans-serif; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; color: #28241E; margin: 0 0 10px; }
body.ra-flow-failed [data-flow-substatus] { display: block !important; font-family: "Inter", system-ui, sans-serif; font-size: 15px; line-height: 1.55; color: #615C53; margin: 0 auto 24px; max-width: 380px; }
/* collapse workbench → only the export panel's action buttons, centered */
body.ra-flow-failed .st-workbench { display: block; max-width: none; margin: 0; }
body.ra-flow-failed .st-col { display: contents; }
body.ra-flow-failed .ra-artifact-card, body.ra-flow-failed .st-director { display: none !important; }
body.ra-flow-failed .ra-export-panel { display: block; background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; max-width: none; margin: 0; backdrop-filter: none; }
body.ra-flow-failed .ra-export-panel .ra-artifact-kicker,
body.ra-flow-failed .flow-or-each,
body.ra-flow-failed [data-flow-selection-title],
body.ra-flow-failed [data-flow-selection-meta],
body.ra-flow-failed [data-shelf-mockup],
body.ra-flow-failed [data-flow-export-btn],
body.ra-flow-failed [data-flow-postpro-btn],
body.ra-flow-failed [data-flow-library-btn],
body.ra-flow-failed [data-infographic-btn],
body.ra-flow-failed [data-infographic-block] { display: none !important; }
body.ra-flow-failed button[data-flow-retry-btn] {
  display: inline-flex !important; align-items: center; justify-content: center; width: 100%; margin: 4px 0 0;
  border: 1px solid transparent; border-image: linear-gradient(180deg,#FFD9C4,#E26A38 55%,#B83E12) 1;
  background: linear-gradient(180deg, #F8743E, #F1581E 55%, #E04E18);
  box-shadow: inset 0 1px 0 rgba(255,217,196,0.65), 0 14px 30px -14px rgba(241,88,30,0.45);
  color: #FFFFFF; font-weight: 600; font-size: 15px; padding: 0 22px; height: 48px; border-radius: 10px;
}
body.ra-flow-failed button[data-flow-retry-btn]:hover { transform: translateY(-1px); }
body.ra-flow-failed button[data-flow-back-to-brief-btn] {
  display: inline-flex !important; width: auto; margin: 14px auto 0; background: none; border: 0;
  color: #615C53; font-size: 14px; font-weight: 500;
}
body.ra-flow-failed button[data-flow-back-to-brief-btn]:hover { color: #28241E; }
/* credits variant: «Пополнить кредиты» replaces retry */
body.ra-flow-failed-credits button[data-flow-retry-btn] { display: none !important; }
body.ra-flow-failed-credits .stg-fail-topup {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; margin-top: 4px;
  height: 48px; padding: 0 22px; border-radius: 10px; text-decoration: none;
  border: 1px solid transparent; border-image: linear-gradient(180deg,#FFD9C4,#E26A38 55%,#B83E12) 1;
  background: linear-gradient(180deg, #F8743E, #F1581E 55%, #E04E18);
  box-shadow: inset 0 1px 0 rgba(255,217,196,0.65), 0 14px 30px -14px rgba(241,88,30,0.45);
  color: #FFFFFF; font-weight: 600; font-size: 15px; font-family: "Inter", system-ui, sans-serif;
}
body.ra-flow-failed-credits .stg-fail-topup:hover { transform: translateY(-1px); }


/* ── motion polish (auto) ── */
:root { --stg-ease: cubic-bezier(0.16,1,0.3,1); }

/* panel entrance — container always present, JS-agnostic */
body.studio-shell .stg-panel {
  animation: stgPanelIn 600ms var(--stg-ease) both;
}
@keyframes stgPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.994); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* dropzone — add hover lift + warm shadow on top of existing border/bg transition */
body.studio-shell .stg-dropzone {
  will-change: transform;
  box-shadow: 0 1px 2px rgba(40,36,30,0.04);
  transition: border-color 0.25s var(--stg-ease), background 0.25s var(--stg-ease),
              transform 0.25s var(--stg-ease), box-shadow 0.25s var(--stg-ease);
}
body.studio-shell .stg-dropzone:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px -10px rgba(241,88,30,0.20), 0 2px 6px rgba(40,36,30,0.06);
}
body.studio-shell .stg-dropzone:focus-visible {
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4), 0 14px 32px -12px rgba(241,88,30,0.18);
}
body.studio-shell .stg-dropzone.is-dragover {
  box-shadow: 0 0 0 3px rgba(241,88,30,0.18), 0 18px 40px -14px rgba(241,88,30,0.28);
}

/* idle breathing — single soft glow on the dropzone accent dot (one key accent) */
body.studio-shell .stg-dz-glyph .dot {
  animation: stgDotBreathe 6.5s ease-in-out infinite;
}
@keyframes stgDotBreathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(241,88,30,0.35); }
  50%      { transform: scale(1.12); box-shadow: 0 0 0 5px rgba(241,88,30,0); }
}

/* active step dot — gentle pulse so the current stage "lives" */
body.studio-shell .stg-step.is-active .pdot {
  animation: stgStepPulse 2.8s ease-in-out infinite;
}
@keyframes stgStepPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: 0.78; }
}

/* secondary dropzone button — lift + shadow + focus ring */
body.studio-shell .stg-dz-btn {
  transition: border-color 0.2s var(--stg-ease), background 0.2s var(--stg-ease),
              transform 0.18s var(--stg-ease), box-shadow 0.18s var(--stg-ease);
}
body.studio-shell .stg-dz-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px rgba(40,36,30,0.18);
}
body.studio-shell .stg-dz-btn:active { transform: translateY(0) scale(0.98); }
body.studio-shell .stg-dz-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4);
}

/* clear (remove file) button */
body.studio-shell .stg-dz-clear {
  transition: border-color 0.2s var(--stg-ease), color 0.2s var(--stg-ease), transform 0.18s var(--stg-ease);
}
body.studio-shell .stg-dz-clear:hover { transform: rotate(90deg); }
body.studio-shell .stg-dz-clear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4);
}

/* upload tile in command bar */
body.studio-shell .stg-up {
  transition: border-color 0.2s var(--stg-ease), transform 0.18s var(--stg-ease), box-shadow 0.18s var(--stg-ease);
}
body.studio-shell .stg-up:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -8px rgba(40,36,30,0.22);
}
body.studio-shell .stg-up:active { transform: translateY(0) scale(0.98); }
body.studio-shell .stg-up:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4);
}

/* gear button */
body.studio-shell .stg-gear {
  transition: background 0.2s var(--stg-ease), transform 0.18s var(--stg-ease);
}
body.studio-shell .stg-gear:hover { transform: rotate(35deg); }
body.studio-shell .stg-gear:active { transform: rotate(35deg) scale(0.94); }
body.studio-shell .stg-gear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4);
}

/* primary CTA — keep existing hover lift, add press + focus ring */
body.studio-shell .stg-cta:active { transform: translateY(0) scale(0.98); }
body.studio-shell .stg-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4), 0 10px 22px -4px rgba(241,88,30,0.4);
}

/* avatar press + (focus already defined upstream) */
body.studio-shell button.stg-avatar {
  transition: border-color 0.2s var(--stg-ease), background 0.2s var(--stg-ease), transform 0.18s var(--stg-ease);
}
body.studio-shell .stg-avatar:active { transform: scale(0.94); }

/* credits pill — subtle responsive lift */
body.studio-shell .stg-credits {
  transition: transform 0.2s var(--stg-ease), box-shadow 0.2s var(--stg-ease), border-color 0.2s var(--stg-ease);
}
body.studio-shell .stg-credits:hover {
  transform: translateY(-1px);
  border-color: #C5C0B6;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 6px 14px -6px rgba(40,36,30,0.16);
}

/* nav links — animated underline + focus ring */
body.studio-shell .stg-links a {
  position: relative;
  transition: color 0.2s var(--stg-ease);
}
body.studio-shell .stg-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: #F1581E; transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s var(--stg-ease);
}
body.studio-shell .stg-links a:hover::after { transform: scaleX(1); }
body.studio-shell .stg-links a:focus-visible {
  outline: none; border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4);
}

/* role chip — gentle hover lift */
body.studio-shell .stg-role {
  transition: transform 0.18s var(--stg-ease), box-shadow 0.18s var(--stg-ease), background 0.18s var(--stg-ease);
}
body.studio-shell .stg-role:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px -4px rgba(241,88,30,0.28);
}

/* brief input — focus ring on the command bar field */
body.studio-shell .stg-brief-input {
  transition: box-shadow 0.2s var(--stg-ease);
  border-radius: 6px;
}
body.studio-shell .stg-brief-input:focus {
  box-shadow: 0 0 0 3px rgba(241,88,30,0.18);
}

/* fail-state action buttons — keep upstream hover lift, add press + focus */
body.studio-shell button[data-flow-retry-btn]:active,
body.studio-shell .stg-fail-topup:active { transform: translateY(0) scale(0.98); }
body.studio-shell button[data-flow-retry-btn]:focus-visible,
body.studio-shell .stg-fail-topup:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(241,88,30,0.4), 0 14px 30px -14px rgba(241,88,30,0.45);
}

/* respect reduced motion — disable all added motion + idle effects */
@media (prefers-reduced-motion: reduce) {
  body.studio-shell .stg-panel,
  body.studio-shell .stg-dz-glyph .dot,
  body.studio-shell .stg-step.is-active .pdot {
    animation: none;
  }
  body.studio-shell .stg-dropzone,
  body.studio-shell .stg-dz-btn,
  body.studio-shell .stg-dz-clear,
  body.studio-shell .stg-up,
  body.studio-shell .stg-gear,
  body.studio-shell button.stg-avatar,
  body.studio-shell .stg-credits,
  body.studio-shell .stg-links a,
  body.studio-shell .stg-links a::after,
  body.studio-shell .stg-role,
  body.studio-shell .stg-brief-input {
    transition: none;
  }
  body.studio-shell .stg-dropzone:hover,
  body.studio-shell .stg-dz-btn:hover,
  body.studio-shell .stg-dz-btn:active,
  body.studio-shell .stg-dz-clear:hover,
  body.studio-shell .stg-up:hover,
  body.studio-shell .stg-up:active,
  body.studio-shell .stg-gear:hover,
  body.studio-shell .stg-gear:active,
  body.studio-shell .stg-cta:active,
  body.studio-shell .stg-avatar:active,
  body.studio-shell .stg-credits:hover,
  body.studio-shell .stg-role:hover,
  body.studio-shell button[data-flow-retry-btn]:active,
  body.studio-shell .stg-fail-topup:active {
    transform: none;
  }
  body.studio-shell .stg-links a:hover::after { transform: scaleX(0); }
}
