/* Launcher, cookie sheet, and demo modal. Logical properties only. */
.dock {
  position: fixed; z-index: 50;
  inset-block-end: calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
/* Gabster's Arabic shots keep this cluster on the physical right. */
html[dir="rtl"] .dock { inset-inline-start: 12px; inset-inline-end: auto; }
html[dir="ltr"] .dock { inset-inline-end: 12px; inset-inline-start: auto; }
.dock[hidden] { display: none; }
.dock-mark {
  width: 52px; height: 52px; border-radius: 99px; display: grid; place-items: center;
  background: var(--white); box-shadow: 0 8px 22px rgb(48 44 64 / 14%);
}
.dock-mark img { width: 30px; height: 24px; }
.chan { position: relative; display: flex; flex-direction: column; align-items: center; }
.dock.is-parked { visibility: hidden; pointer-events: none; }
.chan-mini {
  width: 48px; min-height: 56px; border-radius: 18px; background: var(--white);
  box-shadow: 0 8px 22px rgb(48 44 64 / 14%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: opacity 280ms ease;
}
.chan[data-state="opening"] .chan-mini,
.chan[data-state="open"] .chan-mini,
.chan[data-state="closing"] .chan-mini { opacity: 0; pointer-events: none; position: absolute; }
.chan-pill {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--white); border-radius: 999px; padding: 8px 8px 6px;
  box-shadow: 0 12px 28px rgb(48 44 64 / 16%);
}
.chan-pill[hidden] { display: none; }
.chan-btn, .chan-x {
  width: 48px; height: 48px; border-radius: 99px; display: grid; place-items: center;
  transition: transform 320ms cubic-bezier(0.22, 1.35, 0.36, 1), opacity 280ms ease;
}
.chan-wa { background: #1fa855; color: #fff; }
.chan-ig { background: linear-gradient(140deg, #f9ce34 0%, #ee2a7b 52%, #6228d7 100%); color: #fff; }
.chan-x { width: 40px; height: 40px; background: #ececf1; color: #6d6878; }
.chan[data-state="opening"] .chan-btn,
.chan[data-state="opening"] .chan-x,
.chan[data-state="closing"] .chan-btn,
.chan[data-state="closing"] .chan-x { transform: translateY(22px) scale(0.42); opacity: 0; }
.chan[data-state="open"] .chan-btn,
.chan[data-state="open"] .chan-x { transform: none; opacity: 1; }
.chan[data-state="open"] .chan-wa { transition-delay: 30ms; }
.chan[data-state="open"] .chan-ig { transition-delay: 90ms; }
.chan[data-state="open"] .chan-x { transition-delay: 140ms; }
.chan[data-state="closing"] .chan-wa { transition-delay: 100ms; }
.chan[data-state="closing"] .chan-ig { transition-delay: 50ms; }
.chan[data-state="closing"] .chan-x { transition-delay: 0ms; }
.mini-wa, .mini-ig { width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; }
.mini-wa { background: #1fa855; }
.mini-ig { background: linear-gradient(140deg, #f9ce34, #ee2a7b 55%, #6228d7); }
@media (prefers-reduced-motion: reduce) {
  .chan-btn, .chan-x, .chan-mini { transition: opacity 200ms linear; transform: none; }
}
.dock-panel {
  position: absolute; inset-block-end: 58px; width: min(260px, calc(100vw - 32px));
  background: var(--white); color: var(--plum); border-radius: 18px; padding: 14px;
  box-shadow: 0 16px 40px rgb(48 44 64 / 16%); border: 1px solid var(--line);
}
html[dir="rtl"] .dock-panel { inset-inline-start: 0; }
html[dir="ltr"] .dock-panel { inset-inline-end: 0; }
.dock-panel[hidden] { display: none; }
.dock-panel p { font-size: 14px; line-height: 22px; }
.dock-panel .btn {
  width: 100%; margin-block-start: 10px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(100deg, #6554b8, #6554b8 52%, #554894);
  color: var(--white); font-weight: 600;
}

.cookie {
  position: fixed; z-index: 60; inset-inline: 0;
  inset-block-end: 0;
  display: flex; align-items: center; gap: 12px;
  height: 56px; max-height: 56px;
  background: var(--page, var(--white)); color: var(--ink, var(--plum));
  border-radius: 0;
  border: 0; border-block-start: 1px solid var(--edge, var(--line));
  box-shadow: 0 -8px 28px rgb(48 44 64 / 10%);
  padding: 0 12px;
  overflow: hidden;
}
.cookie[hidden] { display: none; }
.cookie p {
  flex: 1; min-width: 0; margin: 0;
  font-size: 13px; line-height: 20px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cookie-acts { display: flex; flex-direction: row; gap: 8px; margin: 0; flex: none; }
.cookie-acts button {
  min-height: 36px; min-width: 44px; padding-inline: 12px; border-radius: 10px; border: 1px solid var(--edge, var(--line));
  font-size: 13px; line-height: 16px; font-weight: 500; background: var(--card, var(--white)); color: var(--ink, var(--plum)); white-space: nowrap;
}
.cookie-acts .yes { background: var(--plum); color: #fff; border-color: var(--plum); }
body:has(.cookie:not([hidden])) { padding-block-end: 56px; }
body:has(.dock:not([hidden])) { padding-block-end: 88px; }

.modal {
  position: fixed; inset: 0; z-index: 80; background: rgb(48 44 64 / 55%);
  display: grid; place-items: center; padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(560px, 100%); background: var(--white); color: var(--plum);
  border-radius: 20px; overflow: hidden;
}
.modal-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.modal-top h2 { font-size: 16px; line-height: 24px; font-weight: 600; margin-inline-start: auto; }
.modal-x {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
}
.stage { position: relative; background: #eceaf1; aspect-ratio: 16 / 10; }
.stage video { width: 100%; height: 100%; object-fit: cover; background: #1c1a22; }
.stage-play {
  position: absolute; inset: 0; margin: auto; width: fit-content; height: 44px;
  padding-inline: 16px; border-radius: 12px; background: var(--violet); color: var(--white);
  font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
}
.stage.is-playing .stage-play { display: none; }
