/* ShotGram v139.78 — story stickers (link card, text, emoji, @mention)
   Sizes use --su (= sticker-frame width / 360) so a sticker looks the same on
   every screen. Outside a frame (inside the sheets) --su is plain 1px. */

:root { --su: 1px; }

/* ----------------------------------------------------------- the frame */
.ss-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 7; pointer-events: none; overflow: visible; container-type: normal;
}
.ss-frame.editing { pointer-events: auto; touch-action: none; }

.ss {
  position: absolute; left: 50%; top: 50%;
  display: block; width: max-content; max-width: none; white-space: nowrap;   /* width must not depend on position */
  transform-origin: center center; will-change: transform;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.ss-frame.editing .ss { cursor: grab; touch-action: none; pointer-events: auto; }
.ss-frame.editing .ss:active { cursor: grabbing; }
.ss.sel { filter: drop-shadow(0 0 calc(var(--su) * 6) rgba(255, 255, 255, .85)); }
.ss.view { pointer-events: auto; }
button.ss.view { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }
button.ss.view:active { filter: brightness(.92); }

/* --------------------------------------------------------------- looks */
.ss-link {
  display: inline-flex; align-items: center; gap: calc(var(--su) * 9);
  background: #fff; color: #0b0f14; text-align: start;
  padding: calc(var(--su) * 8) calc(var(--su) * 16) calc(var(--su) * 8) calc(var(--su) * 8);
  border-radius: calc(var(--su) * 18);
  box-shadow: 0 calc(var(--su) * 4) calc(var(--su) * 18) rgba(0, 0, 0, .35);
  max-width: calc(var(--su) * 270);
}
.ss-link-ic {
  flex: none; width: calc(var(--su) * 36); height: calc(var(--su) * 36);
  border-radius: calc(var(--su) * 12); background: var(--blue, #3f92ff); color: #fff;
  display: grid; place-items: center;
}
.ss-link-ic svg { width: 56%; height: 56%; stroke: currentColor; }
.ss-link-tx { display: grid; gap: 1px; min-width: 0; }
.ss-link-tx b {
  font-size: calc(var(--su) * 14); font-weight: 800; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(var(--su) * 190);
}
.ss-link-tx i { font-style: normal; font-size: calc(var(--su) * 11.5); color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: calc(var(--su) * 190); }

.ss-text {
  display: inline-block; font-size: calc(var(--su) * 26); font-weight: 800; line-height: 1.25;
  white-space: pre-wrap; word-break: break-word; max-width: calc(var(--su) * 300); text-align: center;
  text-shadow: 0 1px calc(var(--su) * 6) rgba(0, 0, 0, .55);
}
.ss-text.filled {
  text-shadow: none; padding: calc(var(--su) * 6) calc(var(--su) * 13); border-radius: calc(var(--su) * 12);
}
.ss-emoji { display: inline-block; font-size: calc(var(--su) * 64); line-height: 1.05; }
.ss-mention {
  display: inline-block; font-size: calc(var(--su) * 18); font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  padding: calc(var(--su) * 6) calc(var(--su) * 14); border-radius: 999px;
  box-shadow: 0 calc(var(--su) * 3) calc(var(--su) * 12) rgba(0, 0, 0, .3);
}

/* -------------------------------------------------- composer chrome */
.story-compose-media { touch-action: none; }
.ss-tools {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 9;
  display: grid; gap: 10px;
}
.ss-tools button {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: 20px; line-height: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .22);
}
.ss-tools button b { font-size: 16px; font-weight: 800; }
.ss-tools button svg { width: 20px; height: 20px; }
.ss-tools button:active { transform: scale(.94); background: rgba(63, 146, 255, .55); }
.ss-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 8;
  max-width: calc(100% - 96px); text-align: center; pointer-events: none;
  font-size: 12px; color: rgba(255, 255, 255, .9); background: rgba(0, 0, 0, .45);
  padding: 6px 12px; border-radius: 99px; transition: opacity .2s;
}
.ss-hint.gone { opacity: 0; }

.ss-ctl {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 20;
  display: flex; gap: 8px; pointer-events: auto;
}
.ss-ctl[hidden], .ss-trash[hidden] { display: none; }
.ss-ctl button {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 20px; line-height: 1;
  border: 1px solid rgba(255, 255, 255, .25);
}
.ss-ctl button svg { width: 18px; height: 18px; }
.ss-trash {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 19;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .6); color: #fff; border: 2px solid rgba(255, 255, 255, .5);
  transition: transform .12s, background .12s; pointer-events: none;
}
.ss-trash svg { width: 24px; height: 24px; }
.ss-trash.hot { background: #ef4444; border-color: #fff; transform: translateX(-50%) scale(1.18); }

/* ------------------------------------------------------------- sheets */
.ss-sheet { display: grid; gap: 12px; padding: 4px 4px 8px; }
.ss-sheet .input { width: 100%; }
.ss-sheet textarea.input { resize: none; font-size: 16px; }
.ss-prev {
  min-height: 74px; display: grid; place-items: center; border-radius: 16px; padding: 12px;
  background: linear-gradient(135deg, #1e2a44, #0e1626);
}
.ss-prev:empty { display: none; }
.ss-colors { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ss-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); }
.ss-dot.on { outline: 2px solid var(--blue, #3f92ff); outline-offset: 2px; }
.ss-bgtoggle {
  margin-inline-start: auto; width: 34px; height: 34px; border-radius: 10px; font-weight: 800;
  border: 2px solid var(--line-strong, rgba(255, 255, 255, .25)); color: var(--text);
}
.ss-bgtoggle[aria-pressed="true"] { background: var(--blue, #3f92ff); color: #fff; border-color: transparent; }
.ss-err { color: var(--bad, #ff4e6b); margin: 0; }
.ss-prevhead { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.ss-prevlist { display: grid; gap: 6px; max-height: 34vh; overflow: auto; }
.ss-prevrow {
  display: flex; align-items: center; gap: 10px; text-align: start; padding: 8px 10px;
  border-radius: 14px; background: var(--surface-2, rgba(255, 255, 255, .06));
}
.ss-prevrow .ss-link-tx b, .ss-prevrow .ss-link-tx i { max-width: 60vw; font-size: 13px; color: var(--text); }
.ss-prevrow .ss-link-tx i { color: var(--muted); font-size: 11.5px; }
.ss-prevrow .ss-link-ic { width: 34px; height: 34px; border-radius: 11px; }

.ss-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 4px 0 10px; }
.ss-emoji-grid button { font-size: 28px; padding: 6px 0; border-radius: 12px; line-height: 1.1; }
.ss-emoji-grid button:active { background: var(--surface-3, rgba(255, 255, 255, .1)); }
@media (max-width: 380px) { .ss-emoji-grid { grid-template-columns: repeat(6, 1fr); } }

.ss-who { display: grid; gap: 2px; max-height: 44vh; overflow: auto; }
.ss-who-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; text-align: start; width: 100%; }

.ss-open { display: grid; gap: 8px; padding: 2px 4px 8px; }
.ss-open-host { font-size: 20px; font-weight: 800; word-break: break-all; }
.ss-open-url { font-size: 12px; color: var(--muted); word-break: break-all; }
.ss-open p { margin: 0; }
.ss-open-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
