/* ============================================================
   NIQUELACOM.EXE — refais la story de la com
   ============================================================ */
.st { --ink: #14101f; --pink: #ff2bd6; --ig: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  position: absolute; inset: 0; overflow: hidden; color: #fff; font-family: var(--f-ui);
  background: radial-gradient(circle at 50% -10%, #2a1747, #0e0a18 60%); }
.st, .st * { box-sizing: border-box; }
.st button { font-family: inherit; cursor: pointer; }
.st-btn { padding: 12px 22px; border-radius: 99px; border: 0; background: var(--ig); color: #fff; font: 800 15px var(--f-ui); box-shadow: 0 4px 18px rgba(214, 41, 118, .45); }
.st-btn.ghost { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3); }
.st-btn:active { transform: scale(.96); }

/* ---------- la story (identique partout grâce aux unités cqw) ---------- */
.st-story { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px; background: #333; user-select: none; -webkit-user-select: none; }
.st-el { position: absolute; left: 50%; top: 50%; white-space: nowrap; line-height: 1; }
.st-t { display: inline-block; font-family: Inter, var(--f-ui); font-weight: 800; letter-spacing: -.01em; text-shadow: 0 .03em .12em rgba(0, 0, 0, .25); }
.st-t.f-strong { font-family: 'Bebas Neue', var(--f-title); font-weight: 400; letter-spacing: .02em; }
.st-t.f-neon { font-family: Pacifico, cursive; font-weight: 400; text-shadow: 0 0 .12em currentColor, 0 0 .35em currentColor, 0 0 .7em rgba(255, 43, 214, .6); }
.st-t.f-marker { font-family: 'Permanent Marker', cursive; font-weight: 400; }
.st-t.f-serif { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 700; }
.st-t.box { padding: .16em .42em .2em; border-radius: .28em; background: rgba(15, 12, 20, .82); text-shadow: none; }
.st-t.box.box-l { background: rgba(255, 255, 255, .92); }
.st-e { display: block; line-height: 1; filter: drop-shadow(0 .04em .06em rgba(0, 0, 0, .3)); }
.st-l { display: block; aspect-ratio: 1; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 .5cqw .8cqw rgba(0, 0, 0, .35)); pointer-events: none; }

/* widgets façon Instagram (tailles en em → suivent la taille choisie) */
.st-wwrap { line-height: 1.15; }
.st-w { font-family: Inter, var(--f-ui); font-weight: 800; color: var(--ink); white-space: nowrap; }
.st-w--loc, .st-w--tag { padding: .45em .8em; border-radius: .5em; background: #fff; box-shadow: 0 .15em .5em rgba(0, 0, 0, .2); text-transform: uppercase; font-size: 1em; }
.st-w--loc { background-image: linear-gradient(#fff, #fff); }
.st-w--loc, .st-w--tag { color: #962fbf; }
.st-w--tag { text-transform: none; color: #d62976; }
.st-w--date { padding: .5em .9em; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; border: .1em solid rgba(255, 255, 255, .6); letter-spacing: .04em; backdrop-filter: none; }
.st-w--count { padding: .55em 1em .65em; border-radius: .6em; background: var(--ig); color: #fff; text-align: center; box-shadow: 0 .15em .5em rgba(0, 0, 0, .25); }
.st-w--count small { display: block; font-size: .5em; letter-spacing: .15em; opacity: .9; margin-bottom: .25em; }
.st-w--count b { font-size: 1.25em; }
.st-w--poll { width: 15em; padding: .7em; border-radius: .7em; background: #fff; text-align: center; box-shadow: 0 .15em .5em rgba(0, 0, 0, .25); }
.st-w--poll b { display: block; font-size: 1.05em; margin-bottom: .55em; white-space: normal; }
.st-w--poll div { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.st-w--poll span { padding: .55em .3em; border-radius: .45em; background: #efefef; font-size: .8em; background-image: linear-gradient(90deg, #f7c6e6, #c9cff7); }
.st-w--music { display: flex; align-items: center; gap: .6em; padding: .5em .8em .5em .5em; border-radius: .6em; background: #fff; box-shadow: 0 .15em .5em rgba(0, 0, 0, .25); }
.st-w--music i { width: 2.4em; height: 2.4em; border-radius: .35em; background: var(--ig); flex: none; }
.st-w--music span { display: grid; text-align: left; }
.st-w--music b { font-size: .9em; }
.st-w--music small { font-size: .6em; color: #777; letter-spacing: .05em; margin-top: .25em; }

/* ---------- accueil ---------- */
.st-home { height: 100%; overflow: auto; padding: 16px 14px 24px; }
.st-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.st-head h1 { margin: 0; font: 26px/1 var(--f-title); background: var(--ig); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-head h1 span { font-size: .6em; }
.st-head p { margin: 6px 0 0; font-size: 13px; opacity: .75; }
.st-headr { display: flex; gap: 8px; align-items: center; flex: none; }
.st-coins { padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-weight: 700; font-size: 14px; }
.st-help { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: none; color: #fff; font: 800 16px var(--f-ui); }
.st-random { width: 100%; margin-bottom: 12px; padding: 12px; border-radius: 14px; border: 0; background: var(--ig); color: #fff; font: 800 15px var(--f-ui); }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-card { position: relative; aspect-ratio: 9 / 14; border: 0; border-radius: 14px; overflow: hidden; display: flex; align-items: flex-end; padding: 8px; text-align: left; color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.st-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .7)); }
.st-card b { position: relative; font: 800 13px/1.15 var(--f-ui); }
.st-card-ring { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--ig); padding: 2px; }
.st-card-ring::after { content: '📣'; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #111; font-size: 12px; border: 2px solid #111; }
.st-card i { position: absolute; right: 6px; top: 8px; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .6); font: 800 11px var(--f-ui); font-style: normal; }
.st-card i.top { background: #ffd23f; color: var(--ink); }
.st-card:active { transform: scale(.96); }

.st-over { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(8, 5, 15, .8); }
.st-rules { width: min(380px, 100%); padding: 20px; border-radius: 20px; background: #1c1430; border: 2px solid rgba(255, 255, 255, .15); text-align: center; }
.st-rules h2 { margin: 0 0 10px; font: 22px var(--f-title); }
.st-rules ol { margin: 0 0 16px; padding-left: 20px; text-align: left; display: grid; gap: 8px; font-size: 14px; line-height: 1.35; }

/* ---------- la com montre sa story ---------- */
.st-show { height: 100%; display: grid; place-items: center; padding: 10px; background: #000; }
.st-show .st-frame { position: relative; animation: st-in .35s cubic-bezier(.2, 1.2, .4, 1) both; }
.st-show .st-frame.gone { animation: st-out .45s ease-in both; }
@keyframes st-in { from { transform: scale(.85); opacity: 0; } }
@keyframes st-out { to { transform: scale(.6) rotate(-6deg); opacity: 0; filter: blur(6px); } }
.st-show .st-story { height: 100%; }
.st-ig { position: absolute; left: 0; right: 0; top: 0; z-index: 2; padding: 8px 10px 18px; border-radius: 14px 14px 0 0; background: linear-gradient(rgba(0, 0, 0, .45), transparent); pointer-events: none; }
.st-bars i { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.st-bars b { display: block; width: 0; height: 100%; background: #fff; }
.st-user { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 13px; }
.st-ava { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #111; box-shadow: 0 0 0 2px #111, 0 0 0 4px #d62976; font-size: 13px; }
.st-user small { opacity: .7; }
.st-user em { margin-left: auto; padding: 3px 8px; border-radius: 99px; background: #ffd23f; color: var(--ink); font: 800 11px var(--f-ui); font-style: normal; animation: st-blink 1s steps(2) infinite; }
@keyframes st-blink { 50% { opacity: .4; } }

/* ---------- l'éditeur ---------- */
.st-edit { height: 100%; display: flex; flex-direction: column; background: #0b0910; }
.st-ebar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex: none; }
.st-timer { position: relative; width: 42px; height: 42px; flex: none; }
.st-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.st-timer circle { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: 3.5; }
.st-timer circle.v { stroke: #3ee6b0; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.st-timer.hurry circle.v { stroke: #ff4d6d; }
.st-timer.hurry b { color: #ff4d6d; animation: st-blink .5s steps(2) infinite; }
.st-timer b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 14px var(--f-ui); }
.st-ename { flex: 1; min-width: 0; display: grid; }
.st-ename small { font-size: 11px; opacity: .6; }
.st-ename b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-done { padding: 9px 16px; border-radius: 99px; border: 0; background: #fff; color: var(--ink); font: 800 14px var(--f-ui); }
.st-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 2px 10px; }
.st-edit .st-frame { position: relative; }
.st-edit .st-story { height: 100%; touch-action: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.st-edit .st-el { cursor: grab; }
.st-edit .st-el.sel { outline: 1.5px dashed rgba(255, 255, 255, .9); outline-offset: 4px; z-index: 2; }
.st-h { position: absolute; right: -16px; bottom: -16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); font: 800 14px/1 var(--f-ui); box-shadow: 0 2px 6px rgba(0, 0, 0, .5); cursor: nwse-resize; text-shadow: none; letter-spacing: 0; font-style: normal; }
.st-guide { position: absolute; z-index: 3; pointer-events: none; opacity: 0; background: #ff2bd6; transition: opacity .1s; }
.st-guide.v { left: 50%; top: 0; bottom: 0; width: 1px; }
.st-guide.h { top: 50%; left: 0; right: 0; height: 1px; }
.st-guide.on { opacity: 1; }
.st-selbar { flex: none; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 8px; flex-wrap: wrap; }
.st-selbar button { min-width: 38px; height: 36px; padding: 0 8px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .1); color: #fff; font: 800 17px var(--f-ui); }
.st-selbar button.on { background: #fff; color: var(--ink); }
.st-selbar button[data-a="font"] { font-size: 17px; }
.st-selbar button[data-a="font"].f-strong { font-family: 'Bebas Neue'; font-weight: 400; font-size: 21px; }
.st-selbar button[data-a="font"].f-neon { font-family: Pacifico; font-weight: 400; }
.st-selbar button[data-a="font"].f-marker { font-family: 'Permanent Marker'; font-weight: 400; }
.st-selbar button[data-a="font"].f-serif { font-family: 'Playfair Display'; font-style: italic; }
.st-selbar button i { display: block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; }
.st-selbar .st-sw { min-width: 28px; width: 28px; height: 28px; border-radius: 50%; padding: 0; border: 2px solid rgba(255, 255, 255, .4); }
.st-selbar .st-sw.on { box-shadow: 0 0 0 2px #0b0910, 0 0 0 4px #fff; }
.st-tip { font-size: 12px; opacity: .5; }
.st-tabs { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 0 8px; }
.st-tabs button { padding: 6px 0 5px; border: 0; border-radius: 12px 12px 0 0; background: none; color: rgba(255, 255, 255, .6); display: grid; gap: 1px; justify-items: center; }
.st-tabs b { font-size: 17px; line-height: 1.1; }
.st-tabs small { font-size: 10px; font-weight: 700; }
.st-tabs button.on { background: #1c1630; color: #fff; }
.st-panel { flex: none; height: 112px; overflow: auto; padding: 10px; background: #1c1630; }
.st-bgs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; }
.st-bgs button { aspect-ratio: 9 / 14; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .2); padding: 0; }
.st-bgs button.on { border-color: #fff; box-shadow: 0 0 0 2px #ff2bd6; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chips button { padding: 7px 11px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font: 600 13px var(--f-ui); }
.st-emos { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; }
.st-emos button { height: 38px; border: 0; border-radius: 10px; background: none; font-size: 24px; padding: 0; }
.st-logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.st-logos button { aspect-ratio: 1; max-height: 44px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .08); justify-self: center; }
.st-logos img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.st-wids { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-wids button { border: 0; background: none; padding: 2px; font-size: 10px; }
.st-emos button:active, .st-chips button:active, .st-logos button:active, .st-wids button:active, .st-bgs button:active { transform: scale(.9); }

/* ---------- résultat ---------- */
.st-res { height: 100%; overflow: auto; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.st-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(360px, 100%); }
.st-duo figure { margin: 0; }
.st-duo figcaption { text-align: center; font: 800 12px var(--f-ui); opacity: .7; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .1em; }
.st-mini { position: relative; }
.st-mini .st-story { border-radius: 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); }
.st-stamp { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) rotate(-18deg); padding: 4px 12px; border: 4px solid #e63946; border-radius: 8px; color: #e63946; font: 26px var(--f-title); background: rgba(255, 255, 255, .85); opacity: 0; }
.st-res.shown .st-stamp { animation: st-stamp .4s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes st-stamp { from { transform: translate(-50%, -50%) rotate(-18deg) scale(2.4); opacity: 0; } to { opacity: 1; } }
.st-scan { position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 4; display: grid; place-items: center; pointer-events: none; transition: opacity .3s; }
.st-scan b { padding: 8px 16px; border-radius: 99px; background: rgba(0, 0, 0, .75); font-size: 14px; }
.st-scan i { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #3ee6b0; box-shadow: 0 0 18px 6px rgba(62, 230, 176, .6); animation: st-scan 1.4s ease-in-out both; }
@keyframes st-scan { to { transform: translateY(min(60vh, 520px)); } }
.st-res.shown .st-scan { opacity: 0; }
.st-score { width: min(360px, 100%); text-align: center; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; }
.st-res.shown .st-score { opacity: 1; transform: none; }
.st-pct { font: 64px/1 var(--f-title); background: var(--ig); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-pct span { font-size: .45em; }
.st-score p { margin: 4px 0 10px; font-weight: 700; }
.st-score ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.st-score li { padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .1); font-size: 12px; font-weight: 700; }
.st-score li.ok { background: rgba(62, 230, 176, .25); }
.st-score li.bad { background: rgba(255, 77, 109, .25); }
.st-gain { font: 22px var(--f-title); color: #ffd23f; margin-bottom: 14px; }
.st-gain em { font: 700 13px var(--f-ui); color: #3ee6b0; }
.st-acts { display: flex; gap: 10px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .st-user em, .st-timer.hurry b { animation: none; } }

.st-random { display: grid; gap: 2px; text-align: center; }
.st-random small { font: 600 12px var(--f-ui); opacity: .75; }
.st-sub { margin: 2px 2px 0; font-size: 13px; opacity: .7; }
.st-card.is-done { cursor: default; filter: saturate(.55) brightness(.8); }
.st-card.is-done i { background: #3ee6b0 !important; color: #14101f !important; }
