/* A share link's page (templates/flisk/link.html): the Flisk, over its picture till it plays. */
.share main { max-width: 760px; }
.stage { position: relative; width: 100%; aspect-ratio: 1200 / 630; border-radius: 18px; overflow: hidden; background: #0b0814; margin: 8px 0 18px; }
.stage .poster, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stage .poster.blank { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2a0f6b, #864dff); }
.stage .poster.blank span { color: #fff; font-size: 28px; font-weight: 700; padding: 0 24px; text-align: center; }
.stage canvas[hidden], .stage button[hidden], .stage p[hidden] { display: none; }
.stage canvas { touch-action: none; opacity: 0; transition: opacity 0.3s; }  /* (the engine's own scene, under its picture till the Flisk's here) */
.stage.ready canvas { opacity: 1; }
.stage .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 14px 30px; font-size: 18px; border-radius: 999px; }
.stage .sound { position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; font-size: 13px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #fff; border: 0; }
.stage .loading { position: absolute; left: 12px; bottom: 6px; color: #fff; font-size: 13px; opacity: 0.8; }
.share .by { color: var(--soft); margin-top: -6px; }
.share .buttons a[hidden] { display: none; }
.share p.soft { color: var(--soft); font-size: 14px; }
@media (max-width: 600px) { .stage { aspect-ratio: 4 / 5; border-radius: 14px; } }

/* Embed it (the share page's panel). */
.share details.embed { margin: 18px 0; border: 1px solid var(--line, #2c2440); border-radius: 12px; padding: 10px 14px; }
.share details.embed summary { cursor: pointer; font-weight: 600; }
.share .shapes { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.share .shapes button { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #2c2440); background: transparent; color: inherit; cursor: pointer; }
.share .shapes button[aria-pressed="true"] { background: var(--accent, #864dff); border-color: var(--accent, #864dff); color: #fff; }
.share textarea.code { width: 100%; box-sizing: border-box; font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px;
  border-radius: 10px; border: 1px solid var(--line, #2c2440); background: var(--field, #1a1528); color: var(--ink, #f4f2ff); resize: vertical; }
.share textarea.code[hidden], .share #copied[hidden] { display: none; }

/* Embedded in someone's page (templates/flisk/embed.html): the Flisk fills the frame. */
html:has(body.embedded), body.embedded { margin: 0; height: 100%; background: #0b0814; overflow: hidden; }
.embedded .stage { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; border-radius: 0; }
.embedded .stage .full { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border-radius: 999px; border: 0;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 17px; cursor: pointer; }
.embedded .stage .mark { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 70px); padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font: 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embedded .stage .mark b { color: #c9a8ff; }
.embedded .stage .loading { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
.embedded .stage .play { background: #864dff; color: #fff; border: 0; cursor: pointer; font-family: inherit; }
