:root {
  --studio-bg: #0c0c10;
  --studio-card: #14141b;
  --studio-card-2: #1c1c26;
  --studio-line: rgba(255, 255, 255, 0.12);
  --studio-line-strong: rgba(255, 255, 255, 0.22);
  --studio-ink: #f7f5f1;
  --studio-muted: #b6b2bf;
  --studio-soft: #858191;

  /* Live formal SPA Black & Amber tokens */
  --canvas: #000000;
  --canvas-deep: #0b0b0b;
  --card: #121212;
  --card-vip: #282828;
  --ink: #ffffff;
  --muted: #bbbbbb;
  --accent: #ff9900;
  --accent-bright: #ffb038;
  --accent-ink: #100b00;
  --accent-soft: rgba(255, 153, 0, 0.16);
  --accent-border: rgba(255, 153, 0, 0.5);
  --green: #2ee59d;
  --green-soft: rgba(46, 229, 157, 0.14);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.14);

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--studio-bg);
  color: var(--studio-ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color-scheme: dark;
  overflow-x: hidden;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 12px;
  color: #ffd599;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}

[hidden] {
  display: none !important;
}

.studio-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px 18px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.studio-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  padding: 16px 18px;
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 18px;
}

.studio-header-main {
  flex: 1 1 480px;
  min-width: 0;
}

.studio-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #fff;
}

.brand-badge .brand-va {
  background: #ff9700;
  color: #100b00;
  padding: 1px 5px;
  border-radius: 5px;
  margin-left: 1px;
}

.brand-badge .brand-age {
  font-size: 11px;
  font-weight: 800;
  color: #ffad33;
  border: 1px solid var(--accent-border);
  padding: 0 5px;
  border-radius: 6px;
  margin-left: 5px;
}

.status-tag,
.sync-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--studio-muted);
}

.sync-badge {
  background: var(--accent-soft);
  color: #ffd38c;
  border: 1px solid rgba(255, 153, 0, 0.3);
}

.studio-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.3;
}

.studio-header p {
  margin: 0;
  color: var(--studio-muted);
  font-size: 13px;
}

.studio-header-side {
  flex: 0 1 auto;
}

.global-video-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.switch-caption {
  font-size: 12px;
  color: var(--studio-muted);
  font-weight: 600;
}

.preset-btn {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--studio-card-2);
  border: 1px solid var(--studio-line);
  color: var(--studio-ink);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.preset-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 800;
}

/* Mode tabs */
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--studio-card);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--studio-line);
}

.mode-tab {
  flex: 1 1 180px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  color: var(--studio-muted);
  text-align: center;
}

.mode-tab.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.workspace-main {
  min-width: 0;
}

/* Compare Tab */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.compare-card {
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.compare-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35);
}

.compare-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.scheme-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffd38c;
  border: 1px solid rgba(255, 153, 0, 0.35);
}

.compare-card h2 {
  margin: 6px 0 2px;
  font-size: 16px;
  line-height: 1.3;
}

.compare-sub {
  margin: 0;
  font-size: 12px;
  color: var(--studio-muted);
}

.compare-mini-phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 15.5;
  max-height: 470px;
  background: var(--canvas);
  border: 2px solid #2a2a36;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.metric-chip {
  background: var(--studio-card-2);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
}

.metric-chip strong {
  display: block;
  color: #ffd38c;
  font-size: 13px;
}

.compare-pros {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--studio-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compare-tradeoff {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--studio-muted);
}

.compare-card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.studio-cta {
  flex: 1;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 13px;
}

.studio-btn-ghost {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--studio-card-2);
  border: 1px solid var(--studio-line);
  color: var(--studio-ink);
  font-weight: 600;
  font-size: 13px;
}

/* Comparison table */
.audit-table-card {
  margin-top: 16px;
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  padding: 16px;
  overflow-x: auto;
}

.audit-table-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 660px;
}

