/* Presentation only. No audio transport or musical scheduling rules. */
html{overscroll-behavior-x:none}
#portrait-composition-title{display:flex;align-items:center;gap:2px;height:32px;padding:3px 8px;box-sizing:border-box;overflow:hidden}
#portrait-composition-title input{display:block;min-width:0;width:100%;height:26px;box-sizing:border-box;border:0;border-radius:7px;padding:3px 8px;text-align:center;font:700 16px/20px system-ui;color:inherit;background:transparent;text-overflow:ellipsis;outline-offset:-2px;cursor:text}
#portrait-composition-title input:not([readonly]){background:rgba(255,255,255,.16)}
.composition-bin{display:grid;place-items:center;flex:0 0 28px;width:28px;height:26px;padding:4px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer}
.composition-bin[hidden]{display:none}.composition-bin svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#composition-menu{position:absolute;top:100%;left:32px;right:32px;z-index:50;max-height:min(40dvh,320px);overflow-y:auto;border:1px solid var(--portrait-border);border-radius:0 0 10px 10px;padding:6px;background:var(--portrait-surface);color:var(--portrait-text);box-shadow:0 6px 16px #0002}
#composition-menu[hidden]{display:none}.composition-option-row{display:flex;align-items:center}.composition-option{display:block;flex:1;min-width:0;width:100%;padding:9px 10px;text-align:left;font:500 14px system-ui;color:inherit;background:none;border:0;border-radius:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.composition-option:hover,.composition-option[aria-current=true]{background:rgba(120,72,200,.12)}
#composition-menu [role=status]{font:12px system-ui;color:#77737b;padding:0 10px}
.chat-composer-footer {display:grid;grid-template-columns:minmax(0,1fr) 46px;gap:8px}
.chat-composer-footer #prompt-status {grid-column:1/-1}
.chat-composer-footer .produce-button {min-width:0}
.voice-button {display:grid;place-items:center;width:46px;height:46px;padding:10px;border:0;border-radius:50%;background:var(--portrait-button);color:var(--portrait-button-text);cursor:pointer}
.voice-button svg {width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
/* White portrait actions with the same purple as the composition title. */
.chat-composer #produce-track,.chat-composer #portrait-record{box-sizing:border-box;background:#fff;color:var(--mood-sad);border:3px solid var(--mood-sad)}
.chat-composer #produce-track:hover,.chat-composer #portrait-record:hover{background:#fff}
.chat-composer #produce-track svg{fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.chat-composer #portrait-record svg{stroke-width:2}
.chat-composer #produce-track:focus-visible,.chat-composer #portrait-record:focus-visible{outline:2px solid var(--mood-sad);outline-offset:3px}
#portrait-record[data-speech-state="recording"] {background:var(--speech-recording,#b63b62);box-shadow:0 0 0 4px var(--speech-halo,#b63b6226)}
#portrait-record[data-speech-state="transcribing"] {opacity:.7}
#speech-status {font-size:12px;color:var(--portrait-muted);line-height:1.6;margin:5px 0 8px;overflow-wrap:anywhere}
#speech-status[hidden],#speech-status button[hidden] {display:none}
#speech-status button {font:inherit;color:inherit;border:0;background:none;text-decoration:underline;margin-left:8px;padding:5px;cursor:pointer}
#voice-dialog {max-width:340px;width:calc(100vw - 40px);border:1px solid var(--portrait-border);border-radius:20px;padding:24px;background:var(--portrait-surface);color:var(--portrait-text)}
#voice-dialog::backdrop {background:var(--portrait-scrim)}
#voice-dialog p {line-height:1.6} #voice-dialog button {padding:12px 24px;min-height:44px;border-radius:24px;border:0;background:var(--portrait-button);color:var(--portrait-button-text)}
.working-balls {display:inline-flex;position:relative;width:92px;height:24px;align-items:center;overflow:hidden;color:var(--mood-sad)}
.working-balls i {display:block;position:absolute;left:3px;width:7px;height:7px;border-radius:50%;background:currentColor;animation:working-travel 1.6s ease-in-out infinite}
@keyframes working-travel {0%{transform:translateX(0);opacity:0}15%{opacity:1}75%{opacity:1}100%{transform:translateX(80px);opacity:0}}
.page-note-overlay {position:fixed;inset:0;z-index:100;background:var(--portrait-scrim);display:grid;place-items:center;pointer-events:auto}
.page-note-overlay[hidden]{display:none}.page-note-overlay svg{width:76px;height:76px;fill:none}
.page-note-overlay .loading-orbit{transform-box:view-box;transform-origin:50% 50%;animation:loading-orbit 1.7s linear infinite}
@keyframes loading-orbit {to{transform:rotate(360deg)}}
.tilt-cue {position:fixed;z-index:90;left:0;top:21vh;width:min(43vw,210px);height:min(68vh,430px);pointer-events:none;color:var(--mood-sad);contain:layout paint}
.tilt-cue[hidden]{display:none}.tilt-cue svg{display:block;width:100%;height:100%;overflow:visible}
.tilt-cue-path{fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round;opacity:.82}
#tilt-arrow path{fill:currentColor}.tilt-phone-body{fill:color-mix(in srgb,var(--mood-sad) 72%,#241432);stroke:currentColor;stroke-width:2}.tilt-phone-screen{fill:color-mix(in srgb,var(--portrait-surface) 92%,var(--mood-sad));stroke:color-mix(in srgb,currentColor 55%,transparent);stroke-width:1}.tilt-phone-island,.tilt-phone-home{fill:currentColor;opacity:.72}
.tilt-phone-travel{transform:translate(-8px,405px) rotate(0deg);transform-origin:0 0}.tilt-phone-float{transform-origin:0 0}
#account-home {max-width:420px;margin:0 auto;padding:40px 24px 28px;color:var(--portrait-text)}
.home-page {padding:0;min-height:100dvh;background:var(--portrait-surface)}
.account-brand {font:600 22px system-ui;margin:0 0 28px} #home-title {font:400 35px/1.15 Georgia,serif;margin:0 0 26px}
.account-form {display:grid;gap:16px}.account-form label {display:grid;gap:6px;font:14px system-ui}.account-form label[hidden]{display:none}
.account-form input,.account-form select {width:100%;height:46px;border:1px solid var(--portrait-border);border-radius:10px;padding:10px;font:16px system-ui;background:var(--portrait-surface);color:var(--portrait-text)}
.account-form button {height:46px;border:0;border-radius:24px;background:var(--portrait-button);color:var(--portrait-button-text);font:15px system-ui}
.account-actions {display:flex;justify-content:space-between;margin-top:16px}.account-actions button {min-height:44px;padding:8px 0;border:0;background:transparent;color:var(--portrait-muted);font:14px system-ui}
#login-status {font:13px/1.6 system-ui;color:#77737b;margin:0}
.account-social {margin-top:18px}.account-social[hidden]{display:none}
.account-social-divider {display:flex;align-items:center;gap:16px;margin:0 0 20px;font:12px system-ui;color:var(--portrait-muted);text-align:center}
.account-social-divider::before,.account-social-divider::after{content:'';height:1px;flex:1;background:var(--portrait-border)}
.account-social-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.account-social-buttons button,.google-auth-slot{display:grid;place-items:center;min-width:0;width:100%;height:46px;border:0;border-radius:999px;background:var(--auth-provider-surface);color:var(--auth-provider-icon)}
.account-social-buttons button{cursor:pointer}.google-auth-slot>div{display:grid;place-items:center;max-width:100%;max-height:44px;overflow:hidden}
.account-social-buttons button:hover{background:var(--auth-provider-hover)}.account-social-buttons button:disabled{opacity:.55;cursor:wait}
.account-social-buttons button:focus-visible{outline:2px solid var(--mood-sad);outline-offset:3px}
.account-social-buttons svg{width:24px;height:24px;display:block;pointer-events:none}
.library-page {height:100dvh;overflow-y:auto;background:var(--surface);color:var(--text);padding:24px;touch-action:pan-y}
body.chat-open,body.library-open{overscroll-behavior-x:none}
body.chat-open .produce-page,body.chat-open .chat-shell,body.chat-open .chat-conversation{touch-action:pan-y;overscroll-behavior-x:none}
.release-music-cover{aspect-ratio:1;display:grid;place-items:center;background:var(--surface-message,#f3f1ee);border-radius:8px;color:var(--accent,#8056cc);border:1px solid var(--border,#e2ded8)}
.release-music-cover svg{width:38%;height:38%;fill:currentColor}
.library-page:not(.is-active){display:none}.library-page h1{font:650 23px system-ui;margin:18px 0 6px}.library-page>p{font:12px/1.5 system-ui;color:var(--text-muted)}
#library-back {border:0;background:transparent;color:var(--accent);min-height:44px;font:15px system-ui;padding:0 8px}
.release-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 16px;margin:24px 0}.release{min-width:0;margin:0}.release img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:7px;background:var(--surface-raised)}
.release h2 {font:500 14px/1.35 system-ui;margin:9px 0 3px;overflow-wrap:anywhere}.release p{font:12px system-ui;color:var(--text-muted);margin:0}
.release-empty-tile{box-sizing:border-box;display:grid;place-items:center;aspect-ratio:1;padding:22px;border:1px dashed var(--border,#d9d4cd);border-radius:8px;background:var(--surface-message,#f3f1ee);color:var(--text-muted);text-align:center;font:500 14px/1.5 system-ui}
body.library-open {margin:0;overflow:hidden}.library-open .app-main{display:none}
@media(min-width:800px){.release-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:960px}}
@media(orientation:landscape){.tilt-cue{display:none}}
@media(prefers-reduced-motion:reduce){.working-balls i{animation:none;position:static;margin:3px;opacity:1}.page-note-overlay .loading-orbit{animation:none}.tilt-phone-travel{transform:translate(35px,25px) rotate(-90deg)}}

/* Whole row is a generous tap target; the visible switch stays compact. */
#settings-dialog .settings-animation{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;border-bottom:1px solid var(--portrait-border);font:15px/1.4 system-ui;cursor:pointer}
.settings-animation-control{display:flex;align-items:center;position:relative;gap:8px;flex-shrink:0}
#background-animation-state{font:12px system-ui;color:var(--portrait-muted)}
#background-animation{position:absolute;right:0;top:0;width:38px;height:24px;margin:0;opacity:0;cursor:pointer}
.settings-animation-switch{display:block;width:38px;height:24px;box-sizing:border-box;border:1px solid #aca3b5;border-radius:20px;background:#d8d3de;pointer-events:none}
.settings-animation-switch::after{content:'';display:block;width:18px;height:18px;margin:2px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0002}
#background-animation:checked+.settings-animation-switch{background:#7848c8;border-color:#7848c8}
#background-animation:checked+.settings-animation-switch::after{transform:translateX(14px)}
#background-animation:focus-visible+.settings-animation-switch{outline:2px solid #7848c8;outline-offset:3px}
