/* Painel Instagram — folha de estilo unica.
   Escrita a mao de proposito: sem build, sem CDN, funciona offline. */

:root {
  --bg: #0e1014;
  --surface: #161a21;
  --surface-2: #1d222b;
  --surface-3: #252b36;
  --border: #2b313d;
  --border-soft: #232935;

  --text: #e7e9ef;
  --muted: #98a1b3;
  --faint: #6b7488;

  --accent: #e1306c;
  --accent-2: #f5603f;
  --accent-soft: rgba(225, 48, 108, 0.14);

  --ok: #3ddc97;
  --ok-soft: rgba(61, 220, 151, 0.13);
  --warn: #f7b955;
  --warn-soft: rgba(247, 185, 85, 0.14);
  --err: #ff6b6b;
  --err-soft: rgba(255, 107, 107, 0.14);
  --info: #5aa9ff;
  --info-soft: rgba(90, 169, 255, 0.13);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 .75rem; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .83rem; }
.tiny  { font-size: .76rem; }
.mono  { font-family: ui-monospace, Consolas, "Courier New", monospace; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------- layout */

.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font-weight: 700;
  font-size: 1.02rem;
}
.brand .dot {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-size: 15px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.ativo {
  background: var(--accent-soft);
  color: #ffd7e4;
}
.nav a .ico { width: 18px; text-align: center; opacity: .9; }
.nav .sep { height: 1px; background: var(--border-soft); margin: 10px 6px; }

.main { padding: 26px 30px 60px; max-width: 1180px; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-head .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* ------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.card.tight { padding: 14px; }
.card h3 { margin-bottom: 12px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.card-head h3 { margin: 0; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat .label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.stat .hint { color: var(--faint); font-size: .78rem; margin-top: 2px; }

/* ------------------------------------------------------------- botões */

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .9rem; font-weight: 550;
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { background: var(--surface-3); border-color: #39414f; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
}
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.btn-danger { background: var(--err-soft); border-color: rgba(255,107,107,.35); color: #ffb3b3; }
.btn-danger:hover { background: rgba(255,107,107,.22); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: .83rem; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ------------------------------------------------------------- forms */

label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field { margin-bottom: 14px; }

input[type=text], input[type=password], input[type=number], input[type=datetime-local],
input[type=time], input[type=date], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .93rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.help { color: var(--faint); font-size: .79rem; margin-top: 5px; }

.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 150px; }

/* ------------------------------------------------------------- tabelas */

table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 10px; border-bottom: 1px solid var(--border);
}
td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* ------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .76rem; font-weight: 600;
  background: var(--surface-3); color: var(--muted);
  white-space: nowrap;
}
.badge-ok    { background: var(--ok-soft);   color: var(--ok); }
.badge-warn  { background: var(--warn-soft); color: var(--warn); }
.badge-err   { background: var(--err-soft);  color: var(--err); }
.badge-info  { background: var(--info-soft); color: var(--info); }
.badge-accent{ background: var(--accent-soft); color: #ff9ec0; }

.dotmark { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dotmark.ok { background: var(--ok); }
.dotmark.warn { background: var(--warn); }
.dotmark.err { background: var(--err); }
.dotmark.off { background: var(--faint); }

/* ------------------------------------------------------------- avisos */

.alert {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: .89rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.alert-warn  { background: var(--warn-soft); border-color: rgba(247,185,85,.3); color: #ffdfa8; }
.alert-err   { background: var(--err-soft);  border-color: rgba(255,107,107,.3); color: #ffbcbc; }
.alert-ok    { background: var(--ok-soft);   border-color: rgba(61,220,151,.3);  color: #a9f0cf; }
.alert-info  { background: var(--info-soft); border-color: rgba(90,169,255,.3);  color: #bcdcff; }
.alert b { color: inherit; }

.banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--warn-soft);
  border: 1px solid rgba(247,185,85,.32);
  color: #ffe0aa;
  border-radius: var(--radius);
  padding: 11px 15px;
  margin-bottom: 16px;
  font-size: .89rem;
}

/* ------------------------------------------------------------- listas */

.lista-contas { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.item-conta {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  cursor: pointer;
}
.item-conta:hover { border-color: #3a4351; }
.item-conta.marcado { border-color: var(--accent); background: var(--accent-soft); }
.item-conta .nome { font-weight: 600; font-size: .92rem; }
.item-conta .meta { color: var(--faint); font-size: .78rem; }
.item-conta input { margin: 0; }

/* area de envio dentro do composer — o caminho principal do dia a dia */
.dropzone {
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--surface-3); }
.dropzone.arrastando { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-ico { font-size: 1.7rem; margin-bottom: 6px; opacity: .75; }
.dropzone input[type=file] { display: none; }

.preview-atual {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  margin-top: 12px;
}
.preview-atual img {
  width: 84px; height: 84px; object-fit: contain; border-radius: 8px;
  background: var(--surface-3);
}

details.avancado > summary {
  cursor: pointer; list-style: none; color: var(--muted);
  font-size: .85rem; padding: 6px 0;
}
details.avancado > summary::-webkit-details-marker { display: none; }
details.avancado > summary::before { content: "▸ "; }
details.avancado[open] > summary::before { content: "▾ "; }
details.avancado > summary:hover { color: var(--text); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
}
.media-card.marcado { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.media-card img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; background: #000; }
.media-card .info { padding: 7px 9px; font-size: .76rem; color: var(--muted); }
.media-card .x {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,.65); color: #fff; border: none;
  border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 13px;
}

/* ------------------------------------------------------------- calendário */

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .cab { text-align: center; color: var(--faint); font-size: .72rem; text-transform: uppercase; padding: 5px 0; font-weight: 600; }
.cal .dia {
  min-height: 84px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 5px 6px;
  background: var(--surface-2);
  font-size: .78rem;
}
.cal .dia.hoje { border-color: var(--accent); }
.cal .dia.vazio { background: transparent; border-color: transparent; }
.cal .dia .num { color: var(--faint); font-weight: 600; margin-bottom: 4px; }
.cal .chip {
  display: block; padding: 2px 5px; margin-bottom: 3px;
  border-radius: 5px; font-size: .71rem;
  background: var(--accent-soft); color: #ffb0cd;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal .chip.pub { background: var(--ok-soft); color: var(--ok); }
.cal .chip.err { background: var(--err-soft); color: var(--err); }

/* ------------------------------------------------------------- fila */

.alvo {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 7px;
}
.alvo .who { font-weight: 600; min-width: 150px; }
.alvo .st { min-width: 110px; }
.alvo .msg { color: var(--muted); font-size: .85rem; flex: 1; }

.barra { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.barra > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s; }

.composer-progress {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(620px, calc(100vw - 32px));
  padding: 17px 18px 15px;
  border: 1px solid rgba(90,169,255,.42);
  border-radius: 14px;
  background: rgba(24,29,38,.97);
  box-shadow: 0 18px 60px rgba(0,0,0,.5);
  backdrop-filter: blur(12px);
}
.composer-progress[hidden] { display: none; }
.composer-progress.failed { border-color: rgba(255,107,107,.55); }
.composer-progress.done { border-color: rgba(61,220,151,.55); }
.composer-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 13px;
}
.composer-progress-kicker {
  margin-bottom: 3px;
  color: var(--faint);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .12em;
}
.composer-progress-head strong { font-size: 1.02rem; }
.composer-progress-bar { height: 8px; margin-bottom: 11px; }
.composer-progress-message { color: var(--text); font-size: .9rem; line-height: 1.4; }
.composer-progress-time { margin-top: 4px; color: var(--faint); font-size: .75rem; }

@media (max-width: 640px) {
  .composer-progress { bottom: 12px; padding: 14px; }
  .composer-progress-head { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* ------------------------------------------------------------- modal */

dialog.modal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  max-width: 560px; width: 92%;
  box-shadow: var(--shadow);
}
dialog.modal::backdrop { background: rgba(0,0,0,.6); }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--border); font-weight: 650; }
.modal-body { padding: 18px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* -------------------------------------------------------------- misc */

.empty {
  text-align: center; padding: 40px 20px; color: var(--faint);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty .big { font-size: 2rem; margin-bottom: 8px; }

.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 999; }
.toast {
  background: var(--surface-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 15px; font-size: .88rem;
  box-shadow: var(--shadow); max-width: 340px;
}
.toast.ok { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--err); }
.toast.warn { border-left: 3px solid var(--warn); }

.spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: gira .7s linear infinite; display: inline-block;
}
@keyframes gira { to { transform: rotate(360deg); } }

.preview-img { max-width: 260px; border-radius: var(--radius-sm); border: 1px solid var(--border); display: block; }

.kbd { background: var(--surface-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: .78rem; font-family: ui-monospace, Consolas, monospace; }

/* ------------------------------------------------------- dashboard */

.barras {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px; height: 140px; padding: 10px 6px 0;
}
.barra-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px;
}
.barra-fundo {
  width: 100%; max-width: 34px; height: 100px;
  background: var(--surface-2); border-radius: 6px;
  display: flex; align-items: flex-end; overflow: hidden;
}
.barra-fill {
  width: 100%; background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 6px 6px 0 0; min-height: 4px; transition: height .5s ease;
}
.barra-label { font-size: .72rem; color: var(--faint); text-transform: uppercase; }
.barra-num { font-size: .72rem; color: var(--muted); font-weight: 600; }

.agendado-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); background: var(--surface-2);
  margin-bottom: 7px;
}
.agendado-hora {
  font-size: .78rem; color: var(--accent); font-weight: 600;
  min-width: 110px;
}
.agendado-titulo { flex: 1; font-size: .88rem; }
.agendado-contas { display: flex; gap: 4px; flex-wrap: wrap; }

/* ------------------------------------------------------- preview */

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 380px;
  overflow: hidden;
}
.preview-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
}
.preview-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: .9rem;
}
.preview-user { font-weight: 600; font-size: .88rem; }
.preview-local { font-size: .75rem; color: var(--faint); }
.preview-img-ig {
  width: 100%; height: auto; object-fit: contain;
  display: block; background: var(--surface-2);
}
.preview-img-placeholder {
  width: 100%; aspect-ratio: 1/1;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--faint);
  font-size: .85rem;
}
.preview-actions {
  display: flex; gap: 14px; padding: 10px 14px;
  font-size: 1.1rem;
}
.preview-caption {
  padding: 0 14px 12px; font-size: .87rem; line-height: 1.55;
  word-break: break-word;
}
.preview-texto { white-space: pre-wrap; }
.preview-meta {
  padding: 0 14px 14px;
}

.story-options {
  padding: 14px;
  border: 1px solid rgba(90,169,255,.28);
  border-radius: var(--radius-sm);
  background: rgba(90,169,255,.055);
}
.story-options-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.story-poll-fields { margin-bottom: 0; }
.story-model-picker { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.story-model-picker legend { font-weight: 700; margin-bottom: 4px; }
.story-model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  min-width: 0;
}
.story-model-choice {
  display: grid; gap: 8px; position: relative; cursor: pointer; padding: 8px;
  border: 2px solid var(--border); border-radius: 10px; background: var(--surface-2);
  text-align: center; font-size: .84rem;
  min-width: 0;
  overflow: hidden;
}
.story-model-choice img {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 156px !important;
  max-height: 156px !important;
  object-fit: contain;
  border-radius: 5px;
}
.story-model-choice input { position: absolute; top: 11px; left: 11px; accent-color: var(--accent); }
.story-model-choice:has(input:checked) { border-color: var(--accent); background: var(--surface-3); }
.story-model-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1200px) {
  .story-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.story-model-none { margin-top: 12px; gap: 7px; cursor: pointer; }
[data-story-custom-background][hidden] { display: none; }
.story-model-photo-size { margin: 0 0 18px; }
.story-model-photo-size[hidden] { display: none; }
.story-model-photo-size input[type="range"] { padding: 0; cursor: pointer; }
.story-editor-tools {
  margin-bottom: 16px; padding: 13px;
  border: 1px solid rgba(236,72,128,.28); border-radius: 10px;
  background: rgba(236,72,128,.045);
}
.story-editor-title {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 13px;
}
.story-color-row input[type="color"],
.story-editor-tools input[type="color"] {
  width: 54px; min-width: 54px; height: 42px; padding: 3px;
  border-radius: 9px; cursor: pointer;
}
.story-editor-tools input[type="range"] { padding: 0; cursor: pointer; }
.story-native-title {
  padding-top: 2px; margin: 2px 0 12px; color: var(--muted); font-size: .88rem;
}

.preview-card-story { max-width: 380px; background: #111; }
.preview-story-frame {
  width: 100%; aspect-ratio: 9/16; position: relative;
  overflow: hidden; background: #17191e; color: #fff;
}
.preview-img-story,
.preview-story-placeholder {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.preview-img-story { object-fit: cover; display: block; }
.preview-story-placeholder {
  display: grid; place-items: center; padding: 24px; text-align: center;
  color: rgba(255,255,255,.62); background: #252b36;
}
.preview-story-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 18%, transparent 70%, rgba(0,0,0,.5));
}
.preview-story-progress {
  position: absolute; z-index: 2; top: 9px; left: 10px; right: 10px;
  height: 3px; border-radius: 3px; background: rgba(255,255,255,.35);
}
.preview-story-progress span {
  display: block; width: 42%; height: 100%; border-radius: inherit; background: #fff;
}
.preview-story-head {
  position: absolute; z-index: 2; top: 20px; left: 12px; right: 12px;
  display: flex; align-items: center; gap: 8px; font-size: .78rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.preview-story-head .preview-avatar { width: 30px; height: 30px; font-size: .78rem; }
.preview-story-more { margin-left: auto; font-weight: 700; letter-spacing: 2px; }
.preview-story-text {
  position: absolute; z-index: 4; width: max-content; max-width: 86%;
  line-height: 1.12; font-size: 25px; font-weight: 700;
  white-space: pre-wrap; overflow-wrap: anywhere;
  cursor: grab; user-select: none; touch-action: none;
  filter: none;
}
.preview-story-text:active { cursor: grabbing; }
.preview-story-text span { display: block; padding: 3px 5px; }
.story-font-modern { font-family: Arial, Helvetica, sans-serif; }
.story-font-strong { font-family: Impact, "Arial Black", sans-serif; letter-spacing: .01em; }
.story-font-classic { font-family: Georgia, "Times New Roman", serif; }
.story-font-typewriter { font-family: Consolas, "Courier New", monospace; }
.story-text-shadow { text-shadow: 0 2px 5px rgba(0,0,0,.9); }
.story-text-outline {
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000,
               -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 3px #000;
}
.story-text-box span {
  background: rgba(0,0,0,.7); border-radius: 8px; padding: 7px 10px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.story-drag-handle {
  position: absolute; right: -16px; top: -16px; width: 25px; height: 25px;
  display: grid; place-items: center; border-radius: 50%; font-style: normal;
  font-size: 13px; color: #fff; background: rgba(236,72,128,.94);
  box-shadow: 0 2px 8px rgba(0,0,0,.38);
}
.preview-story-stickers {
  position: absolute; z-index: 2; inset: 74px 18px 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; pointer-events: none;
}
.story-sticker {
  max-width: 90%; color: #15171b; background: rgba(255,255,255,.94);
  border-radius: 10px; padding: 8px 13px; font-size: .78rem;
  text-align: center; box-shadow: 0 3px 14px rgba(0,0,0,.3);
}
.story-mention { font-weight: 700; transform: rotate(-1deg); }
.story-link { border-radius: 999px; font-weight: 700; transform: rotate(1deg); }
.story-poll { width: 88%; padding: 12px; }
.story-poll b { display: block; margin-bottom: 8px; font-size: .85rem; }
.story-poll div {
  background: #f0f1f4; border-radius: 7px; padding: 6px 8px; margin-top: 5px;
}
.preview-story-bottom {
  position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 14px;
  display: flex; align-items: center; gap: 12px; font-size: 1rem;
}
.preview-story-bottom span:first-child {
  flex: 1; border: 1px solid rgba(255,255,255,.75); border-radius: 999px;
  padding: 8px 12px; font-size: .75rem; color: rgba(255,255,255,.82);
}
.preview-card-story > .preview-meta {
  background: var(--surface); padding: 10px 12px; text-align: center;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #363e4d; }