.compare-table th,
.compare-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--studio-line);
  vertical-align: top;
}

.compare-table th {
  color: #ffd38c;
  font-size: 12px;
  font-weight: 700;
}

/* Demo Tab Layout */
.demo-layout {
  display: grid;
  grid-template-columns: minmax(300px, 404px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.phone-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mobile-quick-bar {
  display: none;
  width: 100%;
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 14px;
  padding: 8px;
  gap: 6px;
  flex-wrap: wrap;
}

.phone-stage {
  position: relative;
  width: min(100%, 393px);
  height: min(812px, calc(100dvh - 110px));
  min-height: 600px;
  background: var(--canvas);
  color: var(--ink);
  border: 3px solid #2b2b38;
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  font-size: 15px;
}

.phone-stage[data-large-text="1"] {
  font-size: 19px;
}

.phone-stage[data-large-text="1"] .op-title {
  font-size: clamp(26px, 7.2vw, 31px);
}

.phone-stage[data-large-text="1"] .op-sub {
  font-size: 17px;
}

.phone-stage[data-large-text="1"] .op-cta-primary,
.phone-stage[data-large-text="1"] .sp-primary-btn {
  font-size: 20px;
}

.phone-stage[data-large-text="1"] .op-drama-pill {
  font-size: 15px;
}

/* Phone Inner Screen */
.phone-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  overflow: hidden;
}

/* Opening Fullscreen Stage (Schemes A & B) */
.op-screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}

.op-bg-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.op-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.12) 26%,
    rgba(0, 0, 0, 0.18) 54%,
    rgba(0, 0, 0, 0.92) 78%,
    #000000 100%
  );
  pointer-events: none;
}

.op-top-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 4px;
}

.op-formula-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 153, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.op-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.op-sound-btn,
.op-skip-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.op-skip-btn {
  color: #e5e2dc;
}

/* Scheme B 2-beat progress bar */
.op-beat-bar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 14px;
  margin-top: 2px;
}

.op-beat-seg {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  padding: 0;
  min-height: 20px;
  display: flex;
  align-items: center;
}

.op-beat-track {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.op-beat-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.op-beat-seg.is-done .op-beat-fill {
  width: 100%;
}

.op-beat-seg.is-active .op-beat-fill {
  width: 100%;
  transition: width 1.6s linear;
}

/* Before thumb overlay (Scheme A/B corner hint) */
.op-before-thumb {
  position: relative;
  z-index: 4;
  margin: 8px 14px 0;
  width: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 153, 0, 0.72);
  background: #121212;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}

.op-before-thumb img {
  display: block;
  width: 100%;
  height: 82px;
  object-fit: cover;
}

.op-before-thumb span {
  display: block;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 4px;
  background: #ff9900;
  color: #100b00;
}

/* Bottom content on Opening */
.op-bottom {
  position: relative;
  z-index: 5;
  margin-top: auto;
  padding: 12px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.op-drama-pill {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(20, 18, 22, 0.9);
  border: 1px solid rgba(255, 153, 0, 0.45);
  color: #fff;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.25s ease;
}

.op-drama-pill.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.op-drama-pill.is-flashing {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.32), 0 8px 24px rgba(255, 153, 0, 0.2);
}

.op-drama-pill.is-flashing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 173, 51, 0.35) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: dramaSheen 1.2s ease-out 1;
  pointer-events: none;
}

@keyframes dramaSheen {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(120%); }
}

.op-drama-thumbs {
  display: flex;
  align-items: center;
  flex: none;
}

.op-drama-thumbs img {
  width: 28px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.op-drama-thumbs img + img {
  margin-left: -10px;
}

.op-drama-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.op-drama-copy strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  color: #fff;
}

.op-drama-copy span {
  display: block;
  font-size: 11px;
  color: #ffd38c;
  font-weight: 700;
}

.op-drama-arrow {
  flex: none;
  font-size: 14px;
  font-weight: 800;
  color: #ffad33;
}

.op-title {
  margin: 0;
  font-size: 27px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: #fff;
}

.op-sub {
  margin: 0;
  font-size: 14px;
  color: #d7d4de;
  font-weight: 500;
}

.op-cta-primary {
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 26px rgba(255, 153, 0, 0.34);
}

.op-cta-primary:active {
  transform: scale(0.99);
}

.op-cta-sub {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #b7b3c0;
}

.op-mini-link {
  align-self: center;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #d1ced8;
  text-decoration: underline;
}

/* Scheme B Drama Flash Stage overlay */
.op-drama-flash-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
}

.op-drama-flash-banner {
  position: relative;
  z-index: 5;
  margin: 12px 14px 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.op-drama-flash-banner strong {
  display: block;
  font-size: 14px;
  color: #fff;
}

.op-drama-flash-banner span {
  display: block;
  font-size: 12px;
  color: #ffd38c;
}

.op-drama-flash-watch {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: #282828;
  border: 1px solid var(--accent);
  color: #ffd38c;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

/* Scheme C Split Card Layout */
.op-split-screen {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  padding: 12px 14px 16px;
  gap: 10px;
  overflow-y: auto;
}

.op-split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.op-split-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.op-split-cards {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) auto minmax(0, 1.32fr);
  gap: 8px;
  align-items: stretch;
  min-height: 228px;
  flex: 1 1 auto;
}

.op-card-slot {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.op-card-slot.is-after {
  border-color: var(--accent-border);
}

.op-card-slot-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 165px;
  background: #0a0a0e;
}

.op-card-slot-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.op-card-slot-label {
  padding: 7px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--card-vip);
  color: #fff;
}

.op-card-slot.is-after .op-card-slot-label {
  background: rgba(255, 153, 0, 0.18);
  color: #ffd38c;
}

.op-split-arrow {
  align-self: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Media Stage internals */
.wk-stage-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wk-real-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  background: #050507;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.wk-real-video {
  width: 100%;
  height: 100%;
  display: block;
}

.wk-real-video-wrap.is-portrait-source .wk-real-video {
  object-fit: cover;
}

.wk-real-video-wrap.is-landscape-source .wk-real-video {
  object-fit: contain;
  position: relative;
  z-index: 2;
}

.wk-landscape-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 42%, rgba(255, 153, 0, 0.2), #050507 72%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 12px;
  font-size: 10px;
  color: rgba(255, 211, 140, 0.45);
}

.wk-media-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0d0c10;
}

.wk-media-fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.78;
}

.wk-fallback-pill {
  position: absolute;
  top: 88px;
  right: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

/* Mini compare mode tweaks */
.compare-mini-phone .op-title {
  font-size: 19px;
}

.compare-mini-phone .op-sub {
  font-size: 12px;
}

.compare-mini-phone .op-cta-primary {
  min-height: 44px;
  font-size: 14px;
  border-radius: 12px;
}

.compare-mini-phone .op-bottom {
  padding: 8px 10px 12px;
  gap: 7px;
}

.compare-mini-phone .op-split-cards {
  min-height: 150px;
}

.compare-mini-phone .op-card-slot-media {
  min-height: 108px;
}

.compare-mini-phone .op-drama-pill {
  min-height: 40px;
  padding: 5px 8px;
  gap: 8px;
}

.compare-mini-phone .op-drama-thumbs img {
  width: 22px;
  height: 30px;
}

.compare-mini-phone .op-drama-copy strong {
  font-size: 11px;
}

.compare-mini-phone .op-drama-copy span {
  font-size: 10px;
}

.compare-mini-phone .op-top-bar {
  padding: 8px 8px 4px;
}

.compare-mini-phone .op-skip-btn {
  min-width: 36px;
  min-height: 34px;
  padding: 0 8px;
  font-size: 11px;
}

.compare-mini-phone .op-split-screen {
  padding: 10px;
  gap: 7px;
}

/* SPA Inner Shell (Create / Catalog / Dramas / Credits / Result) */
.sp-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
}

