:root {
  --bg: #f4f1ea;
  --card: #fcfbf7;
  --ink: #1c1b18;
  --soft: rgba(28, 27, 24, 0.58);
  --line: rgba(28, 27, 24, 0.1);
  --accent: #6a4df4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: 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;
}

.sp { position: relative; width: min(324px, 100%); padding: 16px 16px 14px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(28, 27, 24, 0.05), 0 28px 46px -28px rgba(28, 27, 24, 0.35); }

.sp__head { display: flex; align-items: center; gap: 10px; }
.sp__face { flex: none; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, #e6dcff, #cdbcff); color: #2c1c78; font-size: 14px; line-height: 36px; font-weight: 740; text-align: center; box-shadow: inset 0 0 0 1px rgba(44, 28, 120, 0.12); }
.sp__name { min-width: 0; display: grid; }
.sp__name b { font-size: 15.500px; line-height: 20px; font-weight: 740; font-stretch: 106%; letter-spacing: -0.01em; }
.sp__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sp__text { margin-top: 12px; font-size: 16px; line-height: 25px; font-weight: 520; letter-spacing: -0.005em; text-wrap: pretty; }
/* a spoiler: every letter has its own cover, so they can go one after the other */
.sp__hide { cursor: pointer; outline: none; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.sp__hide.is-open { cursor: text; }
.sp__hide:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.sp__w { display: inline-block; white-space: nowrap; }
.sp__c { --k: 1; position: relative; display: inline-block; color: rgba(28, 27, 24, calc(1 - var(--k))); }
.sp__c::after { content: ""; position: absolute; left: -0.500px; right: -0.500px; top: 3px; bottom: 2px; background-color: rgba(28, 27, 24, 0.13); background-image: var(--grain); background-size: 48px 48px; background-position: var(--gx, 0) var(--gy, 0); opacity: var(--k); pointer-events: none; }
.sp__w .sp__c:first-child::after { border-radius: 5px 0 0 5px; left: -2px; }
.sp__w .sp__c:last-child::after { border-radius: 0 5px 5px 0; right: -2px; }
@media (hover: hover) { .sp__hide:not(.is-open):hover .sp__c::after { background-color: rgba(28, 27, 24, 0.2); } }

.sp__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.sp__count { display: block; height: 16px; overflow: hidden; font-size: 12px; line-height: 16px; font-weight: 580; color: var(--soft); white-space: nowrap; }
.sp__count span { display: block; }
.sp__all { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--accent); color: #ffffff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 18px -12px color-mix(in srgb, var(--accent) 85%, #000000); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sp.is-clear .sp__all { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.500px rgba(28, 27, 24, 0.2); }
.sp__all:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.sp__roll { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.sp__roll span { display: block; white-space: nowrap; }
@media (hover: hover) { .sp:not(.is-clear) .sp__all:hover { background: color-mix(in srgb, var(--accent) 88%, #000000); } .sp.is-clear .sp__all:hover { background: rgba(28, 27, 24, 0.05); } }

.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: #1c1b18; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }
