/* Existing Studio layout and colours; only real-account screens and their states. */
.backend-studio .studio-home { min-width: 0; }
.backend-studio .studio-home .pagehead h2 { margin-top: 10px; }
.backend-studio .studio-home .creation-card { display: block; color: inherit; text-decoration: none; }
.backend-studio .studio-home .quick-prompt { margin-block: 0; }
.backend-studio .studio-home .quick-prompt input { min-width: 0; }
.backend-studio .studio-home .btn { min-height: 44px; white-space: normal; }
.backend-studio .studio-home .status:empty { display: none; }
.backend-studio .studio-home .song-meta { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.backend-studio .studio-home .song-meta span { display: block; color: var(--muted); }
.backend-studio .studio-home .occasion-panel h2 { margin-block: 12px; }
.backend-studio .studio-home .section-head { flex-wrap: wrap; gap: 12px; }
.backend-studio .studio-home .section-head .muted { font-size: 12px; }
.backend-studio .real-nav svg { width: 20px; height: 20px; flex-shrink: 0; }
@media(max-width: 620px) {
 .backend-studio .studio-home .quick-prompt { display: flex; flex-wrap: wrap; }
 .backend-studio .studio-home .quick-prompt input { flex: 1 1 100%; min-height: 44px; }
 .backend-studio .studio-home .quick-prompt .btn { flex: 1 1 100%; }
 .backend-studio .studio-home .song-row { gap: 10px; }
}
.backend-studio { padding-bottom: 0; }
.backend-studio .workspace { min-width: 0; }
.backend-studio .content { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.backend-studio .sidebar { padding-bottom: 24px; }
.backend-studio .sidebar-bottom { margin-top: auto; }
.backend-studio .brand img { max-width: 150px; }
.backend-studio .topbar { height: auto; min-height: 85px; flex-wrap: wrap; padding-block: 16px; }
.backend-studio .top-actions { flex-wrap: wrap; min-width: 0; }
.backend-studio .top-actions .btn { max-width: 100%; white-space: normal; }
.backend-studio .mobile-nav a { min-width: 0; flex: 1; }
.backend-studio .mobile-nav span { overflow-wrap: anywhere; }
.backend-studio [hidden] { display: none !important; }
.backend-studio .pagehead, .backend-studio .row { flex-wrap: wrap; }
.backend-studio .panel, .backend-studio .stat, .backend-studio .note,
.backend-studio .account, .backend-studio .topbar { min-width: 0; overflow-wrap: anywhere; }
.backend-studio .profile-grid { margin-top: 24px; align-items: start; }
.backend-studio .profile-grid .field { display: block; margin-block: 16px; }
.backend-studio .profile-grid input, .backend-studio .profile-grid select { width: 100%; min-width: 0; }
.backend-studio bdi { unicode-bidi: isolate; overflow-wrap: anywhere; }
.backend-studio .rights-list { display: grid; gap: 16px; margin-top: 20px; }
.backend-studio .rights-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 16px; }
.backend-studio .rights-facts dt { color: var(--muted); font-size: 12px; }
.backend-studio .rights-facts dd { margin: 0; }
.backend-studio .status { min-height: 1.6em; margin-block: 12px; }
.backend-studio .btn:disabled { cursor: not-allowed; opacity: .55; }
.backend-studio .btn:focus-visible, .backend-studio a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.backend-studio .real-nav a[aria-current="page"] { color: var(--accent); }
@media(max-width: 900px) {
 .backend-studio .topbar { padding: 14px 18px; gap: 12px; }
 .backend-studio .top-brand { min-width: 0; }
 .backend-studio .top-actions { flex: 1 1 100%; margin-inline-start: 0; gap: 6px; }
 .backend-studio .top-actions .btn { padding: 10px; }
 .backend-studio .content { padding-inline: 18px; }
 .backend-studio .profile-grid { grid-template-columns: minmax(0,1fr); }
 .backend-studio .mobile-nav { padding-bottom: max(12px,env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion: reduce) {
 .backend-studio *, .backend-studio *::before, .backend-studio *::after { animation: none !important; transition: none !important; }
}

/* Only B12 real library rows, forms and confirmed selected states. */
.backend-studio .library-search { display:flex; align-items:end; gap:12px; flex-wrap:wrap; margin-block:20px; }
.backend-studio .library-search .field { flex:1 1 220px; min-width:0; margin:0; }
.backend-studio .library-search input, .backend-studio .rename-form input { width:100%; min-width:0; }
.backend-studio .real-song-row, .backend-studio .real-song-detail { min-width:0; }
.backend-studio .real-song-row h2, .backend-studio .real-song-detail h2 { overflow-wrap:anywhere; }
.backend-studio .rename-form { display:grid; gap:12px; margin-block:20px; }
.backend-studio .rename-form .field { min-width:0; }
.backend-studio .rename-form button { justify-self:start; max-width:100%; }
.backend-studio .real-lyrics { font:inherit; white-space:pre-wrap; overflow-wrap:anywhere; margin-block:16px; }
.backend-studio .library-filters .selected, .backend-studio .real-song-row .selected, .backend-studio .real-song-detail .selected { background:var(--accent); color:#20263D; border-color:var(--accent); }
.backend-studio .real-song-detail .panel { margin-block:20px; }
.backend-studio .real-song-row .actions button, .backend-studio .real-song-detail .actions button { max-width:100%; white-space:normal; }

/* Native modal provides keyboard focus containment and Escape cancellation. */
.backend-studio .real-delete-dialog { width:min(560px,calc(100% - 32px)); max-height:calc(100dvh - 32px); overflow:auto; margin:auto; padding:24px; border:1px solid var(--line); border-radius:20px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow); }
.backend-studio .real-delete-dialog::backdrop { background:#0008; }
.backend-studio .real-delete-dialog h2, .backend-studio .real-delete-dialog p { overflow-wrap:anywhere; margin-block:12px; }
.backend-studio .real-delete-dialog .actions { flex-wrap:wrap; }
.backend-studio .real-delete-dialog .btn { max-width:100%; white-space:normal; }

/* Only server-backed song forms. */
.backend-studio .real-song-form { margin-block:24px; align-items:start; }
.backend-studio .real-song-form fieldset { border:0; padding:0; margin:0 0 24px; min-width:0; }
.backend-studio .real-song-form legend { font-weight:750; font-size:20px; margin-block:16px; }
.backend-studio .real-song-form .field { display:block; margin-block:16px; }
.backend-studio .real-song-form input:not([type=checkbox]), .backend-studio .real-song-form select, .backend-studio .real-song-form textarea { width:100%; min-width:0; }
.backend-studio .real-song-form .choices .choice { display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.backend-studio .real-song-form .choice input { accent-color:var(--accent); }
.backend-studio .real-song-form .choice.selected { background:var(--tint); border-color:var(--accent); }
.backend-studio #draft-language { max-width:100%; }
@media(max-width:900px) { .backend-studio .real-song-form { grid-template-columns:minmax(0,1fr); } }

.backend-studio .real-song-form .choice { max-width:100%; min-width:0; overflow-wrap:anywhere; }

/* Server-backed song text editor only. */
.backend-studio .real-text-panel { margin-block:24px; min-width:0; }
.backend-studio .real-text-panel textarea { width:100%; min-width:0; resize:vertical; unicode-bidi:plaintext; white-space:pre-wrap; }
.backend-studio .real-text-panel .actions { flex-wrap:wrap; margin-block:20px; }
.backend-studio .real-text-panel .btn { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.backend-studio .real-text-panel .check { display:flex; align-items:flex-start; gap:10px; margin-block:20px; }
.backend-studio .real-text-panel input[type=checkbox] { accent-color:var(--accent); flex:none; margin-block-start:4px; }

/* Owned child briefs only. */
.backend-studio .real-child-form { margin-block:24px; align-items:start; }
.backend-studio .real-child-form .field { display:block; margin-block:18px; }
.backend-studio .real-child-form input:not([type=radio]), .backend-studio .real-child-form select, .backend-studio .real-child-form textarea, .backend-studio .real-child-form audio { width:100%; min-width:0; }
.backend-studio .real-child-form fieldset { border:0; padding:0; min-width:0; margin-block:20px; }
.backend-studio .real-child-form .choice { display:flex; align-items:center; gap:10px; cursor:pointer; max-width:100%; overflow-wrap:anywhere; }
.backend-studio .real-child-form .selected { background:var(--tint); border-color:var(--accent); }
.backend-studio .real-child-form input[type=radio] { accent-color:var(--accent); }
.backend-studio .real-child-form audio { margin-block-end:18px; }
@media(max-width:900px) { .backend-studio .real-child-form { grid-template-columns:minmax(0,1fr); } }

.backend-studio .entry-action { max-width:100%; white-space:normal; overflow-wrap:anywhere; }

.backend-studio .real-child-form .choice::before { display:none; }
.backend-studio .real-child-form .child-gender .choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.backend-studio .real-child-form .child-gender .choice { min-height:48px; justify-content:center; }
.backend-studio .real-child-form input[type=radio] { width:18px; height:18px; min-height:18px; padding:0; margin:0; flex:none; }

/* Preset briefs only. */
.backend-studio .real-preset-form { margin-block:24px; }
.backend-studio .real-preset-form .field { display:block; margin-block:18px; }
.backend-studio .real-preset-form input:not([type=radio]):not([type=checkbox]), .backend-studio .real-preset-form select, .backend-studio .real-preset-form textarea { width:100%; min-width:0; }
.backend-studio .real-preset-form fieldset { min-width:0; border:0; padding:0; }
.backend-studio .real-preset-form .choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); margin-block:18px; }
.backend-studio .real-preset-form .choice { max-width:100%; overflow-wrap:anywhere; cursor:pointer; min-height:48px; }
.backend-studio .real-preset-form .choice::before { display:none; }
.backend-studio .real-preset-form input[type=radio] { width:18px; height:18px; min-height:18px; padding:0; margin:0; flex:none; accent-color:var(--accent); }
.backend-studio .real-preset-form .selected { background:var(--tint); border-color:var(--accent); }
.backend-studio .real-preset-form .actions { flex-wrap:wrap; margin-block:20px; }
.backend-studio .real-preset-form .check { display:flex; gap:10px; align-items:center; margin-block:20px; }

/* Instrumental read/preparation screens only. */
.backend-studio .real-instrumental-form { margin-block:24px; }
.backend-studio .real-instrumental-form .field { display:block; margin-block:18px; }
.backend-studio .real-instrumental-form input:not([type=radio]), .backend-studio .real-instrumental-form textarea, .backend-studio .real-instrumental-form select { width:100%; min-width:0; }
.backend-studio .real-instrumental-form fieldset { min-width:0; border:0; padding:0; }
.backend-studio .real-instrumental-form .choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); margin-block:18px; }
.backend-studio .real-instrumental-form .choice { min-height:48px; max-width:100%; overflow-wrap:anywhere; cursor:pointer; }
.backend-studio .real-instrumental-form .choice::before { display:none; }
.backend-studio .real-instrumental-form input[type=radio] { width:18px; height:18px; min-height:18px; padding:0; margin:0; flex:none; accent-color:var(--accent); }
.backend-studio .real-instrumental-form .selected { background:var(--tint); border-color:var(--accent); }
.backend-studio .real-instrumental-form .btn { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.backend-studio .real-instrumental-form h2, .backend-studio .instrumental-command { overflow-wrap:anywhere; }
.real-video-form .field,.real-video-form input,.real-video-form select,.real-video-form textarea{min-width:0;max-width:100%;box-sizing:border-box}
.real-video-form select,.real-video-form textarea{width:100%}
.real-video-form button,.real-video-review button{margin-block:8px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.real-video-form,.real-video-review,.real-video-history{min-width:0;overflow-wrap:anywhere}
.video-check{display:flex;align-items:flex-start;gap:10px;margin-block:16px;cursor:pointer}
.video-check input{width:20px;height:20px;flex:0 0 20px;accent-color:#FFB17A;margin-top:2px}
.real-video-history details{padding-block:10px;border-bottom:1px solid var(--line)}
.real-video-history summary{cursor:pointer}

.real-video-review textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box}

.template-example{display:block;max-width:100%;width:100%;max-height:420px;object-fit:contain;border-radius:16px;background:#111318;margin-block:14px}
.real-template-form,.real-template-form fieldset{min-width:0;overflow-wrap:anywhere}
.real-template-form input{width:100%;max-width:100%;box-sizing:border-box;min-width:0}
.real-template-form .choices{display:flex;flex-wrap:wrap;gap:10px}
.real-template-form button{white-space:normal;overflow-wrap:anywhere;max-width:100%;margin-block:8px}
.real-template-form .selected{background:#FFB17A;color:#20263D;border-color:#FFB17A}

.real-template-form fieldset{border:0;padding:0;margin-block:20px}
.real-template-form legend{padding:0;margin-block-end:8px;font-weight:600}

.backend-studio .real-archive-row,.backend-studio .real-archive-dialog{min-width:0;overflow-wrap:anywhere}
.backend-studio .archive-filters{display:flex;flex-wrap:wrap;gap:8px;margin-block:18px}
.backend-studio .archive-filters .selected{background:var(--accent);color:#20263D}
.backend-studio .real-archive-list .btn,.backend-studio .real-archive-dialog .btn{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.backend-studio .real-archive-dialog{width:min(480px,calc(100% - 32px));max-height:85dvh;box-sizing:border-box;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:20px}
.backend-studio .real-archive-dialog::backdrop{background:rgb(0 0 0 / .65)}

.backend-studio .real-history-row,.backend-studio .real-history-operation{min-width:0;overflow-wrap:anywhere}
.backend-studio .real-history-row .btn{white-space:normal;overflow-wrap:anywhere;max-width:100%}
.backend-studio .purchase-amount{font-size:1.5rem;font-weight:700;margin-block:12px}

.backend-studio .history-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-block:18px}
.backend-studio .history-tabs .selected{background:var(--accent);color:#20263D}

.backend-studio .history-facts{margin-block:14px;border-block:1px solid var(--line);padding-block:12px}
.backend-studio .history-facts summary{cursor:pointer;font-weight:600;overflow-wrap:anywhere}
.backend-studio .history-facts[open] summary{margin-block-end:12px}

.backend-studio .real-help{margin-block:24px;min-width:0}
.backend-studio .real-help .panel{min-width:0;overflow-wrap:anywhere}
.backend-studio .real-help .btn{white-space:normal;overflow-wrap:anywhere;max-width:100%;margin-block:8px}

.backend-studio .real-notice-row,.backend-studio .real-notice-detail,.backend-studio .real-inbox-dialog{min-width:0;overflow-wrap:anywhere}
.backend-studio .inbox-filters{display:flex;flex-wrap:wrap;gap:8px;margin-block:18px}
.backend-studio .inbox-filters .selected{background:var(--accent);color:#20263D}
.backend-studio .notice-state{background:var(--tint);border-radius:10px;padding:8px;margin-block:12px}
.backend-studio .notice-text{white-space:pre-wrap;margin-block:18px}
.backend-studio .real-inbox-list .btn,.backend-studio .real-notice-detail .btn,.backend-studio .real-inbox-dialog .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.backend-studio .real-inbox-dialog{width:min(480px,calc(100% - 32px));max-height:85dvh;box-sizing:border-box;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:20px}
.backend-studio .real-inbox-dialog::backdrop{background:rgb(0 0 0 / .65)}
.backend-studio .real-admin-features{margin-block:24px}.backend-studio .real-admin-feature{min-width:0;overflow-wrap:anywhere}.backend-studio .real-admin-feature .feature-status{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px}.backend-studio .real-admin-feature .tag{white-space:normal;max-width:100%}.backend-studio .real-admin-feature .actions{flex-wrap:wrap}.backend-studio .real-admin-feature .btn{flex:1 1 120px;min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}.backend-studio .real-admin-feature .btn[aria-pressed=true]{background:var(--accent);color:#20263D;border-color:transparent;opacity:1}
.backend-studio .real-admin-video-gifts{margin-block:24px}.backend-studio .real-admin-video-gifts .panel{min-width:0;overflow-wrap:anywhere}.backend-studio .real-admin-video-gifts .btn{max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}.backend-studio .real-admin-video-gifts .rights-facts{margin-block:16px}.backend-studio .real-admin-video-gifts .actions{flex-wrap:wrap}

.real-shop-products{margin-block:20px}.real-invoice .purchase-amount,.real-shop-selection .purchase-amount{font-size:1.7rem;font-weight:700;overflow-wrap:anywhere}.real-shop-products h2,.real-shop-selection h2{overflow-wrap:anywhere}.real-shop-selection .btn{margin-block:8px}

.backend-studio .real-demo-dialog{box-sizing:border-box;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:20px;padding:24px;width:min(560px,calc(100% - 32px));max-block-size:calc(100dvh - 32px);overflow:auto;overflow-wrap:anywhere}.backend-studio .real-demo-dialog::backdrop{background:rgb(0 0 0/.65)}.backend-studio .real-demo-dialog .actions{flex-wrap:wrap}.backend-studio .real-demo-row{margin-block:16px}.backend-studio .real-demo-row h2{overflow-wrap:anywhere}.backend-studio .real-demo-dialog .btn,.backend-studio .real-demo-row .btn{white-space:normal;max-width:100%;overflow-wrap:anywhere}

.real-cover{position:relative;width:128px;max-width:100%;aspect-ratio:1;flex:none;margin-block:8px}.real-cover img{display:block;width:100%;height:100%;object-fit:cover;border-radius:20px}.real-cover .cover-edit{position:absolute;inset-inline-end:6px;bottom:6px;background:var(--surface);color:var(--ink);max-width:calc(100% - 12px);min-height:44px;white-space:normal;padding:6px;font-size:11px;overflow-wrap:anywhere}.cover-variant{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-block:10px;border-bottom:1px solid var(--line)}.real-cover-dialog{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line);color:var(--ink);background:var(--surface);padding:20px;border-radius:24px}.real-cover-dialog::backdrop{background:#14142d99;backdrop-filter:blur(8px)}.cover-crop canvas{display:block;width:100%;aspect-ratio:1;border-radius:16px}.cover-crop input[type=range]{width:100%;padding:0;min-height:44px}.real-cover-dialog .actions{flex-wrap:wrap}.real-cover-dialog .actions .btn{flex:1 1 120px;white-space:normal;overflow-wrap:anywhere}.real-cover-dialog [hidden]{display:none!important}

.admin-tabs{flex-wrap:wrap}.admin-tabs .btn{white-space:normal;overflow-wrap:anywhere}.admin-client h2,.admin-client-detail h2{overflow-wrap:anywhere}

.real-admin-confirmation .admin-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding-block:8px}.real-admin-confirmation input[type=checkbox]{width:22px;height:22px;min-height:22px;flex:none;accent-color:var(--accent)}.real-admin-confirmation textarea{width:100%;min-height:90px;resize:vertical;box-sizing:border-box}
.real-admin-feature .admin-inline-confirmation,.real-admin-refund .admin-inline-confirmation{margin-top:16px;padding:16px;max-width:100%;width:auto;box-sizing:border-box;border:1px solid var(--accent);border-radius:16px;background:var(--card);scroll-margin-block:25vh;overflow-wrap:anywhere}.admin-inline-confirmation>p:first-child{margin-top:0}.admin-inline-confirmation .status:empty{display:none}.real-admin-feature .admin-inline-confirmation .actions,.real-admin-refund .admin-inline-confirmation .actions{display:flex;flex-direction:column;gap:8px}.real-admin-feature .admin-inline-confirmation .actions>.btn,.real-admin-refund .admin-inline-confirmation .actions>.btn{flex:none;width:100%;margin:0}

.real-admin-access .admin-role-actions{display:flex;flex-wrap:wrap;gap:12px}.real-admin-access .btn{white-space:normal;max-width:100%;overflow-wrap:anywhere}.real-admin-access .btn[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}

.real-admin-rights form{display:grid;gap:16px}.real-admin-rights .field{display:block}.real-admin-rights input,.real-admin-rights select{width:100%;min-width:0;max-width:100%;min-height:44px}.admin-rights-group{padding-block:12px;border-bottom:1px solid var(--line)}.admin-tabs a[aria-current=page]{background:var(--selected);border-color:var(--selected-border);color:var(--ink)}

.real-admin-message-form details{margin-block:1rem}.real-admin-message-form summary{cursor:pointer;font-weight:700}.real-admin-message-form fieldset{min-inline-size:0;border:1px solid var(--line);border-radius:12px;padding:12px}.admin-message-text{white-space:pre-wrap;overflow-wrap:anywhere}

.backend-studio .real-admin-message-create .admin-switch,.backend-studio .real-admin-message-form .admin-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px}.backend-studio .real-admin-message-create input[type=checkbox],.backend-studio .real-admin-message-form input[type=checkbox]{width:auto;inline-size:auto;flex:0 0 auto;margin:0}.backend-studio #admin-message-toolbar .btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}

.backend-studio #admin-message-toolbar .btn{flex:1 1 140px}

.backend-studio .real-admin-report-form .admin-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px}.backend-studio .real-admin-report-form input[type=checkbox]{width:auto;inline-size:auto;flex:0 0 auto;margin:0}

.backend-studio .admin-payment-facts p,.backend-studio .admin-payment-facts bdi{overflow-wrap:anywhere;min-width:0}.backend-studio .admin-payment-facts .btn{white-space:normal;max-width:100%}

.backend-studio .real-admin-calendar-form .btn{white-space:normal;max-width:100%}.backend-studio .real-admin-calendar-form .note{overflow-wrap:anywhere}

.backend-studio #admin-finance-summary bdi,.backend-studio #admin-finance-history bdi{overflow-wrap:anywhere;min-width:0}.backend-studio .real-admin-finance-form .btn{white-space:normal;max-width:100%}

.backend-studio .real-admin-usage-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;align-items:end}.backend-studio .real-admin-usage-form .btn{white-space:normal;max-width:100%}.backend-studio #admin-usage-summary :is(p,bdi,h3,summary),.backend-studio #admin-usage-history :is(p,bdi,h3,summary){overflow-wrap:anywhere;min-width:0}
.backend-studio #admin-usage-summary summary,.backend-studio #admin-usage-history summary{padding-block:10px;line-height:24px;cursor:pointer}

/* Owned video gifts: exact product, explicit consent, scoped responsive controls. */
.real-gift-receipt,.real-gift-summary,#gift-offer,#gift-products article{min-inline-size:0;overflow-wrap:anywhere}.real-gift-receipt bdi,#gift-offer>bdi{display:block;overflow-wrap:anywhere}.real-gift-receipt .btn,.real-gift-offer-link .btn,#gift-offer .btn,#gift-summary .btn{min-block-size:44px;white-space:normal;text-align:center}.gift-consent{display:flex;align-items:center;gap:12px;padding:14px;margin-block:16px;min-block-size:44px;border:1px solid var(--line);border-radius:14px}.gift-consent.selected{background:var(--tint);border-color:var(--accent)}.gift-consent input{flex:0 0 22px;width:22px;height:22px;accent-color:var(--accent)}

/* Read-only API node snapshot; keep refresh and facts usable in both directions. */
.backend-studio .real-admin-server{min-inline-size:0}.backend-studio .real-admin-server article,.backend-studio #admin-server-facts{min-inline-size:0;overflow-wrap:anywhere}.backend-studio #admin-server-refresh{min-block-size:44px;white-space:normal}.backend-studio .real-admin-server .rights-facts{align-items:start}

/* Recovery offer only: intrinsic sizing and logical spacing preserve RTL. */
.backend-studio .real-recovery-card{min-inline-size:0;max-inline-size:100%;margin-block-end:1rem}
.backend-studio .real-recovery-card h2,.backend-studio .real-recovery-invoice dd{overflow-wrap:anywhere}
.backend-studio .real-recovery-card .btn{margin-block:.35rem;margin-inline-end:.5rem;white-space:normal}
.backend-studio .real-recovery-discount{display:inline-block;font-weight:700;color:var(--accent-ink);background:var(--accent);padding:.3em .65em;border-radius:999px}
.backend-studio .real-recovery-card .eyebrow{color:var(--muted)}
.backend-studio .real-recovery-card [role=timer]{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.backend-studio .real-recovery-invoice{border-block-start:1px solid var(--line);margin-block-start:1rem;padding-block-start:1rem}
.real-recovery-dialog{box-sizing:border-box;inline-size:min(34rem,calc(100vw - 2rem));max-block-size:calc(100dvh - 2rem);overflow:auto;border-radius:1.25rem;padding:1.25rem;background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.real-recovery-dialog::backdrop{background:rgb(0 0 0 / .55)}
.real-recovery-dialog p,.real-recovery-dialog h2{overflow-wrap:anywhere}
.real-recovery-dialog .actions{display:flex;flex-wrap:wrap;gap:.75rem}
.real-recovery-dialog .btn{white-space:normal;max-inline-size:100%;overflow-wrap:anywhere;min-block-size:44px}

/* Private photo controls share existing theme tokens and logical RTL sizing. */
.private-upload{min-inline-size:0;max-inline-size:100%;border:1px solid var(--line);border-radius:14px}
.private-upload img{display:block;inline-size:min(160px,100%);block-size:auto;max-block-size:200px;object-fit:contain;border-radius:12px;margin-block:12px}
.private-upload img[hidden]{display:none}.private-upload-name{display:block;overflow-wrap:anywhere;min-inline-size:0;max-inline-size:100%}
.private-upload .actions{display:flex;flex-wrap:wrap;gap:10px}.private-upload .btn{min-block-size:44px;white-space:normal;max-inline-size:100%;overflow-wrap:anywhere}
.private-upload[aria-busy=true]{opacity:.7;transition:opacity .15s ease}@media(prefers-reduced-motion:reduce){.private-upload{transition:none}}

/* Authenticated native players: intrinsic sizing, theme tokens and RTL-safe actions. */
.backend-studio .private-player{inline-size:100%;max-inline-size:100%;min-inline-size:0;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface);margin-block:12px}
.backend-studio .private-player :is(audio,video){display:block;inline-size:100%;min-inline-size:0;max-inline-size:100%;margin-block:12px;border-radius:10px}
.backend-studio .private-player video{max-block-size:65vh;background:#000}.backend-studio .private-player .actions{display:flex;flex-wrap:wrap;gap:10px}
.backend-studio .private-player .btn{min-block-size:44px;max-inline-size:100%;white-space:normal;overflow-wrap:anywhere}.backend-studio .private-player .status{overflow-wrap:anywhere}
.backend-studio .private-player [hidden]{display:none}.backend-studio .private-player{color-scheme:dark}.backend-studio[data-appearance=light] .private-player,html[data-appearance=light] .private-player{color-scheme:light}

/* P199/P200 A: advisory only; shared by text, audio and regeneration. */
.backend-studio .bilingual-warning { border: 1px solid #cb6565; background: rgba(203,101,101,.06); border-radius: 12px; padding: 10px 12px; margin-block: 12px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.backend-studio .bilingual-warning p { margin: 0; }
.backend-studio .bilingual-warning p + p { margin-block-start: 6px; }
.backend-studio .sf-field-error { display:block; color:var(--ink); border-inline-start:3px solid #cb6565; padding-inline-start:8px; margin-block-start:6px; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.backend-studio #song-form [aria-invalid=true] { border-color:#cb6565; outline:1px solid #cb6565; outline-offset:1px; }

/* R1B: stable shell; motion belongs to controls, never a fade of the whole page. */
.backend-studio .text-stepper { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; margin-block: 24px; }
.backend-studio .text-stepper .step { font-size: 13px; min-height: 44px; flex: 1 1 130px; min-width: 0; overflow-wrap: anywhere; }
.backend-studio .text-stepper .step i { flex-shrink: 0; }
.backend-studio .real-text-panel > .btn { margin-block: 8px; }
.backend-studio .real-text-panel > .actions { justify-content: flex-start; gap: 12px; }
@media(max-width:620px) { .backend-studio .real-text-panel > .btn, .backend-studio .real-text-panel > .actions > .btn { width: 100%; flex: 1 1 100%; } }
.backend-studio .preset-cards .creation-card { cursor: pointer; min-width: 0; }
.backend-studio .preset-cards .creation-card input { position: absolute; inset-inline-end: 16px; top: 16px; width: 20px; height: 20px; accent-color: var(--accent); }
.backend-studio .preset-cards .creation-card.selected { border-color: var(--accent); background: var(--tint); }
.backend-studio .preset-cards .creation-card:focus-within { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.backend-studio .preset-cards .creation-card:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.backend-studio .preset-cards h3 { overflow-wrap: anywhere; }
.backend-studio .real-preset-form > .actions { justify-content: flex-start; gap: 12px; }
@media(max-width:620px) { .backend-studio .real-preset-form > .actions .btn { width: 100%; flex: 1 1 100%; } }
.backend-studio .real-child-form .children-tile { display: grid; position: relative; cursor: pointer; min-width: 0; overflow: hidden; text-align: start; }
.backend-studio .real-child-form .children-tile input { position: absolute; inset-inline-start: 12px; top: 12px; width: 20px; height: 20px; accent-color: var(--accent); }
.backend-studio .real-child-form .children-tile strong { overflow-wrap: anywhere; }
.backend-studio .real-child-form .children-tile:focus-within { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.backend-studio .real-child-form .children-tile:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.backend-studio #child-summary dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.backend-studio .child-step-actions { margin-block: 24px; }
@media(max-width:620px) { .backend-studio .real-child-form .child-step-actions .btn, .backend-studio #children-save, .backend-studio #children-clear { width: 100%; flex: 1 1 100%; margin-block: 6px; } }
.backend-studio .sound-choice-field .song-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block: 12px 24px; }
.backend-studio .sound-choice-field .song-choice { display: flex; align-items: flex-start; gap: 10px; min-width: 0; min-height: 56px; width: 100%; padding: 16px; text-align: start; }
.backend-studio .sound-choice-field .song-choice input { flex: 0 0 18px; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.backend-studio .sound-choice-field .song-choice::before { display: none; }
.backend-studio .sound-choice-field .song-choice span { min-width: 0; }
.backend-studio .sound-choice-field .song-choice strong { font-size: 14px; }
.backend-studio .sound-choice-field .song-choice small { display: block; margin-block-start: 6px; line-height: 1.6; }
.backend-studio .sound-choice-field .song-choice:focus-within { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.backend-studio .sound-choice-field .song-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
@media(max-width:620px) { .backend-studio .sound-choice-field .song-choices { grid-template-columns: minmax(0,1fr); } }
.backend-studio .song-stepper { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 24px; }
.backend-studio .song-stepper .step { flex: 1 1 150px; min-width: 0; min-height: 48px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); justify-content: flex-start; text-align: start; font-size: 13px; overflow-wrap: anywhere; }
.backend-studio .song-stepper .step i { flex-shrink: 0; order: -1; }
.backend-studio .song-stepper .step.active { background: var(--tint); border-color: var(--accent); color: var(--ink); }
.backend-studio .song-step-review .summary-list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.backend-studio .song-step-actions { margin-block: 24px; }
.backend-studio .song-step-review h2 { margin-block-end: 20px; }
.backend-studio .real-song-form > #song-form > .actions { justify-content: flex-start; gap: 12px; }
@media(max-width:620px) {
 .backend-studio .real-song-form > #song-form > .actions > .btn { flex: 1 1 100%; width: 100%; }
}
/* R1C: common fields and existing native dialogs, including dialogs on body. */
.backend-studio :is(.field,fieldset) { min-inline-size: 0; }
.backend-studio .field { overflow-wrap: anywhere; }
.backend-studio .field > :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) { max-inline-size: 100%; min-inline-size: 0; min-block-size: 44px; }
.backend-studio textarea { resize: vertical; }
.backend-studio :is(.status,.help,.error-text,.field-error) { overflow-wrap: anywhere; }
.backend-studio [aria-invalid=true] { border-color: var(--danger, #d66b6b); }
:is(.real-cover-dialog,.real-delete-dialog) { overscroll-behavior: contain; scroll-padding-block: 20px; }
:is(.real-cover-dialog,.real-delete-dialog) :is(form,.field,fieldset,.actions) { min-inline-size: 0; }
:is(.real-cover-dialog,.real-delete-dialog) :is(h2,p,label) { overflow-wrap: anywhere; }
:is(.real-cover-dialog,.real-delete-dialog) .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 20px; }
:is(.real-cover-dialog,.real-delete-dialog) .btn { min-block-size: 44px; min-inline-size: 44px; max-inline-size: 100%; white-space: normal; overflow-wrap: anywhere; }
:is(.real-cover-dialog,.real-delete-dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { max-inline-size: 100%; min-inline-size: 0; font: inherit; }
:is(.real-cover-dialog,.real-delete-dialog) :is(button,input,textarea,select):focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
:is(.real-cover-dialog,.real-delete-dialog) button:disabled { filter: none; cursor: not-allowed; }
@media(max-width:620px) {
 .backend-studio .field > :is(input:not([type=checkbox]):not([type=radio]),select,textarea),
 :is(.real-cover-dialog,.real-delete-dialog) :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; }
 :is(.real-cover-dialog,.real-delete-dialog) .actions .btn { flex: 1 1 140px; }
}
.backend-studio .content { animation: none; min-height: calc(100dvh - 85px); }
.backend-studio .status:empty { visibility: hidden; }
.backend-studio .topbar { position: relative; flex-wrap: nowrap; gap: 16px; }
.backend-studio .breadcrumb { margin-inline-end: auto; }
.backend-studio .shell-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.backend-studio .account-menu { position: relative; border: 0; padding: 0; margin: 0; }
.backend-studio .account-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 44px; height: 44px; }
.backend-studio .account-menu > summary::-webkit-details-marker { display: none; }
.backend-studio .account-menu svg, .backend-studio .shell-notices svg { width: 22px; height: 22px; }
.backend-studio .account-menu .top-actions { position: absolute; inset-inline-end: 0; top: calc(100% + 12px); width: min(330px,calc(100vw - 36px)); max-height: calc(100dvh - 110px); overflow-y: auto; z-index: 50; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); display: grid; gap: 6px; margin: 0; }
.backend-studio .account-menu .btn { justify-content: flex-start; text-align: start; }
.backend-studio .shell-notices { position: relative; flex-shrink: 0; }
.backend-studio .notice-count { position: absolute; inset-inline-end: -4px; top: -5px; min-width: 18px; padding: 2px 4px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 10px; }
.backend-studio :is(button,input,textarea,select) { font-family: inherit; }
.backend-studio :is(.btn,.iconbtn) { min-height: 44px; min-width: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.backend-studio :is(button,.btn,.iconbtn,.choice,.creation-card,summary) { transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
.backend-studio :is(button,.btn,.iconbtn,.choice,.creation-card):active { transform: none; filter: none; box-shadow: inset 0 0 0 2px var(--accent); }
.backend-studio :is(a,button,summary,input,textarea,select):focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.backend-studio .real-shop-products + .help { margin-top: 24px; }
@media(max-width:900px) {
 .backend-studio .topbar { flex-wrap: wrap; }
 .backend-studio .topbar .breadcrumb { display: none; }
 .backend-studio .top-brand { margin-inline-end: auto; }
 .backend-studio .shell-tools { gap: 8px; }
 .backend-studio .shell-tools #theme { padding: 10px; }
 .backend-studio .account-menu .top-actions { flex: initial; }
}
@media(max-width:360px) {
 .backend-studio .topbar { gap: 8px; }
 .backend-studio .topbar .brand img { max-width: 88px; }
}
@media(prefers-reduced-motion:reduce) {
 .backend-studio :is(button,.btn,.iconbtn,.choice,.creation-card,summary) { transition: none; }
}

/* R4A: approved library list composition over real owner-scoped records. */
.backend-studio .real-library-list { margin-block:24px; }
.backend-studio .real-song-row { display:flex; align-items:center; gap:16px; padding-block:18px; }
.backend-studio .real-song-row + .real-song-row { border-top:1px solid var(--line); }
.backend-studio .real-song-row .real-cover { width:64px; margin:0; }
.backend-studio .real-song-row .real-cover img { border-radius:16px; }
.backend-studio .real-song-row .song-copy { flex:1; min-width:0; }
.backend-studio .real-song-row h3 { font-size:16px; line-height:1.5; margin:0; overflow-wrap:anywhere; }
.backend-studio .real-song-row .title-btn { color:inherit; text-decoration:none; text-align:start; display:inline-flex; align-items:center; min-height:44px; }
.backend-studio .real-song-row small { color:var(--muted); display:block; }
.backend-studio .real-song-row .actions { margin:0; gap:10px; flex-wrap:wrap; }
.backend-studio .library-tabs { flex-wrap:wrap; }
.backend-studio .library-tabs button { min-height:44px; white-space:normal; }
.backend-studio .real-song-detail > h2 { font-size:clamp(24px,4vw,36px); line-height:1.25; }
@media(max-width:620px) {
 .backend-studio .real-song-row { flex-wrap:wrap; gap:12px; }
 .backend-studio .real-song-row .song-copy { flex-basis:calc(100% - 80px); }
 .backend-studio .real-song-row .actions { width:100%; }
 .backend-studio .real-song-row .actions .btn { flex:1 1 100px; }
}
/* R4B: one authenticated audio element survives route changes in the shell dock. */
.backend-studio .mp-song { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; padding:20px; border:1px solid var(--line); border-radius:20px; background:var(--surface); min-width:0; }
.backend-studio .mp-song audio { display:none; }
.backend-studio .mp-now { display:flex; align-items:center; gap:12px; min-width:0; }
.backend-studio .mp-now img { width:56px; height:56px; object-fit:cover; border-radius:14px; flex:none; }
.backend-studio .mp-now div { min-width:0; }
.backend-studio .mp-now strong { display:block; overflow-wrap:anywhere; }
.backend-studio .mp-now small { color:var(--muted); display:block; }
.backend-studio .mp-transport { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; }
.backend-studio .mp-song .btn svg { width:22px; height:22px; flex:none; }
.backend-studio .mp-song .btn { min-height:44px; min-width:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.backend-studio .mp-timeline { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-width:0; }
.backend-studio .mp-timeline input { flex:1 1 150px; }
.backend-studio .mp-song input[type=range] { min-width:0; max-width:100%; min-height:44px; padding:0; accent-color:var(--accent); }
.backend-studio .mp-clock { font-variant-numeric:tabular-nums; color:var(--muted); font-size:13px; }
.backend-studio .music-dock { position:fixed; z-index:40; inset-inline-start:calc(270px + 24px); inset-inline-end:24px; bottom:20px; max-height:calc(100dvh - 40px); overflow:auto; }
.backend-studio .music-dock:empty { display:none; }
.backend-studio .mp-docked { box-shadow:0 16px 60px #0003; display:grid; grid-template-columns:minmax(140px,1fr) minmax(180px,1.5fr); gap:10px 20px; }
.backend-studio .mp-docked .status { margin:0; }
.backend-studio .mp-docked > .actions { grid-column:1 / -1; margin:0; justify-content:flex-end; }
.backend-studio .mp-docked > input { width:100%; }
.backend-studio.has-music-dock .content { padding-bottom:380px; }
.backend-studio .mp-dialog { width:min(900px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:24px; }
.backend-studio .mp-dialog::backdrop { background:#111827aa; backdrop-filter:blur(8px); }
.backend-studio .mp-dialog .mp-song { display:grid; grid-template-columns:minmax(0,1fr); border:0; box-shadow:none; }
.backend-studio .mp-dialog .mp-now { flex-direction:column; text-align:center; }
.backend-studio .mp-dialog .mp-now img { width:160px; height:160px; border-radius:24px; }
.backend-studio .mp-dialog .mp-lyrics { margin-block:24px; }
@media(max-width:900px) {
 .backend-studio .music-dock { inset-inline:16px; bottom:calc(84px + env(safe-area-inset-bottom)); }
 .backend-studio .mp-docked { grid-template-columns:minmax(0,1fr); max-height:50dvh; }
 .backend-studio.has-music-dock .content { padding-bottom:calc(60dvh + 100px); }
}

/* R4C: archive and permitted examples use the approved panels/tabs. */
.backend-studio .archive-filters { display:flex; flex-wrap:wrap; gap:10px; margin-block:24px; }
.backend-studio .archive-filters button { min-height:44px; white-space:normal; }
.backend-studio .real-archive-list { margin-block:24px; align-items:stretch; }
.backend-studio .real-archive-row { display:flex; flex-direction:column; gap:14px; min-width:0; }
.backend-studio .real-archive-row h2 { font-size:22px; line-height:1.3; overflow-wrap:anywhere; }
.backend-studio .real-archive-row .actions { margin-top:auto; flex-wrap:wrap; }
.backend-studio .real-archive-list > .actions { grid-column:1 / -1; }
.backend-studio .archive-symbol svg { width:28px; height:28px; }
.backend-studio .examples-grid { margin-block:24px; align-items:start; }
.backend-studio .example-song,.backend-studio .example-video { padding-block:20px; border-bottom:1px solid var(--line); }
.backend-studio .example-song h3,.backend-studio .example-video h3 { font-size:17px; line-height:1.5; margin-block:0 12px; overflow-wrap:anywhere; }
.backend-studio .example-song audio,.backend-studio .example-video video { width:100%; max-width:100%; }
.backend-studio .example-video video { display:block; border-radius:16px; margin-block:12px; }
.backend-studio .examples-grid .btn { margin-top:16px; min-height:44px; white-space:normal; }
.backend-studio .real-archive-row .btn { min-height:44px; white-space:normal; }
@media(max-width:620px){.backend-studio .real-archive-row .actions .btn { flex:1 1 100px; }}

/* R4D: approved cover/title detail composition, actual variants beneath it. */
.backend-studio .song-detail-summary { align-items:center; gap:26px; margin-block:0 24px; }
.backend-studio .song-detail-summary > .real-cover { width:160px; margin:0; }
.backend-studio .song-detail-copy { flex:1; min-width:0; }
.backend-studio .song-detail-copy h2 { font-size:clamp(24px,4vw,36px); line-height:1.25; margin-block:0 12px; overflow-wrap:anywhere; }
.backend-studio .song-detail-variants { align-items:start; margin-block:20px; }
.backend-studio .song-variant-card { border:1px solid var(--line); border-radius:20px; padding:18px; min-width:0; gap:12px; align-items:center; }
.backend-studio .song-variant-card > .real-cover { width:96px; }
.backend-studio .song-variant-card .private-player { flex-basis:100%; width:100%; }
.backend-studio .song-variant-card .mp-now img { display:none; }
.backend-studio .song-variant-card .cover-edit { font-size:12px; }
.backend-studio .real-song-detail > .actions { gap:12px; flex-wrap:wrap; margin-block:20px; }
@media(max-width:620px){
 .backend-studio .song-detail-summary { align-items:flex-start; }
 .backend-studio .song-detail-summary > .real-cover { width:128px; }
 .backend-studio .song-detail-variants { grid-template-columns:minmax(0,1fr); }
 .backend-studio .real-song-detail > .actions .btn { flex:1 1 130px; }
}

/* R5A: approved video catalogue; actual capabilities control each destination. */
.backend-studio .video-products { margin-block:28px; align-items:stretch; }
.backend-studio .video-product { min-width:0; display:flex; flex-direction:column; }
.backend-studio .video-product .scene { height:180px; min-height:180px; }
.backend-studio .video-product .scene-copy svg { width:48px; height:48px; }
.backend-studio .video-product .scene-copy small { display:block; margin-top:16px; overflow-wrap:anywhere; }
.backend-studio .video-product[data-product=postcard] .scene { filter:hue-rotate(35deg); }
.backend-studio .video-product[data-product=templates] .scene { filter:hue-rotate(310deg); }
.backend-studio .video-product .body { display:flex; flex-direction:column; flex:1; min-width:0; gap:14px; }
.backend-studio .video-product h3 { font-size:22px; line-height:1.3; }
.backend-studio .video-product .btn { margin-top:auto; min-height:44px; white-space:normal; }
.backend-studio .video-product p { overflow-wrap:anywhere; }
@media(max-width:900px){.backend-studio .video-products { grid-template-columns:minmax(0,1fr); }}

/* R5C: postcard settings use the approved shell and native accessible choices. */
.backend-studio .postcard-settings { max-width:860px; margin-inline:auto; padding:clamp(20px,3vw,36px); }
.backend-studio .postcard-settings > h2 { margin-block:0 24px; }
.backend-studio .postcard-settings .field { margin-block:18px; }
.backend-studio .postcard-choice-group { min-width:0; border:0; padding:0; margin-block:24px; }
.backend-studio .postcard-choice-group legend { font-weight:700; padding:0; margin-block-end:12px; }
.backend-studio .postcard-choice-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.backend-studio .postcard-choice { display:flex; align-items:center; gap:10px; min-height:72px; padding:16px; border:1px solid var(--line); border-radius:16px; cursor:pointer; background:var(--raised); overflow-wrap:anywhere; transition:background-color .18s,border-color .18s; }
.backend-studio .postcard-choice[data-selected=true] { border-color:var(--selected-border); background:var(--selected); }
.backend-studio .postcard-choice:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
.backend-studio .postcard-choice input { width:18px; height:18px; flex:0 0 18px; accent-color:var(--accent); }
.backend-studio .postcard-choice span { min-width:0; }
.backend-studio .postcard-source-actions { display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.backend-studio .postcard-source-actions .field { flex:1 1 220px; margin-block:0; }
.backend-studio .postcard-source-actions .btn { min-height:44px; white-space:normal; }
.backend-studio .postcard-settings-actions { display:flex; flex-wrap:wrap; gap:12px; margin-block-start:24px; }
.backend-studio .postcard-settings-actions .btn { min-height:48px; padding-inline:24px; }
.backend-studio .postcard-source-photo[hidden] { display:none; }
@media(max-width:620px){.backend-studio .postcard-choice-grid{grid-template-columns:minmax(0,1fr)}.backend-studio .postcard-settings-actions .btn{flex:1 1 140px}.backend-studio .postcard-source-actions > .btn{width:100%}}
@media(prefers-reduced-motion:reduce){.backend-studio .postcard-choice{transition:none}}

/* R5O: approved four-step form composition, using real source/preview records. */
.backend-studio .postcard-stepper{display:flex;flex-wrap:wrap;gap:12px 22px;list-style:none;padding:0;margin:0 0 30px;max-width:1100px}
.backend-studio .postcard-stepper li{display:flex;align-items:center;gap:9px;min-width:0;color:var(--muted);font-size:13px;line-height:1.5}
.backend-studio .postcard-stepper li>span{display:grid;place-items:center;flex:0 0 30px;height:30px;border:1px solid var(--line);border-radius:50%;font-weight:700}
.backend-studio .postcard-stepper li[aria-current=step]{color:var(--ink)}
.backend-studio .postcard-stepper li[aria-current=step]>span,.backend-studio .postcard-stepper li[data-complete=true]>span{background:var(--selected);border-color:var(--selected-border)}
.backend-studio .postcard-flow-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:25px;align-items:start;max-width:1100px}
.backend-studio .postcard-flow-main,.backend-studio .postcard-flow-aside{min-width:0}
.backend-studio .postcard-flow-main>.panel{margin-block:0 22px}
.backend-studio .postcard-flow-main .postcard-settings{max-width:none;margin-inline:0}
.backend-studio .postcard-flow-aside{position:sticky;top:24px;padding:28px;overflow-wrap:anywhere}
.backend-studio .postcard-flow-aside h2{font-size:18px;margin-block:20px 12px}
.backend-studio .postcard-flow-aside bdi{display:block;font-size:20px;font-weight:700;line-height:1.5}
.backend-studio .postcard-flow-aside .btn{display:flex;margin-block-start:20px;min-height:44px;white-space:normal}
.backend-studio .postcard-symbol{display:grid;place-items:center;width:56px;height:56px;border-radius:18px;background:var(--selected);color:var(--accent)}
.backend-studio .postcard-symbol svg{width:28px;height:28px}
.backend-studio .postcard-execution .pc-review-title{font-size:clamp(22px,3vw,30px);line-height:1.3;margin-block:24px 16px}
.backend-studio .postcard-flow-main .pc-previews{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.backend-studio .postcard-flow-main .pc-preview{min-width:0;overflow:hidden;padding:14px;border-radius:20px}
.backend-studio .postcard-flow-main .pc-preview[data-selected=true]{grid-column:1/-1}
.backend-studio .postcard-flow-main .pc-history-title{grid-column:1/-1;font-size:18px;margin-block:8px 0}
.backend-studio .postcard-flow-main .pc-preview img{display:block;width:100%;height:auto;max-height:220px;object-fit:contain;aspect-ratio:9/16;border-radius:12px;background:var(--raised)}
.backend-studio .postcard-flow-main .pc-preview[data-selected=true] img{max-height:560px}
.backend-studio .postcard-flow-main .pc-preview .actions{gap:10px;flex-wrap:wrap;margin-block-start:14px}
.backend-studio .postcard-execution .btn{min-height:44px;white-space:normal;overflow-wrap:anywhere}
.backend-studio .postcard-flow-main .pc-preview .btn{flex:1 1 140px}
.backend-studio .postcard-flow-main .pc-preview-scene{display:block;line-height:1.6;margin-block-start:14px;overflow-wrap:anywhere}
.pc-image-dialog{width:min(960px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px;overflow:auto;border:1px solid var(--line);border-radius:22px;color:var(--ink);background:var(--surface)}
.pc-image-dialog::backdrop{background:rgb(0 0 0 / .75)}
.pc-image-dialog>button{display:block;min-height:44px;margin-inline-start:auto;margin-block-end:14px;white-space:normal}
.pc-image-dialog>img{display:block;max-width:100%;max-height:calc(100dvh - 120px);width:auto;height:auto;margin-inline:auto;object-fit:contain}
@media(max-width:1100px){.backend-studio .postcard-flow-layout{grid-template-columns:minmax(0,1fr)}.backend-studio .postcard-flow-aside{position:static;order:2}}
@media(max-width:620px){.backend-studio .postcard-stepper{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.backend-studio .postcard-flow-main .pc-previews{grid-template-columns:minmax(0,1fr)}.backend-studio .postcard-flow-main .pc-preview[data-selected=true]{grid-column:auto}.backend-studio .postcard-flow-main .panel{padding:20px}.backend-studio .postcard-flow-main .pc-preview .btn{flex-basis:100%}}

/* R5P: bounded portrait result and stable, readable processing states. */
.backend-studio .postcard-flow-main .pc-working .pc-phase{justify-content:center;min-height:100px;font-size:18px;line-height:1.5}
.backend-studio .postcard-flow-main .pc-result .private-player{margin:0;padding:0;border:0;background:transparent}
.backend-studio .postcard-flow-main .pc-result video{display:block;width:100%;height:auto;max-height:65dvh;aspect-ratio:9/16;object-fit:contain;border-radius:15px;background:var(--bg)}
.backend-studio .postcard-flow-main .pc-result .private-player>.actions{display:flex;flex-wrap:wrap;gap:12px;margin-block:20px}
.backend-studio .postcard-flow-main .pc-result .private-player>.actions>.btn{min-height:44px;flex:1 1 180px;font-size:14px;padding:12px 20px;white-space:normal;overflow-wrap:anywhere}
.backend-studio .postcard-flow-main .pc-result .private-player>.actions>button:nth-child(2){background:var(--accent);color:#20263d;border-color:var(--accent);font-weight:700}
.backend-studio .postcard-flow-main .pc-result-actions>.btn{min-height:44px;white-space:normal}
.backend-studio .postcard-flow-main .pc-result .status:empty{display:none}
@media(max-width:620px){.backend-studio .postcard-flow-main .pc-result .private-player>.actions>.btn,.backend-studio .postcard-flow-main .pc-result-actions>.btn{flex-basis:100%;width:100%}}

/* R8A: approved personal-space composition, existing owner data only. */
.backend-studio .profile-page{display:grid;gap:22px;min-width:0}
.backend-studio .profile-heading h1{margin-block:0 12px}
.backend-studio .profile-heading p{margin:0;line-height:1.6}
.backend-studio .profile-summary{display:flex;align-items:center;gap:20px;min-width:0}
.backend-studio .profile-summary>div{min-width:0;overflow-wrap:anywhere}
.backend-studio .profile-summary h2{margin-block:0 6px;font-size:clamp(22px,3vw,28px)}
.backend-studio .profile-summary p{margin:0}
.backend-studio .profile-symbol{display:grid;place-items:center;flex:0 0 72px;width:72px;height:72px;background:var(--selected);color:var(--accent)}
.backend-studio .profile-symbol svg{width:32px;height:32px}
.backend-studio .profile-grid{align-items:start;gap:22px}
.backend-studio .profile-grid>section{min-width:0}
.backend-studio .profile-grid h2{margin-block:0 18px;font-size:22px}
.backend-studio .profile-grid form{display:grid;gap:18px}
.backend-studio .profile-shortcuts{display:grid;gap:12px}
.backend-studio .profile-shortcuts .btn{display:flex;justify-content:space-between;text-align:start}
.backend-studio .profile-page .btn{min-height:44px;padding:12px 20px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
.backend-studio .profile-page .rights-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.backend-studio .profile-page .rights-list .panel{margin:0;min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){.backend-studio .profile-grid,.backend-studio .profile-page .rights-list{grid-template-columns:minmax(0,1fr)}}
@media(max-width:420px){.backend-studio .profile-page>.panel,.backend-studio .profile-grid>.panel{padding:20px}.backend-studio .profile-summary{gap:14px}.backend-studio .profile-symbol{flex-basis:56px;width:56px;height:56px}}

/* R8B1: persisted owner statistics, no demo counters. */
.backend-studio .profile-statistics{min-width:0}
.backend-studio .profile-statistics-grid{gap:16px}
.backend-studio .profile-statistics .stat{min-width:0;display:flex;flex-direction:column;gap:12px;overflow-wrap:anywhere;text-decoration:none;color:var(--ink);padding:24px}
.backend-studio .profile-statistics .stat strong{font-size:34px;line-height:1.2}
.backend-studio .profile-statistics .stat small{font-size:14px;color:var(--muted)}
.backend-studio .profile-statistics a.stat:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.backend-studio .profile-statistics .help{line-height:1.6;margin-block:14px 0}
@media(max-width:620px){.backend-studio .profile-statistics-grid{grid-template-columns:minmax(0,1fr)}}

/* R8B2B: persistent avatar actions use the same large profile controls. */
.backend-studio .profile-symbol img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.backend-studio .profile-avatar-controls{margin-inline-start:auto;min-width:0;max-width:52%}
.backend-studio .profile-avatar-controls .actions{display:flex;flex-wrap:wrap;gap:12px}
.backend-studio .profile-avatar-controls .btn{flex:1 1 160px}
.backend-studio .profile-avatar-controls .status{max-width:440px;margin-block:12px 0;overflow-wrap:anywhere;line-height:1.6}
.backend-studio .profile-avatar-controls .status:empty{display:none}
@media(max-width:900px){.backend-studio .profile-summary{flex-wrap:wrap}.backend-studio .profile-avatar-controls{flex:1 1 100%;max-width:100%;margin-inline:0}}

/* R8C1: verified owner email and existing security workflows. */
.backend-studio .profile-account-address{margin-block:10px 0!important;overflow-wrap:anywhere;font-size:14px;line-height:1.6}
.backend-studio .profile-security{min-width:0;overflow-wrap:anywhere}
.backend-studio .profile-security h2{margin-block:0 18px;font-size:22px}
.backend-studio .profile-security .link-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding-block:18px;border-bottom:1px solid var(--line)}
.backend-studio .profile-security .link-row>div{min-width:0}
.backend-studio .profile-security .link-row strong,.backend-studio .profile-security .link-row small{display:block;line-height:1.6}
.backend-studio .profile-security .link-row small{margin-block-start:6px;color:var(--muted);overflow-wrap:anywhere}
.backend-studio .profile-security .tag{flex-shrink:0;max-width:45%;white-space:normal;overflow-wrap:anywhere}
.backend-studio .profile-security>.actions{display:flex;flex-wrap:wrap;gap:12px;margin-block-start:22px}
.backend-studio .profile-security>.actions>.btn{flex:1 1 180px}
.backend-studio .profile-security .status:empty{display:none}
@media(max-width:420px){.backend-studio .profile-security .link-row{align-items:flex-start;flex-wrap:wrap}.backend-studio .profile-security .tag{max-width:100%}}

/* R8C3: native focus-trapped profile editor, using the shared form controls. */
.profile-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;flex-wrap:wrap}.profile-heading>div{flex:1 1 360px;min-width:0;overflow-wrap:anywhere}.profile-heading #profile-edit{display:inline-flex;align-items:center;gap:10px;margin-block:4px;max-width:100%;flex:0 1 auto}
.profile-editor{box-sizing:border-box;width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:28px;border:1px solid var(--line);border-radius:24px;background:var(--surface);color:var(--ink);overflow:auto;box-shadow:0 24px 80px #0006}
.profile-editor::backdrop{background:#080b12b8}.profile-editor h2{margin-block:0 20px}.profile-editor .field{margin-block:16px}.profile-editor .actions{display:flex;flex-wrap:wrap;gap:12px}.profile-editor .actions>.btn{flex:1;min-width:140px;min-height:46px}.profile-editor-photo{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.profile-editor-photo>.profile-symbol{flex:0 0 80px;width:80px;height:80px}.profile-editor .profile-avatar-controls{flex:1;min-width:180px}.profile-editor .profile-avatar-controls .actions>.btn{min-width:120px}.profile-editor .status:empty{display:none}.profile-editor .profile-discard{margin-block-start:16px}.profile-editor .profile-discard[hidden]{display:none}.profile-balances>summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}.profile-balances>summary::after{content:"⌄";margin-inline-start:auto}.profile-balances[open]>summary::after{transform:rotate(180deg)}
@media(max-width:480px){.profile-editor{padding:20px}.profile-editor-photo{gap:12px}}

/* R8D: actual scoped balances and configured pack selection in approved shop layout. */
.backend-studio .balance-rights{margin-block:24px 30px;min-width:0}.backend-studio .balance-rights-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:16px}.backend-studio .balance-rights-grid>.panel{min-width:0;margin:0;overflow-wrap:anywhere}.backend-studio .balance-rights .rights-facts dd:first-of-type{font-size:30px;font-weight:750;line-height:1.2}.backend-studio .balance-video-links{display:flex;gap:12px;flex-wrap:wrap;margin-block:20px}.backend-studio .balance-video-links>.btn{min-height:46px;flex:1;text-align:center;justify-content:center;white-space:normal}.backend-studio .real-shop-products{margin-block:22px;align-items:stretch}.backend-studio .real-shop-products>.pack{width:100%;height:100%;display:flex;flex-direction:column;align-items:stretch;text-align:start;white-space:normal;overflow-wrap:anywhere;min-width:0;gap:12px;cursor:pointer}.backend-studio .real-shop-products .shop-pack-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.backend-studio .real-shop-products .shop-radio{font-size:22px;line-height:1}.backend-studio .real-shop-products .number{font-family:Onest,Manrope,sans-serif;font-size:54px;line-height:1.2}.backend-studio .real-shop-products .pack-label{font-size:20px;font-weight:700}.backend-studio .real-shop-products .pack-price{margin-block-start:auto;font-size:25px;line-height:1.4}.backend-studio .real-shop-selection{display:flex;gap:18px;flex-wrap:wrap;align-items:center;justify-content:space-between}.backend-studio .real-shop-selection h2{margin-block:0}.backend-studio .real-shop-selection>.btn{min-height:46px;padding:12px 24px}.backend-studio .real-invoice .history-facts{margin-block:18px}.backend-studio .history-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-block:18px}.backend-studio .history-tabs>.btn{flex:1;min-height:46px;white-space:normal}.backend-studio .history-empty{margin-block:20px;text-align:center}.backend-studio .history-empty h2{font-size:26px}
@media(max-width:620px){.backend-studio .balance-video-links>.btn{flex-basis:100%}.backend-studio .real-shop-selection>.btn{width:100%}.backend-studio .real-shop-products .number{font-size:44px}}

.backend-studio .real-shop-products>.pack{font:inherit;color:var(--ink)}.backend-studio .real-shop-products>.pack.selected::after{content:none}

@media(max-width:620px){.backend-studio .real-shop-products .pack-price{font-size:22px}.backend-studio .real-shop-products .pack-label{font-size:18px}}

/* R8E: approved FAQ/contact composition, with actual configured destinations only. */
.backend-studio .real-help{display:grid;gap:24px;margin-block:24px;min-width:0}.backend-studio .help-layout{align-items:start;gap:24px;min-width:0}.backend-studio .help-sidebar{gap:20px;min-width:0}.backend-studio .real-help .panel{margin:0;min-width:0;overflow-wrap:anywhere}.backend-studio .real-help h2{font-size:24px;margin-block:0 18px}.backend-studio .help-faq details{border-top:1px solid var(--line);padding-block:6px}.backend-studio .help-faq summary{min-height:52px;display:list-item;align-content:center;cursor:pointer;padding-block:12px;font-weight:700;line-height:1.5}.backend-studio .help-faq details>p{margin-block:4px 18px;line-height:1.7;color:var(--muted)}.backend-studio .help-contact-address{font-size:16px;line-height:1.6;overflow-wrap:anywhere;margin-block:18px}.backend-studio .real-help .btn{min-height:46px;white-space:normal;line-height:1.5;padding:12px 20px}.backend-studio .help-sidebar .actions{display:flex;gap:12px;flex-wrap:wrap}.backend-studio .help-sidebar .actions>.btn{flex:1;text-align:center}.backend-studio #help-legal>.actions{gap:12px;flex-wrap:wrap}.backend-studio #help-legal .btn{flex:1;justify-content:center;text-align:center}
@media(max-width:760px){.backend-studio .help-layout{grid-template-columns:minmax(0,1fr)}.backend-studio .help-sidebar .actions>.btn{flex-basis:100%}}

/* R8F1: actual permission-filtered admin destinations in the approved card system. */
.backend-studio .admin-dashboard{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:20px;margin-block:24px;min-width:0}.backend-studio .admin-dashboard>.creation-card{display:flex;flex-direction:column;align-items:flex-start;position:relative;min-height:190px;min-width:0;text-decoration:none;color:var(--ink);overflow-wrap:anywhere;padding:26px}.backend-studio .admin-dashboard .symbol{display:grid;place-items:center;width:60px;height:60px;color:var(--accent-text)}.backend-studio .admin-dashboard .symbol svg{width:30px;height:30px}.backend-studio .admin-dashboard h2{font-size:23px;line-height:1.4;margin-block:20px 12px}.backend-studio .admin-dashboard .admin-card-open{font-size:14px;color:var(--muted);margin-block-start:auto}.backend-studio .admin-dashboard .arrow{position:absolute;inset-inline-end:24px;top:24px;display:grid;place-items:center;width:30px;height:30px;color:var(--muted)}.backend-studio .admin-dashboard .arrow svg{width:20px;height:20px}.backend-studio .admin-dashboard>.creation-card:hover{border-color:var(--selected-border)}.backend-studio .admin-dashboard>.creation-card:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.backend-studio .admin-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-block:20px}.backend-studio .admin-tabs>.btn{min-height:44px;white-space:normal;line-height:1.5;padding:10px 16px}

.backend-studio .admin-dashboard .arrow{inset-inline-start:auto}.backend-studio .admin-workspace .btn.small{font-size:14px;min-height:44px;line-height:1.5;padding:10px 16px;white-space:normal}

/* R8F2D: actual scoped provider controls use the shared admin confirmation. */
.backend-studio .admin-provider-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(310px,100%),1fr));gap:20px;min-width:0}.backend-studio .admin-provider-card{margin:0;min-width:0;overflow-wrap:anywhere}.backend-studio .admin-provider-card h3{font-size:22px;line-height:1.4}.backend-studio .admin-provider-card .actions{display:flex;flex-wrap:wrap;gap:12px}.backend-studio .admin-provider-card .btn{min-height:48px;padding:12px 18px;line-height:1.5;white-space:normal;flex:1 1 170px}.backend-studio .real-admin-providers{margin-block:26px}.backend-studio .real-admin-providers>.actions{align-items:center;justify-content:space-between}

.backend-studio .real-admin-providers>.actions{gap:12px;flex-wrap:wrap}.backend-studio .real-admin-providers>.actions h2{margin:0;font-size:26px;line-height:1.4;min-width:0}.backend-studio .real-admin-providers .provider-status{margin:0;min-height:1.5em;flex:1 1 120px;font-size:14px}

/* Private message attachments: existing panels and controls, no global media styles. */
.message-files{margin-block:1rem;padding:1rem;border:1px solid var(--line,#424d68);border-radius:1rem;min-width:0}
.message-file-row{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;min-width:0;margin-block:.5rem}
.message-file-row bdi{flex:1 1 9rem;overflow-wrap:anywhere;min-width:0}.message-file-row input[type=checkbox]{flex:0 0 auto;width:1.1rem;height:1.1rem}
.message-files .message-file-input{position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)}
.message-files>.btn{margin-inline-end:.5rem}.message-files .status:empty{display:none}
.message-file-expiry{flex-basis:100%;font-size:.85em;opacity:.8;overflow-wrap:anywhere}