.sp-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--canvas-deep);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sp-back-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--card-vip);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sp-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp-credits-pill {
  min-height: 40px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card-vip);
  border: 1px solid rgba(255, 153, 0, 0.45);
  color: #ffd38c;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.sp-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 2-step Guide Banner */
.sp-guide-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 14px;
}

.sp-guide-banner button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  text-decoration: underline;
  font-weight: 700;
  font-size: 13px;
}

.sp-template-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sp-template-hero img {
  width: 68px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  flex: none;
}

.sp-template-meta {
  min-width: 0;
  flex: 1 1 auto;
}

.sp-template-meta h2 {
  margin: 2px 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.sp-template-meta p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.sp-badge-amber {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffd38c;
}

.sp-more-link {
  min-height: 44px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #ffd38c;
  white-space: nowrap;
}

/* Photo picker box */
.sp-photo-box {
  padding: 12px;
  border-radius: 16px;
  background: var(--card);
  border: 2px dashed rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-photo-box.is-guided {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.22);
}

.sp-picked-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-picked-row img {
  width: 64px;
  height: 82px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--accent);
}

.sp-sample-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sp-sample-btn {
  padding: 5px;
  border-radius: 12px;
  background: var(--card-vip);
  border: 1.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}

.sp-sample-btn[aria-pressed="true"] {
  border-color: var(--accent);
}

.sp-sample-btn img {
  width: 100%;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.sp-sample-btn span {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.sp-upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card-vip);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sp-dock {
  flex: none;
  padding: 10px 14px 14px;
  background: var(--canvas-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-primary-btn {
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sp-secondary-btn {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--card-vip);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.sp-credit-alert {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 153, 0, 0.14);
  border: 1px solid var(--accent);
  color: #ffe2b3;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Catalog Grid */
.sp-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sp-tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  text-align: left;
  padding: 0;
}

.sp-tile.is-guided {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.25);
}

.sp-tile img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  display: block;
}

.sp-tile-cap {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-tile-cap strong {
  font-size: 13px;
  color: #fff;
}

.sp-tile-cap span {
  font-size: 11px;
  color: var(--muted);
}

/* Tab Bar inside SPA */
.sp-tab-bar {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--card-vip);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 6px 8px;
}

.sp-tab-btn {
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.sp-tab-btn[aria-current="page"] {
  color: var(--accent);
}

.sp-image-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 26%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.sp-image-tip button {
  min-height: 36px;
  padding: 0 4px;
  text-decoration: underline;
  font-weight: 700;
}

/* Dramas player inside phone */
.sp-drama-player {
  position: relative;
  flex: 1 1 auto;
  min-height: 320px;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sp-drama-canvas {
  position: absolute;
  inset: 0;
}

.sp-drama-overlay {
  position: relative;
  z-index: 3;
  margin-top: auto;
  padding: 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92) 45%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-drama-eps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sp-ep-btn {
  min-height: 44px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(40, 40, 40, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
}

.sp-ep-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Result & Generating */
.sp-generating-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.sp-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(255, 153, 0, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sp-result-img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: 16px;
  background: #0d0c10;
  border: 1px solid rgba(255, 153, 0, 0.45);
}

/* Right Control Panel in Demo Mode */
.control-panel {
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.cp-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--studio-line);
}

.cp-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cp-section h2 {
  margin: 0;
  font-size: 14px;
  color: #ffd38c;
}

.cp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.cp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--studio-card-2);
  border: 1px solid var(--studio-line);
  font-size: 12px;
  cursor: pointer;
}

.cp-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-input {
  flex: 1 1 200px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #0d0d12;
  border: 1px solid var(--studio-line);
  font-size: 12px;
}

.telemetry-box {
  background: #0b0b10;
  border: 1px solid var(--studio-line);
  border-radius: 12px;
  padding: 10px;
  max-height: 170px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--studio-muted);
}

