.save-song-page { width: min(100% - 2rem, 1080px); margin-inline: auto; padding-block: 1.5rem 3rem; }
.save-song-page > cps-page-head, .save-song-page > .page-head { margin-bottom: 1rem; }
.sos { --sos-accent: var(--amber, #ffb000); --sos-ink: #211600; --sos-muted: var(--text-muted, #cdd2e1); --sos-ease: var(--ease-out, cubic-bezier(.23,1,.32,1)); position: relative; color: var(--text, #f2f0ff); background: var(--surface-1-solid, #130e20); border: 1px solid var(--border, rgb(160 140 255 / .24)); border-radius: 16px; overflow: clip; isolation: isolate; scroll-margin-top: 80px; }
.sos *, .sos *::before, .sos *::after { box-sizing: border-box; }
.sos [hidden] { display: none !important; }
.sos button, .sos input { font: inherit; }
.sos button, .sos a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.sos button { cursor: pointer; }
.sos button:disabled { cursor: wait; opacity: .55; }
.sos :focus-visible { outline: 3px solid var(--focus, #c4b5fd); outline-offset: 5px; }
.sos [tabindex="-1"]:focus { outline: none; }
.sos ::selection { background: var(--sos-accent); color: var(--sos-ink); }
.sos svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.sos-stage { position: relative; padding: clamp(1.25rem, 3vw, 2.75rem); min-height: 540px; }
.sos-stage.sos-transition-out { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sos-transition-out * { animation: none !important; }
.sos h2, .sos h3, .sos p { margin: 0; }
.sos h2 { font-family: var(--font-display, 'CPS Display', 'Teko', sans-serif); font-weight: 600; line-height: 1.05; text-wrap: balance; }
.sos-song-copy h2, .sos-result h2, .sos-choice h3 { text-transform: none; }
.sos-button { display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 48px; padding: .8rem 1.25rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600 !important; line-height: 1.2; transition: background .15s ease, color .15s ease, transform .15s var(--sos-ease); }
.sos-button--primary { background: var(--sos-accent); color: var(--sos-ink); min-width: 230px; }
.sos-button--quiet { background: var(--surface-2, #1d152b); border-color: var(--border-control, #6d62b0); color: var(--text, #f2f0ff); }
.sos-button--save { width: 100%; color: var(--sos-ink); background: var(--sos-accent); font-size: .95rem !important; padding-inline: .7rem; }
.sos-save-short { display: none; }
.sos-text-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .4rem .6rem; background: transparent; border: 0; color: var(--sos-muted); text-decoration: underline; text-underline-offset: .25em; }
.sos-button:active { transform: scale(.97); }
.sos-intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: .5rem; }
.sos-records { position: relative; width: 210px; height: 155px; margin: 0 auto 1.5rem; }
.sos-record { position: absolute; display: grid; place-items: center; width: 133px; height: 133px; inset-block-start: 5px; border-radius: 12px; }
.sos-record--back { inset-inline-start: 4px; transform: rotate(-15deg); color: #d7c7ff; background: #4b346b; }
.sos-record--back svg { width: 62px; height: 62px; }
.sos-record--front { inset-inline-end: 9px; inset-block-start: 13px; transform: rotate(9deg); background: var(--sos-accent); color: var(--sos-ink); }
.sos-record__label { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; border: 15px solid #261f29; background: #eeb645; font-family: 'CPS Display','Teko',sans-serif; font-size: 1.75rem; font-weight: 600; }
.sos-record-stamp { display: grid; place-items: center; position: absolute; inset-inline-end: 2px; bottom: -2px; width: 48px; height: 48px; border-radius: 50%; background: #d2baff; color: #21122f; transform: rotate(-9deg); }
.sos-record-stamp svg { width: 26px; height: 26px; }
.sos-intro__title { font-size: clamp(2.8rem, 6vw, 4.3rem); }
.sos-intro__title span { color: var(--sos-accent); }
.sos-intro__text { max-width: 39ch; margin-block: 1rem 1.5rem !important; line-height: 1.55; color: var(--sos-muted); font-size: 1.05rem; }
.sos-sound-note { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .45rem; margin-top: 1rem !important; font-size: .875rem; line-height: 1.5; color: var(--sos-muted); }
.sos-sound-note svg { width: 1rem; height: 1rem; }
.sos-intro__years { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.75rem; color: var(--sos-muted); font-family: 'CPS Display','Teko',sans-serif; font-size: 1.3rem; letter-spacing: .04em; }
.sos-intro__years span:last-child { color: var(--sos-accent); }
.sos-status { min-height: 1.5rem; margin-inline: 1.25rem !important; text-align: center; font-size: .9rem; line-height: 1.5; color: var(--sos-muted); }
.sos-status:empty { min-height: 0; }
.sos-credit { margin: .7rem 1rem 1rem !important; text-align: center; font-size: .8rem; line-height: 1.5; color: var(--sos-muted); }
.sos-loading, .sos-error, .sos-year-reveal { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 460px; gap: 1.5rem; text-align: center; }
.sos-loading svg { width: 3rem; height: 3rem; color: var(--sos-accent); }
.sos-loading h2, .sos-error h2 { font-size: 2.5rem; }
.sos-year-reveal h2 { color: var(--sos-accent); font-size: clamp(5rem, 18vw, 9rem); font-variant-numeric: tabular-nums; animation: sos-year-in .6s var(--sos-ease) both; }
.sos-year-reveal p { color: var(--sos-muted); font-size: 1.125rem; }
.sos-round-top { display: flex; align-items: center; gap: .8rem; min-height: 44px; margin-bottom: 2rem; font-size: .9rem; color: var(--sos-muted); }
.sos-round-top .sos-text-button { margin-inline-start: auto; }
.sos-year-tag { color: var(--sos-accent); font-family: 'CPS Display','Teko',sans-serif; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.sos-spotlight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: center; max-width: 790px; margin-inline: auto; }
.sos-cover { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--surface-3, #2b203d); }
.sos-cover > svg { position: absolute; width: 30%; height: 30%; top: 35%; left: 35%; color: var(--sos-muted); }
.sos-cover img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }
.sos-cover--hero { box-shadow: 0 16px 30px rgb(0 0 0 / .25); transform-origin: 50% 85%; }
.sos-song-copy { min-width: 0; }
.sos-song-copy h2 { margin-top: .5rem; min-height: 2.1em; font-size: clamp(2rem, 4vw, 3.5rem); overflow-wrap: anywhere; }
.sos-artist { color: var(--sos-accent); font-size: 1.1rem; overflow-wrap: anywhere; }
.sos-listening { display: flex; align-items: center; gap: .7rem; min-height: 2rem; margin-block: 1.5rem .7rem; color: var(--sos-muted); font-size: .9rem; }
.sos-equalizer { display: flex; align-items: center; gap: 3px; height: 22px; }
.sos-equalizer i { width: 3px; height: 18px; background: var(--sos-accent); border-radius: 2px; transform: scaleY(.35); }
.is-playing .sos-equalizer i { animation: sos-level .65s ease-in-out infinite alternate; }
.sos-equalizer i:nth-child(2) { animation-delay: -.3s; }
.sos-equalizer i:nth-child(3) { animation-delay: -.45s; }
.sos-equalizer i:nth-child(4) { animation-delay: -.15s; }
.sos-progress { height: 5px; border-radius: 5px; overflow: hidden; background: var(--surface-3, #2b203d); }
.sos-progress > span { display: block; width: 100%; height: 100%; background: var(--sos-accent); transform: scaleX(0); transform-origin: left; }
.sos-play-actions { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 1rem; }
.sos-preview-note { margin-top: 1rem !important; color: var(--sos-muted); line-height: 1.5; font-size: .8rem; }
.sos-slots { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .75rem; max-width: 570px; margin: 2.25rem auto 0; padding: 0; list-style: none; }
.sos-slot { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; border: 1px dashed var(--border-strong, #6d62b0); border-radius: 8px; font-family: 'CPS Display','Teko',sans-serif; font-size: 1.75rem; color: var(--sos-muted); }
.sos-slot.is-revealed { border-style: solid; border-color: transparent; }
.sos-slot.is-current { outline: 2px solid var(--sos-accent); outline-offset: 3px; }
.sos-slot .sos-cover { width: 100%; border-radius: 7px; }
.sos-slot__check { display: grid; place-items: center; position: absolute; width: 20px; height: 20px; bottom: 3px; right: 3px; border-radius: 50%; background: var(--sos-accent); color: var(--sos-ink); }
.sos-slot__check svg { width: 14px; height: 14px; }
.sos-rule { margin-top: 1rem !important; text-align: center; color: var(--sos-muted); font-size: .875rem; }
.sos-choice-heading { margin-bottom: 1.75rem; text-align: center; }
.sos-choice-heading h2 { font-size: clamp(2.3rem, 4vw, 3.5rem); margin-top: .4rem; }
.sos-choice-heading p { margin: .65rem auto 0; max-width: 55ch; color: var(--sos-muted); line-height: 1.5; }
.sos-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 1.75rem; }
.sos-choice { min-width: 0; display: grid; grid-template-columns: 88px minmax(0,1fr); gap: .5rem 1rem; align-items: center; padding-block: .9rem; min-height: 132px; border-bottom: 1px solid var(--border); }
.sos-choice .sos-cover { grid-area: 1 / 1 / 3 / 2; width: 88px; }
.sos-choice__copy { grid-area: 1 / 2; min-width: 0; }
.sos-choice h3 { font-family: var(--font-body, 'CPS Body', 'Outfit', sans-serif); font-size: 1.05rem; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.sos-choice p { margin-top: .25rem; color: var(--sos-muted); font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.sos-preview-button { grid-area: 1 / 1 / 3 / 2; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; min-height: 44px; background: rgb(5 3 13 / .2); color: #fff; border: 0; border-radius: 6px; }
.sos-preview-button > svg { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: rgb(5 3 13 / .8); }
.sos-preview-button > span { display: none; }
.sos-preview-button[aria-pressed="true"] { color: var(--sos-accent); background: rgb(5 3 13 / .35); }
.sos-choice > .sos-button--save { grid-area: 2 / 2; width: fit-content; min-height: 44px; padding: .6rem .75rem; font-size: .875rem !important; }
.sos-another { display: flex; margin: 1.5rem auto 0; }
.sos-result { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0,1fr); align-items: center; gap: clamp(1.5rem, 4vw, 3rem); max-width: 800px; margin: 1rem auto 2.5rem; }
.sos-result__cover { position: relative; padding: .8rem; }
.sos-result__cover .sos-cover { transform: rotate(-4deg); box-shadow: 0 16px 32px rgb(0 0 0 / .3); }
.sos-saved-mark { position: absolute; display: grid; place-items: center; width: 66px; height: 66px; bottom: -8px; inset-inline-end: -3px; background: var(--sos-accent); color: var(--sos-ink); border-radius: 50%; transform: rotate(10deg); animation: sos-track-in .45s var(--sos-ease) both; }
.sos-saved-mark svg { width: 34px; height: 34px; }
.sos-result__label { color: var(--sos-accent); font-size: 1.125rem; }
.sos-result h2 { margin-top: .65rem; font-size: clamp(2.4rem, 5vw, 4rem); overflow-wrap: anywhere; }
.sos-result__artist { margin-top: .6rem !important; font-size: 1.2rem; }
.sos-result__copy > p:not([class]) { margin-block: 1.5rem; color: var(--sos-muted); }
.sos-source { display: flex; gap: .45rem; align-items: center; margin-top: 1rem; min-height: 44px; color: var(--sos-muted); font-size: .9rem; text-underline-offset: .25em; }
.sos-result__actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 1rem; }
.sos-shared-pick { margin-top: 1rem !important; color: var(--sos-muted); font-size: .9rem; line-height: 1.5; }
.sos-share-fallback { display: grid; gap: .75rem; padding: 1.25rem; }
.sos-share-fallback input { min-width: 0; width: 100%; min-height: 44px; color: var(--text, #f2f0ff); background: var(--surface-2, #1d152b); border: 1px solid var(--border-control, #6d62b0); border-radius: 6px; padding: .6rem; }
@keyframes sos-year-in { from { opacity: 0; transform: translateY(12px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes sos-track-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sos-level { to { transform: scaleY(1); } }
@media (hover: hover) and (pointer: fine) {
  .sos-button--primary:hover, .sos-button--save:hover { background: #ffc34d; }
  .sos-button--quiet:hover { background: var(--surface-3, #2b203d); }
  .sos-preview-button:hover, .sos-text-button:hover, .sos-source:hover { color: var(--sos-accent); }
}
@media (max-width: 600px) {
  .save-song-page { width: min(100% - 1rem, 1080px); padding-top: 1rem; }
  .save-song-page > .page-head .page-head__lede { display: none; }
  .sos-stage { padding: 1.25rem 1rem; min-height: 0; }
  .sos-intro { padding-top: 0; }
  .sos-intro__title { font-size: clamp(2rem, 8.5vw, 2.5rem); }
  .sos-intro__text { font-size: .95rem; margin-block: .65rem 1rem !important; }
  .sos-sound-note { max-width: 30ch; font-size: .8rem; margin-top: .65rem !important; }
  .sos-sound-note > span { display: none; }
  .sos-records { width: 165px; height: 115px; margin-bottom: .65rem; }
  .sos-record { width: 100px; height: 100px; }
  .sos-record__label { width: 78px; height: 78px; border-width: 12px; font-size: 1.4rem; }
  .sos-record--back svg { width: 44px; height: 44px; }
  .sos-record-stamp { width: 38px; height: 38px; }
  .sos-record-stamp svg { width: 23px; height: 23px; }
  .sos-intro__years { display: none; }
  .sos-loading, .sos-error, .sos-year-reveal { min-height: 340px; }
  .sos-spotlight { grid-template-columns: 1fr; gap: 1rem; }
  .sos-cover--hero { width: min(42vw, 180px); margin-inline: auto; }
  .sos-song-copy { text-align: center; }
  .sos-song-copy h2 { font-size: 2rem; margin-top: .25rem; }
  .sos-artist { font-size: .95rem; }
  .sos-listening { justify-content: center; margin-block: .8rem .5rem; }
  .sos-play-actions { justify-content: center; gap: 1rem; margin-top: .75rem; }
  .sos-preview-note { display: none; }
  .sos-round-top { margin-bottom: 1rem; gap: .6rem; font-size: .83rem; }
  .sos-round-top .sos-text-button { padding-inline: 0; font-size: .83rem; }
  .sos-slots { margin-top: 1.1rem; gap: .5rem; }
  .sos-slot { font-size: 1.4rem; }
  .sos-slot__check { display: none; }
  .sos-rule { font-size: .8rem; }
  .sos-choices { grid-template-columns: minmax(0,1fr); gap: 0; }
  .sos-choice-heading { margin-bottom: .8rem; }
  .sos-choice-heading h2 { font-size: 2rem; margin-top: .25rem; }
  .sos-choice-heading p { font-size: .875rem; margin-top: .4rem; line-height: 1.4; }
  .sos-choice { display: grid; grid-template-columns: 52px minmax(0,1fr) 90px; gap: .65rem; align-items: center; min-height: 78px; padding-block: .65rem; border-bottom: 1px solid var(--border); }
  .sos-choice .sos-cover { grid-area: 1 / 1; width: 52px; border-radius: 6px; }
  .sos-choice__copy { grid-area: 1 / 2; margin: 0; }
  .sos-choice h3 { font-size: .9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sos-choice p { font-size: .8125rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .sos-choice .sos-button { grid-area: 1 / 3; min-height: 44px; font-size: .875rem !important; gap: 0; padding: .5rem .25rem; }
  .sos-choice .sos-button svg, .sos-save-full { display: none; }
  .sos-save-short { display: inline; }
  .sos-preview-button { grid-area: 1 / 1; position: relative; z-index: 1; width: 52px; height: 52px; min-height: 52px; margin: 0; background: rgb(5 3 13 / .35); color: #fff; }
  .sos-preview-button svg { padding: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgb(5 3 13 / .8); }
  .sos-preview-button span { display: none; }
  .sos-preview-button[aria-pressed="true"] { background: rgb(5 3 13 / .35); }
  .sos-another { margin-top: .75rem; }
  .sos[data-phase="choosing"] .sos-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sos-result { grid-template-columns: 1fr; gap: 2rem; text-align: center; margin-block: .5rem 1.5rem; }
  .sos-result__cover { width: min(65vw, 255px); margin-inline: auto; }
  .sos-result h2 { font-size: 2.75rem; }
  .sos-result__copy > p:not([class]) { margin-block: 1rem; }
  .sos-source { justify-content: center; }
  .sos-result__actions { gap: .5rem; }
  .sos-result__actions .sos-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sos *, .sos *::before, .sos *::after { animation: none !important; transition: none !important; }
}
