:root {
  --bg: #0b0c0e;
  --card: #15171a;
  --tile: #23262b;
  --ink: #f2f3f1;
  --soft: rgba(242, 243, 241, 0.6);
  --faint: rgba(242, 243, 241, 0.22);
  --line: rgba(242, 243, 241, 0.1);
  --accent: #3ddc84;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 0%, #16181c 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.ss { position: relative; width: min(324px, 100%); padding: 14px; border-radius: 26px; background: linear-gradient(180deg, #1b1d21, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }

.ss__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; min-height: 36px; }
.ss__name { min-width: 0; display: grid; }
.ss__name b { font-size: 16px; line-height: 21px; font-weight: 740; font-stretch: 108%; letter-spacing: -0.012em; }
.ss__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss__badge { flex: none; display: block; height: 26px; padding: 0 11px; border-radius: 13px; background: var(--accent); color: #06301a; font-size: 12px; line-height: 26px; font-weight: 720; white-space: nowrap; opacity: 0; transform: scale(0.6); transform-origin: 100% 50%; }

.ss__stage { position: relative; height: min(176px, 44vh); margin-top: 10px; border-radius: 16px; background: #0d0e10; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
/* a person in the call: the script places each tile, in the grid or in the strip */
.ss__tile { position: absolute; left: 0; top: 0; display: grid; place-items: center; border-radius: 12px; background: var(--tile); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line), 0 6px 10px -6px rgba(0, 0, 0, 0.8); }
.ss__tile b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: var(--t); font-size: 13px; font-weight: 760; }
.ss__tile span { position: absolute; left: 7px; bottom: 5px; font-size: 10.500px; font-weight: 620; color: var(--soft); }
.ss.is-sharing .ss__tile span { opacity: 0; }

/* what is being shared, drawn as a wireframe */
.ss__shared { position: absolute; inset: 0; opacity: 0; transform-origin: 0 0; background: #17191d; }
.ss__view { position: absolute; inset: 0; display: none; }
.ss__view.is-on { display: block; }
.wf { position: absolute; inset: 0; display: block; }
.wf i { position: absolute; display: block; border-radius: 3px; background: rgba(242, 243, 241, 0.1); box-shadow: inset 0 0 0 1px var(--faint); }
.wf .wf__bar { border-radius: 0; background: rgba(242, 243, 241, 0.14); box-shadow: none; }
.wf .wf__line { border-radius: 99px; background: rgba(242, 243, 241, 0.6); box-shadow: none; }
.wf .wf__line--soft { background: var(--faint); }
.wf .wf__col { border-radius: 3px 3px 0 0; background: var(--faint); box-shadow: none; transform-origin: 50% 100%; }
.wf .wf__row { border-radius: 99px; background: var(--faint); box-shadow: none; }
.wf .wf__col--on, .wf .wf__row--on { background: var(--accent); }

.ss__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; }
.ss.is-sharing .ss__frame { opacity: 1; transition-duration: 0.1s; }
.ss__frame rect { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }

.ss__sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 9px 10px 10px; border-radius: 16px 16px 0 0; background: #24272c; box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.1), 0 -14px 22px -10px rgba(0, 0, 0, 0.8); transform: translateY(105%); }
.ss__sheet > b { display: block; padding: 0 2px; font-size: 12px; line-height: 16px; font-weight: 700; }
.ss__opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.ss__opt { display: grid; gap: 4px; padding: 5px 5px 4px; border: 0; border-radius: 11px; background: rgba(242, 243, 241, 0.06); color: var(--soft); font: inherit; font-size: 10.500px; line-height: 13px; font-weight: 640; text-align: center; cursor: pointer; outline: none; box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ss__opt span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss__thumb { position: relative; display: block; width: 100%; aspect-ratio: 296 / 176; border-radius: 7px; background: #17191d; overflow: hidden; }
.ss__opt:focus-visible, .ss__share:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
@media (hover: hover) { .ss__opt:hover { background: rgba(242, 243, 241, 0.12); color: var(--ink); box-shadow: inset 0 0 0 1.500px var(--accent); } }

.ss__bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ss__ctl { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(242, 243, 241, 0.07); color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.ss__ctl svg, .ss__share svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; }
.ss__share { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: 14px; background: var(--ink); color: #101112; font: inherit; font-size: 13.500px; font-weight: 720; cursor: pointer; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ss__share svg { flex: none; }
.ss.is-sharing .ss__share { background: var(--accent); color: #06301a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 14px 22px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.ss__roll { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.ss__roll span { display: block; white-space: nowrap; }
@media (hover: hover) { .ss:not(.is-sharing) .ss__share:hover { background: #ffffff; } }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f2f3f1; stroke: #000000; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