.telemetry-line strong {
  color: var(--green);
}

/* Spec Tab */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.spec-card {
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-card h2 {
  margin: 0;
  font-size: 16px;
  color: #ffd38c;
}

.spec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--studio-card-2);
  border: 1px solid var(--studio-line);
  font-size: 13px;
}

.spec-item strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
}

.spec-item span {
  color: var(--studio-muted);
}

/* Toast */
.studio-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .op-drama-pill,
  .op-beat-seg.is-active .op-beat-fill,
  .op-drama-pill.is-flashing::after,
  .sp-spinner {
    animation: none !important;
    transition: none !important;
  }
}

.phone-stage[data-reduced-motion="1"] .op-drama-pill,
.phone-stage[data-reduced-motion="1"] .op-beat-seg.is-active .op-beat-fill,
.phone-stage[data-reduced-motion="1"] .op-drama-pill.is-flashing::after,
.phone-stage[data-reduced-motion="1"] .sp-spinner {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 1040px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .demo-layout,
  .spec-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .studio-wrap {
    padding: 6px 8px 32px;
    gap: 8px;
  }
  .studio-header {
    padding: 8px 10px;
    border-radius: 12px;
    gap: 6px;
  }
  .studio-brand-row {
    margin-bottom: 4px;
    gap: 6px;
  }
  .status-tag,
  .sync-badge {
    font-size: 10px;
    padding: 2px 7px;
  }
  .studio-header h1 {
    font-size: 14px;
    margin: 0;
  }
  .studio-header p {
    display: none;
  }
  .switch-caption {
    display: none;
  }
  .global-video-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .preset-btn {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 11px;
    text-align: center;
  }
  .mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 4px;
    gap: 4px;
  }
  .mode-tab {
    min-height: 36px;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.2;
  }
  .mobile-quick-bar {
    display: flex;
    padding: 6px;
    gap: 4px;
  }
  .mobile-quick-bar .preset-btn {
    flex: 1 1 0;
  }
  .phone-stage {
    width: 100%;
    height: clamp(460px, calc(100dvh - 265px), 600px);
    min-height: 460px;
    border-radius: 22px;
    border-width: 2px;
  }
  .phone-stage .op-before-thumb {
    width: 56px;
    margin: 4px 12px 0;
  }
  .phone-stage .op-before-thumb img {
    height: 60px;
  }
  .phone-stage .op-bottom {
    padding: 8px 12px 12px;
    gap: 7px;
  }
  .phone-stage .op-title {
    font-size: 24px;
  }
  .phone-stage .op-cta-primary {
    min-height: 54px;
  }
  .cp-toggle-list {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
 * Real Phone Size Comparison (A vs C vs A+) & Scheme A+
 * ========================================================= */
.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 16px;
  margin-bottom: 14px;
}

.compare-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.real-phone-compare-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  align-items: flex-start;
  max-width: 100%;
  min-width: 0;
}

.real-phone-compare-row.is-fit-mode {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  overflow-x: visible;
}

.compare-phone-col {
  flex: 0 0 auto;
  width: calc(var(--phone-w, 393px) + 26px);
  max-width: 100%;
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.real-phone-compare-row.is-fit-mode .compare-phone-col {
  width: 100%;
}

.compare-phone-col.is-recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35);
}

.compare-phone-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.compare-phone-meta h2 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.3;
}

.compare-phone-dims {
  font-family: var(--mono);
  font-size: 11px;
  color: #ffd38c;
}

.real-phone-frame-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.real-phone-frame {
  position: relative;
  width: var(--phone-w, 393px);
  height: var(--phone-h, 852px);
  max-width: 100%;
  background: var(--canvas);
  color: var(--ink);
  border: 3px solid #2b2b38;
  border-radius: 38px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  font-size: 15px;
}

.real-phone-compare-row.is-fit-mode .real-phone-frame {
  zoom: 0.8;
}

