.sx-enhanced { color-scheme:dark; background:#15171b; }
.sx-enhanced body { margin:0; background:#15171b; }
.sx-enhanced #sx-creator-mobile { --sx-duration:180ms; }
.sx-enhanced #sx-creator-mobile button { touch-action:manipulation; transition:background-color var(--sx-duration),color var(--sx-duration),opacity var(--sx-duration),transform 120ms; }
.sx-enhanced #sx-creator-mobile button:active:not(:disabled) { transform:scale(.96); }
.sx-enhanced #sx-creator-mobile button:disabled { cursor:default; opacity:.45; }
.sx-enhanced #sx-creator-mobile .sc-nav button { min-height:48px; position:relative; }
.sx-enhanced #sx-creator-mobile .sc-track-play { min-width:44px; min-height:44px; }
.sx-enhanced #sx-creator-mobile .sc-player-toggle { min-width:48px; min-height:48px; }
.sx-enhanced #sx-creator-mobile .sc-player-controls button { min-width:44px; min-height:44px; }

/* Keep the visual controls small without shrinking their touch targets. */
.sx-compact-player #sx-creator-mobile .sc-player {
  padding: 0 4px 3px 10px;
  background: var(--sc-surface);
}
.sx-compact-player #sx-creator-mobile .sc-player-top { gap: 0; }
.sx-compact-player #sx-creator-mobile .sc-player-info { padding-right: 5px; }
.sx-compact-player #sx-creator-mobile .sc-player-info strong { line-height: 16px; }
.sx-compact-player #sx-creator-mobile .sc-player-controls { gap: 0; }
.sx-compact-player #sx-creator-mobile .sc-player :is(.sc-player-controls button, .sc-player-close) {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}
.sx-compact-player #sx-creator-mobile .sc-player :is(.sc-player-controls svg, .sc-player-close svg) { width: 16px; height: 16px; }
.sx-compact-player #sx-creator-mobile .sc-player-controls .sc-player-toggle {
  position: relative;
  isolation: isolate;
  background: transparent;
}
.sx-compact-player #sx-creator-mobile .sc-player-controls .sc-player-toggle::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border-radius: 50%;
  background: var(--sc-soft);
  pointer-events: none;
}
.sx-compact-player #sx-creator-mobile .sc-player-timeline { margin: 0 6px 0 0; gap: 6px; }
.sx-compact-player #sx-creator-mobile .sc-player-time { min-width: 24px; font-size: 10px; }
.sx-compact-player #sx-creator-mobile .sc-player-scrubber { height: 26px; }
.sx-enhanced #sx-creator-mobile .sc-toast { max-width:calc(100% - 32px); pointer-events:none; animation:sx-toast-in 180ms ease-out; }
.sx-enhanced #sx-creator-mobile .sc-primary[disabled] { cursor:progress; }
.sx-enhanced #sx-creator-mobile .sx-danger { color:var(--sc-error); }
.sx-network { position:fixed; z-index:100; top:8px; left:12px; right:12px; max-width:620px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; background:#24282f; border:1px solid #536375; border-radius:12px; color:#eef2f7; font:12px/1.5 Inter,system-ui,sans-serif; box-shadow:0 4px 16px #0005; }
.sx-network[hidden] { display:none; }
.sx-network button { background:#3e8df5; color:white; border:0; border-radius:8px; padding:10px 14px; font:inherit; min-height:44px; }
.sx-preview-badge { position:fixed; bottom:0; left:50%; transform:translateX(-50%); font:10px/1.4 Inter,system-ui,sans-serif; color:#aeb8c7; background:#15171bee; padding:3px 10px; pointer-events:none; z-index:40; white-space:nowrap; border-radius:4px 4px 0 0; }
#sx-privacy { background:#1c1f24; color:#eef2f7; border:1px solid #303640; border-radius:16px; padding:24px; width:calc(100% - 32px); max-width:520px; max-height:80dvh; font:14px/1.65 Inter,system-ui,sans-serif; }
#sx-privacy::backdrop { background:#0009; }
#sx-privacy h2 { font-size:21px; margin-top:0; }
#sx-privacy button { background:#3e8df5; color:#fff; border:0; border-radius:8px; min-height:44px; width:100%; font:inherit; }
@keyframes sx-toast-in { from { opacity:0; translate:0 6px; } to { opacity:1; translate:0 0; } }
@media(prefers-reduced-motion:reduce) { .sx-enhanced #sx-creator-mobile *, .sx-enhanced #sx-creator-mobile *::before { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }
.sx-transfer-progress { appearance:none; width:100%; height:5px; border:0; border-radius:4px; overflow:hidden; background:#303640; margin:4px 0 16px; }
.sx-transfer-progress::-webkit-progress-bar { background:#303640; }
.sx-transfer-progress::-webkit-progress-value { background:#3e8df5; border-radius:4px; transition:width 120ms linear; }
@media(hover:hover) and (min-width:900px) {
 .sx-enhanced:not(.sx-native) body { display:grid; place-items:center; min-height:100dvh; background:radial-gradient(ellipse at 50% 30%,#222a36,#0c0e12 70%); }
 .sx-enhanced:not(.sx-native) #sx-creator-mobile { width:410px; height:min(900px,calc(100dvh - 40px)); border:1px solid #303640; border-radius:24px; overflow:hidden; box-shadow:0 24px 100px #0008; }
 .sx-enhanced:not(.sx-native) #sx-creator-mobile :is(.sc-stage,.sc-phone) { height:100%; }
 .sx-enhanced:not(.sx-native) .sx-preview-badge { bottom:4px; }
}
/* Explicit dark colors also cover WebViews predating CSS light-dark(). */
.sx-enhanced #sx-creator-mobile { --sc-bg:#15171b; --sc-surface:#1c1f24; --sc-field:#24282f; --sc-hover:#2c323c; --sc-line:#303640; --sc-text:#eef2f7; --sc-secondary:#aeb8c7; --sc-muted:#8996a8; --sc-blue:#77b2ff; --sc-fill:#3e8df5; --sc-onblue:#fff; --sc-soft:#20334c; --sc-green:#79d5a7; --sc-error:#ff9bb0; }

/* Keep the track details aligned above the waveform at every width. */
.sx-enhanced #sx-creator-mobile .sc-track {
  grid-template: "play info actions" auto "wave wave wave" auto / 44px minmax(0, 1fr) max-content;
  gap: 2px 8px;
  padding: 6px 0;
  min-width: 0;
}
.sx-enhanced #sx-creator-mobile .sc-track > button.sc-track-play {
  grid-area: play;
  background: var(--sc-cover-color, #233956);
  color: #fff;
}
.sx-enhanced #sx-creator-mobile .sc-track:is([data-track$="2"], [data-track$="7"]) {
  --sc-cover-color: #3b285f;
}
.sx-enhanced #sx-creator-mobile .sc-track:is([data-track$="3"], [data-track$="8"]) {
  --sc-cover-color: #164747;
}
.sx-enhanced #sx-creator-mobile .sc-track:is([data-track$="4"], [data-track$="9"]) {
  --sc-cover-color: #532c51;
}
.sx-enhanced #sx-creator-mobile .sc-track:is([data-track$="5"], [data-track$="0"]) {
  --sc-cover-color: #55382d;
}
.sx-enhanced #sx-creator-mobile .sc-track-info { display: block; grid-area: info; min-width: 0; }
.sx-enhanced #sx-creator-mobile .sc-track-name { justify-content: flex-start; gap: 6px; min-width: 0; }
.sx-enhanced #sx-creator-mobile .sc-track-name h2 { min-width: 0; white-space: nowrap; }
.sx-enhanced #sx-creator-mobile .sc-track-name time { white-space: nowrap; }
.sx-enhanced #sx-creator-mobile .sc-track-actions { grid-area: actions; flex-wrap: nowrap; margin: 0 -3px 0 0; }
.sx-enhanced #sx-creator-mobile .sc-track-wave { grid-area: wave; }
.sx-enhanced #sx-creator-mobile .sc-track-actions button { flex: 0 0 auto; min-height: 44px; }
.sx-enhanced #sx-creator-mobile :is(.sc-track-play, .sc-player-toggle) { position: relative; }
.sx-enhanced #sx-creator-mobile [data-action="play"][aria-busy="true"]::after {
  position: absolute;
  inset: 4px;
  border: 2px solid #77b2ff45;
  border-block-start-color: #77b2ff;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  animation: sx-preview-loading 750ms linear infinite;
}
.sx-enhanced #sx-creator-mobile .sc-track-play[aria-busy="true"]::after {
  border-color: #ffffff48;
  border-block-start-color: #fff;
}
@keyframes sx-preview-loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .sx-enhanced #sx-creator-mobile .sc-player-toggle[aria-busy="true"]::after { animation: none; }
}

/* Animate only opacity and translation so Android can composite the drawer. */
.sx-enhanced #sx-creator-mobile .sc-overlay { backdrop-filter: none; transition: opacity 240ms ease-out; }
.sx-enhanced #sx-creator-mobile .sc-overlay .sc-sheet {
  visibility: visible;
  transition: transform 260ms cubic-bezier(.4, 0, .65, 1);
}
.sx-enhanced #sx-creator-mobile .sc-overlay.is-open .sc-sheet {
  transition: transform 360ms cubic-bezier(.16, 1, .3, 1);
}
.sx-enhanced #sx-creator-mobile .sc-overlay.is-dragging { transition: none; }

