/* Story Production System — Studio launch / download page (studio.spspublishing.com) */
[data-sps-theme="light"] {
  --sps-bg: #f8f5ef;
  --sps-bg-alt: #ede6da;
  --sps-text: #1a1a3a;
  --sps-heading: #111118;
  --sps-muted: #5c5c6a;
  --sps-card-border: rgba(44, 47, 99, 0.22);
  --sps-card-bg: #ffffff;
  --sps-primary: #f2b34c;
  --sps-primary-hover: #e38b2c;
  --sps-primary-text: #1a1a3a;
  --sps-link: #2c2f63;
  --sps-focus: rgba(245, 211, 122, 0.5);
  --sps-header-bg: #1a1a3a;
  --sps-toggle-icon: #f5d37a;
}

[data-sps-theme="dark"] {
  --sps-bg: #1a1a3a;
  --sps-bg-alt: rgba(75, 63, 121, 0.45);
  --sps-text: #f8f5ef;
  --sps-heading: #ffdfa3;
  --sps-muted: #c4bfd8;
  --sps-card-border: rgba(110, 79, 158, 0.45);
  --sps-card-bg: rgba(75, 63, 121, 0.5);
  --sps-primary: #f2b34c;
  --sps-primary-hover: #e38b2c;
  --sps-primary-text: #1a1a3a;
  --sps-link: #f5d37a;
  --sps-focus: rgba(245, 211, 122, 0.45);
  --sps-header-bg: #1a1a3a;
  --sps-toggle-icon: #f5d37a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sps-text);
  -webkit-font-smoothing: antialiased;
}

[data-sps-theme="light"] body {
  background: var(--sps-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(242, 179, 76, 0.22), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(44, 47, 99, 0.06), transparent 50%);
}

[data-sps-theme="dark"] body {
  background: var(--sps-bg);
  background-image:
    linear-gradient(180deg, #1a1a3a 0%, #2c2f63 38%, #2c2f63 68%, #4b3f79 100%),
    radial-gradient(ellipse 100% 70% at 50% -15%, rgba(242, 179, 76, 0.14), transparent 52%),
    radial-gradient(ellipse 75% 55% at 100% 100%, rgba(75, 63, 121, 0.4), transparent 55%);
}

.hidden {
  display: none !important;
}

.studio-launch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 20px 18px 32px;
}

.studio-launch__busy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  max-width: 22rem;
}

.studio-launch__busy-logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: contain;
}

.studio-launch__busy-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--sps-heading);
}

.studio-launch__busy-detail {
  margin: 0;
  font-size: 0.875rem;
  color: var(--sps-muted);
  line-height: 1.45;
}

.studio-launch__busy-dots {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.studio-launch__busy-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sps-primary);
  animation: studio-launch-dot 1.2s ease-in-out infinite;
}

.studio-launch__busy-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.studio-launch__busy-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes studio-launch-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.studio-launch__card {
  width: 100%;
  max-width: 440px;
  background: var(--sps-card-bg);
  border: 1px solid var(--sps-card-border);
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(26, 26, 58, 0.04),
    0 16px 40px rgba(26, 26, 58, 0.1);
  padding: 0 22px 22px;
  overflow: hidden;
}

.studio-launch__brand {
  text-align: center;
}

.studio-launch__logo-wrap {
  width: calc(100% + 44px);
  margin: 0 -22px 14px;
  padding: 18px 16px 16px;
  background: radial-gradient(ellipse 120% 100% at 50% 0%, #4b3f79 0%, #2c2f63 42%, #1f1b35 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

[data-sps-theme="light"] .studio-launch__logo-wrap {
  background: radial-gradient(ellipse 120% 100% at 50% 0%, #4a3f72 0%, #2f2858 42%, #1e1a32 100%);
}

.studio-launch__brand-icon {
  display: block;
  width: min(120px, 36vw);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.studio-launch__title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sps-heading);
}

.studio-launch__subtitle {
  margin: 10px auto 0;
  max-width: 36ch;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--sps-muted);
}

.studio-launch__subtitle strong {
  color: var(--sps-heading);
  font-weight: 600;
}

.studio-launch__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.studio-launch__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.12s ease;
}

/* CTA colors: css/sps-buttons.css */

.studio-launch__status {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
  color: var(--sps-muted);
}

.studio-launch__platforms {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--sps-card-border);
}

.studio-launch__platforms-heading {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sps-muted);
}

.studio-launch__platform-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-launch__platform-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sps-text);
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--sps-bg-alt);
}

.studio-launch__platform-list a:hover {
  border-color: var(--sps-card-border);
}

.studio-launch__platform-list a.is-recommended {
  border-color: rgba(242, 179, 76, 0.45);
}

.studio-launch__platform-list a span:last-child {
  font-size: 0.75rem;
  color: var(--sps-muted);
  font-weight: 600;
}

.studio-launch__footnote {
  margin: 18px 0 0;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--sps-muted);
}

.studio-launch__link {
  color: var(--sps-link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sps-theme-toggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 900;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--sps-header-bg);
  color: var(--sps-toggle-icon);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sps-theme-toggle:hover {
  transform: scale(1.06);
}

/* Theme toggle icons — matches desktop app v0.3/app */
.sps-theme-toggle-icons {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 1;
}

.sps-theme-toggle-icon {
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

html[data-sps-theme="light"] .sps-theme-toggle-icon--to-dark {
  display: flex;
}

html[data-sps-theme="dark"] .sps-theme-toggle-icon--to-light,
html:not([data-sps-theme="light"]) .sps-theme-toggle-icon--to-light {
  display: flex;
}

.sps-theme-toggle-icon .sps-ui-icon-img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