.real-phone-frame[data-large-text="1"] {
  font-size: 19px;
}

.real-phone-frame[data-large-text="1"] .op-title {
  font-size: clamp(24px, 6.8vw, 30px);
}

.real-phone-frame[data-large-text="1"] .op-sub {
  font-size: 16px;
}

.real-phone-frame[data-large-text="1"] .op-cta-primary {
  font-size: 19px;
}

.phone-stage.is-sized-demo {
  width: min(100%, var(--phone-w, 393px));
  height: min(var(--phone-h, 852px), calc(100dvh - 110px));
}

/* Scheme A+ Morph Curtain + Connector Badge + Drama Peek */
.op-morph-curtain {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #09080c;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.48s ease, transform 0.52s ease;
  pointer-events: none;
}

.op-morph-curtain.is-revealed {
  opacity: 0;
  transform: scale(1.04);
}

.op-morph-curtain img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.op-morph-tag {
  position: absolute;
  bottom: 42%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--accent);
  color: #ffd38c;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.op-connector-badge {
  position: relative;
  z-index: 5;
  align-self: flex-start;
  margin: 6px 14px 0;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  background: rgba(12, 12, 16, 0.86);
  border: 1px solid rgba(255, 153, 0, 0.65);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}

.op-connector-badge img {
  width: 44px;
  height: 54px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.op-connector-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.op-connector-copy strong {
  font-size: 12px;
  color: #ffd38c;
  letter-spacing: 0.01em;
}

.op-connector-copy span {
  font-size: 11px;
  color: #e2dfeb;
}

.op-drama-pill.is-peek {
  min-height: 76px;
  padding: 10px 12px;
  border-color: var(--accent-bright);
  background: rgba(28, 18, 10, 0.94);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.42), 0 14px 32px rgba(255, 153, 0, 0.28);
}

.op-drama-pill.is-peek .op-drama-thumbs img {
  width: 42px;
  height: 56px;
}

.op-drama-pill.is-peek .op-drama-copy strong {
  font-size: 15px;
}

/* =========================================================
 * Historical WK Onboarding Benchmark (v1 - v4 vs New A+)
 * ========================================================= */
.history-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  align-items: flex-start;
  max-width: 100%;
  min-width: 0;
}

.history-card {
  flex: 0 0 auto;
  width: 340px;
  max-width: 100%;
  background: var(--studio-card);
  border: 1px solid var(--studio-line);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card.is-new-winner {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35);
}

.history-phone-shell {
  position: relative;
  width: 100%;
  height: 560px;
  border-radius: 28px;
  border: 2px solid #2b2b38;
  background: #14111c;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wk-hist-backdrop {
  flex: 1 1 auto;
  padding: 14px;
  background: radial-gradient(circle at top, #2c1e3e 0%, #14111c 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.wk-hist-modal {
  background: #211d29;
  border: 1px solid #6b4e70;
  border-radius: 20px;
  padding: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.wk-hist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #d6c5e0;
}

.wk-hist-modal h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.wk-hist-modal p {
  margin: 0;
  font-size: 12px;
  color: #dcd3e6;
}

.wk-hist-media-box {
  position: relative;
  flex: 1 1 auto;
  min-height: 200px;
  background: #120f18;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-hist-media-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.wk-hist-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.wk-hist-dot {
  min-width: 32px;
  min-height: 32px;
  color: #8f7e9d;
  font-size: 12px;
}

.wk-hist-dot[aria-pressed="true"] {
  color: #e796ff;
}

.wk-hist-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wk-hist-purple-btn {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #9e3e96;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.wk-hist-ghost-btn {
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid #6b4e70;
  color: #e5d8ed;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .op-morph-curtain {
    transition: none !important;
  }
}

.real-phone-frame[data-reduced-motion="1"] .op-morph-curtain,
.phone-stage[data-reduced-motion="1"] .op-morph-curtain {
  transition: none !important;
}