@font-face {
  font-family: IRANSansX;
  src: url('./vendor/fonts/IRANSansX-Regular.woff2') format('woff2');
  font-weight: 100 599;
  font-display: swap;
}
@font-face {
  font-family: IRANSansX;
  src: url('./vendor/fonts/IRANSansX-Bold.woff2') format('woff2');
  font-weight: 600 900;
  font-display: swap;
}
.sx-enhanced #sx-creator-mobile[lang="fa"],
.sx-enhanced #sx-creator-mobile [lang="fa"],
.sx-enhanced :is(#sx-privacy, .sx-network, .sx-preview-badge)[lang="fa"] { font-family: IRANSansX, sans-serif; }
.sx-enhanced #sx-creator-mobile[dir="rtl"] { direction: rtl; }
.sx-enhanced #sx-creator-mobile [lang="en"] { font-family: Inter, system-ui, sans-serif; }
.sx-enhanced #sx-creator-mobile :is(h1,h2,.sc-mobile):lang(fa) { letter-spacing: normal; }
.sx-enhanced #sx-creator-mobile[dir="rtl"] :is(.lucide-chevron-right, .lucide-arrow-right, .lucide-arrow-left) { transform: scaleX(-1); }
.sx-enhanced #sx-creator-mobile .sc-panel-back { display: flex; align-items: center; gap: 5px; }
.sx-enhanced #sx-creator-mobile .sc-panel-back svg { width: 14px; height: 14px; }
.sx-enhanced #sx-creator-mobile .sx-language-setting { padding: 14px 0; border-bottom: 1px solid var(--sc-line); }
.sx-enhanced #sx-creator-mobile .sx-language-setting p { margin: 0 0 10px; color: var(--sc-secondary); font-size: 12px; }
.sx-enhanced #sx-creator-mobile .sx-language { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sc-field); }
.sx-enhanced #sx-creator-mobile .sx-language button { flex: 1; min-height: 40px; padding: 6px 10px; border-radius: 8px; color: var(--sc-secondary); }
.sx-enhanced #sx-creator-mobile .sx-language button[aria-pressed="true"] { background: var(--sc-soft); color: var(--sc-blue); }
.sx-enhanced #sx-creator-mobile .sc-auth .sx-language { margin-block-start: 18px; }

.sx-enhanced #sx-creator-mobile .sx-introduction {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 22px 22px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
}
.sx-introduction header, .sx-intro-controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.sx-intro-brand { display: inline-flex; gap: 7px; align-items: center; font-weight: 700; font-size: 19px; }
.sx-intro-brand svg { width: 22px; color: var(--sc-blue); }
.sx-enhanced #sx-creator-mobile .sx-intro-skip, .sx-enhanced #sx-creator-mobile .sx-intro-previous {
  min-height: 44px; padding: 8px 12px; color: var(--sc-secondary);
}
.sx-intro-slide { margin: auto 0; text-align: center; padding-block: 26px; touch-action: pan-y; animation: sx-intro-in 240ms ease-out; }
.sx-intro-art {
  width: clamp(104px, 36vw, 152px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border: 1px solid #3e8df54d;
  border-radius: 34px;
  background: radial-gradient(ellipse at 40% 20%, #28436a, #1a2331 75%);
  color: var(--sc-blue);
}
.sx-enhanced #sx-creator-mobile .sx-intro-art svg { width: 46%; height: 46%; stroke-width: 1.5; }
.sx-intro-slide h1 { font-size: clamp(21px, 6vw, 27px); line-height: 1.45; margin: 0 0 9px; }
.sx-intro-slide p { color: var(--sc-secondary); line-height: 1.8; margin: 0 auto; max-width: 30ch; }
.sx-intro-steps { display: flex; justify-content: center; }
.sx-intro-steps button { min-width: 34px; min-height: 38px; display: grid; place-items: center; }
.sx-intro-steps span { width: 7px; height: 7px; border-radius: 8px; background: var(--sc-muted); }
.sx-intro-steps [aria-current="step"] span { width: 20px; background: var(--sc-blue); }
.sx-intro-controls { margin: 4px 0 12px; }
.sx-intro-controls .sc-primary { flex: 1; margin: 0; }
@keyframes sx-intro-in { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.sx-enhanced #sx-creator-mobile :is(input, textarea, select):focus {
  outline: none;
  box-shadow: none;
}
.sx-enhanced #sx-creator-mobile .sc-auth[dir="rtl"] .sc-auth-copy { margin-inline: 0; }
.sx-enhanced #sx-creator-mobile [dir="ltr"] .sc-intro-brand,
.sx-enhanced #sx-creator-mobile .sx-language [lang="en"] { font-family: Inter, system-ui, sans-serif; }
