/* Dashboard one-shot publishing console. Scoped to the home tab. */
.studio-hero-oneshot {
  grid-template-columns: minmax(360px, 0.78fr) minmax(620px, 1.22fr);
  align-items: start;
  gap: clamp(32px, 5vw, 72px);
  padding-top: 44px;
}

.studio-hero-oneshot .studio-hero-copy {
  position: sticky;
  top: 89px;  /* tc-shell(73px) + 여백 — 스튜디오 메뉴바가 하단 고정으로 이동함 */
  padding-top: 22px;
}

.oneshot-account-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--text-subtle);
  font-size: 12px;
}

.oneshot-summary-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6f7785;
}

.oneshot-account-summary.has-connected .oneshot-summary-dot {
  background: #6ee7b7;
  box-shadow: 0 0 10px rgba(110, 231, 183, 0.65);
}

.oneshot-console {
  min-width: 0;
  border: 1px solid rgba(115, 129, 150, 0.34);
  border-top-color: #23c7e8;
  background: #0d121a;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.32);
}

.oneshot-console-head,
.oneshot-review-head,
.oneshot-review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.oneshot-console-head {
  min-height: 66px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.oneshot-console-head > div,
.oneshot-review-head > div {
  display: grid;
  gap: 4px;
}

.oneshot-console-head span,
.oneshot-review-head span {
  color: #23c7e8;
  font: 700 9px/1.2 'JetBrains Mono', monospace;
  letter-spacing: 0.08em;
}

.oneshot-console-head strong,
.oneshot-review-head strong {
  color: var(--text);
  font-size: 15px;
  letter-spacing: 0;
}

.oneshot-connect-all,
.studio-card-account {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #121925;
  color: var(--text-dim);
  font: 700 11px/1 'Pretendard', sans-serif;
  cursor: pointer;
}

.oneshot-connect-all {
  padding: 0 11px;
}

.oneshot-connect-all:hover,
.studio-card-account:hover {
  border-color: #23c7e8;
  color: #23c7e8;
}

.oneshot-account-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px 0;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.oneshot-account {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 62px;
  padding: 12px 13px;
  border: 0;
  background: #0f151f;
  text-align: left;
  cursor: pointer;
}

.oneshot-account:hover,
.oneshot-account.is-selected {
  background: #141d29;
}

.oneshot-account.is-selected {
  box-shadow: inset 0 -2px 0 var(--channel-color, #23c7e8);
}

.oneshot-account-code {
  color: var(--text);
  font: 800 10px/1 'JetBrains Mono', monospace;
}

.oneshot-account-state {
  overflow: hidden;
  color: var(--text-subtle);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oneshot-account.is-connected .oneshot-account-state {
  color: #6ee7b7;
}

.oneshot-account.is-disconnected .oneshot-account-state {
  color: #f0b36a;
}

.oneshot-account[data-oneshot-account="blog"] { --channel-color: #a3ff5e; }
.oneshot-account[data-oneshot-account="insta"] { --channel-color: #d08bff; }
.oneshot-account[data-oneshot-account="threads"] { --channel-color: #4fd7ff; }
.oneshot-account[data-oneshot-account="gblog"] { --channel-color: #5ea9ff; }

.oneshot-input-block {
  padding: 17px 18px 18px;
  border-bottom: 1px solid var(--border);
}

.oneshot-input-block label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
}

.oneshot-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px 134px;
  gap: 8px;
}

.oneshot-input-row input,
.oneshot-input-row select,
.oneshot-input-row button {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  border-radius: 5px;
  font-family: inherit;
}

.oneshot-input-row input,
.oneshot-input-row select {
  border: 1px solid var(--border);
  background: #080c12;
  color: var(--text);
  outline: none;
}

.oneshot-input-row input {
  padding: 0 13px;
}

.oneshot-input-row select {
  padding: 0 9px;
}

.oneshot-input-row input:focus,
.oneshot-input-row select:focus {
  border-color: #23c7e8;
  box-shadow: 0 0 0 2px rgba(35, 199, 232, 0.11);
}

.oneshot-input-row button,
.oneshot-review-actions button {
  border: 1px solid #23c7e8;
  background: #23c7e8;
  color: #041116;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.oneshot-input-row button:hover,
.oneshot-review-actions button:hover {
  background: #63def4;
}

.oneshot-input-row button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.oneshot-distribution {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 0.36fr) minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  min-height: 156px;
  padding: 22px 18px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.oneshot-source-node {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  align-content: center;
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(35, 199, 232, 0.48);
  background: #0a1119;
}

.oneshot-source-node::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 35px;
  height: 1px;
  background: rgba(35, 199, 232, 0.4);
}

.oneshot-source-node span {
  color: #23c7e8;
  font: 700 9px/1 'JetBrains Mono', monospace;
}

.oneshot-source-node strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.oneshot-route-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.oneshot-route-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 34px;
  height: 1px;
  background: rgba(35, 199, 232, 0.4);
}

.oneshot-route {
  --route-color: #7b8798;
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 11px;
  border: 1px solid var(--border);
  background: #101721;
}

.oneshot-route[data-oneshot-route="blog"] { --route-color: #a3ff5e; }
.oneshot-route[data-oneshot-route="insta"] { --route-color: #d08bff; }
.oneshot-route[data-oneshot-route="threads"] { --route-color: #4fd7ff; }
.oneshot-route[data-oneshot-route="gblog"] { --route-color: #5ea9ff; }

.oneshot-route i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #596271;
}

.oneshot-route span {
  color: var(--text);
  font: 800 10px/1 'JetBrains Mono', monospace;
}

.oneshot-route b {
  color: var(--text-subtle);
  font: 700 9px/1 'JetBrains Mono', monospace;
}

.oneshot-route.is-running {
  border-color: color-mix(in srgb, var(--route-color) 45%, var(--border));
}

.oneshot-route.is-running i {
  background: var(--route-color);
  animation: oneshot-pulse 0.72s ease-in-out infinite;
}

.oneshot-route.is-ready {
  border-color: color-mix(in srgb, var(--route-color) 50%, var(--border));
  background: color-mix(in srgb, var(--route-color) 7%, #101721);
}

.oneshot-route.is-ready i {
  background: var(--route-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--route-color) 65%, transparent);
}

.oneshot-route.is-ready b {
  color: var(--route-color);
}

@keyframes oneshot-pulse {
  50% { transform: scale(1.55); opacity: 0.45; }
}

.oneshot-review[hidden] {
  display: none;
}

.oneshot-review {
  padding: 17px 18px 18px;
  animation: oneshot-reveal 0.35s ease-out both;
}

@keyframes oneshot-reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.oneshot-review-head {
  align-items: end;
  margin-bottom: 12px;
}

.oneshot-review-head small {
  color: var(--text-subtle);
  font-size: 10px;
}

.oneshot-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.oneshot-draft-card {
  --draft-color: #23c7e8;
  min-width: 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--draft-color) 33%, var(--border));
  background: #0b1119;
}

.oneshot-draft-card[data-channel="blog"] { --draft-color: #a3ff5e; }
.oneshot-draft-card[data-channel="insta"] { --draft-color: #d08bff; }
.oneshot-draft-card[data-channel="threads"] { --draft-color: #4fd7ff; }
.oneshot-draft-card[data-channel="gblog"] { --draft-color: #5ea9ff; }

.oneshot-draft-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.oneshot-draft-top strong {
  color: var(--draft-color);
  font: 800 10px/1 'JetBrains Mono', monospace;
}

.oneshot-draft-top span {
  color: #6ee7b7;
  font-size: 9px;
  font-weight: 800;
}

.oneshot-draft-card h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oneshot-draft-card p {
  min-height: 34px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.oneshot-draft-card button {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #121925;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.oneshot-draft-card button:hover {
  border-color: var(--draft-color);
  color: var(--draft-color);
}

.oneshot-review-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.oneshot-review-actions span {
  color: var(--text-dim);
  font-size: 11px;
}

.oneshot-review-actions button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 5px;
}

#tab-dashboard .studio-card-product .studio-card-top {
  min-height: 74px;
  justify-content: space-between;
  gap: 8px;
}

.studio-card-account {
  max-width: 132px;
  padding: 0 9px;
  overflow: hidden;
  color: rgba(230, 235, 245, 0.78);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-card-account.is-connected {
  border-color: rgba(110, 231, 183, 0.48);
  color: #6ee7b7;
  background: rgba(14, 44, 37, 0.84);
}

.studio-card-account.is-disconnected {
  border-color: rgba(240, 179, 106, 0.4);
  color: #f0b36a;
}

@media (max-width: 1180px) {
  .studio-hero-oneshot {
    grid-template-columns: minmax(320px, 0.7fr) minmax(540px, 1.3fr);
    gap: 28px;
  }

  .oneshot-input-row {
    grid-template-columns: minmax(0, 1fr) 110px;
  }

  .oneshot-input-row button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .studio-hero-oneshot {
    grid-template-columns: 1fr;
  }

  .studio-hero-oneshot .studio-hero-copy {
    position: static;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .oneshot-console-head,
  .oneshot-review-head,
  .oneshot-review-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .oneshot-account-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oneshot-input-row,
  .oneshot-distribution,
  .oneshot-review-grid {
    grid-template-columns: 1fr;
  }

  .oneshot-input-row button {
    grid-column: auto;
  }

  .oneshot-source-node::after,
  .oneshot-route-grid::before {
    display: none;
  }

  .oneshot-route-grid {
    grid-template-columns: 1fr;
  }

  .oneshot-review-actions button {
    width: 100%;
  }

  #tab-dashboard .studio-card-product .studio-card-top {
    align-items: flex-start;
  }
}

/* ═══════════════ AI 배포 허브 애니메이션 (2026-08-14) ═══════════════
   한방 배포 콘솔의 흐름도를 대체 — 키워드(소스) → AI 코어 → 채널로 빛줄기·파티클이 흐른다.
   상태 훅(.oneshot-route is-running/is-ready, #oneShotSourceLabel)은 그대로 유지. */

.oneshot-hub {
  position: relative;
  display: block;
  height: 280px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 47% 50%, rgba(0, 217, 255, 0.09), transparent 42%),
    radial-gradient(circle at 85% 15%, rgba(163, 255, 94, 0.05), transparent 35%),
    radial-gradient(circle at 85% 85%, rgba(94, 169, 255, 0.05), transparent 35%),
    linear-gradient(180deg, rgba(10, 13, 20, 0.85), rgba(7, 9, 14, 0.95));
  border: 1px solid rgba(0, 217, 255, 0.14);
}

/* 은은한 그리드 배경 */
.oneshot-hub::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 217, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 47% 50%, #000 30%, transparent 78%);
  pointer-events: none;
}

.hub-beams { position: absolute; inset: 0; width: 100%; height: 100%; }

.hub-beam {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 7 11;
  opacity: 0.55;
  animation: hubDashFlow 1.1s linear infinite;
}
.hub-beam-in { stroke: #00d9ff; }
.hub-beam-blog { stroke: #a3ff5e; animation-delay: .1s; }
.hub-beam-insta { stroke: #d08bff; animation-delay: .3s; }
.hub-beam-threads { stroke: #4fd7ff; animation-delay: .5s; }
.hub-beam-gblog { stroke: #5ea9ff; animation-delay: .7s; }
@keyframes hubDashFlow { to { stroke-dashoffset: -18; } }

.hub-dot { filter: drop-shadow(0 0 5px currentColor); }
.hub-dot-in { color: #00d9ff; }
.hub-dot-blog { color: #a3ff5e; }
.hub-dot-insta { color: #d08bff; }
.hub-dot-threads { color: #4fd7ff; }
.hub-dot-gblog { color: #5ea9ff; }

/* 상태 연동 — 생성 중인 채널의 빛줄기를 강하게 */
.oneshot-hub:has(.oneshot-route[data-oneshot-route="blog"].is-running) .hub-beam-blog,
.oneshot-hub:has(.oneshot-route[data-oneshot-route="insta"].is-running) .hub-beam-insta,
.oneshot-hub:has(.oneshot-route[data-oneshot-route="threads"].is-running) .hub-beam-threads,
.oneshot-hub:has(.oneshot-route[data-oneshot-route="gblog"].is-running) .hub-beam-gblog {
  opacity: 1;
  stroke-width: 2.6;
  animation-duration: 0.4s;
  filter: drop-shadow(0 0 6px currentColor);
}
.oneshot-hub:has(.oneshot-route.is-running) .hub-beam-in {
  opacity: 1; stroke-width: 2.6; animation-duration: 0.4s;
  filter: drop-shadow(0 0 6px #00d9ff);
}

/* 소스 노드 (좌) */
.oneshot-hub .hub-source {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 118px; margin: 0; z-index: 2;
}

/* AI 코어 (중앙) */
.hub-core {
  position: absolute; left: 47%; top: 50%;
  width: 132px; height: 132px;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.hub-ai {
  font-family: 'Space Grotesk', 'Pretendard Variable', sans-serif;
  font-size: 30px; font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(135deg, #00d9ff, #a3ff5e 60%, #d08bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hubAiPulse 2.6s ease-in-out infinite;
}
@keyframes hubAiPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 217, 255, .55)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 22px rgba(0, 217, 255, .95)); transform: scale(1.07); }
}
.hub-ring { position: absolute; border-radius: 50%; pointer-events: none; }
.hub-ring-1 {
  inset: 24px; border: 1px dashed rgba(0, 217, 255, 0.55);
  animation: hubSpin 9s linear infinite;
}
.hub-ring-2 {
  inset: 10px; border: 1px solid transparent;
  border-top-color: rgba(163, 255, 94, 0.65); border-right-color: rgba(0, 217, 255, 0.35);
  animation: hubSpin 5.5s linear infinite reverse;
}
.hub-ring-3 {
  inset: 0; border: 1px solid rgba(0, 217, 255, 0.22);
  animation: hubBreath 3.4s ease-in-out infinite;
}
@keyframes hubSpin { to { transform: rotate(360deg); } }
@keyframes hubBreath {
  0%, 100% { transform: scale(1); opacity: .8; }
  50% { transform: scale(1.12); opacity: .28; }
}
.hub-orbit { position: absolute; inset: 4px; border-radius: 50%; animation: hubSpin 4.2s linear infinite; }
.hub-orbit-rev { inset: 17px; animation: hubSpin 6.5s linear infinite reverse; }
.hub-orbit i {
  position: absolute; top: -3px; left: 50%; width: 6px; height: 6px;
  border-radius: 50%; background: #00d9ff;
  box-shadow: 0 0 9px #00d9ff;
}
.hub-orbit-rev i { background: #d08bff; box-shadow: 0 0 9px #d08bff; }

/* 채널 노드 (우) — 세로 스택, 빔 끝점(y=42/107/173/238)에 맞춤 */
.oneshot-hub .hub-routes {
  position: absolute; right: 14px; top: 0; bottom: 0;
  width: 128px;
  display: flex; flex-direction: column; justify-content: space-around;
  gap: 0; padding: 6px 0; margin: 0; z-index: 2;
}
.oneshot-hub .hub-routes::before { display: none; }
.oneshot-hub .oneshot-route {
  background: rgba(13, 16, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(6px);
}
.oneshot-hub .oneshot-route.is-running {
  border-color: var(--route-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--route-color) 38%, transparent);
}
.oneshot-hub .oneshot-route.is-ready { border-color: color-mix(in srgb, var(--route-color) 55%, transparent); }

/* 모바일 — 세로 스택 (빔은 숨김, 코어 펄스는 유지) */
@media (max-width: 720px) {
  .oneshot-hub { height: auto; padding: 18px 14px; }
  .hub-beams { display: none; }
  .oneshot-hub .hub-source { position: static; transform: none; width: auto; }
  .hub-core { position: static; transform: none; margin: 14px auto; }
  .oneshot-hub .hub-routes {
    position: static; width: auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-beam, .hub-ai, .hub-ring-1, .hub-ring-2, .hub-ring-3, .hub-orbit, .hub-orbit-rev { animation: none; }
  .hub-dot { display: none; }
}

/* ── 한방 배포 6채널 확장 (X·SHORTS 합류) ── */
.oneshot-account-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) { .oneshot-account-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.oneshot-route[data-oneshot-route="x"] { --route-color: #cfd6e0; }
.oneshot-route[data-oneshot-route="shorts"] { --route-color: #ff7a5e; }

.oneshot-hub { height: 340px; }
.hub-beam-x { stroke: #aab6c8; animation-delay: .9s; }
.hub-beam-shorts { stroke: #ff7a5e; animation-delay: 1.1s; }
.hub-dot-x { color: #cfd6e0; }
.hub-dot-shorts { color: #ff7a5e; }
.oneshot-hub:has(.oneshot-route[data-oneshot-route="x"].is-running) .hub-beam-x,
.oneshot-hub:has(.oneshot-route[data-oneshot-route="shorts"].is-running) .hub-beam-shorts {
  opacity: 1;
  stroke-width: 2.6;
  animation-duration: 0.4s;
  filter: drop-shadow(0 0 6px currentColor);
}
.oneshot-hub .oneshot-route { min-height: 42px; padding: 0 10px; }
.oneshot-hub .oneshot-route span { font-size: 9px; }
