#preview{display:block;width:100%;height:100%}.sheet{padding-top:12px}fieldset{min-width:0;padding:0;border:0;margin:0}#status{margin:12px 0}.secondary{display:block;width:100%;padding:12px;margin-top:9px;border-radius:10px;border:1px solid #495568;color:#dce7ff;background:#252a31}.scene{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:10px;margin:12px 0}.scene img{width:48px;height:72px;object-fit:cover;border-radius:5px;background:#27282c}.scene label{display:block;font-size:13px;color:#bcc1cb}.scene input{margin-top:4px}.sheet h1{margin-top:16px}#refName{overflow-wrap:anywhere}

.url-row{display:flex;gap:8px;align-items:stretch}.url-row input{flex:1;min-width:0}.url-row button{flex:none;border:0;border-radius:9px;padding:0 14px;background:#1671e8;color:white;font-size:14px;font-family:inherit;font-weight:600;min-height:44px}.url-row button:disabled{opacity:.6}#loginHelp{font-size:14px;color:#9dc9ff}

#referenceStory{padding:16px 0;border-block:1px solid #343942}#sourceTopic{margin:6px 0 12px}#sourceDetails summary{display:inline-block;font-size:13px}#sourceLines{padding-inline-start:22px}#sourceLines li{margin-block:10px}#sourceLines p{font-size:13px;color:#bcc1cb;overflow-wrap:anywhere}

#linkFeedback { margin: 10px 0; }
.scene > .secondary { grid-column: 2; width: fit-content; margin: 0; padding: 7px 14px; }
#linkMessage { margin: 0; color: #c9dfff; font-size: 14px; line-height: 1.5; }
#linkProgress { height: 5px; margin-top: 7px; background: #2b3d58; border-radius: 4px; overflow: hidden; }
#linkProgress::after { content: ''; display: block; width: 38%; height: 100%; background: #70adff; border-radius: inherit; animation: remix-scan 1.4s ease-in-out infinite alternate; }
@keyframes remix-scan { to { transform: translateX(163%); } }
@media (prefers-reduced-motion: reduce) { #linkProgress::after { animation: none; margin-inline: auto; } }

#stage #play { left: auto; right: 8px; bottom: 12px; width: 44px; height: 44px; }
@media (max-width: 767px) {
  main:has(#stage:not([hidden])) {
    position: fixed; inset: 0; width: 100%; height: 100dvh; min-height: 0; display: grid;
    grid-template-rows: auto minmax(0, 1fr) 50%; overflow: clip;
  }
  #stage { position: relative; min-height: 0; container-type: size; padding: 6px 8px; }
  #stage #frame { height: auto; width: min(calc(100cqw - 100px), 56.25cqh); }
  #stage:not([hidden]) + .sheet { display: flex; flex-direction: column; min-height: 0; padding: 9px 0 0; }
  #stage:not([hidden]) + .sheet .handle { flex: none; margin-bottom: 6px; }
  #stage:not([hidden]) + .sheet .remix-fields {
    min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 18px max(24px, env(safe-area-inset-bottom));
  }
}

@media (min-width:1024px) {
  main:has(#stage:not([hidden])) { display: grid; grid-template-columns: minmax(280px,5fr) minmax(0,7fr); grid-template-rows: auto 1fr; width: min(100%,1200px); max-width: none; align-items: start; }
  main > header { grid-column: 1 / -1; }
  #stage:not([hidden]) { grid-column: 1; position: sticky; top: 0; }
  #stage #frame { height: min(76dvh, 640px); }
  #stage:not([hidden]) + .sheet { grid-column: 2; border-radius: 0; }
  .sheet .handle { display: none; }
}
