:root {
  --bg: #050d12;
  --surface: #071418;
  --surface-2: #0c1e26;
  --ink: #e8fbff;
  --cyan: #00e5ff;
  --magenta: #ff2d95;
  --chilli: #ff5a3c;
  --mango: #ffb020;
  --glass: rgba(7, 20, 24, .78);
  --muted: rgba(232, 251, 255, .62);
  --line: rgba(0, 229, 255, .28);
  --radius-card: 18px;
  --nav-h: 64px;
  --board-h: calc(var(--nav-h) + 8px);
  color-scheme: dark;
}

/* Brand themes — tokens only; layout unchanged */
html[data-brand-theme="one"] {
  --bg: #05060f;
  --surface: #07081a;
  --surface-2: #12102a;
  --ink: #f0e8ff;
  --cyan: #2ef0ff;
  --magenta: #c44dff;
  --chilli: #ff4fd8;
  --mango: #ffb84d;
  --glass: rgba(7, 8, 26, .8);
  --muted: rgba(240, 232, 255, .62);
  --line: rgba(46, 240, 255, .32);
}

html[data-brand-theme="two"] {
  --bg: #030b12;
  --surface: #041018;
  --surface-2: #0a1c28;
  --ink: #eef9ff;
  --cyan: #5ad8ff;
  --magenta: #7ec8ff;
  --chilli: #1ec8ff;
  --mango: #ffe08a;
  --glass: rgba(4, 16, 24, .8);
  --muted: rgba(238, 249, 255, .62);
  --line: rgba(90, 216, 255, .35);
}

html[data-brand-theme="three"] {
  --bg: #0c0610;
  --surface: #100814;
  --surface-2: #1a0c1c;
  --ink: #ffe8f6;
  --cyan: #00f0ff;
  --magenta: #ff2d95;
  --chilli: #ff3d9a;
  --mango: #ff7ad9;
  --glass: rgba(16, 8, 20, .8);
  --muted: rgba(255, 232, 246, .62);
  --line: rgba(255, 45, 149, .35);
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html, body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/*
 * Mobil: knappar, tabs, listor och övrig chrome ska inte bli
 * textmarkering / iOS “Kopiera”. Riktig innehållstext optar in nedan.
 */
#app,
#gate,
#boot,
#sheet,
#snap,
#studio,
#quick-cut,
button,
[role="button"],
a,
summary,
label,
nav,
.tab,
.friend,
.menu-row,
.sheet-action,
.chip,
.pill {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""],
.bubble-text,
.ch-post-caption,
#snap-caption,
.selectable-text {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

#app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

#app[hidden] {
  display: none !important;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  /* Match Esri dark-gray tiles (after brightness filter) â€” no flat color flash. */
  background: #2a2a2a;
}

#map[hidden] {
  display: none !important;
}

/* Invisible + non-interactive until base tiles are ready. */
#map.is-booting {
  opacity: 0;
  pointer-events: none;
}

/* â€”â€” Home: no Leaflet; board is the main surface â€”â€” */
#app.is-home {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(46, 230, 255, 0.14), transparent 55%),
    radial-gradient(90% 60% at 100% 40%, rgba(255, 120, 60, 0.1), transparent 50%),
    linear-gradient(180deg, #071418 0%, #0a1c22 45%, #061014 100%);
}

#app.is-home #board {
  top: calc(env(safe-area-inset-top) + 56px);
  bottom: calc(env(safe-area-inset-bottom) + var(--board-h));
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  padding: 0 0 20px;
}

#app.is-home #board .purpose {
  display: none;
}

#app.is-home .live,
#app.is-home #next,
#app.is-home #group-filter,
#app.is-home #hashtag-filter,
#app.is-home #tag-bar {
  pointer-events: auto;
}

#app.is-home #next {
  white-space: normal;
  text-overflow: unset;
  max-width: calc(100% - 28px);
  padding: 0 4px 8px;
}

.home-feed {
  margin: 10px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  padding-bottom: 8px;
  pointer-events: auto;
}

.home-feed[hidden] {
  display: none !important;
}

#app.is-map .home-feed {
  display: none !important;
}

.home-feed-title {
  margin: 6px 2px 8px;
  color: rgba(232, 251, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-feed-empty {
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 20, 24, 0.5);
  border: 1px solid rgba(232, 251, 255, 0.08);
  color: rgba(232, 251, 255, 0.65);
  font-size: 0.88rem;
}

.home-feed-link {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(46, 230, 255, 0.28);
  border-radius: 12px;
  background: rgba(46, 230, 255, 0.1);
  color: var(--cyan);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.home-chats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.home-chats .wa-convo,
.home-chats .convo-row {
  width: 100%;
  border: 1px solid rgba(232, 251, 255, 0.1);
  border-radius: 16px;
  background: rgba(7, 20, 24, 0.58);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.home-chats .wa-convo.is-unread,
.home-chats .convo-row.is-unread {
  border-color: rgba(0, 229, 255, 0.22);
  box-shadow: none;
}

#map-close {
  position: fixed;
  z-index: 6;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 88px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(232, 251, 255, 0.22);
  border-radius: 50%;
  background: rgba(7, 20, 24, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

#map-close[hidden] {
  display: none !important;
}

#app.is-map #board {
  pointer-events: none;
}

#app.is-map #board .purpose {
  display: none;
}

#app.is-map .stories,
#app.is-map #group-filter,
#app.is-map #group-filter-clear,
#app.is-map #hashtag-filter,
#app.is-map #hashtag-filter-clear,
#app.is-map #tag-bar {
  pointer-events: auto;
}

.leaflet-container,
.leaflet-pane,
.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane {
  background: #2a2a2a !important;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
}

.leaflet-tile {
  background: transparent !important;
}

/* Dark Gray tiles + lÃ¤tt upplysning sÃ¥ gator syns (filter bara pÃ¥ tile-pane). */
.leaflet-tile-pane {
  filter: brightness(1.55) contrast(1.18) saturate(1.05);
}

.leaflet-div-icon {
  background: none;
  border: none;
  overflow: visible;
}

.leaflet-control-zoom { display: none; }

.leaflet-bottom.leaflet-right {
  right: max(8px, env(safe-area-inset-right));
  bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 120px);
}

.leaflet-control-attribution {
  background: rgba(7, 20, 24, .7) !important;
  color: var(--muted) !important;
  font-size: 10px;
  max-width: 42vw;
}

.leaflet-control-attribution a { color: var(--cyan) !important; }

.leaflet-tooltip {
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--cyan);
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}

.leaflet-tooltip::before { display: none; }

/* OSM ambient place names — under chilli pins, never steal taps. */
.leaflet-placePane,
.leaflet-pane.leaflet-placePane {
  pointer-events: none !important;
}

.map-place-label {
  background: transparent !important;
  border: 0 !important;
}

.map-place-label-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
  padding: 2px 0;
  color: rgba(180, 230, 240, 0.55);
  font-family: Outfit, "Nunito Sans", sans-serif;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.map-place-label-inner em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 10px;
  opacity: 0.7;
}

.map-place-label-inner > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.chilli-pin .pin-chip {
  display: none;
  max-width: 96px;
  margin: 0 auto 4px;
  padding: 2px 8px;
  overflow: hidden;
  border: 1px solid rgba(232, 251, 255, .28);
  border-radius: 999px;
  background: rgba(4, 10, 14, .82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
/* Namn först vid tillräcklig inzoom (LOD). */
#map.pins-named .chilli-pin .pin-chip {
  display: block;
}
#map.pins-compact .chilli-pin .pin-photo {
  width: 30px !important;
  height: 30px !important;
  max-width: 30px !important;
  max-height: 30px !important;
  border-width: 1.5px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .1),
    0 0 8px rgba(46, 230, 255, .28);
}
#map.pins-compact .chilli-pin.is-video:has(.pin-photo)::before,
#map.pins-compact .chilli-pin.is-video:has(.pin-photo)::after {
  top: 38px;
  transform: translate(-50%, -50%) scale(.72);
}
#map.pins-compact .pin-hot .pin-photo {
  box-shadow:
    0 0 0 1px rgba(255, 90, 60, .35),
    0 0 10px rgba(255, 90, 60, .55);
}

/* Marker clusters — tema-dead + siffra. */
.chill-cluster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  color: #e8fbff;
}
.chill-cluster-sm { width: 40px; height: 40px; }
.chill-cluster-md { width: 48px; height: 48px; }
.chill-cluster-lg { width: 56px; height: 56px; }
.chill-cluster-dead {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(46, 230, 255, .45));
  pointer-events: none;
}
.chill-cluster-lg .chill-cluster-dead {
  filter: drop-shadow(0 0 10px rgba(255, 90, 60, .5));
}
.chill-cluster-count {
  position: absolute;
  right: -2px;
  bottom: -1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: Outfit, 'Nunito Sans', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1;
  color: #071418;
  background: #2ee6ff;
  border: 1.5px solid rgba(7, 20, 24, .85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.chill-cluster-md .chill-cluster-count {
  min-width: 20px;
  height: 20px;
  font-size: 12px;
}
.chill-cluster-lg .chill-cluster-count {
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  background: #ff5a3c;
  color: #fff;
}
.marker-cluster {
  background: transparent !important;
}
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform .28s ease-out, opacity .28s ease-in;
}

.chilli-pin .pin-pod {
  display: block;
  font-size: 28px;
  line-height: 1;
  text-align: center;
  filter: drop-shadow(0 0 8px var(--cyan));
}

.pin-photo {
  display: block;
  box-sizing: border-box;
  width: 54px;
  height: 54px;
  max-width: 54px;
  max-height: 54px;
  margin: 0 auto;
  overflow: hidden;
  object-fit: cover;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #1a3a44, #0a1c22 70%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    0 0 14px rgba(46, 230, 255, .4);
}

.leaflet-container img.pin-photo {
  width: 54px !important;
  height: 54px !important;
  max-width: 54px !important;
  max-height: 54px !important;
  border-radius: 50% !important;
}

.pin-near .pin-chip { border-color: var(--cyan); }
.pin-hot .pin-pod {
  filter: drop-shadow(0 0 12px rgba(255, 90, 60, .95));
}

.pin-hot .pin-photo {
  border-color: var(--chilli);
  animation: pin-hot-settle 1.2s ease-out 1;
  box-shadow:
    0 0 0 2px rgba(255, 90, 60, .35),
    0 0 18px rgba(255, 90, 60, .75),
    0 0 36px rgba(255, 90, 60, .35);
}

@keyframes pin-hot-settle {
  0% { transform: scale(1.12); filter: brightness(1.2); }
  100% { transform: scale(1); filter: none; }
}

.leaflet-ring-halo {
  pointer-events: none;
}

.leaflet-ring-pulse {
  animation: ring-breathe 2.8s ease-in-out infinite;
}

@keyframes ring-breathe {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

.chilli-pin.is-video:has(.pin-photo)::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 49px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.chilli-pin.is-video:has(.pin-photo)::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 49px;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #fff;
  transform: translate(-35%, -50%);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .8));
  pointer-events: none;
}

.top {
  position: fixed;
  z-index: 6;
  top: calc(env(safe-area-inset-top) + 8px);
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-mark {
  flex: none;
  margin-left: 2px;
  color: var(--cyan);
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: 22px;
  letter-spacing: .04em;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 229, 255, .45);
  pointer-events: none;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.brand-lockup:active {
  opacity: .85;
  transform: scale(.98);
}

.brand-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: min(52vw, 160px);
  object-fit: contain;
  border-radius: 6px;
  pointer-events: none;
}
.brand-build {
  flex: none;
  margin-left: 8px;
  color: #fff;
  font-family: Outfit, 'Nunito Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  opacity: .88;
  pointer-events: none;
  white-space: nowrap;
}
.brand-build[hidden] {
  display: none !important;
}

#app.is-entering {
  animation: app-enter .45s ease-out;
}

@keyframes app-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.me {
  flex: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: #0d2830;
  box-shadow: 0 0 16px rgba(46, 230, 255, .35);
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  padding: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  overflow: hidden;
  border: 1px solid rgba(232, 251, 255, .16);
  border-radius: 999px;
  background: rgba(7, 20, 24, .55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pill.mango {
  margin-left: auto;
  color: var(--mango);
  border-color: rgba(255, 176, 32, .45);
}

#pm-btn.has-mail {
  border-color: rgba(255, 90, 60, .55);
  color: #fff;
}

#pm-btn.is-alert {
  animation: pm-alert-pulse .7s ease-in-out 3;
}

@keyframes pm-alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 60, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 90, 60, .35); }
}

.badge {
  display: inline-grid;
  place-items: center;
  flex: none;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-size: 11px;
}

#locate,
#locate.map-locate {
  position: fixed;
  z-index: 5;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 18px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(232, 251, 255, .22);
  border-radius: 50%;
  background: rgba(7, 20, 24, .55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--cyan);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

#locate[hidden] {
  display: none !important;
}

/* Skapa lives in #tabbar; keep pulse/brand look as raised center tab */
#tabbar #fota,
#fota.tab-create {
  position: relative;
  z-index: 2;
  left: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  margin-top: -18px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 32%,
    color-mix(in srgb, var(--chilli) 55%, #fff),
    var(--chilli) 58%,
    color-mix(in srgb, var(--chilli) 65%, #000)
  );
  color: #fff;
  line-height: 1;
  transform: none;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--chilli) 22%, transparent),
    0 8px 22px color-mix(in srgb, var(--chilli) 45%, transparent);
  animation: fota-pulse 2.4s ease-in-out infinite;
}

#tabbar #fota:active,
#fota.tab-create:active {
  transform: scale(.96);
  animation: none;
}

@keyframes fota-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 6px color-mix(in srgb, var(--chilli) 18%, transparent),
      0 0 28px 6px color-mix(in srgb, var(--chilli) 40%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 12px color-mix(in srgb, var(--chilli) 8%, transparent),
      0 0 40px 12px color-mix(in srgb, var(--chilli) 55%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  #fota { animation: none; }
}

.fota-word {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.fota-chilli {
  display: block;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
  transform: translateY(1px) rotate(-12deg);
}

#fota.is-menu-open {
  animation: none;
  box-shadow:
    0 0 0 6px rgba(255, 90, 60, .28),
    0 0 36px 10px rgba(255, 90, 60, .55);
}

/* Skapa-meny ovanför chili-knappen */
.create-scrim {
  position: fixed;
  inset: 0;
  z-index: 28;
  background: rgba(4, 10, 14, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.create-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.create-menu {
  position: fixed;
  left: 50%;
  z-index: 29;
  width: min(340px, calc(100vw - 28px));
  padding: 18px 14px 14px;
  border-radius: 22px;
  background:
    linear-gradient(165deg, rgba(28, 42, 48, .97), rgba(10, 18, 22, .98));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(255, 90, 60, .12);
  transform: translateX(-50%) translateY(12px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .2s cubic-bezier(.2, .9, .2, 1);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.create-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.create-menu-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: 16px;
  line-height: 1;
}

.create-menu-x:active {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.create-menu-quota {
  margin: 4px 2px 10px;
}

.create-menu-reply {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 2px 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(46, 230, 255, .12);
  border: 1px solid rgba(46, 230, 255, .35);
  color: #e8fbff;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}
.create-menu-reply strong {
  font-size: 13px;
  font-weight: 800;
}
/* Ge plats åt create-menu-x så banner/kryss inte krockar. */
.create-menu.is-ring-reply .create-menu-reply {
  margin-right: 40px;
}

.snap-reply-of {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 255, .4);
  background: rgba(46, 230, 255, .12);
  color: #b8f7ff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.snap-reply-of.is-gone {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .62);
  cursor: default;
  font-weight: 600;
}
.snap-reply-of[hidden] { display: none !important; }

.create-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 8px;
}

/* Aktiva post-kvoter (kartan / grupper) — syns i Skapa, kamera, Studio, Cut */
.post-quota-hint {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 36px 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: rgba(244, 247, 248, .9);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.post-quota-hint:not(.is-ephemeral) {
  padding-right: 12px;
}

.post-quota-hint .post-quota-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .01em;
}

.post-quota-hint .post-quota-counts {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(244, 247, 248, .92);
}

.post-quota-hint .post-quota-x {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.post-quota-hint .post-quota-x:active {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.post-quota-hint.is-full {
  border-color: rgba(255, 90, 60, .55);
  background: rgba(255, 90, 60, .12);
}

.post-quota-hint--overlay {
  position: absolute;
  z-index: 28;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 24px));
  margin: 0;
  pointer-events: auto;
  background: rgba(7, 20, 24, .78);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#vf-quota,
.vf-quota {
  position: absolute;
  inset: 0;
  z-index: 28;
  pointer-events: none;
}

#vf-quota .post-quota-hint,
.vf-quota .post-quota-hint {
  pointer-events: auto;
}

.studio-quota-host,
.cut-quota-host,
.qc-quota-host {
  position: relative;
  z-index: 9;
  flex: 0 0 auto;
  padding: 0 10px;
}

.studio-quota-host {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top, 0px) + 52px);
  z-index: 9;
  padding: 0 10px;
  pointer-events: none;
}

.studio-quota-host .post-quota-hint {
  pointer-events: auto;
  margin: 0 auto;
  width: min(360px, 100%);
}

.cut-quota-host,
.qc-quota-host {
  margin: 6px 0 2px;
}

.cut-quota-host .post-quota-hint,
.qc-quota-host .post-quota-hint {
  margin: 0;
}

.create-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 6px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  color: #f4f7f8;
  font: inherit;
}

.create-tile:active,
.create-tile:focus-visible {
  outline: none;
  border-color: rgba(255, 90, 60, .55);
  background: rgba(255, 90, 60, .14);
}

.create-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ff7a5c;
}

.create-ico svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.create-lbl {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.1;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .create-scrim,
  .create-menu {
    transition: none;
  }
}

.cam {
  position: relative;
  width: 22px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 3px;
}

.cam::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cam::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 3px;
  width: 8px;
  height: 4px;
  border: 2px solid #fff;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

#mer[hidden] {
  display: none !important;
}

#mer {
  position: fixed;
  z-index: 5;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(46, 230, 255, .38);
  border-radius: 18px;
  background:
    radial-gradient(circle at 35% 28%, rgba(46, 230, 255, .22), transparent 55%),
    rgba(7, 20, 24, .62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--cyan);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, .32),
    0 0 0 1px rgba(46, 230, 255, .08) inset;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

#mer:active {
  transform: scale(.94);
}

.mer-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 10px;
}

.mer-dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px rgba(46, 230, 255, .55);
}

.mer-word {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(232, 251, 255, .88);
}

.mer-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}

#sheet-body .mer-item,
.mer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(46, 230, 255, .22) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(165deg, rgba(18, 48, 56, .95), rgba(7, 20, 24, .88)) !important;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .22);
}

#sheet-body .mer-item:active,
.mer-item:active {
  transform: scale(.985);
}

.mer-item-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .28);
  background: rgba(46, 230, 255, .1);
  color: var(--cyan);
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}

.mer-item-mark.is-mango {
  border-color: rgba(255, 176, 32, .4);
  background: rgba(255, 176, 32, .12);
  color: var(--mango);
}

.mer-item-mark.is-chat {
  border-color: rgba(46, 230, 255, .4);
  background: rgba(46, 230, 255, .14);
}

.mer-item-mark.is-install {
  border-color: rgba(120, 220, 160, .4);
  background: rgba(80, 200, 140, .12);
  color: #7dffb0;
}

.mer-item-mark.is-admin {
  border-color: rgba(255, 90, 60, .4);
  background: rgba(255, 90, 60, .12);
  color: #ff9a7a;
}

.mer-item-mark.is-out {
  border-color: rgba(255, 120, 90, .35);
  background: rgba(255, 80, 50, .1);
  color: #ffb8a8;
}

.mer-item-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mer-item-copy b {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
}

.mer-item-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.mer-item-chev {
  flex: none;
  color: rgba(46, 230, 255, .55);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

#sheet-body .mer-item.is-out,
.mer-item.is-out {
  border-color: rgba(255, 90, 60, .28) !important;
  background: linear-gradient(165deg, rgba(48, 22, 18, .9), rgba(7, 20, 24, .88)) !important;
}

.mer-help {
  margin-top: 6px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(46, 230, 255, .16);
  border-radius: 18px;
  background: rgba(4, 16, 20, .55);
}

.mer-help-title {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mer-help-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  color: rgba(232, 251, 255, .78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.mer-help-row + .mer-help-row {
  margin-top: 8px;
}

.mer-help-badge {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7a5c, var(--chilli));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.mer-help-badge.is-mango {
  background: linear-gradient(180deg, #ffc85a, var(--mango));
  color: #1a1000;
}

.mer-help-badge.is-group {
  background: rgba(46, 230, 255, .9);
  color: #041014;
}

.faq-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.faq-disclaimer {
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 122, 92, .35);
  background: linear-gradient(165deg, rgba(48, 22, 18, .92), rgba(7, 20, 24, .88));
  text-align: center;
}

.faq-disclaimer-logo {
  display: block;
  width: min(160px, 55%);
  height: auto;
  margin: 0 auto 10px;
  object-fit: contain;
}

.faq-disclaimer-title {
  margin: 0 0 8px;
  color: #ffc8b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.faq-disclaimer p {
  margin: 0;
  color: rgba(232, 251, 255, .82);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}

.faq-disclaimer p + p {
  margin-top: 8px;
}

.faq-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-cat {
  border: 1px solid rgba(46, 230, 255, .14);
  border-radius: 16px;
  background: rgba(4, 16, 20, .55);
  overflow: hidden;
}

#sheet-body .faq-cat-head,
.faq-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 14px;
  border: 0;
  background: transparent;
  color: #e8fbff;
  text-align: left;
  cursor: pointer;
}

.faq-cat-head b {
  font-size: 14px;
  font-weight: 800;
}

.faq-cat-chev {
  flex: none;
  color: rgba(46, 230, 255, .75);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  transition: transform .18s ease;
}

.faq-cat.is-open .faq-cat-chev {
  transform: rotate(90deg);
}

.faq-cat-body {
  padding: 0 14px 12px;
}

.faq-item + .faq-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(46, 230, 255, .1);
}

.faq-q {
  display: block;
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.faq-a {
  margin: 0;
  color: rgba(232, 251, 255, .78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

#board {
  position: fixed;
  z-index: 4;
  top: calc(env(safe-area-inset-top) + 60px);
  left: 0;
  right: 0;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

#board .purpose {
  display: none;
}

.purpose, .empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stories {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 2px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  pointer-events: auto;
  touch-action: pan-x;
}

#group-filter,
#group-filter-clear,
#hashtag-filter,
#hashtag-filter-clear,
#tag-bar {
  pointer-events: auto;
}

.stories::-webkit-scrollbar { display: none; }

.story {
  position: relative;
  flex: none;
  width: 56px;
  min-width: 48px;
  min-height: 44px;
  padding: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px #000;
}

.story img {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 50%;
  background: #0d2830;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4);
}

.story.is-new img {
  border: 2.5px solid transparent;
  background:
    linear-gradient(#0d2830, #0d2830) padding-box,
    linear-gradient(135deg, var(--cyan), var(--mango), var(--chilli)) border-box;
  box-shadow: 0 0 12px rgba(255, 176, 32, .35);
}

.story.is-near img {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(46, 230, 255, .5);
}

.story.is-hot img {
  border-color: var(--chilli);
  box-shadow:
    0 0 0 2px rgba(255, 90, 60, .28),
    0 0 14px rgba(255, 90, 60, .7),
    0 0 28px rgba(255, 90, 60, .35);
  animation: story-hot-breathe 2.4s ease-in-out infinite;
}

@keyframes story-hot-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.story.is-hot {
  filter: drop-shadow(0 0 6px rgba(255, 90, 60, .45));
}

.story.is-friend img {
  box-shadow: 0 0 0 1px rgba(255, 176, 32, .55), 0 4px 14px rgba(0, 0, 0, .4);
}

.story.is-seen:not(.is-hot):not(.is-near) img {
  border-color: rgba(232, 251, 255, .22);
  opacity: .82;
  filter: saturate(.85);
}

.story span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.story--daily-champ {
  position: relative;
  width: 68px;
  min-width: 64px;
}

.story--daily-champ .daily-champ-face {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1a3a42, #0a1216 70%);
  border: 2px solid rgba(255, 200, 60, 0.35);
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.story--daily-champ .daily-champ-ring {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: -3px;
  width: 62px;
  height: 62px;
  margin-left: -31px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #ffe08a, #c99212, #fff3c0, #8a6410, #ffe08a);
  animation: daily-champ-spin 3.2s linear infinite;
  pointer-events: none;
  box-shadow: 0 0 14px rgba(255, 200, 60, 0.35);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}

.story--daily-champ.has-champ .daily-champ-ring {
  box-shadow: 0 0 18px rgba(255, 200, 60, 0.55);
}

@keyframes daily-champ-spin {
  to { transform: rotate(360deg); }
}

.story--daily-champ .daily-champ-label {
  margin-top: 5px;
  white-space: pre-line;
  line-height: 1.15;
  font-size: 9px;
  color: #ffe08a;
  max-height: 2.4em;
}

#sheet.is-daily {
  height: min(100dvh, 100%);
}

#sheet.is-daily #sheet-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100dvh - 64px);
  overflow: auto;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

/* In-run focus: only game stage + action buttons. */
#sheet.is-daily.is-daily-playing .sheet-head {
  display: none;
}

#sheet.is-daily.is-daily-playing #sheet-body {
  max-height: 100dvh;
  height: 100%;
  overflow: hidden;
  padding-top: max(6px, env(safe-area-inset-top));
}

#sheet.is-daily.is-daily-playing .daily-stunt-sheet {
  height: 100%;
  gap: 6px;
}

#sheet.is-daily.is-daily-playing .daily-stunt-play {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 6px;
}

#sheet.is-daily.is-daily-playing .daily-stunt-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  width: 100%;
  max-width: none;
  border-radius: 12px;
}

.daily-stunt-sheet {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.spel-hub-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 2px 6px;
}

.spel-hub-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #f4f7f8;
  line-height: 1.15;
}

.spel-hub-blurb {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(232, 251, 255, .55);
}

.spel-hub-lobby {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.spel-hub-covers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}
.spel-hub-covers.is-single {
  grid-template-columns: 1fr;
  max-width: 280px;
  margin: 0 auto;
}
.spel-hub-covers.is-single .spel-hub-cover {
  max-height: min(48vh, 380px);
}

.spel-hub-game-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.spel-hub-game-col[hidden] {
  display: none !important;
}

.spel-hub-cover {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  max-height: min(42vh, 340px);
  background: #0a1218;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .4);
  touch-action: manipulation;
}

.spel-hub-cover:active {
  transform: scale(.985);
}

.spel-hub-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.spel-hub-cover-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78));
  pointer-events: none;
}

.spel-hub-cover-cta {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(46, 230, 255, .92);
  color: #041014;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}

.spel-hub-game-col[data-game="uno"] .spel-hub-cover-cta {
  background: rgba(230, 60, 60, .94);
  color: #fff;
}

.spel-hub-trickster-row {
  display: flex;
}

.spel-hub-trickster-row[hidden] {
  display: none !important;
}

.spel-hub-trickster-btn {
  width: 100%;
  margin: 0;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: #e9edef;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.daily-board--under-cover {
  margin: 0;
}

.daily-board--under-cover .daily-board-shell {
  gap: 8px;
}

.daily-board--under-cover .daily-podium {
  transform: scale(.92);
  transform-origin: top center;
}

.daily-board--under-cover .daily-board-list {
  max-height: 180px;
}

.daily-board--uno .daily-board-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.daily-board--uno .daily-board-score small {
  font-size: .7em;
}

.spel-hub-game-col .daily-stunt-lobby-actions {
  margin-top: 0;
}

.spel-hub-game-col .daily-stunt-challenge {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
}

@media (max-width: 380px) {
  .spel-hub-covers {
    grid-template-columns: 1fr;
  }
  .spel-hub-cover {
    max-height: min(48vh, 360px);
    aspect-ratio: 3 / 4;
  }
}

.spel-hub-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spel-hub-section-title {
  margin: 6px 2px 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, .42);
}

.spel-hub-mango-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
}

.spel-hub-mango-picker[hidden] {
  display: none !important;
}

.spel-hub-mango-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: #e9edef;
}

.spel-hub-mango-empty {
  margin: 0;
  font-size: 12px;
  color: rgba(232, 251, 255, .5);
}

.spel-hub-mango-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.spel-hub-mango-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
  color: #e9edef;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.spel-hub-mango-row.is-selected {
  border-color: rgba(46, 230, 255, .45);
  background: rgba(14, 58, 68, .55);
}

.spel-hub-mango-row.is-offline {
  opacity: .48;
  cursor: default;
}

.spel-hub-mango-name {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}

.spel-hub-mango-meta {
  font-size: 11px;
  font-weight: 700;
  color: rgba(232, 251, 255, .45);
  flex-shrink: 0;
}

.spel-hub-mango-row:not(.is-offline) .spel-hub-mango-meta {
  color: rgba(80, 220, 140, .9);
}

.spel-hub-mango-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25);
  box-sizing: border-box;
}

.spel-hub-mango-row.is-selected .spel-hub-mango-check {
  border-color: #2ee6ff;
  background: #2ee6ff;
  box-shadow: inset 0 0 0 3px #0e3a44;
}

.spel-hub-mango-actions {
  display: flex;
  gap: 8px;
}

.spel-hub-mango-back,
.spel-hub-mango-start {
  flex: 1;
  min-height: 44px;
  margin: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.spel-hub-mango-back {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #e9edef;
}

.spel-hub-mango-start {
  border: 1px solid rgba(255, 90, 60, .5);
  background: linear-gradient(160deg, rgba(255, 122, 90, .35), rgba(255, 90, 60, .18));
  color: #fff;
}

.spel-hub-mango-start:disabled {
  opacity: .45;
  cursor: default;
}

.spel-hub-tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spel-hub-tracks[hidden] {
  display: none !important;
}

.spel-hub-track-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.spel-hub-track-card {
  margin: 0;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    linear-gradient(165deg, rgba(40, 72, 88, .45), rgba(12, 18, 24, .7));
  color: #e9edef;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 84px;
}

.spel-hub-track-card strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.spel-hub-track-card span {
  font-size: 11px;
  font-weight: 650;
  color: rgba(232, 251, 255, .62);
  line-height: 1.25;
}

.spel-hub-track-card em {
  margin-top: auto;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: rgba(126, 232, 198, .9);
}

.spel-hub-track-card.is-on {
  border-color: rgba(46, 230, 255, .55);
  background:
    linear-gradient(165deg, rgba(28, 86, 102, .65), rgba(10, 24, 32, .85));
  box-shadow: inset 0 0 0 1px rgba(46, 230, 255, .18);
}

.spel-hub-track-card.is-locked {
  opacity: .58;
  cursor: default;
}

.spel-hub-track-card.is-locked em {
  color: rgba(232, 251, 255, .42);
}

.spel-hub-run-picker {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: min(62vh, 480px);
  padding: 18px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 14, 28, .28) 0%, rgba(4, 12, 24, .72) 55%, rgba(2, 8, 16, .88) 100%),
    url('icons/sledders_wall.jpg') center / cover no-repeat;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}

.spel-hub-run-picker[hidden] {
  display: none !important;
}

.spel-hub-run-picker > * {
  position: relative;
  z-index: 1;
}

.spel-hub-run-picker .spel-hub-mango-title {
  margin: 0 0 2px;
  color: #f4f8ff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

.spel-hub-run-picker .spel-hub-mango-empty {
  color: rgba(236, 246, 255, .82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}

.spel-hub-run-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spel-hub-run-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(6, 14, 24, .62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 700;
  color: #e9edef;
  cursor: pointer;
}

.spel-hub-run-opt input {
  width: 18px;
  height: 18px;
  accent-color: #2ee6ff;
  flex-shrink: 0;
}

.daily-stunt-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
  color: rgba(232, 251, 255, 0.75);
}

.daily-stunt-meta strong {
  color: #ffe08a;
}

.daily-stunt-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(46, 230, 255, .16), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(255, 90, 60, .14), transparent 50%),
    linear-gradient(165deg, #152028, #0c141a 70%);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.daily-stunt-hero-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, .45);
}

.daily-stunt-hero-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.daily-stunt-hero-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.daily-stunt-hero-thumb {
  width: 52px;
  height: 40px;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  background: rgba(8, 24, 40, .55);
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 2px 4px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.daily-stunt-hero-title strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #f4f7f8;
  line-height: 1.1;
}

.daily-stunt-hero-title em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: rgba(46, 230, 255, .9);
}

.daily-stunt-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(232, 251, 255, .62);
}

.daily-stunt-hero-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
}

.daily-game-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.daily-game-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: 0;
  padding: 12px 12px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  color: #e9edef;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

.daily-game-card:active {
  transform: scale(.98);
}

.daily-game-card.is-active {
  border-color: rgba(46, 230, 255, .45);
  background: linear-gradient(160deg, rgba(14, 58, 68, .85), rgba(8, 32, 40, .9));
  box-shadow: 0 0 0 1px rgba(46, 230, 255, .12), 0 8px 20px rgba(0, 0, 0, .25);
}

.daily-game-card:not(.is-active) {
  opacity: .88;
}

.daily-game-card-ico {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}

.daily-game-card-thumb {
  display: block;
  width: 48px;
  height: 34px;
  object-fit: contain;
  object-position: center;
  margin-bottom: 6px;
  border-radius: 8px;
  background: rgba(8, 24, 40, .45);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 2px 3px;
  box-sizing: border-box;
}

.daily-game-card-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.daily-game-card-blurb {
  font-size: 11px;
  font-weight: 600;
  color: rgba(232, 251, 255, .5);
}

.daily-stunt-tip {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: rgba(232, 251, 255, 0.48);
  text-align: center;
}

.daily-stunt-loading {
  margin: 0;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(46, 230, 255, 0.35);
  background: rgba(46, 230, 255, 0.08);
  color: #7eecff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.daily-stunt-loading[hidden],
.daily-stunt-track[hidden],
.daily-stunt-play[hidden] {
  display: none !important;
}

.daily-stunt-track {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 224, 138, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-stunt-challenge {
  flex: 1;
  min-height: 52px;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 90, 60, 0.5) !important;
  background: linear-gradient(160deg, rgba(255, 122, 90, 0.35), rgba(255, 90, 60, 0.18)) !important;
  color: #fff !important;
  font-size: 16px !important;
  letter-spacing: 0.02em;
}

.daily-stunt-back {
  border-color: rgba(46, 230, 255, 0.3) !important;
  background: rgba(46, 230, 255, 0.08) !important;
  color: #e8fbff !important;
}

.daily-stunt-sheet.is-lobby .daily-stunt-play {
  display: none !important;
}

.daily-stunt-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-height: min(48vh, 360px);
  height: min(52vh, 420px);
  border-radius: 16px;
  overflow: hidden;
  background: #061016;
  border: 1px solid rgba(46, 230, 255, 0.15);
  touch-action: none;
}

.daily-stunt-stage canvas,
.daily-stunt-stage .daily-stunt-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
}

.daily-stunt-controls {
  display: grid;
  grid-template-columns: 1.1fr 0.85fr 0.85fr 1.25fr;
  gap: 8px;
  flex: none;
}

.daily-stunt-controls--bike {
  grid-template-columns: 1fr 0.75fr 0.75fr 1.1fr 0.95fr;
}

.daily-stunt-credit {
  margin: 0;
  font-size: 10px;
  color: rgba(232, 251, 255, 0.4);
  text-align: center;
}

.daily-stunt-credit a {
  color: rgba(46, 230, 255, 0.75);
}

.daily-stunt-controls button {
  min-height: 58px;
  border: 1px solid rgba(46, 230, 255, 0.35);
  border-radius: 16px;
  background: rgba(46, 230, 255, 0.1);
  color: #e8fbff;
  font-size: 15px;
  font-weight: 800;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.daily-stunt-controls button.daily-stunt-tilt {
  font-size: 22px;
  line-height: 1;
}

.daily-stunt-controls button.daily-stunt-gas {
  border-color: rgba(255, 90, 60, 0.45);
  background: rgba(255, 90, 60, 0.16);
}

.daily-stunt-controls button.daily-stunt-boost {
  border-color: rgba(255, 224, 138, 0.45);
  background: rgba(255, 224, 138, 0.12);
  color: #fff3c0;
}

.daily-stunt-controls button:active,
.daily-stunt-controls button.is-down {
  background: rgba(46, 230, 255, 0.28);
  transform: scale(0.97);
}

.daily-stunt-controls button.daily-stunt-gas.is-down,
.daily-stunt-controls button.daily-stunt-gas:active {
  background: rgba(255, 90, 60, 0.32);
}

.daily-stunt-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.daily-stunt-actions button {
  flex: 1;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 60, 0.4);
  background: rgba(255, 200, 60, 0.12);
  color: #fff3c0;
  font-weight: 800;
  touch-action: manipulation;
}

.daily-board {
  flex: none;
  min-height: 0;
}

.daily-board-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-board-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(46, 230, 255, 0.12);
}

.daily-board-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(232, 251, 255, 0.62);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.daily-board-tab-ico {
  font-size: 14px;
  line-height: 1;
}

.daily-board-tab-count {
  min-width: 1.4em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(232, 251, 255, 0.55);
}

.daily-board-tab.is-active {
  background: linear-gradient(160deg, rgba(255, 122, 90, 0.38), rgba(255, 90, 60, 0.18));
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 90, 60, 0.18);
}

.daily-board-tab.is-active .daily-board-tab-count {
  background: rgba(0, 0, 0, 0.28);
  color: #ffe08a;
}

.daily-board-you {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(46, 230, 255, 0.22);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(46, 230, 255, 0.16), transparent 55%),
    linear-gradient(165deg, rgba(10, 28, 34, 0.95), rgba(4, 14, 18, 0.92));
}

.daily-board-you.is-empty {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
}

.daily-board-you-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, 0.55);
  margin-bottom: 6px;
}

.daily-board-you-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.daily-board-you-score {
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
  color: #ffe08a;
  font-variant-numeric: tabular-nums;
}

.daily-board-you-score small,
.daily-podium-score small,
.daily-board-score small {
  margin-left: 2px;
  font-size: 0.55em;
  font-weight: 750;
  opacity: 0.75;
}

.daily-board-you-meta {
  font-size: 12px;
  font-weight: 700;
  color: rgba(232, 251, 255, 0.7);
}

.daily-board-you-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(232, 251, 255, 0.5);
}

.daily-board-you-bonus {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #7dffb3;
}

.daily-board-you-bonus.is-hint {
  font-weight: 600;
  color: rgba(255, 214, 120, 0.9);
}

.daily-board-panel {
  border-radius: 16px;
  border: 1px solid rgba(46, 230, 255, 0.14);
  background: rgba(4, 14, 18, 0.9);
  overflow: hidden;
}

.daily-board-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(46, 230, 255, 0.1);
  font-size: 12px;
  color: rgba(232, 251, 255, 0.5);
}

.daily-board-head strong {
  color: #e8fbff;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.daily-board-empty {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 22px 14px;
  text-align: center;
  color: rgba(232, 251, 255, 0.48);
}

.daily-board-empty strong {
  color: rgba(232, 251, 255, 0.78);
  font-size: 14px;
}

.daily-board-empty span {
  font-size: 12px;
}

.daily-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 8px;
  align-items: end;
  padding: 14px 12px 10px;
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(255, 224, 138, 0.12), transparent 70%);
}

.daily-podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
  min-width: 0;
}

.daily-podium-slot.is-gold {
  order: 0;
  padding-top: 14px;
  border-color: rgba(255, 224, 138, 0.35);
  background: linear-gradient(180deg, rgba(255, 224, 138, 0.18), rgba(255, 224, 138, 0.04));
  transform: translateY(-4px);
}

.daily-podium-slot.is-silver {
  border-color: rgba(200, 220, 235, 0.22);
  background: linear-gradient(180deg, rgba(200, 220, 235, 0.12), rgba(255, 255, 255, 0.03));
}

.daily-podium-slot.is-bronze {
  border-color: rgba(255, 150, 90, 0.28);
  background: linear-gradient(180deg, rgba(255, 140, 80, 0.12), rgba(255, 255, 255, 0.03));
}

.daily-podium-slot.is-me {
  box-shadow: 0 0 0 1px rgba(46, 230, 255, 0.45);
}

.daily-podium-crown {
  font-size: 18px;
  line-height: 1;
}

.daily-podium-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  color: #e8fbff;
}

.daily-podium-name em,
.daily-board-name em {
  font-style: normal;
  color: #2ee6ff;
  font-weight: 800;
  font-size: 10px;
  margin-left: 4px;
}

.daily-podium-score {
  font-size: 16px;
  font-weight: 850;
  color: #ffe08a;
  font-variant-numeric: tabular-nums;
}

.daily-podium-tries {
  font-size: 10px;
  color: rgba(232, 251, 255, 0.45);
}

.daily-board-list {
  max-height: min(28vh, 220px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.daily-board--lobby .daily-board-list {
  max-height: min(40vh, 320px);
}

.daily-board--compact {
  margin-top: 2px;
}

.daily-board--compact .daily-board-list {
  max-height: min(18vh, 140px);
}

.daily-board--compact .daily-podium {
  display: none;
}

.daily-board-last {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(232, 251, 255, 0.4);
}

.daily-board-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 13px;
  color: rgba(232, 251, 255, 0.88);
}

.daily-board-row:last-child {
  border-bottom: 0;
}

.daily-board-row.is-me {
  background: rgba(46, 230, 255, 0.1);
  box-shadow: inset 3px 0 0 #2ee6ff;
}

.daily-board-rank {
  display: grid;
  place-items: center;
}

.daily-board-rank span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 850;
  color: rgba(232, 251, 255, 0.75);
  font-variant-numeric: tabular-nums;
}

.daily-board-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
}

.daily-board-score {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: #fff3c0;
}

.daily-board-tries {
  font-size: 11px;
  color: rgba(232, 251, 255, 0.42);
  min-width: 28px;
  text-align: right;
}

@media (max-width: 520px) {
  .daily-stunt-stage {
    min-height: 44vh;
    height: 48vh;
  }

  .daily-stunt-controls button {
    min-height: 62px;
    font-size: 14px;
  }

  .daily-stunt-meta {
    font-size: 11px;
  }

  .daily-board--lobby .daily-board-list {
    max-height: min(34vh, 280px);
  }

  .daily-podium {
    gap: 6px;
    padding: 12px 8px 8px;
  }

  .daily-podium-name {
    font-size: 11px;
  }

  .daily-podium-score {
    font-size: 14px;
  }
}

.story-play {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 23px;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(7, 20, 24, .7);
  border: 1px solid rgba(46, 230, 255, .35);
  color: #fff;
  font-style: normal;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.story-badge {
  position: absolute;
  z-index: 2;
  right: 0;
  top: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7a5c, var(--chilli));
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.story-badge.is-mango {
  top: auto;
  bottom: 16px;
  background: linear-gradient(180deg, #ffc85a, var(--mango));
  color: #1a1000;
}

.story-badge.is-group {
  left: 0;
  right: auto;
  background: rgba(46, 230, 255, .9);
  color: #041014;
}

.story-badge.is-processing {
  left: 0;
  right: auto;
  top: auto;
  bottom: 16px;
  background: rgba(8, 18, 32, .88);
  color: #7dd3fc;
  letter-spacing: .04em;
}

.story.is-processing .story-play {
  opacity: .55;
}

#snap-processing {
  position: absolute;
  left: 50%;
  top: calc(12px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 40;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 18, 32, .82);
  color: #e2e8f0;
  font: 700 13px/1.2 system-ui, sans-serif;
  letter-spacing: .02em;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.story-name {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stories .empty {
  flex: none;
  align-self: center;
  margin: 8px 0;
  padding: 0;
  text-shadow: 0 1px 3px #000;
}

.list-hint {
  margin: 0 0 10px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 600;
}

.mango-row .who small {
  color: var(--mango);
}

@media (max-width: 420px) {
  .top {
    gap: 6px;
  }

  .pill {
    height: 40px;
    padding: 0 10px;
    font-size: 12px;
  }

  .pill.mango {
    max-width: 34vw;
  }

  #pm-btn {
    max-width: 32vw;
  }

  #board {
    top: calc(env(safe-area-inset-top) + 54px);
  }

  .live {
    max-width: calc(100% - 20px);
    margin-top: 6px;
    padding: 3px 10px;
    font-size: 11px;
    gap: 4px 8px;
  }

  #next {
    font-size: 11px;
  }

  #tabbar #fota,
  #fota.tab-create {
    width: 54px;
    height: 54px;
    margin-top: -16px;
  }

  #locate.map-locate {
    bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 16px);
  }

  #sheet {
    padding-left: 12px;
    padding-right: 12px;
  }

  #sheet.is-thread .composer,
  .wa-composer {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .studio-head h2 {
    font-size: 16px;
  }

  .vf-bar {
    gap: 18px;
  }

  #vf-shot {
    width: 64px;
    height: 64px;
  }

  #vf-rec {
    width: 56px;
    height: 56px;
  }
}

.live {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
  width: fit-content;
  max-width: calc(100% - 28px);
  margin: 4px auto 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(7, 20, 24, .4);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-shadow: 0 1px 2px #000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: .85;
}

.live strong {
  color: #fff;
  font-weight: 800;
}

#next {
  max-width: calc(100% - 32px);
  margin: 4px auto 0;
  overflow: hidden;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px #000;
}

.group-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: calc(100% - 28px);
  margin: 8px auto 0;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(46, 230, 255, .35);
  border-radius: 999px;
  background: rgba(7, 20, 24, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
  pointer-events: auto;
}

.group-filter[hidden] {
  display: none !important;
}

.group-filter-copy {
  min-width: 0;
  overflow: hidden;
  color: rgba(232, 251, 255, .78);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.group-filter-copy strong {
  color: var(--cyan);
  font-weight: 800;
}

#group-filter-clear,
#hashtag-filter-clear {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(46, 230, 255, .4);
  border-radius: 999px;
  background: rgba(46, 230, 255, .16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

#group-filter-clear:active,
#hashtag-filter-clear:active {
  transform: scale(.96);
}

.hashtag-filter .hashtag-filter-follow {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(46, 230, 255, .35);
  border-radius: 999px;
  background: rgba(46, 230, 255, .1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
}

.hashtag-filter .hashtag-filter-follow.is-following {
  border-color: rgba(255, 176, 32, .45);
  background: rgba(255, 176, 32, .14);
  color: #ffd27a;
}

.tag-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  margin: 10px 0 0;
  padding: 0 max(14px, env(safe-area-inset-right)) 2px max(14px, env(safe-area-inset-left));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  pointer-events: auto;
}

.tag-bar::-webkit-scrollbar { display: none; }

.tag-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.tag-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(232, 251, 255, .14);
  border-radius: 999px;
  background: rgba(7, 20, 24, .72);
  color: rgba(232, 251, 255, .55);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .12s ease;
}

.tag-chip:active {
  transform: scale(.96);
}

/* Cyan när taggen har chillis */
.tag-chip.has-posts {
  border-color: rgba(0, 229, 255, .45);
  background: rgba(0, 229, 255, .1);
  color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, .12), 0 6px 16px rgba(0, 0, 0, .18);
}

.tag-chip.is-on {
  border-color: rgba(0, 229, 255, .55);
  background: linear-gradient(180deg, rgba(0, 229, 255, .22), rgba(0, 180, 200, .12));
  color: #e8fbff;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, .18), 0 8px 18px rgba(0, 0, 0, .22);
}

.tag-chip.has-posts.is-on {
  color: var(--cyan);
}

.tag-chip.tag-add {
  border-style: dashed;
  border-color: rgba(0, 229, 255, .4);
  color: var(--cyan);
  background: rgba(0, 229, 255, .08);
}

.tag-discover {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 2px 8px;
}

.tag-discover-lead {
  margin: 0;
  color: rgba(232, 251, 255, .68);
  font-size: 13px;
  line-height: 1.4;
}

.tag-discover-field input {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(46, 230, 255, .28);
  border-radius: 14px;
  background: rgba(4, 16, 20, .95);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-sizing: border-box;
}

.tag-discover-field input::placeholder {
  color: rgba(180, 220, 230, .45);
  font-weight: 600;
}

.tag-discover-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-discover-empty {
  margin: 8px 0 0;
  color: rgba(232, 251, 255, .58);
  font-size: 13px;
  text-align: center;
}

.tag-discover-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(232, 251, 255, .08);
  border-radius: 16px;
  background: rgba(7, 20, 24, .62);
}

.tag-discover-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  color: inherit;
}

.tag-discover-main strong {
  color: rgba(232, 251, 255, .55);
  font-size: 15px;
  font-weight: 800;
}

.tag-discover-main.has-posts strong {
  color: var(--cyan);
}

.tag-discover-main span,
.tag-discover-meta {
  color: rgba(232, 251, 255, .55);
  font-size: 12px;
  font-weight: 600;
}

.tag-discover-main.has-posts span,
.tag-discover-main.has-posts .tag-discover-meta {
  color: rgba(0, 229, 255, .72);
}

.tag-discover-follow {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(46, 230, 255, .35);
  border-radius: 999px;
  background: rgba(46, 230, 255, .12);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag-discover-follow.is-on {
  border-color: rgba(255, 176, 32, .45);
  background: rgba(255, 176, 32, .14);
  color: #ffd27a;
}

.ch-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 14px;
}

.ch-post-caption + .ch-post-tags {
  padding-top: 0;
  margin-top: -6px;
}

.ch-post-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(0, 229, 255, .28);
  border-radius: 999px;
  background: rgba(0, 229, 255, .08);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 750;
}

.ch-post-tag:active {
  transform: scale(.96);
}

.ch-post-tag-follow {
  min-width: 26px;
  justify-content: center;
  padding: 0 8px;
  font-weight: 900;
}

.ch-post-tag-follow.is-on {
  border-color: rgba(255, 176, 32, .45);
  background: rgba(255, 176, 32, .14);
  color: #ffd27a;
}

#snap-caption .snap-tag,
.snap-tag {
  display: inline;
  margin: 0 1px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

#app-dialog,
.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 24px 18px calc(env(safe-area-inset-bottom) + 24px);
  box-sizing: border-box;
  pointer-events: none;
}

#app-dialog.is-open,
.app-dialog.is-open {
  display: grid;
  pointer-events: auto;
}

#app-dialog[hidden],
.app-dialog[hidden] {
  display: none !important;
}

.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 14, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.app-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  padding: 20px 18px 16px;
  border: 1px solid rgba(46, 230, 255, .34);
  border-radius: 22px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(46, 230, 255, .16), transparent 55%),
    linear-gradient(165deg, rgba(18, 52, 60, .98), rgba(5, 16, 20, .97));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(46, 230, 255, .08),
    0 0 32px rgba(46, 230, 255, .12);
  transform: translateY(10px) scale(.98);
  opacity: 0;
  pointer-events: auto;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

#app-dialog.is-open.is-in .app-dialog-card,
.app-dialog.is-open.is-in .app-dialog-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-dialog-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
}

.app-dialog-msg {
  margin: 0;
  color: rgba(232, 251, 255, .82);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.app-dialog-input {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(46, 230, 255, .28);
  border-radius: 14px;
  background: rgba(0, 0, 0, .35);
  color: #e8fbff;
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box;
}

.app-dialog-input:focus {
  outline: none;
  border-color: rgba(46, 230, 255, .55);
  box-shadow: 0 0 0 3px rgba(46, 230, 255, .12);
}

.app-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

#app-dialog .app-dialog-cancel,
#app-dialog .app-dialog-ok {
  flex: 1;
  min-height: 46px;
  margin: 0;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

#app-dialog .app-dialog-cancel {
  border: 1px solid rgba(46, 230, 255, .22);
  background: rgba(4, 16, 20, .75);
  color: rgba(232, 251, 255, .88);
}

#app-dialog .app-dialog-ok {
  border: 1px solid rgba(255, 176, 32, .5);
  background: rgba(255, 176, 32, .16);
  color: var(--mango);
}

#app-dialog.is-danger .app-dialog-ok {
  border-color: rgba(255, 90, 60, .5);
  background: rgba(255, 70, 40, .18);
  color: #ffb8a8;
}

#toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  top: auto;
  max-width: min(90vw, 340px);
  padding: 12px 18px;
  border: 1px solid rgba(46, 230, 255, .34);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(46, 230, 255, .16), transparent 55%),
    linear-gradient(165deg, rgba(18, 52, 60, .97), rgba(5, 16, 20, .96));
  box-shadow:
    0 14px 36px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(46, 230, 255, .08),
    0 0 28px rgba(46, 230, 255, .1);
  color: #e8fbff;
  transform: translate(-50%, 14px) scale(.98);
  opacity: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

#toast.is-in {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

#toast.is-out {
  opacity: 0;
  transform: translate(-50%, 8px) scale(.98);
}

/* Force-logout: samma språk som #toast, med kryss + godkänn. */
#force-logout-toast,
.force-logout-toast {
  position: fixed;
  z-index: 95;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  top: auto;
  width: min(90vw, 340px);
  padding: 16px 18px 14px;
  border: 1px solid rgba(46, 230, 255, .34);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(46, 230, 255, .16), transparent 55%),
    linear-gradient(165deg, rgba(18, 52, 60, .97), rgba(5, 16, 20, .96));
  box-shadow:
    0 14px 36px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(46, 230, 255, .08),
    0 0 28px rgba(46, 230, 255, .1);
  color: #e8fbff;
  transform: translate(-50%, 14px) scale(.98);
  opacity: 0;
  text-align: center;
  pointer-events: auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}
#force-logout-toast.is-in,
.force-logout-toast.is-in {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
#force-logout-toast.is-out,
.force-logout-toast.is-out {
  opacity: 0;
  transform: translate(-50%, 8px) scale(.98);
}
#force-logout-toast[hidden],
.force-logout-toast[hidden] {
  display: none !important;
}
.force-logout-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #e8fbff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.force-logout-msg {
  margin: 0 28px 12px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .01em;
  color: #e8fbff;
}
.force-logout-logo {
  display: inline-block;
  vertical-align: -6px;
  width: auto;
  height: 22px;
  margin: 0 2px;
  object-fit: contain;
}
#force-logout-sec {
  font-variant-numeric: tabular-nums;
}
.force-logout-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(46, 230, 255, .4);
  border-radius: 12px;
  background: color-mix(in srgb, var(--cyan, #2ee6ff) 22%, rgba(0, 0, 0, .35));
  color: #e8fbff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

#upload-bar {
  position: fixed;
  z-index: 80;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 72px);
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(6, 18, 22, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  pointer-events: none;
}

#upload-bar[hidden] {
  display: none !important;
}

#upload-bar.is-done,
#upload-bar.is-fail {
  pointer-events: none;
}

#upload-bar-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #e8f7fb;
}

#upload-bar.is-fail #upload-bar-label {
  color: #ff8a8a;
}

.upload-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}

#upload-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ee6ff, #3b82f6);
  transition: width .18s ease-out;
}

#upload-bar.is-indeterminate #upload-bar-fill {
  width: 36% !important;
  animation: upload-bar-slide 1.1s ease-in-out infinite;
}

@keyframes upload-bar-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* Global wait: sakta blinkande ChillOr-logo medan något laddar. */
#chill-wait {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 42%, rgba(46, 230, 255, .1), transparent 58%),
    rgba(5, 13, 18, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  touch-action: none;
}

#chill-wait[hidden] {
  display: none !important;
}

.chill-wait-logo {
  width: min(200px, 58vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .45));
  animation: chill-wait-pulse 2.6s ease-in-out infinite;
}

.chill-wait-label {
  margin: 0;
  max-width: 16rem;
  text-align: center;
  color: rgba(232, 251, 255, .78);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.35;
}

@keyframes chill-wait-pulse {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .chill-wait-logo {
    animation: chill-wait-pulse-soft 3.2s ease-in-out infinite;
  }
  @keyframes chill-wait-pulse-soft {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.95; }
  }
}

#snap {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #000;
  touch-action: none;
}

#snap-stage {
  position: relative;
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  touch-action: none;
  will-change: transform, filter, opacity;
  /* Egen stacking för media — under chrome (bar/shade/live). */
  isolation: isolate;
  z-index: 0;
}

#snap-stage.is-swapping {
  pointer-events: none;
}

#snap-img,
#snap-video,
#snap-stage > video.story-vid {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  /* Instagram/Reels-känsla: fyll hela porträttytan (cover), centrerat. */
  object-fit: cover !important;
  object-position: center !important;
  background: #000;
  pointer-events: none;
}
#snap-stage.is-cut #snap-img.is-cut-slide,
#snap-stage.has-gif-frame #snap-img.is-gif-framed {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover !important;
  will-change: transform;
}
#snap-stage.is-cut .chillor-cut-fx-out,
#snap-stage.is-cut .chillor-cut-fx-in,
#snap-stage.is-cut .chillor-cut-zoomblur-out,
#snap-stage.is-cut .chillor-cut-zoomblur-in {
  object-fit: cover !important;
}

.face-privacy-overlay {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

/* Live Lottie stickers on posted chillis (same idea as huvudprojektet). */
.gallery-overlay-text {
  position: absolute;
  z-index: 8;
  max-width: none;
  pointer-events: none;
  text-align: center;
  line-height: 1.05;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .85);
  /* Match studio float: one line — no wrap after post. */
  white-space: nowrap;
  word-break: normal;
  box-sizing: border-box;
}
.gallery-overlay-text.is-frame {
  width: 42%;
  max-width: 92%;
  aspect-ratio: 1 / 1.414; /* fallback; JS sätter fri bredd/höjd */
  height: auto;
  max-height: 70%;
  padding: 7% 8%;
  border-radius: 14px;
  background: rgba(248, 252, 255, .55);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  line-height: 1.28;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 14;
}
.gallery-overlay-text.is-link {
  pointer-events: auto;
  cursor: pointer;
  z-index: 9;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.55em 1.15em;
  border-radius: 999px;
  background: rgba(8, 18, 24, .82);
  border: 1.5px solid rgba(46, 230, 255, .65);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #e8fbff !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.gallery-overlay-text.is-link:active {
  filter: brightness(1.14);
  border-color: rgba(46, 230, 255, .95);
}

.gallery-overlay-text[data-glow="1"],
.studio-float.text[data-glow="1"],
.qc-float.text[data-glow="1"] {
  /* Glow fonts set stronger inline shadow; keep a fallback for CSS-only paints. */
  filter: drop-shadow(0 0 6px currentColor);
}
.gallery-sticker {
  position: absolute;
  z-index: 4;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-sticker img,
.gallery-sticker svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
}

.snap-shade {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(0, 0, 0, .88));
  pointer-events: none;
}

#snap-pos {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top) + 22px);
  left: 50%;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  transform: translateX(-50%);
  text-shadow: 0 1px 4px #000;
  pointer-events: none;
}

#snap-pos:empty { display: none; }

/* Deezer / iTunes — artist + låt mitt överst på chillit */
.snap-music-now {
  position: absolute;
  z-index: 6;
  top: calc(env(safe-area-inset-top, 0px) + 52px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(86vw, 360px);
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: rgba(6, 14, 18, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  color: #f4fbff;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.snap-music-now[hidden] {
  display: none !important;
}
.snap-music-now.is-on {
  visibility: visible;
  animation: snap-music-in .7s cubic-bezier(.2, .8, .2, 1) forwards;
}
.snap-music-now.is-out {
  animation: snap-music-out .35s ease forwards;
}
.snap-music-now-note {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(46, 230, 255, .14);
  border: 1px solid rgba(46, 230, 255, .35);
  animation: snap-music-note 1.8s ease-in-out infinite;
}
.snap-music-now-dead {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 4px rgba(46, 230, 255, .4));
}
.snap-music-now-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.snap-music-now-copy strong {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, .72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
}
.snap-music-now-copy i {
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
  opacity: 0;
  transform: translateY(8px);
}
.snap-music-now.is-on .snap-music-now-copy strong {
  animation: snap-music-line .55s .12s cubic-bezier(.2, .8, .2, 1) forwards;
}
.snap-music-now.is-on .snap-music-now-copy i {
  animation: snap-music-line .6s .26s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes snap-music-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-14px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}
@keyframes snap-music-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(.97);
  }
}
@keyframes snap-music-line {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes snap-music-note {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
#snap.is-wilting .snap-music-now {
  top: calc(env(safe-area-inset-top, 0px) + 64px);
}

#snap.is-wilting #snap-pos {
  top: calc(env(safe-area-inset-top) + 18px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(92vw, 420px);
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(7, 20, 24, .72);
  border: 1px solid rgba(46, 230, 255, .35);
  color: #9ef7ff;
  letter-spacing: .04em;
  text-transform: none;
  font-weight: 700;
}
#snap.is-wilting #snap-pos .snap-pos-dead {
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(46, 230, 255, .5));
  animation: ch-dead-pulse 1.6s ease-in-out infinite;
}
#snap.is-wilting #snap-pos .snap-pos-wilting-title {
  flex: none;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
#snap.is-wilting #snap-pos .snap-pos-count {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: #9ef7ff;
  font-weight: 700;
  white-space: nowrap;
}

#snap-heats-rain {
  position: absolute;
  z-index: 12;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Chilli Live — höger, botten→upp, scrambled + 3D-emoji */
.snap-live-wrap {
  position: absolute;
  z-index: 15;
  right: max(10px, env(safe-area-inset-right, 0px));
  left: auto;
  /* Ovanför cyan #snap-meta / snap-bar — undvik krock med statusraden. */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 138px);
  width: min(78vw, 280px);
  max-width: min(78vw, 280px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  /* Fast plats för Live-knappen — ticker/composer växer uppåt utan att flytta den. */
  padding-bottom: 36px;
  box-sizing: border-box;
  pointer-events: none;
  /* Egen stacking ovanpå stage — undvik contain/transform som kan croppa GIF-syskon. */
  isolation: isolate;
  z-index: 15;
}
.snap-live-wrap[hidden] { display: none !important; }
.snap-live-wrap.is-comments-off .snap-live {
  visibility: hidden;
}
.snap-live {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  width: auto;
  max-width: 100%;
  height: min(46vh, 400px);
  overflow: hidden;
  pointer-events: none;
  /* Tystare mot mitten — opacity-fade i keyframes; undvik mask på mobil (layer-bugg). */
  -webkit-mask-image: none;
  mask-image: none;
}
@media (hover: hover) and (pointer: fine) {
  .snap-live {
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 58%, transparent 96%);
    mask-image: linear-gradient(to top, #000 0%, #000 58%, transparent 96%);
  }
}
.snap-live-toggle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 11px 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .42);
  color: rgba(255, 255, 255, .88);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.snap-live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 1.5px solid color-mix(in srgb, var(--cyan, #5eead4) 85%, #fff);
  background: color-mix(in srgb, var(--cyan, #5eead4) 78%, #fff);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--cyan, #5eead4) 22%, transparent),
    0 0 10px color-mix(in srgb, var(--cyan, #5eead4) 45%, transparent);
}
.snap-live-label {
  line-height: 1;
}
.snap-live-toggle.is-off {
  border-color: rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .5);
  background: rgba(0, 0, 0, .32);
}
.snap-live-toggle.is-off .snap-live-dot {
  border-color: rgba(255, 255, 255, .38);
  background: transparent;
  box-shadow: none;
}
.snap-live-composer {
  position: relative;
  z-index: 4;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}
.snap-live-wrap:not(.is-compose-open) .snap-live-composer {
  display: none;
}
.snap-live-wrap.is-compose-open .snap-live {
  bottom: 118px;
}
.snap-live-emojis {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}
.snap-live-emoji-pick {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(0, 0, 0, .45);
  overflow: hidden;
}
.snap-live-emoji-pick.is-on {
  border-color: color-mix(in srgb, var(--cyan) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cyan) 35%, transparent);
}
.snap-live-emoji-pick .snap-live-emoji {
  width: 100%;
  height: 100%;
}
.snap-live-compose-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.snap-live-compose-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.snap-live-compose-row button {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--chilli);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}
.snap-live-row {
  --live-dur: 4.8s;
  --live-rise: 42vh;
  position: absolute;
  right: 0;
  bottom: 4px;
  left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 10px 6px 6px;
  border: 0;
  border-radius: 14px;
  /* Opak — ingen backdrop-filter (skapar containing block / crop på mobil WebKit). */
  background: rgba(4, 12, 16, .78);
  color: #f2fbfd;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
  pointer-events: none;
  opacity: 0;
  max-width: 100%;
  width: max-content;
  box-sizing: border-box;
  will-change: transform, opacity;
  animation: snap-live-rise var(--live-dur) cubic-bezier(.22, .61, .36, 1) forwards;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.snap-live-row.is-reply {
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--cyan) 28%, transparent);
  background: rgba(4, 12, 16, .28);
}
.snap-live-row.is-mango {
  border-color: color-mix(in srgb, var(--mango) 40%, transparent);
}
.snap-live-row.is-heat {
  background: rgba(4, 12, 16, .22);
}
.snap-live-row.is-blip {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(4, 12, 16, .26);
}
.snap-live-row.is-out {
  animation: snap-live-out .28s ease forwards;
}
.snap-live-row.is-soft {
  --live-dur: 2.4s;
  --live-rise: 26vh;
  animation-timing-function: linear;
}
.snap-live-thumb,
.snap-live-emoji {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  background: #122028;
}
.snap-live-thumb {
  object-fit: cover;
}
.snap-live-emoji svg,
.snap-live-emoji-pick .snap-live-emoji svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.snap-live-copy {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.snap-live-copy strong {
  font-weight: 800;
}
.snap-live-copy i {
  margin-left: 6px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: .85;
}
.snap-live-row.is-mango .snap-live-copy i {
  color: var(--mango);
}
@keyframes snap-live-rise {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
  }
  58% {
    opacity: 1;
  }
  78% {
    opacity: .55;
  }
  100% {
    opacity: 0;
    transform: translateY(calc(-1 * var(--live-rise)));
  }
}
@keyframes snap-live-out {
  to { opacity: 0; transform: translateY(-12px); }
}

.heat-fall {
  --fx: 20;
  --fy: 64;
  --fr: 0;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: max(12px, env(safe-area-inset-left, 0px));
  max-width: min(58vw, 220px);
  overflow: hidden;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd27a, var(--mango) 62%, #d48a10);
  color: #1a1000;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow:
    0 8px 22px rgba(255, 176, 32, .38),
    0 0 0 1px rgba(255, 255, 255, .18) inset;
  opacity: 0;
  -webkit-animation: heat-fall var(--fall-dur, 2.8s) cubic-bezier(.2, .75, .2, 1) forwards;
  animation: heat-fall var(--fall-dur, 2.8s) cubic-bezier(.2, .75, .2, 1) forwards;
}

.heat-fall.is-alt {
  background: linear-gradient(180deg, #7af0ff, var(--cyan) 58%, #1a9fb0);
  color: #041014;
  box-shadow:
    0 8px 22px rgba(46, 230, 255, .32),
    0 0 0 1px rgba(255, 255, 255, .16) inset;
}

.heat-fall.is-soft {
  -webkit-animation-name: heat-fall-soft;
  animation-name: heat-fall-soft;
}

@-webkit-keyframes heat-fall {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, -8px, 0) rotate(0deg) scale(.88);
    transform: translate3d(0, -8px, 0) rotate(0deg) scale(.88);
  }
  12% {
    opacity: 1;
    -webkit-transform: translate3d(calc(var(--fx) * 0.12 * 1vw), 6vh, 0) rotate(calc(var(--fr) * 0.25 * 1deg)) scale(1.04);
    transform: translate3d(calc(var(--fx) * 0.12 * 1vw), 6vh, 0) rotate(calc(var(--fr) * 0.25 * 1deg)) scale(1.04);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    -webkit-transform: translate3d(calc(var(--fx) * 1vw), calc(var(--fy) * 1vh), 0) rotate(calc(var(--fr) * 1deg)) scale(.92);
    transform: translate3d(calc(var(--fx) * 1vw), calc(var(--fy) * 1vh), 0) rotate(calc(var(--fr) * 1deg)) scale(.92);
  }
}

@keyframes heat-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -8px, 0) rotate(0deg) scale(.88);
  }
  12% {
    opacity: 1;
    transform: translate3d(calc(var(--fx) * 0.12 * 1vw), 6vh, 0) rotate(calc(var(--fr) * 0.25 * 1deg)) scale(1.04);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--fx) * 1vw), calc(var(--fy) * 1vh), 0) rotate(calc(var(--fr) * 1deg)) scale(.92);
  }
}

@-webkit-keyframes heat-fall-soft {
  0% { opacity: 0; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }
  15% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; -webkit-transform: translate3d(12vw, 28vh, 0); transform: translate3d(12vw, 28vh, 0); }
}

@keyframes heat-fall-soft {
  0% { opacity: 0; transform: translate3d(0, 0, 0); }
  15% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(12vw, 28vh, 0); }
}

#snap-close {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top) + 12px);
  right: max(12px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 20px;
}

.snap-bar {
  position: absolute;
  z-index: 10;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
  pointer-events: none;
}
.snap-bar .snap-actions,
.snap-bar .snap-act-btn,
.snap-bar #snap-who,
.snap-bar #snap-reply-of,
.snap-bar a,
.snap-bar button {
  pointer-events: auto;
}

#snap-who {
  font-size: 22px;
}

#snap-meta, #snap-caption {
  margin: 4px 0 0;
  color: #fff;
}

#snap-meta { color: var(--cyan); font-weight: 700; }

/* Dans topp-3 podium ovanpå chilli-media (id+class — tål gammal HTML) */
#snap-dance-scores,
.snap-dance-podium {
  position: absolute;
  z-index: 16;
  left: 50%;
  /* Högre upp över collaget — ok om det skymmer nedre poser lite. */
  bottom: calc(env(safe-area-inset-bottom) + 42%);
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  padding: 0 12px;
  max-width: min(420px, calc(100% - 24px));
  pointer-events: none;
  text-shadow: none;
  margin: 0;
  background: transparent;
  color: #e8fbff;
  font: 600 13px/1.45 Outfit, system-ui, sans-serif;
}
#snap-dance-scores[hidden],
.snap-dance-podium[hidden] { display: none !important; }
.snap-dance-podium.is-empty {
  pointer-events: none;
}
.snap-dance-podium-empty {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 12, 18, .55);
  color: rgba(232, 251, 255, .9);
  font: 600 12px/1.3 Outfit, system-ui, sans-serif;
  white-space: nowrap;
}
.snap-dance-podium-slot {
  pointer-events: auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: #e8fbff;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 72px;
  cursor: default;
  font: 650 11px/1.2 Outfit, system-ui, sans-serif;
}
.snap-dance-podium-slot.is-link { cursor: pointer; }
.snap-dance-podium-slot.is-link:active .snap-dance-podium-av-wrap {
  transform: scale(.94);
}
.snap-dance-podium-slot.is-first {
  min-width: 88px;
  transform: translateY(-10px);
}
.snap-dance-podium-av-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  transition: transform .12s ease;
}
.snap-dance-podium-slot.is-first .snap-dance-podium-av-wrap {
  width: 72px;
  height: 72px;
}
.snap-dance-podium-av {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0a1a22, #041014);
  border: 2.5px solid rgba(255, 255, 255, .55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  font: 800 20px/1 Outfit, system-ui, sans-serif;
  color: #2ee6ff;
}
.snap-dance-podium-slot.is-first .snap-dance-podium-av {
  border-color: #ffd54a;
  box-shadow: 0 0 0 2px rgba(255, 213, 74, .35), 0 8px 22px rgba(0, 0, 0, .5);
  font-size: 26px;
  color: #ffd54a;
}
.snap-dance-podium-slot.is-second .snap-dance-podium-av {
  border-color: #c0d0e0;
}
.snap-dance-podium-slot.is-third .snap-dance-podium-av {
  border-color: #d4956a;
}
.snap-dance-podium-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.snap-dance-podium-place {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 800 10px/1 Outfit, system-ui, sans-serif;
  color: #041014;
  background: #e8fbff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  z-index: 1;
}
.snap-dance-podium-slot.is-first .snap-dance-podium-place {
  background: #ffd54a;
  min-width: 26px;
  height: 20px;
  font-size: 11px;
}
.snap-dance-podium-slot.is-second .snap-dance-podium-place { background: #d7e3ef; }
.snap-dance-podium-slot.is-third .snap-dance-podium-place { background: #e0a878; }
.snap-dance-podium-score {
  font: 800 13px/1 Outfit, system-ui, sans-serif;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}
.snap-dance-podium-slot.is-first .snap-dance-podium-score {
  font-size: 15px;
  color: #ffd54a;
}
.snap-dance-podium-stars {
  color: #ffd54a;
  font-size: 11px;
  letter-spacing: .04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
  min-height: 12px;
}
.snap-dance-podium-name {
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: .88;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
}
.dance-lb-you { color: #7dff9a; margin-bottom: 4px; }
.dance-lb-title { opacity: .75; font-size: 12px; margin: 4px 0 2px; }
.dance-lb-row {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 4px 0;
  margin: 0;
}
.dance-lb-row.is-link {
  cursor: pointer;
  color: #2ee6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.snap-social {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  font-weight: 600;
}

.snap-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.snap-actions::-webkit-scrollbar { display: none; }

/* Moderna ikonknappar — cirkel + mikroetikett. */
.snap-actions .snap-act-btn,
.snap-actions button.snap-act-btn {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 52px;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1.1;
  -webkit-tap-highlight-color: transparent;
}
.snap-actions .snap-act-btn:active {
  transform: scale(.94);
}
.snap-actions .snap-act-btn[hidden] { display: none !important; }

.snap-act-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(8, 12, 16, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  color: #fff;
}
.snap-act-ico svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.snap-act-ico svg.is-fill {
  fill: currentColor;
  stroke: none;
}
.snap-act-lbl {
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .75);
  opacity: .92;
}
.snap-act-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff5a1f;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.snap-act-ico-wrap {
  position: relative;
  display: inline-flex;
}

#snap-heat .snap-act-ico {
  color: #1a1000;
  background: linear-gradient(160deg, #ffe08a, var(--mango, #ffb020));
  border-color: transparent;
}
#snap-heat.is-on .snap-act-ico,
#snap-heat.is-hot .snap-act-ico {
  background: linear-gradient(160deg, #ff9a3c, #ff3d00);
  color: #fff;
}
#snap-reply .snap-act-ico {
  color: #7ef3ff;
  border-color: rgba(46, 230, 255, .4);
  background: rgba(10, 40, 48, .62);
}
#snap-chilla-vidare .snap-act-ico {
  color: #041016;
  background: linear-gradient(160deg, #b8ffe8, #2ee6a8);
  border-color: transparent;
}
#snap-follow .snap-act-ico {
  color: #fff;
  border-color: rgba(46, 230, 255, .45);
  background: rgba(46, 230, 255, .16);
}
#snap-follow.is-on .snap-act-ico {
  color: rgba(255, 255, 255, .9);
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .1);
}
#snap-follow.is-back .snap-act-ico {
  color: #041016;
  background: linear-gradient(160deg, #7ef3ff, #2ee6ff);
  border-color: transparent;
}
#snap-act .snap-act-ico {
  color: #fff;
  background: linear-gradient(160deg, #ff6b4a, var(--chilli, #e23d2a));
  border-color: transparent;
}
#snap-act:disabled .snap-act-ico {
  opacity: .55;
}
#snap-share .snap-act-ico,
#snap-dance .snap-act-ico {
  color: #7ef3ff;
}
#snap-delete .snap-act-ico,
#snap-report .snap-act-ico {
  color: #ff8a8a;
}
#snap-audience .snap-act-ico {
  color: #ffd27a;
}

#sheet {
  position: fixed;
  inset: 0;
  /* Above #snap (30) so Dela / Mer never hide behind a chilli. */
  z-index: 35;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 8px) 14px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--surface);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
}

.sheet-head h2 { margin: 0; font-size: 20px; }

#sheet-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 18px;
}

#sheet-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#sheet-body form:not(.composer) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#sheet-body input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]):not([type="file"]) {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #041014;
  color: #fff;
  box-sizing: border-box;
}

/* Full-width sheet actions only — not avatars / compact chips. */
#sheet-body > button,
#sheet-body .profile-sheet > button:not(.profile-avatar):not(.profile-avatar-cta),
#sheet-body .admin-sheet > button,
#sheet-body form > button[type="submit"],
#sheet-body .admin-report > button,
#sheet-body .admin-pick > button {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid rgba(46, 230, 255, .35);
  border-radius: 14px;
  background: rgba(46, 230, 255, .16);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .08s ease, box-shadow .12s ease;
}
#sheet-body > button:hover,
#sheet-body .profile-sheet > button:not(.profile-avatar):not(.profile-avatar-cta):hover,
#sheet-body .admin-sheet > button:hover,
#sheet-body form > button[type="submit"]:hover,
#sheet-body .admin-report > button:hover,
#sheet-body .admin-pick > button:hover {
  background: rgba(46, 230, 255, .26);
  border-color: rgba(46, 230, 255, .55);
  color: #fff;
}
#sheet-body > button:active,
#sheet-body .profile-sheet > button:not(.profile-avatar):not(.profile-avatar-cta):active,
#sheet-body .admin-sheet > button:active,
#sheet-body form > button[type="submit"]:active,
#sheet-body .admin-report > button:active,
#sheet-body .admin-pick > button:active {
  background: rgba(46, 230, 255, .38);
  border-color: #2ee6ff;
  color: #fff;
  transform: scale(.985);
  box-shadow: inset 0 0 0 1px rgba(46, 230, 255, .35);
}

/* Ändra-synlighet — tunn glass-bar ovanpå chilli */
.snap-aud-pop {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding:
    calc(env(safe-area-inset-top) + 12px)
    max(14px, env(safe-area-inset-right))
    calc(env(safe-area-inset-bottom) + 78px)
    max(14px, env(safe-area-inset-left));
  pointer-events: none;
}

.snap-aud-pop-backdrop {
  appearance: none;
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .28);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: opacity .16s ease;
}

.snap-aud-pop.is-in .snap-aud-pop-backdrop {
  opacity: 1;
}

.snap-aud-pop-card {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, 100%);
  margin: 0 auto;
  padding: 14px 14px 12px;
  border-radius: 20px;
  border: 0;
  background: rgba(12, 14, 16, .72);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  transform: translateY(10px);
  opacity: 0;
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), opacity .18s ease;
}

.snap-aud-pop.is-in .snap-aud-pop-card {
  transform: translateY(0);
  opacity: 1;
}

.audience-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.audience-pick-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .55);
}

.audience-pick-x {
  appearance: none;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.audience-pick-x:active {
  color: #fff;
}

.audience-pick-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .08);
}

.audience-pick-seg-btn {
  appearance: none;
  margin: 0;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .55);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .14s ease, color .14s ease;
}

.audience-pick-seg-btn.is-on {
  background: rgba(255, 255, 255, .92);
  color: #0a0c0e;
}

.audience-pick-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audience-pick-groups[hidden] {
  display: none !important;
}

.audience-pick-group-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1px;
}

.audience-pick-group-list::-webkit-scrollbar {
  display: none;
}

.audience-pick-chip {
  appearance: none;
  flex: 0 0 auto;
  margin: 0;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .78);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background .12s ease, color .12s ease;
}

.audience-pick-chip.is-on {
  background: #fff;
  color: #0a0c0e;
}

.audience-pick-empty {
  margin: 0;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .45);
  font-size: 12px;
  font-weight: 500;
}

.audience-pick-empty[hidden] {
  display: none !important;
}

.audience-pick-save {
  appearance: none;
  width: 100%;
  min-height: 40px;
  margin: 2px 0 0;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0a0c0e;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.audience-pick-save:disabled {
  opacity: .35;
  cursor: default;
}

.audience-pick-save:not(:disabled):active {
  opacity: .88;
}

#snap.has-aud-pop .snap-bar {
  opacity: .28;
  pointer-events: none;
}

#sheet-body .profile-avatar-cta {
  width: auto !important;
  margin-top: 0 !important;
}

.profile-meta {
  margin: 10px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
}

.profile-sound-head {
  margin: 18px 0 4px;
  font-weight: 700;
  color: var(--cyan, #2ee6ff);
}

.profile-sound-hint {
  margin: 8px 0 4px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .55);
}

.profile-pin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 4px;
}

.profile-pin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: rgba(232, 251, 255, 0.72);
}

.profile-pin-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, 0.22);
  background: rgba(4, 14, 18, 0.72);
  color: #e8fbff;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.profile-pin-field input:focus {
  outline: none;
  border-color: rgba(46, 230, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(46, 230, 255, 0.15);
}

.profile-pin-error {
  margin: 0;
  min-height: 1.2em;
  font-size: 12px;
  color: #ff8f9a;
}

.profile-pin-form > button[type="submit"] {
  min-height: 44px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a6d78, #0e4450);
  color: #e8fbff;
  font-weight: 750;
}

.profile-cats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.profile-cat {
  border: 1px solid rgba(46, 230, 255, .2);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(18, 48, 56, .88), rgba(7, 20, 24, .82));
  overflow: hidden;
}

#sheet-body .profile-cat-head,
.profile-cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0 !important;
  padding: 12px 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left;
  color: inherit;
  box-sizing: border-box;
}

.profile-cat-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-cat-copy b {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.profile-cat-copy small {
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.profile-cat-chev {
  flex: none;
  color: rgba(46, 230, 255, .55);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: transform .18s ease;
}

.profile-cat.is-open .profile-cat-chev {
  transform: rotate(90deg);
}

.profile-cat-body {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(46, 230, 255, .12);
}

#sheet-body .profile-cat-body > button,
.profile-cat-body > button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(46, 230, 255, .08);
  font-weight: 700;
}

/* Crew-/följ-rader i meny ska inte se ut som action-knappar. */
#sheet-body .profile-cat-body > button.profile-crew-row,
.profile-cat-body > button.profile-crew-row {
  min-height: 0;
  margin-top: 0;
  margin-bottom: 8px;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.profile-cat-body .profile-follow-row {
  margin-top: 4px;
}

.profile-cat-body .home-feed-empty {
  margin: 8px 0 0;
}

.profile-tags-always {
  margin-top: 12px;
}

#sheet-body .profile-cat-body > button.profile-danger,
.profile-cat-body > button.profile-danger {
  border-color: rgba(255, 90, 60, .4);
  background: rgba(255, 70, 40, .12);
  color: #ffb8a8;
}

#sheet.is-chat {
  padding-bottom: 0;
}

#sheet.is-chat #sheet-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat.mango-list,
.chat.inbox-list,
.chat.group-members,
.chat.league-sheet {
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

#sheet.is-chat .back {
  align-self: flex-start;
  width: auto;
  min-height: 36px;
  margin: 0 0 8px;
  padding: 0 12px;
  border-radius: 999px;
}

#sheet.is-chat .add-mango {
  display: flex;
  gap: 8px;
  margin: 0;
}

#sheet.is-chat .add-mango input {
  flex: 1;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 176, 32, .35);
  border-radius: 14px;
  background: #041014;
}

#sheet.is-chat .add-mango button {
  width: auto;
  margin-top: 0;
  min-height: 44px;
  padding: 0 14px;
  white-space: nowrap;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffc85a, var(--mango) 62%, #d48a10);
  color: #1a1004;
  font-weight: 800;
}

.preview {
  width: 100%;
  max-height: 48dvh;
  object-fit: cover;
  border-radius: 18px;
  background: #000;
}

.friend {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.friend .who {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.friend .who b,
.friend .who small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.friend .who small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.friend .unread {
  flex: none;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.thread,
.wa-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 8px 14px;
}

#sheet.is-thread {
  background: #071418;
}

#sheet.is-thread .sheet-head {
  background: rgba(10, 28, 34, .96);
  margin: 0 -14px;
  padding: 6px 10px 6px 4px;
  border-bottom: 1px solid rgba(46, 230, 255, .12);
}

#sheet.is-thread #sheet-close {
  order: -1;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #aebac1;
  font-size: 22px;
}

#sheet.is-thread #sheet-close::before {
  content: '\2039';
  font-size: 28px;
  line-height: 1;
}

#sheet.is-thread #sheet-close {
  font-size: 0;
}

.wa-thread-title {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 16px !important;
}

.wa-head-avatar {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0d2830;
  border: 1px solid rgba(46, 230, 255, .25);
  font-size: 14px;
  font-weight: 800;
}

.wa-head-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wa-head-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #6a7175;
  color: #fff;
  font-weight: 700;
  flex: none;
}

.wa-head-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.wa-head-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e9edef;
  font-weight: 600;
}

.wa-head-status {
  font-size: 11px;
  font-weight: 500;
  color: rgba(232, 251, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-head-status.is-online {
  color: rgba(61, 220, 132, 0.95);
}

.wa-head-status.is-typing {
  color: rgba(46, 230, 255, 0.95);
  font-style: italic;
}

.wa-head-clears {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(46, 230, 255, 0.85);
  line-height: 1.25;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wa-convo time.is-chillor-saved,
.convo-row time.is-chillor-saved {
  color: var(--mango, #ffb347);
  font-weight: 700;
}

.wa-convo .convo-chillor,
.convo-row .convo-chillor {
  flex: none;
  font-size: 14px;
  line-height: 1;
}

.bubble-react-pick-hint {
  display: block;
  margin-top: 4px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font: 700 10px/1 Outfit, system-ui, sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.chillor-saved-rail {
  margin: 12px 14px 20px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 179, 71, 0.28);
  background: rgba(7, 20, 24, 0.55);
}

.chillor-saved-title {
  margin: 0 0 10px;
  color: var(--mango, #ffb347);
  font: 700 13px/1.3 Outfit, system-ui, sans-serif;
}

.chillor-saved-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chillor-saved-thumb {
  position: relative;
  flex: none;
  width: 72px;
  height: 96px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #041014;
}

.chillor-saved-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chillor-saved-play {
  position: absolute;
  inset: auto 6px 6px auto;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 4px #000;
}

.wa-convo time.is-clears {
  color: rgba(46, 230, 255, 0.9);
  font-variant-numeric: tabular-nums;
}

.wa-messages {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(46, 230, 255, .04), transparent 40%),
    radial-gradient(ellipse at 80% 90%, rgba(255, 90, 60, .05), transparent 45%),
    #0b141a;
}

.day-chip {
  align-self: center;
  margin: 6px 0;
  padding: 4px 12px;
  border-radius: 8px;
  background: #182229;
  color: #8696a0;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.bubble {
  align-self: flex-start;
  max-width: 78%;
  padding: 6px 8px 4px 9px;
  border: 0;
  border-radius: 8px 8px 8px 2px;
  background: #202c33;
  color: #e9edef;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

.bubble time {
  color: #8696a0;
  font-size: 11px;
  line-height: 1;
}

.bubble-ticks {
  color: #8696a0;
  font-size: 12px;
  letter-spacing: -2px;
  line-height: 1;
}

.bubble-ticks.is-read {
  color: #53bdeb;
}

.bubble.mine {
  align-self: flex-end;
  border-radius: 8px 8px 2px 8px;
  background: linear-gradient(160deg, #0e3a44, #0a2a32 55%, #083038);
  color: #e8fbff;
  border: 1px solid rgba(46, 230, 255, .22);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .2);
}

.bubble-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.35;
}

.bubble.is-bombed {
  background: rgba(255, 255, 255, .06);
  border: 1px dashed rgba(255, 255, 255, .22);
  color: #b8c4cc;
  box-shadow: none;
}

.bubble.mine.is-bombed {
  background: rgba(14, 58, 68, .35);
  border: 1px dashed rgba(46, 230, 255, .28);
  color: #9eb8c0;
}

.bubble-bombed {
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  opacity: .95;
}

.bubble-bomb-btn {
  background: rgba(180, 40, 40, .35) !important;
}

.bubble-bomb-fab {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  background: rgba(20, 12, 12, .72);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.bubble-bomb-fab:disabled {
  opacity: .5;
}

.bubble-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 4px;
  border-radius: 6px;
  object-fit: cover;
  background: #0b141a;
}

.bubble-media {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  overflow: visible;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
}

.bubble-media .bubble-photo {
  margin: 0;
  pointer-events: none;
  border-radius: 6px;
}

.bubble-video-btn {
  cursor: pointer;
}

/* WhatsApp-style chilli reaction on media */
.bubble-react {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  background: #1f2c34;
  border: 1.5px solid rgba(11, 20, 26, .9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.bubble.mine .bubble-react {
  left: auto;
  right: 8px;
}
.bubble-react.is-mine {
  background: linear-gradient(160deg, #3a2218, #2a1810);
  border-color: rgba(255, 90, 60, .45);
  box-shadow: 0 0 0 1px rgba(255, 90, 60, .2), 0 1px 4px rgba(0, 0, 0, .4);
}
.bubble-media.is-react-pop .bubble-react {
  animation: bubble-react-pop .32s ease-out;
}
.bubble-react-pick {
  position: fixed;
  z-index: 13000;
  padding: 6px 8px;
  border-radius: 999px;
  background: #1f2c34;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}
.bubble-react-pick-btn {
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.bubble-react-pick-btn:active {
  transform: scale(1.18);
}
.bubble-react-pick-btn.is-on {
  background: rgba(255, 90, 60, .18);
}
@keyframes bubble-react-pop {
  0% { transform: scale(.55); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .bubble-media.is-react-pop .bubble-react { animation: none; }
}

.bubble-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.chat-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .92);
  touch-action: none;
  overscroll-behavior: none;
}

.chat-media-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.chat-media-stage {
  width: min(100%, 920px);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.chat-media-image,
.chat-media-video {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(88dvh, 100%);
  border-radius: 10px;
  background: #000;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.chat-media-image {
  touch-action: none;
  transition: transform .08s ease-out;
}

.chat-media-viewer.is-zoomed .chat-media-image {
  transition: none;
  border-radius: 0;
}

.chat-media-stage.is-slide-up {
  transform: translate3d(0, -12%, 0);
  opacity: 0.35;
  transition: transform .09s ease-out, opacity .09s ease-out;
}
.chat-media-stage.is-slide-down {
  transform: translate3d(0, 12%, 0);
  opacity: 0.35;
  transition: transform .09s ease-out, opacity .09s ease-out;
}
.chat-media-stage.is-slide-in {
  animation: chat-media-slide-in .18s ease-out;
}
@keyframes chat-media-slide-in {
  from { opacity: 0.4; transform: translate3d(0, 6%, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.chilli-audience {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chilli-audience select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #041014;
  color: #fff;
  box-sizing: border-box;
}

.convo-row,
button.friend {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 4px;
  text-align: left;
}

.convo-row .avatar,
.friend .avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0d2830;
  border: 1px solid var(--line);
  font-weight: 800;
}

.composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex: none;
  padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--surface) 28%);
}

.composer-photo {
  flex: none;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(46, 230, 255, .08);
  font-weight: 700;
}

#sheet.is-chat .composer input {
  flex: 1;
  width: auto;
  border-radius: 999px;
}

#sheet.is-chat .composer button {
  flex: none;
  width: auto;
  min-width: 84px;
  margin-top: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
}

.friend .avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0d2830;
  border: 1px solid var(--line);
  line-height: 36px;
  text-align: center;
  font-weight: 800;
}

/* Boot splash â€” ChillOr + chilli fire/smoke while map tiles load */
#boot-splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 62%, rgba(255, 90, 60, .28), transparent 62%),
    radial-gradient(ellipse 80% 45% at 50% 18%, rgba(46, 230, 255, .12), transparent 55%),
    linear-gradient(165deg, #010608 0%, #071418 48%, #120a08 100%);
  transition: opacity .45s ease;
  pointer-events: auto;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}

#boot-splash[hidden] {
  display: none !important;
}

#boot-splash.is-done {
  opacity: 0;
  /* Still capture touches while fading â€” map enables interaction after fade. */
  pointer-events: auto;
  touch-action: none;
}

.boot-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 70%, rgba(255, 120, 40, .22), transparent 42%),
    radial-gradient(circle at 40% 30%, rgba(255, 60, 40, .1), transparent 36%);
  pointer-events: none;
  animation: bootGlow 2.8s ease-in-out infinite alternate;
}

.boot-stage {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
}

.boot-chili {
  position: relative;
  z-index: 3;
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(255, 60, 20, .55));
  animation: bootChili 1.6s ease-in-out infinite;
  transform-origin: 50% 80%;
}

.boot-fire {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 18px;
  width: 54px;
  height: 54px;
  border-radius: 50% 50% 40% 40%;
  background:
    radial-gradient(circle at 50% 70%, #fff6a8 0%, #ffb020 28%, #ff5a3c 58%, transparent 72%);
  transform: translateX(-50%);
  filter: blur(1px);
  opacity: .9;
  animation: bootFire 0.55s ease-in-out infinite alternate;
  pointer-events: none;
}

.boot-smoke {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 58px;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(210, 220, 230, .38), transparent 68%);
  filter: blur(4px);
  animation: bootSmoke 2.8s ease-out infinite;
  pointer-events: none;
}

.boot-smoke-a { animation-delay: 0s; }
.boot-smoke-b { width: 36px; height: 36px; margin-left: -18px; animation-delay: .7s; opacity: .7; }
.boot-smoke-c { width: 22px; height: 22px; margin-left: -8px; animation-delay: 1.4s; opacity: .55; }

.boot-brand {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  color: #e8fbff;
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: clamp(42px, 12vw, 64px);
  letter-spacing: .06em;
  line-height: 1;
  text-shadow:
    0 0 22px rgba(46, 230, 255, .35),
    0 0 40px rgba(255, 90, 60, .28);
}

.boot-logo,
.gate-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: min(72vw, 220px);
  height: auto;
  margin: 8px auto 0;
  border-radius: 10px;
  object-fit: contain;
}

.boot-copy {
  position: relative;
  z-index: 2;
  margin: 0;
  color: rgba(232, 251, 255, .62);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
}

@keyframes bootGlow {
  from { opacity: .7; }
  to { opacity: 1; }
}

@keyframes bootChili {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.06); }
}

@keyframes bootFire {
  from { transform: translateX(-50%) scaleY(0.92) scaleX(1.05); opacity: .75; }
  to { transform: translateX(-50%) scaleY(1.12) scaleX(0.95); opacity: 1; }
}

@keyframes bootSmoke {
  0% { transform: translate3d(0, 0, 0) scale(0.7); opacity: 0; }
  20% { opacity: .55; }
  100% { transform: translate3d(-18px, -86px, 0) scale(2.1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-chili,
  .boot-fire,
  .boot-smoke,
  .boot-glow {
    animation: none;
  }
}

#gate {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    calc(24px + env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(46, 230, 255, .18), transparent 58%),
    radial-gradient(ellipse 85% 48% at 50% 115%, rgba(255, 90, 60, .38), transparent 54%),
    linear-gradient(165deg, #010608 0%, #071418 46%, #0c1418 100%);
}

#gate[hidden] { display: none !important; }

.gate-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(46, 230, 255, .08), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(255, 90, 60, .1), transparent 40%);
  pointer-events: none;
  animation: gateGlow 8s ease-in-out infinite alternate;
}

.gate-ring {
  position: absolute;
  top: max(6vh, calc(env(safe-area-inset-top) + 18px));
  left: 50%;
  width: min(82vw, 360px);
  height: min(82vw, 360px);
  border: 1px solid rgba(46, 230, 255, .26);
  border-radius: 50%;
  box-shadow:
    0 0 0 16px rgba(46, 230, 255, .035),
    0 0 0 44px rgba(255, 90, 60, .035),
    0 0 100px rgba(255, 90, 60, .2),
    inset 0 0 70px rgba(0, 0, 0, .4);
  transform: translateX(-50%);
  pointer-events: none;
  animation: gatePulse 6s ease-in-out infinite;
}

@keyframes gateGlow {
  from { opacity: .7; }
  to { opacity: 1; }
}

@keyframes gatePulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .9; }
  50% { transform: translateX(-50%) scale(1.03); opacity: 1; }
}

.gate-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.gate-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
}

#gate h1 {
  margin: 0;
  color: #fff;
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: clamp(72px, 22vw, 104px);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: .82;
  text-shadow:
    0 0 36px rgba(255, 90, 60, .55),
    0 12px 32px rgba(0, 0, 0, .45);
}

.gate-tagline {
  margin: 14px 0 0;
  color: rgba(232, 251, 255, .78);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}

#gate-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  color: rgba(232, 251, 255, .55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#gate input {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(46, 230, 255, .34);
  border-radius: 16px;
  background: rgba(4, 12, 16, .78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#gate input::placeholder {
  color: rgba(180, 220, 230, .38);
  font-weight: 500;
}

.gate-faq {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 12px 12px 11px;
  border: 1px solid rgba(46, 230, 255, .22);
  border-radius: 14px;
  background: rgba(4, 16, 20, .55);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

#gate .gate-faq input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  padding: 0;
  border-radius: 6px;
  accent-color: var(--cyan);
  box-shadow: none;
}

.gate-faq-copy {
  color: rgba(232, 251, 255, .78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.gate-faq-copy em {
  display: block;
  margin-top: 4px;
  color: rgba(232, 251, 255, .45);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

#gate-faq-open {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

#gate-submit {
  width: 100%;
  height: 54px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8a6a, var(--chilli) 62%, #d83a22);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 12px 32px rgba(255, 90, 60, .36);
}

#gate-error {
  min-height: 1.2em;
  margin: 0;
  color: var(--chilli);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.gate-install {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid rgba(46, 230, 255, .4);
  border-radius: 999px;
  background: rgba(46, 230, 255, .1);
  color: #e8fbff;
  font-size: 15px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.gate-install:active {
  background: rgba(46, 230, 255, .18);
}

.gate-android {
  margin-top: 10px;
  border-color: rgba(61, 220, 132, .45);
  background: rgba(61, 220, 132, .12);
  color: #eafff2;
}

.gate-android:active {
  background: rgba(61, 220, 132, .2);
}

.gate-ios-hint {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .2);
  background: rgba(4, 16, 20, .55);
  color: rgba(232, 251, 255, .72);
  font-size: 13px;
  line-height: 1.4;
}

.gate-ios-hint strong {
  color: #fff;
  font-weight: 800;
}

.gate-meta {
  margin: 18px 0 0;
  color: rgba(232, 251, 255, .42);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .gate-glow,
  .gate-ring {
    animation: none;
  }
}

/* Live camera */
#viewfinder {
  position: fixed;
  inset: 0;
  z-index: 36;
  background: #000;
}

#vf-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#vf-close,
#vf-flip,
#vf-gallery {
  position: absolute;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(7, 20, 24, .45);
  color: #fff;
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#vf-close {
  top: calc(env(safe-area-inset-top) + 12px);
  left: max(12px, env(safe-area-inset-left));
}

#vf-flip {
  top: calc(env(safe-area-inset-top) + 12px);
  right: max(12px, env(safe-area-inset-right));
}

#vf-time {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 118px);
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .06em;
  transform: translateX(-50%);
  text-shadow: 0 1px 4px #000;
}

#########NYTT VF
/* Live-kameran i fota-läget */
#vf-video {
    width: 100%;
    height: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover; /* <- Detta är nyckeln! Klipper bilden perfekt utan att den blir konstig. */
}

/* Bild/video som förhandsvisas innan den postas */
.preview {
    width: 100%;
    height: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover; /* <- Samma här! */
    border-radius: 12px; /* Om du vill ha snyggt rundade kanter som i en app */
}
###############SLUT

#vf-time:empty { display: none; }

.vf-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

#vf-gallery {
  position: static;
}

#vf-shot {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .25);
}

#vf-rec {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--chilli);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(255, 90, 60, .55);
}

#vf-rec.is-on {
  border-radius: 14px;
  animation: chill-rec-pulse 1s ease-in-out infinite;
}

@keyframes chill-rec-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 90, 60, .45); }
  50% { box-shadow: 0 0 32px rgba(255, 90, 60, .9); }
}

/* ChillOr Studio */
#studio {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
}

#studio[hidden] { display: none !important; }

.studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding:
    calc(10px + env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    10px
    max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}

.studio-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

#studio-close,
#studio-post {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
}

#studio-close {
  border: 1px solid var(--line);
  background: rgba(46, 230, 255, .06);
}

#studio-post {
  background: linear-gradient(180deg, #ff8a6a, var(--chilli) 60%, #d83a22);
  color: #fff;
}

.studio-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  background: #000;
}

#studio-canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.studio-filters {
  display: flex;
  gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  overflow-x: auto;
  scrollbar-width: none;
}

.studio-filters::-webkit-scrollbar { display: none; }

.studio-filters button {
  flex: none;
  min-width: 52px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(232, 251, 255, .2);
  border-radius: 999px;
  background: rgba(46, 230, 255, .06);
  font-size: 12px;
  font-weight: 800;
}

.studio-filters button.is-on {
  border-color: var(--chilli);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 90, 60, .35);
}

.studio-caption-wrap {
  display: block;
  padding: 0 max(14px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#studio-caption {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 6px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #041014;
  color: var(--ink);
}

/* Hot reward + fota pulse */
#hot-card {
  position: fixed;
  z-index: 38;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  top: calc(env(safe-area-inset-top) + 64px);
  padding: 14px 16px;
  border: 1px solid rgba(255, 90, 60, .7);
  border-radius: 18px;
  background: rgba(20, 6, 4, .92);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}

#hot-card strong {
  display: block;
  font-size: 20px;
}

#hot-card p {
  margin: 6px 0 12px;
  color: rgba(255, 255, 255, .84);
}

#hot-card button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-weight: 800;
}

#fota.is-alive {
  animation: chill-fota-glow 2.4s ease-in-out infinite;
}

#fota.is-hot-flash {
  animation: chill-fota-hot .5s ease-out 4;
}

@keyframes chill-fota-glow {
  0%, 100% {
    box-shadow:
      0 0 0 6px rgba(255, 90, 60, .16),
      0 0 28px 8px rgba(255, 90, 60, .35);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(255, 90, 60, .28),
      0 0 40px 12px rgba(255, 90, 60, .55);
  }
}

@keyframes chill-fota-hot {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.08); }
}

.story.is-hot img,
.pin-hot .pin-photo {
  border-color: var(--chilli);
  box-shadow: 0 0 14px rgba(255, 90, 60, .55);
}

#snap-prev,
#snap-next {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

#snap-prev { top: calc(env(safe-area-inset-top) + 56px); }
#snap-next { bottom: calc(env(safe-area-inset-bottom) + 120px); }

/* â€”â€” Hot reward card â€”â€” */
#hot-card {
  position: fixed;
  z-index: 8;
  top: calc(env(safe-area-inset-top) + 60px);
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 16px 12px;
  border: 1px solid rgba(255, 90, 60, .55);
  border-radius: 18px;
  background: rgba(7, 20, 24, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 0 0 1px rgba(255, 90, 60, .12),
    0 0 28px rgba(255, 90, 60, .28),
    0 12px 32px rgba(0, 0, 0, .4);
  pointer-events: auto;
}

#hot-card[hidden] { display: none !important; }

#hot-card strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 0 18px rgba(255, 90, 60, .55);
}

#hot-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

#hot-card button {
  align-self: flex-end;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(255, 90, 60, .35);
}

/* â€”â€” Snap vertical controls (swipe up/down) â€”â€” */
#snap-prev,
#snap-next {
  position: absolute;
  z-index: 3;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  border: 1px solid rgba(232, 251, 255, .18);
  border-radius: 50%;
  background: rgba(7, 20, 24, .45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transition: opacity 180ms ease;
}

#snap-prev[hidden],
#snap-next[hidden] {
  display: none !important;
}

#snap-prev { top: calc(env(safe-area-inset-top) + 56px); }
#snap-next { bottom: calc(env(safe-area-inset-bottom) + 120px); }

/* â€”â€” Camera viewfinder â€”â€” */
#viewfinder {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: flex;
  flex-direction: column;
  background: #000;
  touch-action: none;
}

#viewfinder[hidden] { display: none !important; }

#vf-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#vf-close,
#vf-flip {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top) + 12px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(7, 20, 24, .42);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}

#vf-close { left: max(12px, env(safe-area-inset-left)); }
#vf-flip { right: max(12px, env(safe-area-inset-right)); }

#vf-time {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top) + 18px);
  left: 50%;
  margin: 0;
  color: rgba(255, 255, 255, .85);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  transform: translateX(-50%);
  text-shadow: 0 1px 6px #000;
  pointer-events: none;
}

#vf-time:empty { display: none; }

.vf-bar {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 12px;
  padding:
    18px
    max(20px, env(safe-area-inset-right))
    calc(22px + env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
  background: linear-gradient(transparent, rgba(0, 0, 0, .72) 55%);
}

#vf-gallery {
  display: grid;
  place-items: center;
  min-width: 56px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  background: rgba(7, 20, 24, .4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

#vf-moves,
.vf-moves {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  height: 52px;
  padding: 4px 8px;
  border: 1px solid rgba(46, 230, 255, .35);
  border-radius: 16px;
  background: rgba(7, 28, 34, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e8fbff;
  box-shadow: 0 0 18px rgba(46, 230, 255, .12);
}
#vf-moves.is-on {
  border-color: #2ee6ff;
  background: rgba(46, 230, 255, .22);
}
.vf-moves-icon {
  font-size: 18px;
  line-height: 1;
}
.vf-moves-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
/* Chat composer capture: reuse Fota viewfinder, hide ChillMoves. */
#viewfinder.is-chat-capture #vf-moves {
  display: none;
}

#viewfinder.is-moves-pick .vf-bar,
#viewfinder.is-moves-pick #vf-flip,
#viewfinder.is-dance-pick .vf-bar,
#viewfinder.is-dance-pick #vf-flip {
  opacity: .35;
  pointer-events: none;
}
#viewfinder.is-dance-capture #vf-shot,
#viewfinder.is-dance-capture #vf-gallery,
#viewfinder.is-dance-ready #vf-shot,
#viewfinder.is-dance-ready #vf-gallery,
#viewfinder.is-dance-play #vf-shot,
#viewfinder.is-dance-play #vf-gallery,
#viewfinder.is-dance-rec #vf-shot,
#viewfinder.is-dance-rec #vf-gallery {
  opacity: .35;
  pointer-events: none;
}
#viewfinder.is-dance-ready .vf-bar,
#viewfinder.is-dance-play .vf-bar,
#viewfinder.is-dance-rec .vf-bar {
  z-index: 5;
}
/* Capture actions sit above the 10-move grid â€” keep above shutter bar so taps land. */
#viewfinder.is-dance-capture .vf-bar {
  z-index: 3;
  pointer-events: none;
}
#viewfinder.is-dance-capture #vf-rec {
  pointer-events: auto;
}
.dance-mode-link {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2ee6ff;
  font: 600 13px/1.3 Outfit, system-ui, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}
.dance-capture,
.dance-ready {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  padding:
    12px
    max(14px, env(safe-area-inset-right))
    calc(88px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, rgba(2, 10, 14, .92) 22%);
  color: #e8fbff;
  pointer-events: none;
}
.dance-capture > *,
.dance-ready > * {
  pointer-events: auto;
}
.dance-capture[hidden],
.dance-ready[hidden] { display: none !important; }
/* Under övning/rec: bara status + knappar (Stoppa), dölj pose-brädan. */
.dance-ready.is-playing .dance-ready-board,
.dance-ready.is-playing .dance-leaderboard,
.dance-ready.is-playing .dance-diff {
  display: none !important;
}
.dance-ready.is-playing {
  padding-top: 8px;
  background: linear-gradient(180deg, transparent, rgba(2, 10, 14, .88) 35%);
}
.dance-diff {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
  font: 600 13px/1.3 Outfit, system-ui, sans-serif;
  color: rgba(232, 251, 255, .85);
}
.dance-diff select {
  min-width: 7.5rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 255, .35);
  background: rgba(2, 10, 14, .85);
  color: #e8fbff;
  font: 650 13px/1.2 Outfit, system-ui, sans-serif;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #2ee6ff 50%),
    linear-gradient(135deg, #2ee6ff 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
#viewfinder.is-dance-play .dance-ready,
#viewfinder.is-dance-rec .dance-ready {
  z-index: 9;
}
.dance-capture-status {
  margin: 0 0 10px;
  font: 700 15px/1.3 Outfit, system-ui, sans-serif;
  text-align: center;
}
.dance-capture-actions {
  margin-bottom: 12px;
}
.dance-capture-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: 360px;
  margin: 0 auto;
}
.dance-picto-cell {
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: #000;
  color: rgba(255,255,255,.45);
  font: 700 14px Outfit, system-ui, sans-serif;
  padding: 0;
  overflow: hidden;
}
.dance-picto-cell.is-filled {
  border-color: #2ee6ff;
}
.dance-picto-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dance-capture-actions,
.dance-ready-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.dance-capture-btn,
.dance-capture-auto,
.dance-capture-done,
.dance-practice,
.dance-publish {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  min-height: 48px;
  min-width: 96px;
  font: 700 14px/1 Outfit, system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.dance-capture-btn {
  background: #2ee6ff;
  color: #041018;
}
.dance-capture-auto {
  background: rgba(46, 230, 255, .2);
  color: #2ee6ff;
  border: 1px solid rgba(46, 230, 255, .45);
}
.dance-capture-auto.is-on {
  background: #ffd54a;
  color: #1a1200;
  border-color: transparent;
}
.dance-capture-done,
.dance-practice {
  background: rgba(255,255,255,.14);
  color: #fff;
}
.dance-play {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  min-height: 48px;
  min-width: 112px;
  font: 700 14px/1 Outfit, system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: rgba(46, 230, 255, .92);
  color: #041014;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.dance-play[hidden] { display: none !important; }
.dance-publish {
  background: linear-gradient(120deg, #ffd54a, #ff9a3c);
  color: #1a1200;
}
.dance-ready-board {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 10px;
  padding-bottom: 4px;
}
.dance-ready-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #000;
  flex: 0 0 auto;
}
.dance-leaderboard {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.55);
  font: 600 13px/1.4 Outfit, system-ui, sans-serif;
  color: #e8fbff;
}
.dance-leaderboard[hidden] { display: none !important; }
.dance-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#viewfinder.is-dance-play .dance-canvas,
#viewfinder.is-dance-rec .dance-canvas {
  z-index: 6;
}
.dance-canvas[hidden] { display: none !important; }
#viewfinder.is-chat-capture #dance-pick,
#viewfinder.is-chat-capture #dance-capture,
#viewfinder.is-chat-capture #dance-ready,
#viewfinder.is-chat-capture #dance-canvas {
  display: none !important;
}
#viewfinder.is-moves-ready #vf-shot,
#viewfinder.is-moves-rec #vf-shot,
#viewfinder.is-moves-ready #vf-gallery,
#viewfinder.is-moves-rec #vf-gallery {
  opacity: .35;
  pointer-events: none;
}
/* Keep Rec / Moves above cue overlay so start/stop stays tappable */
#viewfinder.is-moves-ready .vf-bar,
#viewfinder.is-moves-rec .vf-bar {
  z-index: 4;
}

.moves-pick {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: rgba(2, 10, 14, .92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #e8fbff;
  padding:
    calc(env(safe-area-inset-top) + 12px)
    max(14px, env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}
.moves-pick[hidden] { display: none !important; }
.moves-pick-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.moves-pick-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #2ee6ff;
}
.moves-pick-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(232, 251, 255, .7);
}
#moves-close {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(7, 20, 24, .5);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.moves-loading {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 24px 0;
  font-size: 14px;
  font-weight: 700;
  color: #2ee6ff;
  animation: moves-pulse 1.2s ease-in-out infinite;
}
.moves-loading[hidden] { display: none !important; }
@keyframes moves-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}
.moves-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.moves-empty {
  margin: 24px 0 8px;
  text-align: center;
  color: rgba(232, 251, 255, .7);
  font-size: 13px;
}
.moves-retry {
  align-self: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .35);
  background: rgba(46, 230, 255, .12);
  color: #e8fbff;
  font-weight: 700;
}
.moves-track {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .16);
  background: rgba(4, 16, 20, .88);
}
.moves-track img,
.moves-note {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px;
  max-height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 28px;
  background: #0b141a;
}
.moves-note {
  display: grid;
  place-items: center;
  font-size: 14px;
}
.moves-track-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.moves-track-meta strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.moves-track-meta span {
  font-size: 10px;
  opacity: .7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.moves-play,
.moves-pick-btn {
  flex: none;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(46, 230, 255, .28);
  background: rgba(46, 230, 255, .1);
  color: #e8fbff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.moves-play {
  width: 40px;
  padding: 0;
}
.moves-play.is-on {
  background: rgba(46, 230, 255, .28);
  color: #041014;
}
.moves-pick-btn {
  padding: 0 12px;
  background: #2ee6ff;
  color: #041014;
  border-color: #2ee6ff;
}

.moves-cues {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(env(safe-area-inset-top) + 64px);
}
.moves-cues[hidden] { display: none !important; }
.moves-back {
  pointer-events: auto;
  align-self: flex-start;
  margin-left: max(12px, env(safe-area-inset-left));
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(7, 20, 24, .55);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.moves-done {
  display: none;
  pointer-events: auto;
  margin: 12px 0 132px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 2px solid #2ee6ff;
  background: rgba(46, 230, 255, .92);
  color: #041014;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}
#viewfinder.is-moves-rec .moves-done {
  display: grid;
  place-items: center;
}
#viewfinder.is-moves-rec .moves-back {
  opacity: .5;
  pointer-events: none;
}
.moves-cue-status {
  margin: 10px 16px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 1px 8px #000;
  max-width: 90%;
  pointer-events: none;
}
.moves-cue-board {
  margin-top: auto;
  margin-bottom: calc(156px + env(safe-area-inset-bottom));
  width: min(92vw, 360px);
  min-height: 140px;
  display: grid;
  grid-template-columns: minmax(72px, 22vw) 1fr;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 213, 74, .28);
  background: rgba(8, 6, 2, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  pointer-events: none;
  --moves-beat: 0;
}
/* Just Dance layout: soft dim, left pictogram rail, coach lower-right */
#viewfinder.is-moves-rec .moves-cue-board {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  width: auto;
  max-width: none;
  min-height: 0;
  border-radius: 0;
  border: none;
  background: rgba(4, 3, 1, .28);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  box-shadow: none;
  grid-template-columns: minmax(76px, 20vw) 1fr;
  align-items: stretch;
  gap: 0;
  padding:
    calc(env(safe-area-inset-top) + 56px)
    max(12px, env(safe-area-inset-right))
    calc(128px + env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
}
#viewfinder.is-moves-rec .moves-cue-status {
  display: none;
}
#viewfinder.is-moves-rec .moves-done {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: calc(118px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
}
#viewfinder.is-moves-rec .moves-track-chip,
#viewfinder.is-moves-count .moves-track-chip {
  display: none !important;
}

.moves-picto-rail {
  position: relative;
  height: min(62vh, 420px);
  align-self: center;
  width: 100%;
  max-width: 104px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 213, 74, .08), transparent 28%),
    rgba(0, 0, 0, .28);
  box-shadow: inset 0 0 0 1px rgba(255, 213, 74, .22);
  overflow: hidden;
}
.moves-picto-hit {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 72%;
  height: 3px;
  border-radius: 999px;
  background: #ffd54a;
  box-shadow: 0 0 12px rgba(255, 213, 74, .85), 0 0 0 4px rgba(255, 213, 74, .12);
  z-index: 2;
  pointer-events: none;
  transform-origin: 50% 50%;
}
.moves-picto-hit.is-beat-pulse {
  animation: moves-beat-pulse .18s ease-out;
}
.moves-cue-board.is-hit .moves-picto-hit {
  animation: moves-gold-hit .28s ease-out;
}
.moves-picto-list {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.moves-picto-slot {
  position: absolute;
  left: 50%;
  top: var(--picto-y, 20%);
  width: 78%;
  aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%) scale(var(--picto-scale, 1));
  transition: opacity .12s ease, filter .12s ease;
  will-change: top, transform;
}
.moves-picto-slot.is-lead {
  filter: drop-shadow(0 0 10px rgba(255, 213, 74, .55));
  z-index: 1;
}
.moves-picto-slot.is-lead.is-arriving {
  filter: drop-shadow(0 0 6px rgba(255, 213, 74, .35));
}
.moves-picto-slot.is-lead.is-onbeat {
  filter: drop-shadow(0 0 16px rgba(255, 224, 130, .9));
}
.moves-picto-slot.is-lead.is-exit {
  animation: moves-picto-exit .22s ease-out;
}
.moves-picto-slot.is-empty {
  visibility: hidden;
}
.moves-picto-canvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
@keyframes moves-beat-pulse {
  0% { transform: scaleX(.75); opacity: .55; }
  55% { transform: scaleX(1.2); opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}
@keyframes moves-picto-exit {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(var(--picto-scale, 1.05)); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.28); }
}
.moves-coach-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  padding-bottom: 4px;
  transform: translateY(var(--groove-y, 0px));
  will-change: transform;
}
#viewfinder.is-moves-rec .moves-coach-wrap {
  align-items: flex-end;
  padding-right: max(4px, env(safe-area-inset-right));
}
.moves-coach {
  display: block;
  width: min(42vw, 168px);
  height: min(30vh, 220px);
  opacity: .88;
  pointer-events: none;
  background: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
  transform-origin: 50% 85%;
}
#viewfinder.is-moves-rec .moves-coach {
  width: min(55vw, 280px);
  height: min(42vh, 340px);
  opacity: .85;
}
.moves-move-label {
  margin: 0;
  max-width: min(70vw, 320px);
  text-align: center;
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 800;
  letter-spacing: .04em;
  color: #ffe082;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.moves-move-label[data-hint]::after {
  content: attr(data-hint);
  display: block;
  margin-top: 0.2em;
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 246, 220, 0.88);
  white-space: normal;
  line-height: 1.25;
}
#viewfinder.is-moves-rec .moves-move-label {
  align-self: flex-end;
  text-align: right;
}

.moves-pose-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  mix-blend-mode: screen;
}
.moves-pose-overlay[hidden] { display: none !important; }

.moves-body-guide {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: max(12px, env(safe-area-inset-top)) 16px max(96px, env(safe-area-inset-bottom));
  pointer-events: none;
  color: rgba(255, 213, 74, 0.72);
  transition: opacity .35s ease;
}
.moves-body-guide[hidden] { display: none !important; }
.moves-body-guide.is-ok {
  opacity: 0;
}
.moves-body-guide-svg {
  width: min(42vw, 160px);
  height: auto;
  filter: drop-shadow(0 0 12px rgba(255, 213, 74, 0.35));
  animation: moves-guide-pulse 1.8s ease-in-out infinite;
}
.moves-body-guide.is-ok .moves-body-guide-svg {
  animation: none;
}
@keyframes moves-guide-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.98); }
  50% { opacity: 0.95; transform: scale(1.02); }
}
.moves-body-guide-tip {
  margin: 0;
  max-width: 16rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffe082;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  background: rgba(0, 0, 0, 0.42);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
}

.moves-pose-hud {
  position: absolute;
  z-index: 3;
  left: max(12px, env(safe-area-inset-left));
  top: calc(env(safe-area-inset-top) + 58px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: min(48vw, 180px);
  pointer-events: none;
}
.moves-pose-hud[hidden] { display: none !important; }
.moves-pose-board {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.65rem 0.4rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.62);
  color: #ffd54a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 213, 74, 0.22);
}
.moves-pose-points {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}
.moves-pose-points strong {
  font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.moves-pose-points span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
  color: #ffe082;
}
.moves-pose-stars {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #ff5fd2;
  line-height: 1.2;
}
.moves-pose-moves {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 246, 220, 0.72);
}
.moves-pose-score {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.55);
  color: var(--score-color, #ffe082);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.moves-pose-score strong {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.moves-pose-score span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.92;
}
.moves-pose-mode {
  margin-left: 0.25rem;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 213, 74, 0.18);
  color: #ffe082;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.moves-pose-parts {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.moves-pose-part {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.22rem 0.45rem;
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.48);
  color: var(--part-color, #e2e8f0);
  font-size: 0.68rem;
  font-weight: 700;
}
.moves-pose-part em {
  font-style: normal;
  opacity: 0.78;
  font-weight: 600;
}
.moves-cue-board.is-hit .moves-coach {
  animation: moves-coach-pulse .28s ease-out;
}
@keyframes moves-gold-hit {
  0% { transform: scaleX(.6); opacity: .5; box-shadow: 0 0 0 rgba(255, 213, 74, 0); }
  40% { transform: scaleX(1.15); opacity: 1; box-shadow: 0 0 28px rgba(255, 213, 74, .95); }
  100% { transform: scaleX(1); opacity: 1; box-shadow: 0 0 12px rgba(255, 213, 74, .85); }
}
@keyframes moves-coach-pulse {
  0% { transform: scale(.94); filter: drop-shadow(0 0 4px rgba(255, 213, 74, .2)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 22px rgba(255, 213, 74, .75)); }
  100% { transform: scale(1); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45)); }
}
.moves-track-chip {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(118px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 70vw;
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(7, 20, 24, .7);
  border: 1px solid rgba(46, 230, 255, .28);
  color: #e8fbff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.moves-track-chip[hidden] { display: none !important; }

.moves-countdown {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: rgba(2, 12, 16, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #2ee6ff;
  font-size: clamp(96px, 32vw, 180px);
  font-weight: 900;
  letter-spacing: .06em;
  text-shadow: 0 0 48px rgba(46, 230, 255, .55), 0 4px 24px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.moves-countdown[hidden] { display: none !important; }
.moves-countdown.is-pop {
  animation: moves-count-pop .65s ease-out;
}
@keyframes moves-count-pop {
  0% { transform: scale(.45); opacity: .35; }
  35% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
#viewfinder.is-moves-count .moves-cues {
  opacity: .35;
}

@media (prefers-reduced-motion: reduce) {
  .moves-loading { animation: none; }
  .moves-countdown.is-pop { animation: none; }
  .moves-cue-board.is-hit .moves-picto-hit,
  .moves-cue-board.is-hit .moves-coach,
  .moves-picto-hit.is-beat-pulse,
  .moves-picto-slot.is-lead.is-exit { animation: none; }
  .moves-picto-slot { transition: none; }
  .moves-coach { opacity: .92; }
}

#vf-shot {
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .35);
}

#vf-shot::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

#vf-shot:active::after { transform: scale(.88); }

#vf-rec {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 3px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 0;
}

#vf-rec::after {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--chilli);
  box-shadow: 0 0 16px rgba(255, 90, 60, .55);
  transition: border-radius .15s ease, width .15s ease, height .15s ease;
}

#vf-rec.is-on::after {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--chilli);
  animation: vf-rec-pulse 1.1s ease-in-out infinite;
}

@keyframes vf-rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 60, .55); }
  50% { box-shadow: 0 0 0 10px rgba(255, 90, 60, 0); }
}

@media (prefers-reduced-motion: reduce) {
  #vf-rec.is-on::after { animation: none; }
}

/* â€”â€” Edit studio â€”â€” */
#studio {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  background: #061014;
  color: var(--ink);
}

#studio[hidden] { display: none !important; }

.studio-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-height: 52px;
  padding:
    calc(env(safe-area-inset-top) + 8px)
    max(12px, env(safe-area-inset-right))
    10px
    max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(46, 230, 255, .12);
  background: rgba(4, 12, 16, .92);
}

.studio-head .studio-close,
.studio-head > button:first-of-type {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(232, 251, 255, .14);
  border-radius: 50%;
  background: rgba(7, 20, 24, .5);
  color: #fff;
  font-size: 18px;
}

.studio-head .studio-title,
.studio-head h2 {
  flex: 1;
  margin: 0;
  min-width: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-align: center;
}

.studio-head .studio-post,
.studio-head > button:last-of-type:not(:first-of-type) {
  flex: none;
  width: auto;
  min-width: 72px;
  min-height: 40px;
  height: auto;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8a6a, var(--chilli) 65%, #d83a22);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 90, 60, .35);
}

.studio-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(46, 230, 255, .06), transparent 70%),
    #030a0c;
  overflow: hidden;
}

.studio-stage canvas,
#studio-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}

.studio-filters {
  display: flex;
  flex: none;
  gap: 8px;
  padding: 10px max(14px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: pan-x;
  background: rgba(4, 12, 16, .88);
  border-top: 1px solid rgba(46, 230, 255, .1);
}

.studio-filters::-webkit-scrollbar { display: none; }

.studio-filters button {
  flex: none;
  height: auto;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(232, 251, 255, .16);
  border-radius: 14px;
  background: rgba(7, 20, 24, .55);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.studio-filters button.is-on {
  border-color: var(--chilli);
  background: rgba(255, 90, 60, .16);
  color: #fff;
  box-shadow: 0 0 14px rgba(255, 90, 60, .28);
}

#studio-caption {
  display: block;
  flex: none;
  width: 100%;
  height: 48px;
  margin: 0 0 env(safe-area-inset-bottom);
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border: 0;
  border-top: 1px solid rgba(46, 230, 255, .12);
  background: #041014;
  color: var(--ink);
  font-size: 15px;
}

#studio-caption::placeholder {
  color: var(--muted);
}

.studio-canvas-wrap {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: block;
  line-height: 0;
}

.studio-canvas-wrap #studio-canvas {
  display: block;
  max-width: min(100vw, 100%);
  max-height: min(52dvh, 58vh);
  width: auto;
  height: auto;
}

.studio-layer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: auto;
  touch-action: none;
  overflow: visible;
}

/* Säker zon för stickers/text — UI + kantklipp (syns vid redigering).
   Kalibrerad mot riktig snap-UI (X upptill, Du/meta/Dela nedtill) — inte för aggressiv. */
.studio-safe-guides {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  box-sizing: border-box;
  /* Tunna band ≈ snap-UI (X / Du+Dela) — studio är referens, inte brösthög crop. */
  --safe-t: 6%;
  --safe-b: 12%;
  --safe-x: 4%;
}
.studio-safe-guides[hidden] { display: none !important; }
.studio-safe-band {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, .42),
    rgba(0, 0, 0, .42) 6px,
    rgba(255, 90, 0, .16) 6px,
    rgba(255, 90, 0, .16) 12px
  );
  color: rgba(255, 255, 255, .88);
  font: 700 10px/1 Outfit, system-ui, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  overflow: hidden;
}
.studio-safe-band span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  white-space: nowrap;
}
.studio-safe-top {
  left: 0; right: 0; top: 0;
  height: var(--safe-t);
}
.studio-safe-bottom {
  left: 0; right: 0; bottom: 0;
  height: var(--safe-b);
}
.studio-safe-left {
  left: 0; top: var(--safe-t); bottom: var(--safe-b);
  width: var(--safe-x);
}
.studio-safe-right {
  right: 0; top: var(--safe-t); bottom: var(--safe-b);
  width: var(--safe-x);
}
.studio-safe-left span,
.studio-safe-right span { display: none; }
.studio-safe-frame {
  position: absolute;
  left: var(--safe-x);
  right: var(--safe-x);
  top: var(--safe-t);
  bottom: var(--safe-b);
  border: 1.5px dashed rgba(46, 230, 255, .6);
  box-shadow: inset 0 0 0 1px rgba(46, 230, 255, .12);
  border-radius: 2px;
}

.studio-float {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

.studio-float.sticker {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .55));
  z-index: 3;
}

.studio-float.sticker.is-lottie {
  font-size: 0;
  overflow: visible;
}

.studio-float.sticker.is-selected {
  z-index: 5;
}

.studio-float.is-selected {
  z-index: 5;
}

.studio-sticker-host {
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-sticker-host svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.studio-sticker-frame {
  position: absolute;
  inset: -4px;
  border: 2px solid transparent;
  border-radius: 10px;
  pointer-events: none;
  box-sizing: border-box;
}

.studio-float.is-selected .studio-sticker-frame {
  border-color: rgba(46, 230, 255, .85);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45);
}

.studio-sticker-del,
.studio-sticker-resize,
.studio-sticker-rotate {
  position: absolute;
  z-index: 4;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(46, 230, 255, .9);
  border-radius: 50%;
  background: #061014;
  color: #2ee6ff;
  font-size: 11px;
  line-height: 1;
  display: none;
  place-items: center;
  padding: 0;
  cursor: pointer;
  touch-action: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}

.studio-float.is-selected .studio-sticker-del,
.studio-float.is-selected .studio-sticker-resize,
.studio-float.is-selected .studio-sticker-rotate {
  display: grid;
}

.studio-sticker-del {
  top: -10px;
  left: -10px;
  border-color: rgba(255, 90, 60, .9);
  color: #ff6b4a;
  font-size: 14px;
}

.studio-sticker-resize {
  right: -10px;
  bottom: -10px;
  cursor: nwse-resize;
}

.studio-sticker-rotate {
  top: -10px;
  right: -10px;
}

.studio-float.text {
  max-width: 86%;
  min-width: 48px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .35);
  color: #00e5ff;
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
  z-index: 20;
  box-shadow: inset 0 0 0 0 transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.studio-float.text.is-selected {
  z-index: 21;
}

.studio-float.text.is-frame {
  width: 42%;
  max-width: 92%;
  min-width: 120px;
  aspect-ratio: 1 / 1.414; /* fallback; resize sätter bredd/höjd fritt */
  height: auto;
  max-height: 70%;
  padding: 7% 8%;
  border-radius: 14px;
  background: rgba(248, 252, 255, .55);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  white-space: normal;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.studio-float.text.is-frame .studio-text-label {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.28;
  width: 100%;
  text-align: left;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 14;
}

.studio-float.text .studio-text-label {
  pointer-events: none;
  display: block;
}

/* Studio text chips/fonts/colors reuse Quick Cut (.qc-*) styles */
#studio-caption.studio-caption-frame,
#studio-caption[data-frame="frost"] {
  min-height: 72px;
  max-height: 120px;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.35;
}
.studio-link-row {
  margin: 0 0 8px;
}
.studio-link-url {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(8, 18, 24, .72);
  color: #e8fbff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
}
.studio-link-url::placeholder {
  color: rgba(232, 251, 255, .4);
}
#studio-text-panel.is-linking #studio-fonts,
#studio-text-panel.is-linking .studio-color-row {
  display: none;
}
.studio-float.text.is-link {
  white-space: nowrap;
  padding: 0.55em 1.15em;
  border-radius: 999px;
  background: rgba(8, 18, 24, .82);
  border: 1.5px solid rgba(46, 230, 255, .65);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #e8fbff;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: none;
}
.studio-float.text.is-link .studio-text-label {
  white-space: nowrap;
}

.studio-float.text.is-selected {
  box-shadow: inset 0 0 0 2px rgba(46, 230, 255, .9);
}

.studio-float.text.is-selected .studio-sticker-frame {
  inset: -6px;
}

.studio-sticker-chrome {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
}

.studio-sticker-tabs {
  display: flex;
  gap: 6px;
}

.studio-sticker-tab {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(232, 251, 255, .14);
  background: rgba(7, 20, 24, .45);
  color: rgba(232, 251, 255, .72);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.studio-sticker-tab.is-on {
  background: rgba(0, 229, 255, .16);
  border-color: rgba(0, 229, 255, .45);
  color: #e8fbff;
}

.studio-sticker-search {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(232, 251, 255, .14);
  background: rgba(7, 20, 24, .55);
  color: #e8fbff;
  font-size: 14px;
  padding: 9px 12px;
}

.studio-stickers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  max-height: min(42vh, 320px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
  scrollbar-width: thin;
}

.studio-stickers-empty {
  margin: 0;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.studio-sticker-more {
  margin: 4px max(12px, env(safe-area-inset-right)) 2px max(12px, env(safe-area-inset-left));
  border-radius: 12px;
  border: 1px solid rgba(232, 251, 255, .16);
  background: rgba(0, 229, 255, .1);
  color: #e8fbff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}

.studio-sticker-info {
  margin: 0;
  padding: 0 max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.studio-sticker-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 78px;
  border-radius: 14px;
  border: 1px solid rgba(232, 251, 255, .16);
  background: rgba(7, 20, 24, .55);
  font-size: 22px;
  line-height: 1;
  padding: 6px 4px 5px;
  overflow: hidden;
  color: #e8fbff;
}

.studio-sticker-btn.is-loading {
  opacity: .55;
  pointer-events: none;
}

.studio-sticker-btn.is-lottie .studio-sticker-thumb {
  width: 56px;
  height: 56px;
}

.studio-sticker-btn.is-lottie .studio-sticker-thumb svg {
  width: 100% !important;
  height: 100% !important;
}

.studio-sticker-btn.is-fallback,
.studio-sticker-btn.is-emoji {
  font-size: 28px;
  font-weight: 700;
  color: #7adfff;
}

.studio-sticker-btn.is-emoji {
  color: inherit;
}

.studio-sticker-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  pointer-events: none;
}

.studio-sticker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.studio-sticker-thumb svg {
  width: 100% !important;
  height: 100% !important;
}

.studio-sticker-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .01em;
  color: rgba(232, 251, 255, .7);
  pointer-events: none;
}

.studio-tools {
  flex: none;
  padding: 0 max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}

.studio-text-compose {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.studio-text-compose #studio-caption {
  flex: 1;
  min-width: 0;
}

.studio-text-add,
#studio-text-add.studio-text-add {
  flex: none;
  min-width: 48px;
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.studio-font-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 8px;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.studio-font-strip::-webkit-scrollbar { display: none; }

.studio-font-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 68px;
  min-height: 64px;
  margin: 0;
  padding: 8px 4px 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}

.studio-font-chip-sample {
  font-size: 22px;
  line-height: 1;
  letter-spacing: .02em;
}

.studio-font-chip small {
  font-size: 9px;
  font-weight: 600;
  opacity: .62;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Outfit, system-ui, sans-serif;
}

.studio-font-chip.is-on {
  background: #fff;
  color: #111;
}

.studio-font-chip.is-on small {
  opacity: .7;
  color: #111;
}

.studio-font-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.studio-font-row select {
  flex: 1 1 140px;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #041014;
  color: var(--text);
}

.studio-font-row input[type="color"] {
  width: 40px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #041014;
}

.studio-size-wrap {
  display: none;
}

.studio-text-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.studio-text-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
}

.studio-text-actions button {
  height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #041014;
  color: var(--text);
  font: 700 13px Outfit, system-ui, sans-serif;
}

.studio-text-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.studio-tools .studio-caption-wrap {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.studio-tools #studio-caption {
  margin-top: 6px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  border-top: 1px solid var(--line);
  background: #041014;
  width: 100%;
}

/* MangO list â€” social crew board */
.add-mango-card {
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 176, 32, .4);
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 176, 32, .22), transparent 55%),
    linear-gradient(165deg, rgba(255, 176, 32, .1), rgba(7, 20, 24, .55));
}

.add-mango-title {
  margin: 0;
  color: var(--mango);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
}

.add-mango-blurb {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.mango-invite-card {
  border-color: rgba(46, 230, 255, .32);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(46, 230, 255, .14), transparent 55%),
    linear-gradient(165deg, rgba(46, 230, 255, .08), rgba(7, 20, 24, .55));
}

.mango-invite-card .add-mango-title {
  color: #7eecff;
}

.mango-invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mango-invite-code {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(46, 230, 255, .28);
  color: #e8fbff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .14em;
  text-align: center;
}

.mango-invite-copy {
  flex: none;
  padding: 10px 14px;
  border: 1px solid rgba(46, 230, 255, .35);
  border-radius: 12px;
  background: rgba(46, 230, 255, .14);
  color: #e8fbff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}

.mango-invite-copy:active:not(:disabled):not(.is-copied) {
  transform: scale(.96);
}

.mango-invite-copy.is-copied,
#sheet-body .profile-cat-body > button.is-copied,
.profile-cat-body > button.is-copied {
  border-color: rgba(80, 220, 140, .55) !important;
  background: rgba(60, 200, 120, .22) !important;
  color: #b8ffd4 !important;
  opacity: 1 !important;
  cursor: default;
}

.mango-invite-copy:disabled:not(.is-copied) {
  opacity: .45;
  cursor: default;
}

.mango-summary {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 176, 32, .1);
  color: #ffd27a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

.mango-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding: 22px 16px;
  border: 1px dashed rgba(255, 176, 32, .35);
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 176, 32, .06);
}

.mango-empty strong {
  color: var(--mango);
  font-size: 15px;
}

.mango-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.mango-fold {
  margin: 0 0 12px;
  border: 1px solid rgba(46, 230, 255, .2);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(18, 48, 56, .88), rgba(7, 20, 24, .82));
  overflow: hidden;
}

#sheet-body .mango-fold-head,
.mango-fold-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin: 0 !important;
  padding: 12px 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left;
  color: inherit;
  box-sizing: border-box;
}

.mango-fold-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mango-fold-copy b {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.mango-fold-copy small {
  color: rgba(255, 255, 255, .55);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.mango-fold-chev {
  flex: none;
  color: rgba(46, 230, 255, .55);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: transform .18s ease;
}

.mango-fold.is-open .mango-fold-chev {
  transform: rotate(90deg);
}

.mango-fold-body {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(46, 230, 255, .12);
}

.mango-fold-body .add-mango-card,
.mango-fold-body .mango-invite-card {
  margin-top: 10px;
}

.mango-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mango-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(46, 230, 255, .22);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(18, 48, 56, .95), rgba(7, 20, 24, .88));
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

/* MangOs-lista: samma lätta radstil som Meddelanden (wa-convo). */
.mango-list .mango-card,
.mango-list .mango-group-card {
  gap: 12px;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}

.mango-list .mango-card.is-unread {
  border-color: transparent;
  border-bottom-color: rgba(255, 255, 255, .06);
  background: rgba(255, 176, 32, .1);
}

.mango-list .mango-card.has-chilli .mango-avatar {
  box-shadow:
    0 0 0 2px rgba(255, 90, 60, .35),
    0 0 10px rgba(255, 176, 32, .2);
}

.mango-list .mango-card.is-online .mango-avatar {
  box-shadow:
    0 0 0 2px rgba(61, 220, 132, .4),
    0 0 10px rgba(61, 220, 132, .18);
}

.mango-list .mango-group-list {
  gap: 0;
}

.mango-card.is-compact,
.mango-group-card.is-compact {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border-radius: 18px;
}

.mango-list .mango-card.is-compact,
.mango-list .mango-group-card.is-compact {
  padding: 10px 8px;
  border-radius: 14px;
}

#sheet-body .mango-main,
.mango-main,
#sheet-body .mango-group-main,
.mango-group-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left;
  color: inherit;
  box-shadow: none !important;
  cursor: pointer;
}

.mango-rail {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mango-rail .mango-act {
  flex: 0 0 auto !important;
}

.mango-more {
  flex: 1 1 100%;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(46, 230, 255, .12);
}

#sheet-body .mango-act-more,
.mango-act-more {
  flex: 0 0 auto !important;
  width: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.mango-card.is-compact .mango-avatar {
  flex: 0 0 48px;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  font-size: 18px;
}

.mango-card.is-unread {
  border-color: rgba(255, 176, 32, .55);
  background: linear-gradient(165deg, rgba(52, 38, 12, .7), rgba(7, 20, 24, .9));
}

.mango-card.has-chilli .mango-avatar {
  box-shadow:
    0 0 0 3px rgba(255, 90, 60, .4),
    0 0 18px rgba(255, 176, 32, .35);
}

.mango-card.is-online .mango-avatar {
  border-color: #3ddc84;
  box-shadow:
    0 0 0 2px rgba(61, 220, 132, .45),
    0 0 16px hsla(var(--mango-hue), 80%, 50%, .28);
}

.mango-status {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(232, 251, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mango-status.is-online {
  color: rgba(61, 220, 132, 0.95);
}

#sheet-body .mango-avatar,
.mango-avatar {
  --mango-hue: 36;
  box-sizing: border-box;
  flex: 0 0 64px;
  width: 64px !important;
  height: 64px !important;
  min-width: 64px;
  min-height: 64px;
  max-width: 64px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 2px solid hsl(var(--mango-hue), 78%, 58%);
  background:
    radial-gradient(circle at 32% 28%, hsl(var(--mango-hue), 70%, 52%), transparent 42%),
    radial-gradient(circle at 70% 80%, #0d2830, #071418 75%);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 0 16px hsla(var(--mango-hue), 80%, 50%, .28);
  display: grid;
  place-items: center;
}

.mango-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mango-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.mango-top b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.mango-top time {
  flex: none;
  color: rgba(232, 251, 255, .55);
  font-size: 12px;
  font-weight: 700;
}

.mango-preview {
  margin: 0;
  overflow: hidden;
  color: rgba(232, 251, 255, .78);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mango-card.is-unread .mango-preview {
  color: #ffe6b0;
}

.mango-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#sheet-body .mango-act,
.mango-act {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(46, 230, 255, .28);
  background: rgba(4, 16, 20, .75) !important;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.mango-act-chilli.is-live {
  border-color: rgba(255, 90, 60, .55);
  color: #ffb8a8;
}

.mango-act-chat {
  border-color: rgba(255, 176, 32, .55) !important;
  color: var(--mango) !important;
  background: rgba(255, 176, 32, .12) !important;
}

.mango-act-block {
  border-color: rgba(255, 120, 90, .4) !important;
  color: #ffc4b0 !important;
  background: rgba(255, 80, 50, .1) !important;
}

.mango-act-report {
  flex: 0 0 auto !important;
  min-width: 40px !important;
  width: 40px !important;
  padding: 0 !important;
  border-color: rgba(255, 90, 60, .25) !important;
  color: rgba(255, 176, 160, .75) !important;
  background: transparent !important;
  font-size: 16px;
}

.mango-requests,
.mango-blocked {
  margin: 0 0 16px;
}

.mango-request-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 14px;
}

.mango-request-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 176, 32, .28);
  border-radius: 16px;
  background: rgba(255, 176, 32, .08);
}

.mango-request-card.is-pending {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04);
}

.mango-request-card .mango-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mango-request-card b {
  display: block;
  font-size: 15px;
}

.mango-request-card .mango-preview {
  margin: 2px 0 0;
}

.mango-card > .unread {
  position: absolute;
  top: 10px;
  right: 10px;
}

#sheet-body .avatar,
.avatar {
  overflow: hidden;
}

.avatar img.avatar-img,
.avatar.has-photo {
  overflow: hidden;
  padding: 0 !important;
  font-size: 0 !important;
}

.avatar img.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
}

.mango-section-title {
  margin: 4px 0 8px;
  color: var(--mango);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mango-groups {
  margin: 0 0 18px;
}

.mango-groups-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mango-groups-head .mango-section-title {
  margin: 0;
}

.mango-groups-head .mango-act {
  flex: none;
  min-height: 32px;
  padding: 0 12px;
}

.mango-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mango-group-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 14px;
  border: 1px solid rgba(46, 230, 255, .22);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(18, 48, 56, .9), rgba(7, 20, 24, .85));
}

.mango-group-top {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}

.mango-group-card.is-compact .mango-group-avatar {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.mango-group-card .mango-rail .league-open-btn {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  font-size: 12px;
}

.mango-group-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0d2830;
  border: 1px solid rgba(46, 230, 255, .28);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

.mango-group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mango-group-body {
  min-width: 0;
}

.mango-group-card b {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.mango-group-card .mango-actions {
  margin-top: 0;
}

.mango-group-card.is-compact .mango-actions.mango-more {
  margin-top: 2px;
}

.mango-group-card .mango-act-report {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 72px !important;
  padding: 0 12px !important;
  font-size: 13px;
}

.create-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow: auto;
}

.create-group form {
  gap: 12px;
}

.create-group-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.create-group-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.create-group input[type="text"] {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(46, 230, 255, .28);
  border-radius: 14px;
  background: rgba(4, 16, 20, .95);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-sizing: border-box;
}

.create-group input[type="text"]::placeholder {
  color: rgba(180, 220, 230, .45);
  font-weight: 600;
}

.create-group-map {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(46, 230, 255, .22);
  background: linear-gradient(160deg, rgba(18, 48, 56, .85), rgba(7, 20, 24, .9));
  color: #e8fbff;
  cursor: pointer;
  user-select: none;
}

.create-group-map-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.create-group-map-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.create-group-map-copy small {
  color: rgba(180, 220, 230, .72);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.create-group-map input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 46px !important;
  height: 28px !important;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .14) !important;
  cursor: pointer;
  transition: background .15s ease;
}

.create-group-map input::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}

.create-group-map input:checked {
  background: var(--cyan) !important;
}

.create-group-map input:checked::after {
  transform: translateX(18px);
}

.create-group-pick-title {
  margin: 4px 0 0;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.create-group-pick-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.create-group-members {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 2px;
  max-height: min(42dvh, 360px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.create-group-row {
  display: grid;
  grid-template-columns: 44px 1fr 22px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(7, 20, 24, .78);
  border: 1px solid rgba(46, 230, 255, .14);
  cursor: pointer;
  user-select: none;
  transition: border-color .12s ease, background .12s ease;
}

.create-group-row:has(input:checked) {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .1);
}

.create-group-row .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0d2830;
  border: 1px solid var(--line);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.create-group-row .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-group-row .who {
  min-width: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-group-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px !important;
  height: 22px !important;
  margin: 0;
  padding: 0 !important;
  border: 2px solid rgba(46, 230, 255, .45) !important;
  border-radius: 7px !important;
  background: rgba(0, 0, 0, .25) !important;
  cursor: pointer;
  position: relative;
}

.create-group-row input[type="checkbox"]:checked {
  background: var(--cyan) !important;
  border-color: var(--cyan) !important;
}

.create-group-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #041014;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.create-group-empty {
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(46, 230, 255, .25);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.create-group button[type="submit"] {
  margin-top: 4px;
  background: rgba(46, 230, 255, .16) !important;
  border-color: rgba(46, 230, 255, .45) !important;
  color: #e8fbff !important;
  font-weight: 800 !important;
}

.chat.group-members {
  gap: 12px;
}

.group-manage-hero {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex: none;
  margin: 0 0 4px;
}

.group-manage-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.group-manage-avatar {
  box-sizing: border-box;
  width: 96px !important;
  height: 96px !important;
  min-width: 96px !important;
  min-height: 96px !important;
  max-width: 96px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 176, 32, .45) !important;
  background: #0d2830 !important;
  color: #fff !important;
  font-size: 32px;
  font-weight: 800;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: none !important;
}

.group-manage-avatar.is-editable {
  cursor: pointer;
}

.group-manage-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-manage-avatar-cta {
  width: auto !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 176, 32, .45) !important;
  background: rgba(255, 176, 32, .12) !important;
  color: var(--mango) !important;
  font-size: 13px;
  font-weight: 800;
  flex: none !important;
}

.group-manage-hint {
  margin: 0;
  text-align: center;
}

.group-manage-tools {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex: none;
}

.group-manage-add {
  width: auto !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 176, 32, .55) !important;
  background: rgba(255, 176, 32, .14) !important;
  color: var(--mango) !important;
  font-size: 14px;
  font-weight: 800;
  flex: none !important;
}

.group-member-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  flex: none;
}

.group-member-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(46, 230, 255, .18);
  border-radius: 16px;
  background: rgba(7, 20, 24, .72);
}

.group-member-row .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #0d2830;
  border: 1px solid var(--line);
  font-weight: 800;
}

.group-member-row .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.group-member-row b {
  display: block;
  color: #fff;
  font-size: 15px;
}

.group-member-row .mango-preview {
  margin: 2px 0 0;
}

.group-member-row .mango-act {
  flex: none !important;
  min-width: 72px;
}

.profile-sheet .profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
}

#sheet-body .profile-avatar,
.profile-avatar {
  box-sizing: border-box;
  width: 112px !important;
  height: 112px !important;
  min-width: 112px;
  min-height: 112px;
  max-width: 112px;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 3px solid var(--mango);
  background: radial-gradient(circle at 30% 30%, #3a2a12, #0d2830 70%);
  color: #fff;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(255, 176, 32, .28);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.profile-avatar-hint {
  margin: 0;
  color: rgba(232, 251, 255, .75);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.profile-avatar-cta {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 32, .45);
  background: rgba(255, 176, 32, .12);
  color: var(--mango);
  font-size: 13px;
  font-weight: 800;
}

.admin-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 28px;
  color: #f4fbfe;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.admin-sheet .admin-section-title {
  margin: 8px 0 0;
  padding: 0 2px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
}

.admin-sheet .empty {
  margin: 0;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(46, 230, 255, .28);
  background: rgba(4, 16, 20, .55);
  color: #e8fbff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.admin-sheet .list-hint {
  margin: 0 0 12px !important;
  color: rgba(244, 251, 254, .9) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  text-shadow: none;
}

.admin-sheet .admin-report {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(255, 176, 32, .4);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 48, 56, .98), rgba(8, 24, 30, .99));
  color: #f4fbfe;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}

.admin-sheet .admin-report strong {
  display: block;
  margin-bottom: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  word-break: break-word;
}

.admin-sheet .admin-report-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.admin-sheet .admin-report-meta p,
.admin-sheet .admin-report p {
  margin: 0;
  color: #e8f6fa;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.admin-sheet .admin-report-meta .admin-meta-label {
  display: block;
  margin-bottom: 2px;
  color: rgba(46, 230, 255, .9);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-sheet .admin-report-media {
  position: relative;
  margin: 0 0 14px;
  border-radius: 14px;
  overflow: hidden;
  background: #031014;
  border: 1px solid rgba(46, 230, 255, .22);
}

.admin-sheet .admin-report-thumb {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #031014;
}

.admin-sheet .admin-report-thumb.is-broken {
  min-height: 120px;
  object-fit: none;
  padding: 24px;
  color: rgba(238, 248, 251, .75);
  font-size: 14px;
}

.admin-sheet .admin-report-video {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #000;
  margin-top: 0;
}

.admin-sheet .admin-report-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 90, 60, .95);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}

.admin-sheet .admin-report-play {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 12px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(46, 230, 255, .18) !important;
  color: #e8fbff !important;
  border: 1px solid rgba(46, 230, 255, .4);
  font-weight: 800;
}

.admin-sheet .admin-report-avatar {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
  margin: 0 0 14px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  border: 2px solid rgba(46, 230, 255, .35);
}

.admin-sheet .admin-report button,
.admin-pick button {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .35);
  background: rgba(46, 230, 255, .18);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .08s ease, box-shadow .12s ease;
}
.admin-sheet .admin-report button:hover,
.admin-pick button:hover {
  background: rgba(46, 230, 255, .28);
  border-color: rgba(46, 230, 255, .55);
  color: #fff;
}
.admin-sheet .admin-report button:active,
.admin-pick button:active {
  background: rgba(46, 230, 255, .4);
  border-color: #2ee6ff;
  color: #fff;
  transform: scale(.985);
  box-shadow: inset 0 0 0 1px rgba(46, 230, 255, .4);
}
.admin-search-form button,
.admin-user-row > button {
  color: #fff;
}

.admin-pick {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(46, 230, 255, .22);
  border-radius: 16px;
  background: rgba(6, 22, 28, .92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

.admin-pick h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: #fff;
}

.admin-pick-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(255, 255, 255, .06);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #f4fbfe;
  word-break: break-word;
}

.admin-pick-row input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.admin-search-form {
  display: flex;
  gap: 8px;
  margin: 10px 0 8px;
}

.admin-search-form input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .28);
  color: #f4fbfe;
  font-size: 15px;
}

.admin-search-form button {
  flex: 0 0 auto;
}

.admin-search-results {
  margin-top: 6px;
}

.admin-user-row {
  justify-content: space-between;
  align-items: center;
}

.admin-user-row > span {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-user-row > button {
  flex: 0 0 auto;
}

.admin-admin-list {
  margin: 8px 0 4px;
}

.tavla-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.tavla-media img,
.tavla-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-float.text.is-frame.has-tavla-media,
.qc-float.text.is-frame.has-tavla-media,
.gallery-overlay-text.is-frame.has-tavla-media {
  /* keep position:absolute from .studio-float / .qc-float */
  overflow: hidden;
}

.studio-float.text.is-frame.has-tavla-media .studio-text-label,
.studio-float.text.is-frame.has-tavla-media [data-role="label"],
.qc-float.text.is-frame.has-tavla-media [data-role="label"],
.gallery-overlay-text.is-frame.has-tavla-media [data-role="label"] {
  position: relative;
  z-index: 1;
}

.studio-tavla-media,
.qc-tavla-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 4px;
}

.studio-tavla-media[hidden],
.qc-tavla-media[hidden] {
  display: none !important;
}

.profile-admin-entry {
  width: 100%;
  margin: 0 0 14px;
  font-weight: 800;
}

.admin-limits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 12px 0 14px;
}

@media (min-width: 420px) {
  .admin-limits-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-limits-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #e8f6fa;
}

.admin-limits-field span {
  line-height: 1.35;
  word-break: break-word;
}

.admin-limits-field input {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(46, 230, 255, .35);
  background: #041014;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}

.admin-games-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 14px;
}

.admin-game-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .18);
  background: rgba(0, 0, 0, .28);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #f4fbfe;
  cursor: pointer;
  word-break: break-word;
}

.admin-game-toggle input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: #2ee6ff;
}

.admin-pick > button.profile-danger {
  background: rgba(255, 90, 60, .22);
  color: #fff;
  border: 1px solid rgba(255, 90, 60, .55);
}
.admin-pick > button.profile-danger:hover {
  background: rgba(255, 90, 60, .34);
  border-color: rgba(255, 120, 90, .75);
  color: #fff;
}
.admin-pick > button.profile-danger:active {
  background: rgba(255, 90, 60, .48);
  border-color: #ff6a3a;
  color: #fff;
  transform: scale(.985);
  box-shadow: inset 0 0 0 1px rgba(255, 160, 130, .35);
}

.studio-audience {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.studio-audience label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.studio-audience select {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #041014;
  color: var(--ink);
  font: inherit;
}

/* Anmäl längst till höger i action-raden (skild från Heat/Följ/MangO). */
#snap-report {
  flex: 0 0 auto;
  margin-left: auto;
  color: #ffb0a0;
}

/* ChillOr thread composer */
#sheet.is-thread .composer,
.wa-composer {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  /* Bleed bg into #sheet padding, but keep controls inside the overflow clip. */
  margin: 0 -14px;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 24, 30, .96);
  border-top: 1px solid rgba(46, 230, 255, .12);
  overflow: visible;
}

.composer-tools {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  flex: none;
  align-self: flex-start;
  overflow: visible;
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

#sheet.is-chat .composer button.composer-icon,
.composer-icon {
  flex: none !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(46, 230, 255, .22) !important;
  background: rgba(46, 230, 255, .08) !important;
  color: var(--cyan) !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.composer-icon.is-ready {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .18);
  color: #fff;
}

.composer-attach-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  padding: 6px;
  border-radius: 12px;
  background: #0c2228;
  border: 1px solid rgba(46, 230, 255, .18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  z-index: 40;
}

.composer-attach-menu[hidden] {
  display: none !important;
}

#sheet.is-chat .composer-attach-menu button,
.composer-attach-menu button {
  flex: none !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #2a3942 !important;
  color: #e9edef !important;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  line-height: 1.2;
}

.wa-composer .composer-row input[type="text"],
.wa-composer input[type="text"],
.wa-composer .composer-text,
#sheet.is-chat .composer textarea.composer-text,
#sheet.is-chat .composer .composer-text {
  flex: 1;
  min-width: 0;
  width: auto !important;
  min-height: 42px !important;
  height: 42px;
  max-height: 32vh;
  margin: 0 !important;
  border-radius: 21px !important;
  border: 0 !important;
  background: #2a3942 !important;
  color: #e9edef;
  padding: 10px 16px !important;
  resize: none;
  overflow-y: hidden;
  line-height: 1.35;
  font: inherit;
  box-sizing: border-box;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
  white-space: pre-wrap;
  word-break: break-word;
}
.wa-composer .composer-text.is-empty::before,
#sheet.is-chat .composer .composer-text.is-empty::before {
  content: attr(data-placeholder);
  color: rgba(233, 237, 239, .45);
  pointer-events: none;
}

#sheet.is-thread .composer button.composer-send,
.composer-send {
  flex: none !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #3aefff, var(--cyan) 55%, #1ab8cc) !important;
  color: #041014 !important;
  display: grid;
  place-items: center;
}

.composer-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -14px;
  padding: 8px 12px;
  background: rgba(8, 24, 30, .96);
  border-top: 1px solid rgba(46, 230, 255, .1);
}

.composer-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

.composer-preview-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
}

.composer-preview-clear {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #2a3942 !important;
  color: #e9edef !important;
}

.wa-inbox .convo-row,
.wa-convo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  border-radius: 14px;
  background: transparent;
  text-align: left;
}

/* Oläst: stilla markering — ingen blinkande ram. */
.wa-convo.is-unread {
  background: rgba(0, 229, 255, .06);
}

.wa-convo .convo-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.wa-convo .convo-top time {
  flex: none;
  margin-left: auto;
  color: #8696a0;
  font-size: 12px;
  font-weight: 700;
}

.wa-convo.is-unread .convo-top time {
  color: var(--mango);
}

.wa-convo .who {
  flex: 1;
  min-width: 0;
}

.wa-convo .who b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #e9edef;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wa-convo .who small {
  display: block;
  overflow: hidden;
  color: #8696a0;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wa-convo .who small.is-unread {
  color: #ffe6b0;
  font-weight: 700;
}

.wa-convo .avatar {
  flex: none;
  width: 49px;
  height: 49px;
  background: #6a7175;
  border: 0;
  color: #fff;
}

.wa-convo > .unread {
  flex: none;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}
/* ChillOr Cut zoomblur (viewer + studio preview) */
.chillor-cut-zoomblur-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 80;
  transform: translateZ(0);
}

.chillor-cut-zoomblur-out,
.chillor-cut-zoomblur-in {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ändrat till cover för sömlösa Reel-klipp */
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
}

/* OUT / IN — mjuk ease-in-out, mindre zoom/blur */
.chillor-cut-zoomblur-out {
  transition:
    opacity var(--duration, 750ms) cubic-bezier(0.4, 0, 0.2, 1),
    transform var(--duration, 750ms) cubic-bezier(0.4, 0, 0.2, 1),
    filter var(--duration, 750ms) cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.chillor-cut-zoomblur-in {
  transition:
    opacity var(--duration, 750ms) cubic-bezier(0.4, 0, 0.2, 1),
    transform var(--duration, 750ms) cubic-bezier(0.4, 0, 0.2, 1),
    filter var(--duration, 750ms) cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(1.08);
  filter: blur(8px);
}

.chillor-cut-zoomblur-layer--intro .chillor-cut-zoomblur-out {
  display: none;
}

.chillor-cut-zoomblur-layer--intro .chillor-cut-zoomblur-in {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(8px);
}

.chillor-cut-zoomblur-layer--run .chillor-cut-zoomblur-out {
  opacity: 0;
  transform: scale(0.94);
  filter: blur(8px);
}

.chillor-cut-zoomblur-layer--run .chillor-cut-zoomblur-in {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

@media (hover: none) and (pointer: coarse) {
  .chillor-cut-zoomblur-in {
    filter: blur(5px);
  }
  .chillor-cut-zoomblur-layer--intro .chillor-cut-zoomblur-in {
    filter: blur(5px);
  }
  .chillor-cut-zoomblur-layer--run .chillor-cut-zoomblur-out {
    filter: blur(5px);
  }
}



#snap-cut-progress {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 12px;
  right: 12px;
  z-index: 8;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

#snap-cut-progress[hidden] {
  display: none !important;
}

.snap-cut-seg {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
}

.snap-cut-seg > i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: inherit;
}

.snap-cut-seg.is-done > i {
  width: 100%;
}

.snap-cut-seg.is-on > i {
  width: 100%;
  animation: snapCutFill var(--cut-ms, 700ms) linear forwards;
}

@keyframes snapCutFill {
  from { width: 0; }
  to { width: 100%; }
}


/* ===== Snapchat-like ChillOr Studio (overrides) ===== */
#studio {
  display: flex !important;
  flex-direction: column !important;
  background: #000 !important;
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  height: 100% !important;
}
#studio .studio-stage {
  position: relative !important;
  flex: 1 1 auto !important;
  inset: auto !important;
  min-height: 58dvh !important;
  width: 100% !important;
  padding: 0 !important;
  background: #000 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
}
#studio.has-panel .studio-stage {
  min-height: 42dvh !important;
}
/* Text = flytande glas-panel — behåll stor preview. */
#studio.is-texting.has-panel .studio-stage,
#studio.is-texting .studio-stage {
  min-height: 58dvh !important;
}
#studio .studio-canvas-wrap {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
}
#studio .studio-canvas-wrap #studio-canvas,
#studio #studio-canvas {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
/* Video is decoded off-stage; preview is canvas so filters match foto path on mobile. */
#studio .studio-video,
#studio-video {
  position: absolute;
  width: 2px;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
#studio.is-video #studio-canvas {
  opacity: 1;
  position: relative;
  z-index: 1;
}
#studio.is-video .studio-layer {
  z-index: 2;
}
#studio.is-video .studio-modes {
  visibility: hidden;
}
/* Animated GIF preview under clear canvas (JS sets left/top/size for pan-zoom). */
#studio .studio-gif-live,
.studio-gif-live {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  max-width: none;
  max-height: none;
}
#studio.is-gif .studio-canvas-wrap {
  overflow: hidden;
}
#studio.is-gif #studio-canvas {
  position: relative;
  z-index: 1;
  background: transparent;
}
#studio.is-gif .studio-layer {
  z-index: 2;
}
.studio-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0,0,0,.65), transparent);
  pointer-events: none;
}
.studio-top > * { pointer-events: auto; }
.studio-modes {
  display: none !important;
}
.studio-mode {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(0,0,0,.4);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 800;
  touch-action: manipulation;
}
.studio-mode.is-on {
  border-color: rgba(46,230,255,.75);
  background: rgba(46,230,255,.22);
  color: #fff;
}
.studio-media-zoom {
  position: absolute;
  z-index: 6;
  left: max(10px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(4, 10, 14, .62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}
.studio-media-zoom button {
  min-height: 30px;
  min-width: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 800;
  touch-action: manipulation;
}
.studio-media-zoom button:active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.studio-media-zoom #studio-zoom-val {
  min-width: 40px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: rgba(232, 251, 255, .88);
  letter-spacing: .02em;
}
#studio.has-panel .studio-media-zoom {
  bottom: auto;
  top: 10px;
}
#studio .studio-wide-fit {
  left: max(10px, env(safe-area-inset-left));
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 42px);
}
#studio.has-panel .studio-wide-fit {
  bottom: auto;
  top: 48px;
}
.studio-wide-fit {
  position: absolute;
  z-index: 6;
  left: max(10px, env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: none;
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}
.studio-wide-fit[hidden] { display: none !important; }
.studio-wide-fit button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 800;
  touch-action: manipulation;
  white-space: nowrap;
}
.studio-wide-fit button.is-on {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
#studio .studio-rail {
  position: absolute;
  z-index: 6;
  right: max(8px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-46%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  pointer-events: auto;
}
#studio .studio-rail .studio-tray-btn {
  flex: none;
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(4, 12, 16, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
#studio .studio-rail .studio-tray-ico {
  font-size: 17px;
}
#studio .studio-rail .studio-tray-lbl {
  font-size: 9px;
  color: rgba(232, 251, 255, .8);
}
#studio .studio-rail .studio-tray-btn.is-on {
  border-color: rgba(46, 230, 255, .9);
  background: rgba(46, 230, 255, .28);
  box-shadow: 0 0 0 1px rgba(46, 230, 255, .25), 0 10px 28px rgba(0, 0, 0, .35);
}
#studio.has-panel .studio-rail {
  top: 42%;
  transform: translateY(-50%);
}
#studio-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 17px;
  touch-action: manipulation;
}
#studio-post {
  flex: none;
  min-width: 92px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8a6a, var(--chilli) 65%, #d83a22);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  touch-action: manipulation;
}
#studio .studio-dock {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 7;
  flex: 0 0 auto !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px max(12px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 10px) max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, rgba(4, 10, 12, .55) 28%, rgba(4, 10, 12, .92));
  border-top: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: max-height .22s ease, padding .22s ease, background .22s ease;
}
#studio.has-panel:not(.is-texting) .studio-dock {
  max-height: min(46dvh, 360px);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  background: rgba(4, 12, 16, .58);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
}
#studio .studio-sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
#studio .studio-sheet-head[hidden] { display: none !important; }
#studio .studio-sheet-title {
  flex: 1;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
}
#studio #studio-sheet-done {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(46, 230, 255, .92);
  color: #041014;
  font-size: 13px;
  font-weight: 800;
  touch-action: manipulation;
}
#studio .studio-coach {
  margin: 0;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: rgba(232, 251, 255, .78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
}
#studio .studio-coach strong {
  color: #fff;
  font-weight: 800;
}
#studio .studio-coach[hidden] { display: none !important; }
#studio.has-panel .studio-coach { display: none !important; }
#studio .studio-dock-label {
  margin: 0;
  padding: 0 2px;
  color: rgba(232, 251, 255, .55);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#studio.is-cut .studio-dock {
  max-height: min(52dvh, 400px);
}
/* Text = flytande glas — ingen opak botten-sheet. */
#studio.is-texting.has-panel .studio-dock,
#studio.is-texting .studio-dock {
  max-height: none !important;
  padding-top: 8px !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 12, .55) 28%, rgba(4, 10, 12, .92)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
}
#studio.is-texting.has-panel .studio-dock::before {
  display: none !important;
}
#studio .studio-filters {
  flex: none;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px;
  background: transparent;
  border: 0;
  gap: 8px;
  align-items: flex-end;
}
#studio .studio-filters[hidden] { display: none !important; }
#studio .studio-filters::-webkit-scrollbar { display: none; }
#studio .studio-filters button.studio-filter-btn {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: auto;
  height: auto;
  min-width: 64px;
  min-height: 0;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: rgba(232, 251, 255, .88);
  font-size: 12px;
  font-weight: 800;
  touch-action: manipulation;
  white-space: nowrap;
}
#studio .studio-filter-thumb {
  position: relative;
  display: block;
  flex: none;
  width: 52px;
  height: 68px;
  margin: 0 auto 5px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c3b52 0%, #b04a6a 55%, #f0a050 100%);
}
#studio .studio-filter-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
#studio .studio-filter-label {
  display: block;
  max-width: 64px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, .75);
}
#studio .studio-filter-tune-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 68px;
  margin: 0 auto 5px;
  border-radius: 9px;
  background: rgba(46, 230, 255, .1);
  border: 1px dashed rgba(46, 230, 255, .35);
  font-size: 22px;
  line-height: 1;
}
#studio .studio-tray {
  display: none !important;
}
#studio .studio-tray-btn {
  flex: none;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#studio .studio-tray-ico {
  display: block;
  font-size: 16px;
  line-height: 1.1;
  font-weight: 800;
}
#studio .studio-tray-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(232, 251, 255, .78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#studio .studio-tray-btn.is-on {
  border-color: rgba(46,230,255,.85);
  background: linear-gradient(180deg, rgba(46,230,255,.28), rgba(255,90,60,.14));
  box-shadow: 0 0 14px rgba(46, 230, 255, .25);
}
#studio .studio-tray-btn.is-on .studio-tray-lbl {
  color: #fff;
}
#studio .studio-filters button.studio-filter-btn.is-on {
  border-color: rgba(46, 230, 255, .65);
  background: rgba(46, 230, 255, .18);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85);
}
#studio .studio-tray-btn[hidden] { display: none !important; }
#studio .studio-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(46,230,255,.22);
  background: rgba(0,0,0,.35);
}
#studio .studio-panel[hidden],
#studio .studio-sticker-chrome[hidden],
#studio .studio-stickers[hidden],
#studio .studio-sticker-more[hidden],
#studio .studio-sticker-info[hidden],
#studio .studio-cut-bar[hidden],
#studio .studio-trim[hidden] {
  display: none !important;
}
#studio .studio-trim-status {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(232, 251, 255, .9);
}
#studio .studio-trim-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(232, 251, 255, .7);
}
#studio .studio-trim-row input[type="range"] {
  width: 100%;
  accent-color: #2ee6ff;
}
#studio .studio-trim-actions {
  display: flex;
  gap: 8px;
}
#studio .studio-trim-actions button {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(46, 230, 255, .3);
  background: rgba(46, 230, 255, .12);
  color: #e8fbff;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
#studio #studio-trim-preview {
  background: rgba(46, 230, 255, .88);
  color: #041014;
  border-color: #2ee6ff;
}
#studio #studio-caption {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid rgba(46,230,255,.45) !important;
  border-radius: 12px !important;
  background: #041014 !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  box-sizing: border-box !important;
  -webkit-user-select: text !important;
  user-select: text !important;
}
#studio .studio-audience {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 230, 255, .35) transparent;
}
#studio .studio-audience::-webkit-scrollbar {
  width: 4px;
}
#studio .studio-audience::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(46, 230, 255, .35);
}
#studio .studio-audience select[hidden] {
  display: none !important;
}
#studio .studio-aud-title,
#quick-cut .studio-aud-title,
#studio .studio-aud-sub,
#quick-cut .studio-aud-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  color: rgba(232, 251, 255, .92);
}
#studio .studio-aud-sub,
#quick-cut .studio-aud-sub {
  font-size: 12px;
  font-weight: 700;
  color: rgba(232, 251, 255, .68);
}
#studio .studio-aud-split,
#quick-cut .studio-aud-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
  min-height: 168px;
}
#studio .studio-aud-split.is-picking,
#quick-cut .studio-aud-split.is-picking {
  opacity: .34;
  pointer-events: none;
}
#studio .studio-aud-pane,
#quick-cut .studio-aud-pane {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(6, 14, 18, .42);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  color: #e8fbff;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease;
}
#studio .studio-aud-pane:not(.is-on),
#quick-cut .studio-aud-pane:not(.is-on) {
  opacity: .72;
}
#studio .studio-aud-pane.is-on,
#quick-cut .studio-aud-pane.is-on {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .14);
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px rgba(46, 230, 255, .18),
    0 8px 22px rgba(0, 0, 0, .22);
}
#studio .studio-aud-pane-head,
#quick-cut .studio-aud-pane-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
#studio .studio-aud-pane-head strong,
#quick-cut .studio-aud-pane-head strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
}
#studio .studio-aud-pane-head span,
#quick-cut .studio-aud-pane-head span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(232, 251, 255, .62);
}
#studio .studio-aud-pane.is-on .studio-aud-pane-head span,
#quick-cut .studio-aud-pane.is-on .studio-aud-pane-head span {
  color: rgba(232, 251, 255, .84);
}
#studio .studio-aud-group-preview,
#quick-cut .studio-aud-group-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  flex: 1 1 auto;
  min-height: 72px;
  overflow: hidden;
}
#studio .studio-aud-groups-full,
#quick-cut .studio-aud-groups-full {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(46, 230, 255, .35);
  background: rgba(4, 12, 16, .72);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}
#studio .studio-aud-groups-full[hidden],
#quick-cut .studio-aud-groups-full[hidden] {
  display: none !important;
}
#studio .studio-aud-groups-full-head,
#quick-cut .studio-aud-groups-full-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#studio .studio-aud-groups-done,
#quick-cut .studio-aud-groups-done {
  appearance: none;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 255, .45);
  background: rgba(46, 230, 255, .18);
  color: #e8fbff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}
#studio .studio-aud-groups-done:active,
#quick-cut .studio-aud-groups-done:active {
  transform: scale(.96);
  background: rgba(46, 230, 255, .28);
}
#studio .studio-aud-group-list,
#quick-cut .studio-aud-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(28vh, 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#studio .studio-aud-group,
#quick-cut .studio-aud-group {
  appearance: none;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(6, 14, 18, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #e8fbff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
#studio .studio-aud-group-preview .studio-aud-group,
#quick-cut .studio-aud-group-preview .studio-aud-group {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}
#studio .studio-aud-group.is-on,
#quick-cut .studio-aud-group.is-on {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(46, 230, 255, .12);
}
#studio .studio-aud-group-more,
#quick-cut .studio-aud-group-more {
  border-style: dashed;
  color: rgba(232, 251, 255, .78);
}
#studio .studio-aud-empty,
#quick-cut .studio-aud-empty {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px dashed rgba(46, 230, 255, .28);
  background: rgba(6, 14, 18, .35);
  color: rgba(232, 251, 255, .72);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}
#studio .studio-aud-empty[hidden],
#quick-cut .studio-aud-empty[hidden] {
  display: none !important;
}
#studio .studio-map-hours,
#quick-cut .studio-map-hours,
#quick-cut .qc-map-hours {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
#studio .studio-map-hours[hidden],
#quick-cut .studio-map-hours[hidden],
#quick-cut .qc-map-hours[hidden] {
  display: none !important;
}
#studio .studio-map-hours-label,
#quick-cut .studio-map-hours-label,
#quick-cut .qc-map-hours-label,
#studio .studio-map-hours-hint,
#quick-cut .qc-map-hours-hint {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(232, 251, 255, .62);
}
#studio .chill-hours-wheel.is-dim,
#quick-cut .chill-hours-wheel.is-dim {
  opacity: .45;
  filter: grayscale(.15);
  pointer-events: none;
}
.chill-hours-wheel {
  --chw-h: 40px;
  position: relative;
  height: calc(var(--chw-h) * 3);
  margin: 0 auto;
  width: min(100%, 220px);
  border-radius: 16px;
  background: rgba(4, 12, 16, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
  isolation: isolate;
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.chill-hours-wheel.is-compact {
  --chw-h: 30px;
  width: 100%;
  max-width: none;
  border-radius: 14px;
  background: rgba(0, 0, 0, .28);
  border-color: rgba(255, 255, 255, .1);
}
.chill-hours-wheel-scroller {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--chw-h) 0;
  outline: none;
}
.chill-hours-wheel-scroller::-webkit-scrollbar {
  display: none;
}
.chill-hours-wheel-item {
  appearance: none;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: var(--chw-h);
  margin: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: rgba(232, 251, 255, .36);
  font: inherit;
  scroll-snap-align: center;
  cursor: pointer;
}
.chill-hours-wheel-item strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.chill-hours-wheel.is-compact .chill-hours-wheel-item {
  gap: 4px;
  padding: 0 8px;
}
.chill-hours-wheel.is-compact .chill-hours-wheel-item strong {
  font-size: 17px;
}
.chill-hours-wheel-item span {
  font-size: 12px;
  font-weight: 700;
  opacity: .85;
}
.chill-hours-wheel.is-compact .chill-hours-wheel-item span {
  font-size: 11px;
}
.chill-hours-wheel-item.is-on {
  color: #e8fbff;
}
.chill-hours-wheel-mark {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: var(--chw-h);
  margin-top: calc(var(--chw-h) / -2);
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .45);
  background: rgba(46, 230, 255, .1);
  pointer-events: none;
  z-index: 1;
}
.chill-hours-wheel.is-compact .chill-hours-wheel-mark {
  left: 6px;
  right: 6px;
  border-radius: 10px;
}
.chill-hours-wheel-fade {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--chw-h);
  pointer-events: none;
  z-index: 2;
}
.chill-hours-wheel-fade-top {
  top: 0;
  background: linear-gradient(180deg, rgba(4, 12, 16, .88), transparent);
}
.chill-hours-wheel-fade-bot {
  bottom: 0;
  background: linear-gradient(0deg, rgba(4, 12, 16, .88), transparent);
}
.chill-hours-wheel.is-compact .chill-hours-wheel-fade-top {
  background: linear-gradient(180deg, rgba(4, 12, 16, .72), transparent);
}
.chill-hours-wheel.is-compact .chill-hours-wheel-fade-bot {
  background: linear-gradient(0deg, rgba(4, 12, 16, .72), transparent);
}
#quick-cut .qc-map-sheet.qc-pop-center {
  width: min(96vw, 440px);
  max-height: min(52vh, 420px);
}
#quick-cut .qc-map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(58vh, 460px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 230, 255, .35) transparent;
}
#quick-cut .qc-map-panel::-webkit-scrollbar {
  width: 4px;
}
#quick-cut .qc-map-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(46, 230, 255, .35);
}
#quick-cut .qc-map-panel-top {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
}
#quick-cut .qc-map-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(46, 230, 255, .45);
  border-radius: 12px;
  color: #b8f7ff;
  background: rgba(46, 230, 255, .18);
  font-size: 14px;
}
#quick-cut .qc-map-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-top: 2px;
}
#quick-cut .qc-map-copy strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #e8fbff;
}
#quick-cut .qc-map-copy span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(232, 251, 255, .62);
}
#studio .studio-face-block,
#quick-cut .studio-face-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
#studio .studio-face-toggle,
#quick-cut .studio-face-toggle {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(6, 14, 18, .42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #e8fbff;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
#studio .studio-face-toggle.is-on,
#quick-cut .studio-face-toggle.is-on {
  border-color: rgba(255, 106, 42, .55);
  background: rgba(255, 106, 42, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 106, 42, .12);
}
#studio .studio-face-toggle-copy,
#quick-cut .studio-face-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
#studio .studio-face-toggle-copy strong,
#quick-cut .studio-face-toggle-copy strong {
  font-size: 14px;
  font-weight: 800;
}
#studio .studio-face-toggle-copy span,
#quick-cut .studio-face-toggle-copy span {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(232, 251, 255, .62);
}
#studio .studio-face-switch,
#quick-cut .studio-face-switch {
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  position: relative;
  transition: background .15s ease;
}
#studio .studio-face-switch i,
#quick-cut .studio-face-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
#studio .studio-face-toggle.is-on .studio-face-switch,
#quick-cut .studio-face-toggle.is-on .studio-face-switch {
  background: #ff6a2a;
}
#studio .studio-face-toggle.is-on .studio-face-switch i,
#quick-cut .studio-face-toggle.is-on .studio-face-switch i {
  transform: translateX(18px);
}
#studio .studio-hide-faces {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(46,230,255,.2);
  background: rgba(4, 16, 20, .85);
  color: #e8fbff;
  font-size: 13px;
}
#studio .studio-hide-faces input {
  width: 18px;
  height: 18px;
  accent-color: #ff6a2a;
}

.face-icon-picker {
  flex: 1 1 100%;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .18);
  background: rgba(4, 16, 20, .72);
}
.face-icon-picker[hidden] {
  display: none !important;
}
.face-icon-picker-hint {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(232, 251, 255, .78);
}
.face-icon-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.face-icon-pick {
  appearance: none;
  width: 56px;
  height: 56px;
  padding: 6px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, .14);
  background: #0a1218;
  cursor: pointer;
  touch-action: manipulation;
}
.face-icon-pick.is-on {
  border-color: #2ee6ff;
  box-shadow: 0 0 0 2px rgba(46, 230, 255, .25);
}
.face-icon-pick img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.face-icon-picker--profile {
  margin: 4px 12px 10px;
}
.face-icon-preview {
  display: block;
  width: 132px;
  height: 165px;
  margin: 0 auto 10px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .22);
  background: #0a1218;
}
#studio .face-icon-preview {
  width: 96px;
  height: 120px;
  margin-bottom: 8px;
}
#studio .studio-cut-bar { display: flex; flex-direction: column; gap: 6px; }
#studio .studio-cut-filmstrip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0;
}
#studio .studio-cut-empty {
  margin: 0;
  color: rgba(232,251,255,.7);
  font-size: 12px;
}
#studio .studio-cut-thumb {
  position: relative;
  flex: none;
  width: 42px;
  height: 56px;
  padding: 0;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
}
#studio .studio-cut-thumb.is-on { border-color: var(--cyan); }
#studio .studio-cut-thumb img { width: 100%; height: 100%; object-fit: cover; }
#studio .studio-cut-thumb-num {
  position: absolute;
  left: 3px; bottom: 3px;
  min-width: 14px;
  padding: 0 3px;
  border-radius: 5px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}
#studio .studio-cut-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
#studio .studio-cut-actions button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(46,230,255,.35);
  background: rgba(46,230,255,.12);
  color: #e8fbff;
  font-size: 12px;
  font-weight: 800;
  touch-action: manipulation;
}
#studio .studio-cut-counter {
  margin-left: auto;
  color: rgba(232,251,255,.7);
  font-size: 11px;
  font-weight: 700;
}
#studio .studio-stickers {
  max-height: min(36vh, 280px);
  overflow: auto;
  background: transparent;
  border: 0;
  padding: 6px 2px;
}
#studio .studio-sticker-info {
  margin: 0;
  color: rgba(232,251,255,.72);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
#studio .studio-font-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#studio .studio-font-row select { flex: 1; min-width: 0; min-height: 40px; }
#studio .studio-tools { display: none !important; }
#studio .studio-head { display: none !important; }
#studio .studio-dock-label { display: none !important; }
@media (max-width: 420px) {
  #studio .studio-rail { gap: 8px; right: max(6px, env(safe-area-inset-right)); }
  #studio .studio-rail .studio-tray-btn { width: 48px; min-width: 48px; min-height: 48px; border-radius: 14px; }
  #studio .studio-rail .studio-tray-lbl { font-size: 8px; }
  #studio .studio-coach { font-size: 11px; }
  #studio-post { min-width: 84px; font-size: 13px; }
  #studio.has-panel:not(.is-texting) .studio-dock { max-height: min(48dvh, 380px); }
  #studio.is-music-sheet.has-panel:not(.is-texting) .studio-dock {
    height: var(--studio-sheet-h, 70dvh);
    max-height: min(88dvh, 92vh) !important;
  }
}

/* â€”â€”â€” ChillOr Cut editor â€”â€”â€” */
.cut-editor {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: Outfit, system-ui, sans-serif;
}
.cut-editor[hidden] { display: none !important; }
.cut-editor.is-open { display: flex; }

/* Toast / uppladdning ovanpå cut-editor (annars syns fel först när man stänger). */
body.cut-editor-open #toast {
  z-index: 12050;
}
body.cut-editor-open #upload-bar {
  z-index: 12040;
}
#cut-editor-toast.cut-editor-toast {
  position: absolute;
  z-index: 2147483000;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 88px);
  max-width: min(90vw, 340px);
  padding: 12px 16px;
  border: 1px solid rgba(46, 230, 255, .4);
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(46, 230, 255, .18), transparent 55%),
    linear-gradient(165deg, rgba(18, 52, 60, .98), rgba(5, 16, 20, .97));
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55);
  color: #e8fbff;
  transform: translate(-50%, 12px) scale(.98);
  opacity: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
  transition: opacity .2s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}
#cut-editor-toast.cut-editor-toast.is-in {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
#cut-editor-toast.cut-editor-toast.is-out {
  opacity: 0;
  transform: translate(-50%, 8px) scale(.98);
}

.cut-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.75), transparent);
}
.cut-head button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 650;
  font-size: 12px;
}
.cut-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.cut-brand strong {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
}
.cut-brand span {
  font-size: 10px;
  color: rgba(255, 255, 255, .48);
}
.cut-save {
  border: 1px solid rgba(46, 230, 255, .55) !important;
  background: rgba(46, 230, 255, .12) !important;
  color: #2ee6ff !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  padding: 0 14px !important;
  box-shadow: none !important;
}
.cut-save:disabled {
  opacity: .45;
}
.cut-post {
  background: #2ee6ff !important;
  color: #041014 !important;
  border: 0 !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.cut-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
}
.cut-stage {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 9 / 16;
  max-height: min(56dvh, 520px);
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: #000;
  box-shadow: none;
}
.cut-stage.is-shake {
  animation: cutShake .22s ease-out;
}

/* Rytm-filter — live skak/zoom/glitch synkad till musik */
.chill-beat-fx {
  transform-origin: center center;
  will-change: transform, filter;
}
.chill-beat-fx.is-beat-hit {
  transition: none;
}
.chill-beat-fx.is-beat-glitch {
  animation: chill-beat-glitch .12s steps(2, end);
}
.chill-beat-fx::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, var(--beat-flash, 0));
  mix-blend-mode: screen;
  opacity: 1;
  z-index: 4;
}
#snap-stage.chill-beat-fx,
.studio-canvas-wrap.chill-beat-fx,
#qc-canvas.chill-beat-fx {
  overflow: hidden;
}
@keyframes chill-beat-glitch {
  0% { filter: hue-rotate(-18deg) contrast(1.25); }
  50% { filter: hue-rotate(22deg) contrast(1.4); }
  100% { filter: none; }
}
@keyframes cutShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-6px, 4px); }
  50% { transform: translate(6px, -4px); }
  75% { transform: translate(-3px, 2px); }
  100% { transform: translate(0, 0); }
}
#cut-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.cut-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .08s linear;
}
.cut-flash.is-on { opacity: .75; }
.cut-export {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: rgba(2, 8, 10, .92);
  padding: 16px;
}
.cut-export[hidden] { display: none !important; }
.cut-export-card {
  width: min(100%, 220px);
  text-align: center;
}
.cut-export-card p {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 13px;
}
.cut-export-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.cut-export-track > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2ee6ff, #3b82f6);
}
#cut-export-label {
  display: block;
  margin-top: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--cyan, #2ee6ff);
}

.cut-transport {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(100%, 340px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(8, 24, 30, .95);
  border: 1px solid rgba(46, 230, 255, .14);
}
.cut-transport button {
  min-width: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(46, 230, 255, .12);
  color: #e8fbff;
  font-size: 12px;
}
#cut-play {
  background: linear-gradient(180deg, #3aefff, var(--cyan, #2ee6ff));
  color: #041014;
  font-weight: 800;
}
#cut-time {
  flex: 1;
  text-align: center;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: rgba(232, 251, 255, .75);
}
.cut-autocut {
  border-radius: 999px !important;
  padding: 0 12px !important;
  background: linear-gradient(180deg, #ffc85a, var(--mango, #f5a623)) !important;
  color: #1a1004 !important;
  font-weight: 800 !important;
  font-size: 11px !important;
}

.cut-timeline {
  flex: none;
  border-top: 1px solid rgba(46, 230, 255, .12);
  background: #030b0e;
}
.cut-ruler {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 9px;
  font-family: ui-monospace, monospace;
  color: rgba(232, 251, 255, .45);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  cursor: pointer;
}
.cut-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, .7);
  pointer-events: none;
}
.cut-tracks {
  padding: 6px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cut-track-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}
.cut-track-row > span {
  width: 36px;
  flex: none;
  font-size: 9px;
  font-weight: 800;
  color: var(--cyan, #2ee6ff);
}
.cut-track-video,
.cut-track-beat {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 22px;
  border-radius: 6px;
  background: rgba(8, 24, 30, .9);
  border: 1px solid rgba(46, 230, 255, .12);
  overflow: visible;
  display: flex;
}
.cut-seg {
  position: relative;
  height: 100%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 8px;
  font-weight: 800;
  color: #041014;
  background: rgba(46, 230, 255, .75);
  border-right: 1px solid #041014;
  box-sizing: border-box;
}
.cut-beat-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #facc15;
  box-shadow: 0 0 4px rgba(250, 204, 21, .7);
}

.cut-panels {
  flex: none;
  height: 168px;
  overflow: auto;
  padding: 8px 10px;
  border-top: 1px solid rgba(46, 230, 255, .12);
  background: #07161b;
  -webkit-overflow-scrolling: touch;
}
.cut-tab { display: block; }
.cut-tab[hidden] { display: none !important; }
.cut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cut-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .14);
  background: #041014;
  color: #e8fbff;
}
.cut-card strong {
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan, #2ee6ff);
}
.cut-card span {
  font-size: 10px;
  color: rgba(232, 251, 255, .55);
}
.cut-card.is-on {
  border-color: var(--cyan, #2ee6ff);
  box-shadow: 0 0 0 1px rgba(46, 230, 255, .25);
}
.cut-breakout-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cut-breakout-panel .cut-seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.cut-breakout-panel .cut-seg-lbl {
  font: 700 11px/1 sans-serif;
  opacity: .8;
  min-width: 64px;
}

.cut-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: rgba(232, 251, 255, .6);
}
.cut-volume-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
  font-size: 11px;
  color: rgba(232, 251, 255, .7);
}
.cut-volume-row i {
  font-style: normal;
  color: var(--cyan, #2ee6ff);
  font-weight: 700;
}
.cut-volume-row input[type="range"] {
  width: 100%;
  accent-color: var(--cyan, #2ee6ff);
}
.cut-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.cut-chip {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 255, .18);
  background: rgba(46, 230, 255, .08);
  color: #e8fbff;
  font-size: 11px;
  font-weight: 700;
}
.cut-tr-colors {
  align-items: center;
  gap: 8px;
}

#quick-cut .qc-tr-colors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 0 2px;
}

#quick-cut .qc-tr-color-hint {
  width: 100%;
  margin: 0 0 2px;
}

.cut-tr-swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
  cursor: pointer;
}

.cut-tr-swatch.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(46, 230, 255, .55);
}

.cut-tr-color-custom {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .22);
  background: conic-gradient(#ff5a00, #ffcc00, #00e5ff, #7c3aed, #ff2d55, #ff5a00);
}

.cut-tr-color-custom input[type="color"] {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: scale(1.4);
}

.cut-chip.is-on {
  background: linear-gradient(180deg, #3aefff, var(--cyan, #2ee6ff));
  color: #041014;
  border-color: transparent;
}
.cut-check-block {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 12px;
}
.cut-music-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.cut-music-actions button,
.cut-btn-file {
  flex: 1;
  min-height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .18);
  background: rgba(46, 230, 255, .1);
  color: #e8fbff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.cut-music-grid {
  grid-template-columns: 1fr;
}
.cut-music-grid .cut-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 8px;
  min-height: 0;
}
.cut-music-grid .cut-music-thumb {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 28px;
  background: #0b141a;
}
.cut-music-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.cut-music-meta strong {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cut-music-meta span {
  font-size: 10px;
  opacity: .75;
}
#studio .studio-music {
  max-height: 42vh;
  overflow: hidden;
}
#studio .studio-music-status {
  margin: 0;
  font-size: 12px;
  color: rgba(232, 251, 255, .85);
}
#studio .studio-music-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 34vh;
  padding-bottom: 4px;
}

/* Musik-drawer: ~70% höjd, lista scrollar under mixern, dragbar */
#studio .studio-sheet-handle {
  display: none;
  flex: none;
  width: 100%;
  padding: 8px 0 2px;
  touch-action: none;
  cursor: grab;
}
#studio .studio-sheet-handle::before {
  content: '';
  display: block;
  width: 40px;
  height: 5px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
}
#studio.is-music-sheet .studio-sheet-handle {
  display: block;
}
#studio.is-music-sheet .studio-sheet-handle[hidden] {
  display: block !important;
}
#studio.is-music-sheet.has-panel:not(.is-texting) .studio-dock {
  height: var(--studio-sheet-h, 70dvh);
  max-height: min(88dvh, 92vh) !important;
  min-height: 36dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 0;
  transition: none;
}
#studio.is-music-sheet.has-panel:not(.is-texting) .studio-dock.is-sheet-dragging {
  transition: none;
}
#studio.is-music-sheet.has-panel:not(.is-texting) .studio-dock::before {
  display: none;
}
#studio.is-music-sheet .studio-sheet-head {
  flex: none;
  touch-action: none;
  cursor: grab;
}
#studio.is-music-sheet .studio-music {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#studio.is-music-sheet .studio-music-tabs,
#studio.is-music-sheet .studio-music-status,
#studio.is-music-sheet .studio-music-search-wrap,
#studio.is-music-sheet .studio-mixer {
  flex: none;
}
#studio.is-music-sheet .studio-mixer {
  margin: 2px 0 4px;
  padding: 8px 10px;
  gap: 8px;
}
#studio.is-music-sheet .studio-mixer-row {
  font-size: 11px;
}
#studio.is-music-sheet .studio-music-list {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 8px;
}
#studio.is-music-sheet.has-panel .studio-stage {
  min-height: 0 !important;
  flex: 1 1 0 !important;
}
#studio .studio-music-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(232, 251, 255, .7);
}
#studio .studio-music-clear {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 5px 8px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .18);
  background: rgba(4, 16, 20, .85);
  color: #e8fbff;
  text-align: left;
  cursor: pointer;
}
#studio .studio-music-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .18);
  background: rgba(4, 16, 20, .85);
  color: #e8fbff;
  text-align: left;
  cursor: pointer;
}
#studio .studio-music-item:not(:has(img)):not(:has(.studio-music-note)) {
  grid-template-columns: minmax(0, 1fr);
}
#studio .studio-music-clear.is-on,
#studio .studio-music-item.is-on {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .14);
}
#studio .studio-music-item img,
#studio .studio-music-note {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 8px;
  object-fit: cover;
  background: #0b141a;
}
#studio .studio-music-note {
  display: grid;
  place-items: center;
  font-size: 14px;
}
#studio .studio-music-item span {
  display: contents;
}
#studio .studio-music-item strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#studio .studio-music-item:not(:has(img)):not(:has(.studio-music-note)) strong {
  grid-column: 1;
}
#studio .studio-music-item i {
  grid-column: 2;
  grid-row: 2;
  font-style: normal;
  font-size: 11px;
  opacity: .72;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#studio .studio-music-item:not(:has(img)):not(:has(.studio-music-note)) i {
  grid-column: 1;
}
.cut-media-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cut-media-thumb {
  position: relative;
  flex: none;
  width: 56px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #0b141a;
  border: 1px solid rgba(46, 230, 255, .2);
  display: grid;
  place-items: center;
  color: #fff;
}
.cut-media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cut-media-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}
.cut-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}
#cut-text-input {
  width: 100%;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .2);
  background: #041014;
  color: #fff;
  box-sizing: border-box;
}
.cut-audience-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cut-audience-row select[multiple] {
  min-height: 72px;
}

.cut-audience-row select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .2);
  background: #041014;
  color: #fff;
}

.cut-nav {
  flex: none;
  display: flex;
  border-top: 1px solid rgba(46, 230, 255, .14);
  padding-bottom: env(safe-area-inset-bottom);
  background: #041014;
}
.cut-nav button {
  flex: 1;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: rgba(232, 251, 255, .5);
  font-size: 11px;
  font-weight: 700;
}
.cut-nav button.is-on {
  color: var(--cyan, #2ee6ff);
}

/* ---- Studio: editable filters ---- */
#studio .studio-filters .studio-filter-tune {
  flex: none;
  border-color: rgba(46, 230, 255, .45);
  color: #9ff0ff;
  background: rgba(46, 230, 255, .08);
}
#studio .studio-filters .studio-filter-tune.is-on {
  background: rgba(46, 230, 255, .22);
  border-color: rgba(46, 230, 255, .75);
  color: #fff;
}
#studio .studio-filters .studio-filter-tune.is-on .studio-filter-label {
  color: #fff;
}
#studio .studio-filters .studio-filter-saved { flex: none; }
#studio .studio-filters button.studio-filter-btn.is-on .studio-filter-label {
  color: #fff;
}
.studio-filter-panel {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(6, 14, 18, .72);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.studio-filter-panel[hidden] { display: none; }
.studio-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.studio-filter-chips::-webkit-scrollbar { display: none; }
.studio-filter-chip {
  position: relative;
  flex: none;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .88);
  font-size: 12px;
  font-weight: 750;
}
.studio-filter-chip[hidden] { display: none; }
.studio-filter-chip.is-on {
  border-color: rgba(46, 230, 255, .7);
  background: rgba(46, 230, 255, .18);
  color: #fff;
}
.studio-filter-chip.is-changed::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2ee6ff;
}
.studio-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
}
.studio-filter-range {
  flex: 1;
  min-width: 0;
  height: 30px;
  accent-color: #2ee6ff;
}
.studio-filter-val {
  min-width: 44px;
  text-align: right;
  font-size: 12px;
  font-weight: 800;
  color: #b8f7ff;
  font-variant-numeric: tabular-nums;
}
.studio-filter-act {
  flex: none;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
}
.studio-filter-act:disabled { opacity: .4; }

/* ChillUno 1v1 */
#sheet.is-uno {
  background:
    radial-gradient(ellipse 80% 50% at 50% 40%, rgba(255,255,255,.06), transparent 55%),
    linear-gradient(180deg, #0a4a28 0%, #06351c 45%, #042616 100%);
}
#sheet.is-uno #sheet-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

/* Portrait phone: true full-screen table */
#sheet.is-uno.is-uno-portrait {
  height: 100dvh !important;
  max-height: 100dvh !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}
#sheet.is-uno.is-uno-portrait .sheet-head {
  flex: none;
  min-height: 44px;
  padding: max(6px, env(safe-area-inset-top)) 12px 6px;
  background: linear-gradient(180deg, rgba(0,0,0,.35), transparent);
  border-bottom: 0;
}
#sheet.is-uno.is-uno-portrait .sheet-head h2 {
  font-size: 16px;
  font-weight: 800;
}
#sheet.is-uno.is-uno-portrait #sheet-body {
  max-height: none;
  height: auto;
  flex: 1 1 auto;
  padding: 0;
  overflow: hidden;
}

.uno-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  padding: 4px 2px calc(10px + env(safe-area-inset-bottom));
}
.uno-table {
  gap: 6px;
  height: 100%;
  min-height: 0;
}
#sheet.is-uno-portrait .uno-table {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 4px;
  padding: 2px 8px calc(8px + env(safe-area-inset-bottom));
}

.uno-lobby {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.uno-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #ff6a4a, #c41e12 60%, #8a0e08);
  border: 5px solid #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  transform: rotate(-8deg);
}

.uno-hint {
  margin: 0 12px;
  max-width: 280px;
  color: rgba(255,255,255,.9);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
}

.uno-opp-zone {
  flex: none;
  width: 100%;
}

.uno-lobby-players {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 320px;
}

.uno-lobby-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .22);
  font-size: 13px;
}

.uno-lobby-player strong {
  color: #fff;
  font-weight: 800;
}

.uno-lobby-player span {
  color: rgba(255, 255, 255, .55);
  font-weight: 600;
  font-size: 11px;
}

.uno-lobby-player.is-accepted {
  border-color: rgba(80, 220, 140, .4);
}

.uno-lobby-player.is-declined {
  opacity: .55;
}

.uno-opp-multi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.uno-opp-multi .uno-opp-row {
  flex: 1 1 120px;
  max-width: 180px;
  min-width: 110px;
}

.uno-opp-row.is-turn {
  box-shadow: 0 0 0 1px rgba(46, 230, 255, .35);
  border-radius: 12px;
}
.uno-opp-row.is-uno-alert {
  animation: unoAlertPulse 1s ease-in-out infinite;
}
@keyframes unoAlertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 47, .0); }
  50% { box-shadow: 0 0 0 3px rgba(255, 59, 47, .55); }
}

.uno-dir-label {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, .7);
}

.uno-opp-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 72px;
}

.uno-opp-fan {
  position: relative;
  height: 56px;
  width: min(280px, 90%);
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.uno-card-back {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 42px;
  height: 60px;
  margin-left: -21px;
  border-radius: 7px;
  border: 2px solid #f5f5f5;
  background: linear-gradient(145deg, #1a1a2e, #0d0d18);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transform: translateX(calc(var(--i, 0) * 14px)) rotate(calc(var(--i, 0) * 4deg));
  display: grid;
  place-items: center;
}
.uno-card-back span {
  font-size: 9px;
  font-weight: 900;
  font-style: italic;
  color: #ff3b2f;
  letter-spacing: -0.5px;
}

.uno-opp-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}
.uno-opp-meta strong { color: #fff; font-size: 13px; }
.uno-opp-empty { color: rgba(255,255,255,.5); font-size: 12px; }

.uno-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 4px;
  min-height: 0;
}
#sheet.is-uno-portrait .uno-stage {
  flex: 1 1 auto;
  padding: 4px 0;
}

.uno-piles {
  display: flex;
  align-items: center;
  gap: 18px;
}

.uno-deck {
  position: relative;
  width: 72px;
  height: 104px;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 3px solid #f0f0f0;
  background: linear-gradient(160deg, #22223a, #0c0c16);
  box-shadow: 3px 3px 0 #050508, 0 6px 14px rgba(0,0,0,.4);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.uno-deck:disabled { opacity: .7; cursor: default; }
.uno-deck span {
  font-size: 16px;
  font-weight: 900;
  font-style: italic;
  color: #ff3b2f;
  transform: rotate(-12deg);
}
.uno-deck em {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff3b2f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  font-style: normal;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.uno-discard { display: flex; }

.uno-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.uno-color-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #111;
  border: 2px solid rgba(255,255,255,.5);
}
.uno-color-chip.is-r { background: #e53935; color: #fff; }
.uno-color-chip.is-g { background: #43a047; color: #fff; }
.uno-color-chip.is-b { background: #1e88e5; color: #fff; }
.uno-color-chip.is-y { background: #fdd835; color: #222; }

.uno-turn-label {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.uno-hand {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 14px 20px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  flex: none;
}
.uno-hand::-webkit-scrollbar { display: none; }

.uno-hand::before,
.uno-hand::after {
  content: '';
  margin: auto;
}

/* Spelbara kort */
.uno-hand .uno-card {
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, margin .18s ease;
}
.uno-hand .uno-card.is-playable {
  transform: translateY(-14px);
  box-shadow: 0 0 14px rgba(46, 230, 255, 0.55), 0 8px 16px rgba(0,0,0,.35);
  filter: none;
}
.uno-hand .uno-card.is-dim {
  filter: brightness(0.55) saturate(0.7);
}
.uno-table.is-your-turn {
  box-shadow: inset 0 0 0 2px rgba(46, 230, 255, 0.35);
}

/* Portrait: overlapping fan, thumb-friendly */
#sheet.is-uno-portrait .uno-hand {
  justify-content: center;
  gap: 0;
  padding: 22px 12px 8px;
  min-height: 128px;
}
#sheet.is-uno-portrait .uno-hand .uno-card {
  width: 62px;
  height: 94px;
  /* --n set in JS: fewer cards = less overlap so values stay readable */
  margin-left: clamp(-18px, calc(12px - var(--n, 7) * 3.5px), -6px);
  border-radius: 8px;
}
#sheet.is-uno-portrait .uno-hand .uno-card:first-child {
  margin-left: 0;
}
#sheet.is-uno-portrait .uno-hand .uno-card.is-playable {
  transform: translateY(-18px) scale(1.03);
  margin-left: clamp(-10px, calc(16px - var(--n, 7) * 2.5px), 2px);
  margin-right: 6px;
  margin-bottom: 4px;
  z-index: 20 !important;
}
#sheet.is-uno-portrait .uno-hand .uno-card.is-playable:first-child {
  margin-left: 0;
}
/* Color picker open: hand stays behind panel, no raised cards covering swatches */
.uno-table.is-color-pick .uno-hand {
  opacity: .35;
  pointer-events: none;
}
.uno-table.is-color-pick .uno-hand .uno-card.is-playable {
  transform: none;
  margin-left: clamp(-18px, calc(12px - var(--n, 7) * 3.5px), -6px);
  margin-right: 0;
  box-shadow: none;
  z-index: auto !important;
}
.uno-table.is-color-pick .uno-hand .uno-card.is-playable:first-child {
  margin-left: 0;
}
#sheet.is-uno-portrait .uno-hand .uno-card-center {
  font-size: 26px;
}
#sheet.is-uno-portrait .uno-hand .uno-card.is-wild .uno-card-center {
  font-size: 20px;
}
#sheet.is-uno-portrait .uno-hand .uno-card-corner {
  font-size: 13px;
}
#sheet.is-uno-portrait .uno-card.is-large {
  width: 86px;
  height: 128px;
  border-radius: 10px;
}
#sheet.is-uno-portrait .uno-card.is-large .uno-card-center {
  font-size: 40px;
}
#sheet.is-uno-portrait .uno-deck {
  width: 64px;
  height: 94px;
  border-radius: 9px;
}
#sheet.is-uno-portrait .uno-actions {
  padding-bottom: 2px;
}
#sheet.is-uno-portrait .uno-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  font-size: 13px;
}
#sheet.is-uno-portrait .uno-color-picker {
  left: 8px;
  right: 8px;
  bottom: calc(10px + env(safe-area-inset-bottom));
}
#sheet.is-uno-portrait .uno-color-swatch {
  width: 56px;
  height: 56px;
}
#sheet.is-uno-portrait .uno-opp-fan {
  height: 48px;
  width: min(220px, 86%);
}
#sheet.is-uno-portrait .uno-card-back {
  width: 34px;
  height: 48px;
  margin-left: -17px;
  transform: translateX(calc(var(--i, 0) * 11px)) rotate(calc(var(--i, 0) * 3.5deg));
}

.uno-card {
  position: relative;
  box-sizing: border-box;
  width: 80px;
  height: 120px;
  margin: 0;
  padding: 0;
  border-radius: 9px;
  border: 2.5px solid #f5f5f5;
  background: #c62828;
  color: #fff;
  flex: none;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  overflow: hidden;
  transition: transform .12s ease;
}
.uno-card:not(:disabled):active { transform: translateY(-6px); }
.uno-card:disabled { opacity: .72; cursor: default; }
.uno-card.is-large {
  width: 110px;
  height: 165px;
  border-radius: 12px;
  border-width: 3px;
  cursor: default;
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.uno-card.is-r { background: #d32f2f; }
.uno-card.is-g { background: #2e7d32; }
.uno-card.is-b { background: #1565c0; }
.uno-card.is-y { background: #f9a825; color: #1a1a1a; }
.uno-card.is-wild { background: #111; }
.uno-card.is-empty { background: rgba(0,0,0,.2); border-style: dashed; }

.uno-card-oval {
  position: absolute;
  inset: 10% 8%;
  border-radius: 50%;
  background: #fff;
  opacity: .95;
}
.uno-card.is-wild .uno-card-oval {
  background: conic-gradient(#d32f2f 0 90deg, #f9a825 90deg 180deg, #2e7d32 180deg 270deg, #1565c0 270deg 360deg);
}
.uno-card.chosen-r .uno-card-oval { box-shadow: inset 0 0 0 4px #d32f2f; }
.uno-card.chosen-g .uno-card-oval { box-shadow: inset 0 0 0 4px #2e7d32; }
.uno-card.chosen-b .uno-card-oval { box-shadow: inset 0 0 0 4px #1565c0; }
.uno-card.chosen-y .uno-card-oval { box-shadow: inset 0 0 0 4px #f9a825; }

.uno-card-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 900;
  z-index: 1;
  line-height: 1;
}
.uno-card.is-r .uno-card-center { color: #d32f2f; }
.uno-card.is-g .uno-card-center { color: #2e7d32; }
.uno-card.is-b .uno-card-center { color: #1565c0; }
.uno-card.is-y .uno-card-center { color: #c49000; }
.uno-card.is-wild .uno-card-center {
  color: #111;
  font-size: 26px;
  text-shadow: 0 0 2px #fff;
}
.uno-card.is-large .uno-card-center { font-size: 52px; }
.uno-card.is-large.is-wild .uno-card-center { font-size: 40px; }

.uno-card-sub {
  position: absolute;
  bottom: 14%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  z-index: 1;
  opacity: .85;
}
.uno-card.is-r .uno-card-sub { color: #d32f2f; }
.uno-card.is-g .uno-card-sub { color: #2e7d32; }
.uno-card.is-b .uno-card-sub { color: #1565c0; }
.uno-card.is-y .uno-card-sub { color: #c49000; }
.uno-card.is-wild .uno-card-sub { color: #111; }

.uno-card-corner {
  position: absolute;
  z-index: 2;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}
.uno-card.is-y .uno-card-corner { color: #1a1a1a; }
.uno-card-corner.is-tl { top: 4px; left: 5px; }
.uno-card-corner.is-br { bottom: 4px; right: 5px; transform: rotate(180deg); }
.uno-card.is-large .uno-card-corner { font-size: 22px; }
.uno-card.is-large .uno-card-corner.is-tl { top: 6px; left: 7px; }
.uno-card.is-large .uno-card-corner.is-br { bottom: 6px; right: 7px; }

.uno-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 2px;
}

.uno-btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.uno-btn-play {
  background: linear-gradient(180deg, #ff5a3c, #c62828);
  border-color: #fff;
}
.uno-btn-muted {
  background: rgba(0,0,0,.25);
  color: rgba(255,255,255,.8);
}
.uno-btn-danger {
  background: rgba(0,0,0,.4);
  border-color: rgba(255,180,160,.45);
  color: #ffc8b8;
}

.uno-color-picker {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  padding: 16px;
  border-radius: 18px;
  background: rgba(6, 28, 18, .97);
  border: 2px solid rgba(255,255,255,.2);
  z-index: 40;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.uno-color-picker p {
  margin: 0 0 12px;
  font-weight: 800;
  color: #fff;
}
.uno-color-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}
.uno-color-swatch {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}
.uno-color-swatch.is-r { background: #d32f2f; }
.uno-color-swatch.is-g { background: #2e7d32; }
.uno-color-swatch.is-b { background: #1565c0; }
.uno-color-swatch.is-y { background: #f9a825; }

/* ── Spelkopplade FX ── */
.uno-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.uno-fx-banner {
  padding: 12px 22px;
  border-radius: 16px;
  border: 3px solid #fff;
  background: #111;
  color: #fff;
  font-size: clamp(22px, 7vw, 36px);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 12px 36px rgba(0,0,0,.45);
  animation: unoBannerIn .28s cubic-bezier(.2,.9,.2,1);
}
.uno-fx-banner.is-out {
  animation: unoBannerOut .25s ease forwards;
}
.uno-fx-banner.is-skip { background: #1565c0; }
.uno-fx-banner.is-reverse { background: #2e7d32; }
.uno-fx-banner.is-draw { background: #c62828; }
.uno-fx-banner.is-uno {
  background: linear-gradient(145deg, #ff5a3c, #c41e12);
  transform: rotate(-6deg);
}
.uno-fx-banner.is-win {
  background: linear-gradient(145deg, #f9a825, #ef6c00);
  color: #1a1a1a;
  font-size: clamp(26px, 8vw, 42px);
}
@keyframes unoBannerIn {
  from { transform: scale(.55) translateY(24px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes unoBannerOut {
  to { transform: scale(.8) translateY(-18px); opacity: 0; }
}
.uno-discard .uno-card.is-just-played {
  animation: unoDiscardLand .38s cubic-bezier(.2,.85,.25,1);
}
@keyframes unoDiscardLand {
  0% { transform: scale(.55) rotate(-18deg); opacity: .35; }
  60% { transform: scale(1.08) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.uno-deck.is-drew-pulse {
  animation: unoDeckPulse .34s ease;
}
@keyframes unoDeckPulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.1); }
}
.uno-hand.is-drew .uno-card:last-child {
  animation: unoCardDeal .4s ease;
}
.uno-hand.is-dealing .uno-card {
  animation: unoCardDeal .45s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes unoCardDeal {
  from { transform: translateY(-28px) scale(.7); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.uno-table.is-color-flash {
  animation: unoColorFlash .5s ease;
}
.uno-table.flash-r { --uno-flash: rgba(211, 47, 47, .35); }
.uno-table.flash-g { --uno-flash: rgba(46, 125, 50, .35); }
.uno-table.flash-b { --uno-flash: rgba(21, 101, 192, .35); }
.uno-table.flash-y { --uno-flash: rgba(249, 168, 37, .4); }
@keyframes unoColorFlash {
  0%, 100% { box-shadow: inset 0 0 0 0 transparent; }
  40% { box-shadow: inset 0 0 0 6px var(--uno-flash, rgba(255,255,255,.25)); }
}
.uno-table.is-turn-pulse {
  animation: unoTurnPulse .65s ease;
}
@keyframes unoTurnPulse {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(46, 230, 255, 0); }
  35% { box-shadow: inset 0 0 0 3px rgba(46, 230, 255, .55); }
}

@media (prefers-reduced-motion: reduce) {
  .uno-hand .uno-card,
  .uno-discard .uno-card.is-just-played,
  .uno-fx-banner,
  .uno-opp-row.is-uno-alert,
  .uno-table.is-color-flash,
  .uno-table.is-turn-pulse,
  .uno-deck.is-drew-pulse,
  .uno-hand.is-drew .uno-card:last-child,
  .uno-hand.is-dealing .uno-card {
    animation: none !important;
    transition: none !important;
  }
}

.mango-act-uno {
  border-color: rgba(255, 90, 60, .45) !important;
  color: #ffb0a0 !important;
  background: rgba(255, 90, 60, .12) !important;
}

.wa-head-uno {
  flex: none;
  margin-left: auto;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 90, 60, .45);
  background: rgba(255, 90, 60, .14);
  color: #ffb0a0;
  font-size: 12px;
  font-weight: 800;
}

.wa-thread-title {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}


/* --- Studio Mixer --- */
.studio-mixer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(46, 230, 255, 0.14);
}
.studio-mixer[hidden] { display: none !important; }
.studio-mixer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(232, 251, 255, 0.85);
}
.studio-mixer-row[hidden] { display: none !important; }
.studio-mixer-row span {
  width: 88px;
  flex: none;
}
.studio-mixer-row input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--cyan, #2ee6ff);
}
.studio-mixer-val {
  width: 42px;
  flex: none;
  text-align: right;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: rgba(46, 230, 255, 0.9);
  font-variant-numeric: tabular-nums;
}
/* Ligagrupper & gruppchatt */
.convo-row.is-group .avatar {
  background: linear-gradient(145deg, #0d2238, #1b5f86);
  font-size: 16px;
  display: grid;
  place-items: center;
}
.group-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.group-thread-title {
  flex: 1;
  min-width: 0;
}
.group-thread-title b {
  display: block;
  font-size: 16px;
}
.group-thread-title small {
  display: block;
  opacity: 0.7;
  font-size: 12px;
}
.group-thread[data-theme="ishockey"] {
  --group-accent: #19d3ee;
}
.group-thread[data-theme="fotboll"] {
  --group-accent: #3ecf7a;
}
.group-thread[data-theme="rock"] {
  --group-accent: #c45c26;
}
.group-thread .group-thread-head {
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13, 34, 56, 0.95), rgba(27, 95, 134, 0.55));
  border: 1px solid color-mix(in srgb, var(--group-accent, #19d3ee) 40%, transparent);
}
.group-thread[data-theme="fotboll"] .group-thread-head {
  background: linear-gradient(135deg, rgba(11, 42, 23, 0.95), rgba(35, 130, 71, 0.55));
}
.group-thread[data-theme="rock"] .group-thread-head {
  background: linear-gradient(135deg, rgba(40, 18, 8, 0.95), rgba(140, 55, 20, 0.55));
}
.bubble-from {
  display: block;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.7;
  margin-bottom: 2px;
}
.group-theme-edit .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-size: 13px;
  font-weight: 700;
}
.group-theme-edit .field input[type="text"],
.group-theme-edit .field select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
}
.group-theme-edit .field select option {
  color: #111;
  background: #fff;
}
.group-manage-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat.group-thread {
  overflow: hidden;
  gap: 0;
  min-height: 0;
}
.chat.group-thread .group-thread-msgs {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.chat.group-thread .group-composer {
  flex: none;
  margin-top: 6px;
}

.group-tip-card {
  flex: none;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(8, 28, 40, 0.92);
  border: 1px solid rgba(25, 211, 238, 0.28);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.group-tip-card.is-collapsed {
  padding: 6px 10px;
  gap: 0;
}
.group-tip-card.is-collapsed .group-tip-body {
  display: none;
}
.group-thread[data-theme="fotboll"] .group-tip-card {
  border-color: rgba(62, 207, 122, 0.35);
  background: rgba(8, 32, 18, 0.92);
}
#sheet-body .group-tip-top,
.group-tip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0 !important;
  padding: 4px 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.group-tip-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.group-tip-top b,
.group-tip-title b {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-tip-title small {
  font-size: 11px;
  font-weight: 600;
  color: rgba(232, 251, 255, 0.55);
}
.group-tip-acts {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}
.group-tip-chev {
  color: rgba(46, 230, 255, 0.7);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.group-tip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.group-tip-more {
  flex: none;
  border: 1px solid rgba(25, 211, 238, 0.4);
  background: rgba(25, 211, 238, 0.12);
  color: #8fe9ff;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
/* Gruppchatt: sheet-titelavatar alltid liten (inte “jättebakgrund”) */
#sheet.is-thread .wa-thread-title .wa-head-avatar,
#sheet.is-thread #sheet-title .wa-head-avatar {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
}
#sheet.is-thread .wa-thread-title .wa-head-avatar img,
#sheet.is-thread #sheet-title .wa-head-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}
.group-tip-match {
  padding: 8px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.group-tip-teams {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.group-tip-when {
  opacity: 0.65;
  font-size: 11px;
  flex: none;
}
.group-tip-picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.group-tip-picks .league-pick {
  padding: 7px 0;
  font-size: 14px;
}
.group-tip-loading {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}
.group-composer.wa-composer {
  margin-top: auto;
}

.group-tip-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.group-tip-pair {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}
.group-tip-vs {
  opacity: 0.45;
  font-weight: 700;
  flex: none;
}

/* —— Quick Cut (social-editor chrome) ——
   Z: canvas(1) < floats(3) < rail(14) < dock(18) < head(20) < sheets(26)
   Hit-test: .qc-layer=none; .qc-float=auto only when [data-qc-interact="1"]
*/
#quick-cut {
  position: fixed;
  inset: 0;
  z-index: 36;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  --qc-cyan: #2ee6ff;
  --qc-ink: #041014;
  --qc-snap: #2ee6ff;
  --qc-glass: rgba(0, 0, 0, .42);
  --qc-glass-border: rgba(255, 255, 255, .14);
}
#quick-cut[hidden] { display: none !important; }
body.quick-cut-open { overflow: hidden; }

.qc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-height: 56px;
  padding: calc(env(safe-area-inset-top) + 8px) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent);
}
.qc-head-mid { flex: 1; min-width: 0; text-align: center; }
.qc-head-mid h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
}
.qc-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.qc-dots i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}
.qc-dots i.is-on { background: #fff; }
.qc-icon-btn,
.qc-post {
  flex: none;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, .4);
  color: #fff;
}
.qc-icon-btn { width: 42px; font-size: 22px; font-weight: 400; }
.qc-post {
  padding: 0 16px;
  font-weight: 800;
  background: var(--qc-snap, #2ee6ff);
  color: #041014;
  border: none;
  box-shadow: none;
}
.qc-post:disabled { opacity: .45; }
.qc-preview-btn {
  flex: none;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Text: flytande glas-box (samma look som right-rail) */
#quick-cut.qc-texting .qc-rail,
#quick-cut.qc-texting .qc-dock {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#quick-cut.qc-texting #qc-pop-text,
#quick-cut #qc-pop-text:not([hidden]) {
  bottom: auto !important;
  width: auto !important;
  max-width: min(420px, calc(100% - 20px)) !important;
  max-height: min(52vh, 420px) !important;
  transform: none !important;
  border-radius: 20px !important;
  padding: 10px 12px 12px !important;
  animation: qcPopIn .2s cubic-bezier(.2,.8,.2,1) !important;
  z-index: 28 !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  background: rgba(4, 12, 16, .55) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.25) !important;
  backdrop-filter: blur(18px) saturate(1.25) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .32) !important;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#quick-cut.qc-framing #qc-pop-text,
#quick-cut #qc-pop-text.is-framing:not([hidden]),
#quick-cut.qc-linking #qc-pop-text,
#quick-cut #qc-pop-text.is-linking:not([hidden]),
#quick-cut.qc-placing #qc-pop-text,
#quick-cut #qc-pop-text.is-placing:not([hidden]) {
  max-height: min(62vh, 500px) !important;
}
#quick-cut.qc-texting #qc-pop-text:not(.is-moved),
#quick-cut #qc-pop-text:not([hidden]):not(.is-moved) {
  left: max(10px, env(safe-area-inset-left)) !important;
  right: max(10px, env(safe-area-inset-right)) !important;
  top: calc(env(safe-area-inset-top) + 56px) !important;
  margin: 0 auto !important;
}
#quick-cut #qc-pop-text.is-moved {
  right: auto !important;
  margin: 0 !important;
}
#quick-cut #qc-pop-text.is-dragging {
  opacity: 0.96;
  user-select: none;
}
#quick-cut #qc-pop-text .qc-pop-head {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#quick-cut.qc-texting #qc-pop-text::before,
#quick-cut #qc-pop-text:not([hidden])::before { display: none !important; }
#quick-cut.qc-texting .qc-sheet-handle,
#quick-cut #qc-pop-text:not([hidden]) .qc-sheet-handle {
  display: none !important;
}
#quick-cut.qc-texting #qc-pop-text .qc-text-compose,
#quick-cut #qc-pop-text:not([hidden]) .qc-text-compose {
  margin-top: 0;
}
#quick-cut.qc-texting .qc-caption,
#quick-cut #qc-pop-text:not([hidden]) .qc-caption {
  font-size: 16px; /* iOS: avoid zoom-on-focus */
  height: 44px;
}
#quick-cut.qc-texting .qc-font-strip,
#quick-cut #qc-pop-text:not([hidden]) .qc-font-strip {
  margin-top: 8px;
}
.qc-preview-btn.is-on {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}
.qc-foot-cut {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.qc-workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #000;
}

.qc-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 560px;
}
.qc-canvas-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  aspect-ratio: 9 / 16;
  max-height: min(78vh, 720px);
  border-radius: 0;
  overflow: hidden;
  background: #000;
  touch-action: none;
  box-shadow: none;
}
.qc-canvas-wrap #qc-canvas { border-radius: 0; }
#qc-canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* fill = 1:1 mapping canvas bitmap ↔ overlay (exact sticker/text placement) */
  object-fit: fill;
  pointer-events: none; /* gestures on wrap; canvas never steals */
}
.qc-gif-live {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  max-width: none;
  max-height: none;
}
#qc.is-gif #qc-canvas {
  position: relative;
  z-index: 1;
  background: transparent;
}
#qc-safe-guides {
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}
.qc-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none; /* empty layer must not steal pan/pinch */
  overflow: visible;
}
.qc-float {
  position: absolute;
  transform: translate(-50%, -50%);
  touch-action: none;
  user-select: none;
  cursor: grab;
  pointer-events: auto; /* layer is none — only floats receive hits */
  z-index: 3;
}
.qc-float.sticker {
  z-index: 3;
}
.qc-float.sticker.is-selected {
  z-index: 5;
}
.qc-float.text {
  z-index: 20;
}
.qc-float.text.is-selected {
  z-index: 21;
}
#quick-cut[data-qc-interact="0"] .qc-float {
  pointer-events: none;
}
.qc-float.text {
  font-family: "Avenir Next", Avenir, "Nunito Sans", system-ui, sans-serif;
  font-size: clamp(16px, 4.5vw, 22px);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,.85);
  white-space: nowrap;
  padding: 4px 8px;
  box-sizing: border-box;
}
.qc-float.text.is-frame {
  width: 42%;
  max-width: 92%;
  min-width: 110px;
  aspect-ratio: 1 / 1.414; /* fallback; resize sätter bredd/höjd fritt */
  height: auto;
  max-height: 70%;
  padding: 7% 8%;
  border-radius: 14px;
  background: rgba(248, 252, 255, .55);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  white-space: normal;
  text-align: left;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  overflow: hidden;
}
.qc-float.text.is-frame [data-role="label"] {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.28;
  text-align: left;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 14;
}
.qc-float.text.is-link {
  white-space: nowrap;
  padding: 0.55em 1.15em;
  border-radius: 999px;
  background: rgba(8, 18, 24, .82);
  border: 1.5px solid rgba(46, 230, 255, .65);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .12);
  color: #e8fbff;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: none;
}
.qc-float.text.is-link [data-role="label"] {
  white-space: nowrap;
}
.qc-link-row {
  margin: 0 0 8px;
}
.qc-link-url {
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(8, 18, 24, .72);
  color: #e8fbff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
}
.qc-link-url::placeholder {
  color: rgba(232, 251, 255, .4);
}
#quick-cut.qc-linking .qc-font-strip,
#quick-cut.qc-linking .qc-color-row {
  display: none;
}
.qc-frame-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 2px 0 4px;
  background: linear-gradient(180deg, rgba(4, 12, 16, .72) 70%, rgba(4, 12, 16, .45));
}
.qc-frame-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(8, 18, 24, .65);
  color: rgba(232, 251, 255, .85);
  border-radius: 999px;
  padding: 8px 2px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  width: 100%;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-frame-chip.is-on {
  border-color: rgba(46, 230, 255, .75);
  background: rgba(46, 230, 255, .16);
  color: #fff;
}
#qc-caption.qc-caption-frame {
  min-height: 52px;
  max-height: 96px;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.35;
  width: 100%;
  padding-top: 8px;
  padding-bottom: 8px;
  box-sizing: border-box;
}
#quick-cut #qc-pop-text .qc-text-compose {
  align-items: flex-start;
}
#quick-cut #qc-pop-text .qc-font-strip,
#quick-cut #qc-pop-text .qc-color-row {
  flex-shrink: 0;
}
/* Size set in px by quick_cut.applyFloatTransform — avoid height:auto + translate(-50%) jump. */
.qc-float.sticker { width: 22%; height: auto; aspect-ratio: 1; box-sizing: border-box; }
.qc-float-sticker-host {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.qc-float-sticker-host svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.qc-float [data-role="label"] {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.qc-float.is-selected {
  outline: 2px solid rgba(255, 255, 255, .95);
  outline-offset: 4px;
  border-radius: 4px;
  box-shadow: none;
}
.qc-float-del {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff3b30;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: none;
  z-index: 5;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
  pointer-events: auto;
}
.qc-float.is-selected .qc-float-del { display: grid; place-items: center; }
.qc-float-resize,
.qc-float-rotate {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 10px;
  font-weight: 800;
  display: none;
  place-items: center;
  z-index: 5;
  touch-action: none;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.qc-float.is-selected .qc-float-resize,
.qc-float.is-selected .qc-float-rotate { display: grid; }
.qc-float-resize { right: -10px; bottom: -10px; cursor: nwse-resize; }
.qc-float-rotate { left: -10px; top: -10px; cursor: grab; }

.qc-rail {
  position: absolute;
  right: max(10px, env(safe-area-inset-right));
  top: 48%;
  transform: translateY(-50%);
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  pointer-events: auto;
}
.qc-rail-btn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .38);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 15px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background .12s ease, transform .12s ease;
}
.qc-rail-btn:active { transform: scale(.92); }
.qc-rail-ico {
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.55);
}
.qc-rail-btn small {
  display: none;
}
.qc-rail-btn.is-on {
  background: #2ee6ff;
  color: #041014;
  box-shadow: none;
}
.qc-rail-btn.is-on .qc-rail-ico { text-shadow: none; }
#quick-cut.has-sheet .qc-rail {
  top: 36%;
  transform: translateY(-50%);
}

.qc-pop,
.qc-sheet {
  position: absolute;
  z-index: 12;
  width: min(42vw, 228px);
  max-height: min(58vh, 420px);
  overflow: auto;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(4, 12, 16, .55);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 8px 28px rgba(0,0,0,.32);
  animation: qcPopIn .2s cubic-bezier(.2,.8,.2,1);
  pointer-events: auto;
}
/* Closed sheets must not cover canvas after close */
.qc-pop[hidden],
.qc-sheet[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden;
}
.qc-pop-left {
  left: max(10px, env(safe-area-inset-left));
  top: 10%;
}
.qc-pop-right {
  right: max(72px, env(safe-area-inset-right));
  top: 8%;
  width: min(48vw, 260px);
}
.qc-pop-center {
  left: 50%;
  bottom: 12px;
  top: auto;
  transform: translateX(-50%);
  width: min(92vw, 380px);
  max-height: min(44vh, 340px);
  animation-name: qcPopInCenter;
}
.qc-sheet-handle {
  display: none;
  width: 40px;
  height: 5px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
}
.qc-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 40px;
}
.qc-pop-head strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
}
.qc-pop-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 17px;
}
.qc-pop-done {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.qc-font-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding: 2px 2px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.qc-font-strip::-webkit-scrollbar { display: none; }
.qc-font-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 68px;
  min-height: 64px;
  margin: 0;
  padding: 8px 4px 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}
.qc-font-chip-sample {
  font-size: 22px;
  line-height: 1;
  letter-spacing: .02em;
}
.qc-font-chip small {
  font-size: 9px;
  font-weight: 600;
  opacity: .62;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Outfit, system-ui, sans-serif;
}
.qc-font-chip.is-on {
  background: #fff;
  color: #111;
}
.qc-font-chip.is-on small { opacity: .7; color: #111; }

.qc-color-row { margin-top: 10px; }
.qc-color-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.qc-color-strip::-webkit-scrollbar { display: none; }
.qc-color-swatch {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  background: var(--sw, #fff);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
  cursor: pointer;
}
.qc-color-swatch.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 2px #111, 0 0 0 4px #fff;
}
.qc-chip-lg {
  min-width: 48px;
  min-height: 44px;
  height: 44px;
  font-size: 16px;
  padding: 0 16px;
}
@keyframes qcPopIn {
  from { opacity: 0; transform: translateY(10px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes qcPopInCenter {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to { opacity: 1; transform: translateX(-50%); }
}
@keyframes qcSheetIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.qc-hint {
  margin: 8px 0 0;
  font-size: 11px;
  opacity: .65;
}
.qc-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.qc-caption {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  padding: 0 12px;
  font-size: 15px;
}
.qc-select {
  flex: 1;
  min-width: 0;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  padding: 0 10px;
  font-size: 13px;
}
.qc-color {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.qc-chip {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.qc-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  align-items: flex-end;
  padding: 2px 0 4px;
}
.qc-filters::-webkit-scrollbar { display: none; }
.qc-filter {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: #dff9ff;
  font-size: 12px;
  font-weight: 700;
}
.qc-filter.qc-filter-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: auto;
  min-width: 64px;
  padding: 6px 4px;
  border-radius: 14px;
}
.qc-filter-thumb {
  position: relative;
  display: block;
  flex: none;
  width: 52px;
  height: 68px;
  margin: 0 auto 5px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c3b52 0%, #b04a6a 55%, #f0a050 100%);
}
.qc-filter-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.qc-filter-label {
  display: block;
  max-width: 64px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, .75);
}
.qc-filter.is-on {
  background: #fff;
  border-color: #fff;
  color: #111;
}
.qc-filter.qc-filter-card.is-on {
  background: rgba(255, 255, 255, .16);
  border-color: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px #fff;
}
.qc-filter.qc-filter-card.is-on .qc-filter-label {
  color: #fff;
}
.qc-sticker-chrome {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.qc-sticker-tabs {
  display: flex;
  gap: 6px;
}
.qc-sticker-tab {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.75);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}
.qc-sticker-tab.is-on {
  background: rgba(0, 229, 255, .16);
  border-color: rgba(0, 229, 255, .4);
  color: #fff;
}
.qc-sticker-search {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: #fff;
  font-size: 14px;
  padding: 9px 12px;
}
.qc-stickers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.qc-sticker-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 84px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  padding: 6px 4px 5px;
  overflow: hidden;
  color: #fff;
}
.qc-sticker-btn.is-loading {
  opacity: .55;
  pointer-events: none;
}

.qc-sticker-btn.is-lottie .qc-sticker-preview svg {
  width: 100% !important;
  height: 100% !important;
}
.qc-sticker-btn.is-fallback {
  font-size: 22px;
  font-weight: 700;
  color: #7adfff;
}
.qc-sticker-btn.is-emoji {
  font-size: 30px;
}
.qc-sticker-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}
.qc-sticker-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.qc-sticker-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
}
.qc-sticker-more {
  width: 100%;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0, 229, 255, .12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
}
.qc-zoom-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}
.qc-zoom-val {
  min-width: 44px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
}
.qc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
}
.qc-field input[type="range"] {
  width: 100%;
  accent-color: #2ee6ff;
}
.qc-music-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow: auto;
}
.qc-music-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #e8fbff;
}
.qc-music-item:not(:has(img)) {
  grid-template-columns: minmax(0, 1fr);
}
.qc-music-item img {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  margin: 0;
  flex: none;
  background: rgba(0, 0, 0, .28);
}
.qc-music-item strong {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-music-item:not(:has(img)) strong {
  grid-column: 1;
}
.qc-music-item i {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  font-style: normal;
  font-size: 11px;
  opacity: .65;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-music-item:not(:has(img)) i {
  grid-column: 1;
}
.qc-music-item.is-on {
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .12);
}

.qc-dock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 18;
  background: linear-gradient(180deg, transparent, rgba(4, 10, 14, .88) 28%);
  padding-top: 4px;
}
.qc-steps {
  display: flex;
  gap: 6px;
  padding: 6px 14px 2px;
  overflow-x: auto;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}
.qc-step {
  flex: none;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: rgba(232, 251, 255, .62);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
}
.qc-step.is-on {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
}

.qc-filmstrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  justify-content: center;
  padding: 8px 14px;
  -webkit-overflow-scrolling: touch;
}
.qc-thumb {
  position: relative;
  flex: none;
  width: 44px;
  height: 66px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #122028;
  padding: 0;
  cursor: grab;
  touch-action: none;
  transition: border-color .15s ease, transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}
.qc-thumb.is-on {
  border-color: #fff;
  transform: translateY(-2px);
}
.qc-thumb.is-dragging {
  opacity: .45;
  cursor: grabbing;
  transform: scale(.92);
  border-color: rgba(46, 230, 255, .65);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  z-index: 2;
}
.qc-thumb.is-drop-before {
  box-shadow: inset 3px 0 0 #2ee6ff;
}
.qc-thumb.is-drop-after {
  box-shadow: inset -3px 0 0 #2ee6ff;
}
.qc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.qc-thumb-num {
  position: absolute;
  left: 4px;
  bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: 1px 5px;
  border-radius: 999px;
}

.qc-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.qc-foot-mid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.qc-link {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 650;
  padding: 0;
}
.qc-secondary,
.qc-primary {
  height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 750;
  font-size: 14px;
  min-width: 104px;
}
.qc-secondary {
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
}
.qc-primary {
  border: none;
  background: #2ee6ff;
  color: #041014;
  box-shadow: none;
}
.qc-primary:disabled,
.qc-secondary:disabled { opacity: .45; }

/* —— Mobile: full-bleed media + overlay chrome + iOS sheets —— */
@media (max-width: 720px) {
  #quick-cut {
    background: #000;
  }
  .qc-head {
    position: absolute;
    left: 0; right: 0; top: 0;
    z-index: 20;
    min-height: 52px;
    padding: calc(env(safe-area-inset-top) + 8px) 14px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.28) 65%, transparent);
    pointer-events: none;
  }
  .qc-head > * { pointer-events: auto; }
  .qc-head-mid h2 {
    font-size: 15px;
    font-weight: 800;
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
  }
  /* Progress dots only — wizard pills hidden in dock */
  .qc-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 5px;
  }
  .qc-dots i {
    width: 16px;
    height: 3px;
    border-radius: 999px;
  }
  .qc-icon-btn {
    width: 44px; height: 44px;
    background: rgba(0,0,0,.4);
    border-color: rgba(255,255,255,.16);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
  .qc-preview-btn {
    height: 36px;
    padding: 0 10px;
    font-size: 11px;
    max-width: 34vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .qc-post {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 999px;
  }

  .qc-workspace {
    position: absolute;
    inset: 0;
    z-index: 1; /* below head/dock overlays; sheets hide dock via :has */
    padding: 0;
    background: #000;
  }
  .qc-stage {
    max-width: none;
    width: 100%;
    height: 100%;
  }
  .qc-canvas-wrap {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    overflow: visible; /* selection handles stay visible at edges */
  }
  #qc-canvas {
    object-fit: fill;
    border-radius: 0;
  }

  .qc-rail {
    right: max(12px, env(safe-area-inset-right));
    top: 44%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 14;
    flex-direction: column;
    padding: 0;
    border-radius: 0;
    gap: 12px;
    background: transparent;
  }
  .qc-rail-btn {
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 50%;
    font-size: 16px;
  }
  .qc-rail-btn small { display: none; }
  .qc-rail-btn.is-on {
    background: #fff;
    color: #111;
    box-shadow: none;
  }

  /* Snap-style bottom sheets (stickers/filter/musik…) — text har egen flytande glas-box */
  .qc-pop:not(#qc-pop-text),
  .qc-sheet:not(#qc-pop-text),
  .qc-pop-left:not(#qc-pop-text),
  .qc-pop-right:not(#qc-pop-text),
  .qc-pop-center:not(#qc-pop-text) {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: min(48dvh, 400px);
    transform: none;
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-bottom: 0;
    background: rgba(4, 12, 16, .58);
    -webkit-backdrop-filter: blur(22px) saturate(1.25);
    backdrop-filter: blur(22px) saturate(1.25);
    padding: 6px 14px calc(12px + env(safe-area-inset-bottom));
    animation: qcSheetIn .22s cubic-bezier(.22, 1, .36, 1);
    z-index: 26;
    box-shadow: 0 -12px 40px rgba(0,0,0,.35);
  }
  .qc-pop[hidden],
  .qc-sheet[hidden] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden;
  }
  .qc-sheet-handle { display: block; }
  .qc-pop::before,
  .qc-sheet::before { content: none; display: none; }
  .qc-pop-head strong { font-size: 17px; }
  .qc-pop-done {
    min-height: 38px;
    padding: 0 18px;
    font-size: 14px;
  }
  .qc-filter {
    min-height: 40px;
    height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }
  .qc-filter.qc-filter-card {
    height: auto;
    min-height: 0;
    padding: 6px 4px;
    font-size: 12px;
  }
  .qc-sticker-btn {
    min-height: 78px;
    border-radius: 18px;
  }
  .qc-music-item {
    min-height: 56px;
    padding: 14px 16px;
  }
  .qc-stickers {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    max-height: min(36dvh, 280px);
  }
  .qc-music-list { max-height: min(28dvh, 220px); }

  /* Filmstrip + CTA dock over bottom gradient (not a wizard bar) */
  .qc-dock {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 18;
    padding-top: 36px;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(0,0,0,.25) 22%,
      rgba(0,0,0,.72) 55%,
      rgba(0,0,0,.92) 100%
    );
    pointer-events: none;
  }
  .qc-dock > * { pointer-events: auto; }
  .qc-steps { display: none; } /* no cramped step pills */
  .qc-filmstrip {
    justify-content: flex-start;
    padding: 0 16px 10px;
    gap: 10px;
    scrollbar-width: none;
  }
  .qc-filmstrip::-webkit-scrollbar { display: none; }
  .qc-thumb {
    width: 42px;
    height: 64px;
    border-radius: 10px;
    border-width: 2.5px;
    box-shadow: 0 4px 14px rgba(0,0,0,.35);
  }
  .qc-thumb.is-on {
    border-color: var(--qc-cyan, #00e5ff);
    transform: translateY(-3px) scale(1.04);
  }
  .qc-foot {
    padding: 4px 14px calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
  }
  .qc-foot-mid { gap: 12px; }
  .qc-link {
    font-size: 12px;
    opacity: .88;
    text-shadow: 0 1px 6px rgba(0,0,0,.5);
  }
  .qc-secondary,
  .qc-primary {
    height: 46px;
    min-width: 0;
    flex: 1;
    max-width: 148px;
    font-size: 15px;
    font-weight: 800;
  }
  .qc-secondary {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  /* Hide dock while a sheet is open so canvas stays reachable after close */
  #quick-cut.has-sheet .qc-dock,
  #quick-cut:has(.qc-pop:not([hidden])) .qc-dock,
  #quick-cut:has(.qc-sheet:not([hidden])) .qc-dock {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* Generic cut CSS transitions (map + quick cut preview) */
.chillor-cut-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  pointer-events: none;
  transform: translateZ(0);
}
.chillor-cut-fx-out,
.chillor-cut-fx-in {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.chillor-cut-fx-veil {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.chillor-cut-fx--flash .chillor-cut-fx-veil { background: #fff; }
.chillor-cut-fx--dip .chillor-cut-fx-veil { background: #000; }
.chillor-cut-fx--dipwhite .chillor-cut-fx-veil { background: #fff; }

.chillor-cut-fx-out,
.chillor-cut-fx-in {
  transition:
    opacity var(--duration, 700ms) cubic-bezier(0.4, 0, 0.2, 1),
    transform var(--duration, 700ms) cubic-bezier(0.4, 0, 0.2, 1);
}
/* Soft crossfade: start states (JS + CSS) — funkar även utan @keyframes / Reduce Motion. */
.chillor-cut-fx--crossfade .chillor-cut-fx-out { opacity: 1; }
.chillor-cut-fx--crossfade .chillor-cut-fx-in { opacity: 0; }
.chillor-cut-fx-layer--run.chillor-cut-fx--crossfade .chillor-cut-fx-out {
  opacity: 0 !important;
  animation: none;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--crossfade .chillor-cut-fx-in {
  opacity: 1 !important;
  animation: none;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--flash .chillor-cut-fx-veil,
.chillor-cut-fx-layer--run.chillor-cut-fx--dip .chillor-cut-fx-veil,
.chillor-cut-fx-layer--run.chillor-cut-fx--dipwhite .chillor-cut-fx-veil {
  animation: qcFxVeil var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--flash .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--dip .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--dipwhite .chillor-cut-fx-out {
  animation: qcFxFadeOut var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--flash .chillor-cut-fx-in,
.chillor-cut-fx-layer--run.chillor-cut-fx--dip .chillor-cut-fx-in,
.chillor-cut-fx-layer--run.chillor-cut-fx--dipwhite .chillor-cut-fx-in {
  animation: qcFxFadeIn var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--slideleft .chillor-cut-fx-out {
  animation: qcFxSlideOutLeft var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--slideleft .chillor-cut-fx-in {
  animation: qcFxSlideInRight var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--slideright .chillor-cut-fx-out {
  animation: qcFxSlideOutRight var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--slideright .chillor-cut-fx-in {
  animation: qcFxSlideInLeft var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--slideup .chillor-cut-fx-out {
  animation: qcFxSlideOutUp var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--slideup .chillor-cut-fx-in {
  animation: qcFxSlideInUp var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--whip .chillor-cut-fx-out {
  animation: qcFxWhipOut var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--whip .chillor-cut-fx-in {
  animation: qcFxWhipIn var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--wipe .chillor-cut-fx-in {
  clip-path: inset(0 100% 0 0);
  animation: qcFxWipe var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--spin .chillor-cut-fx-out {
  animation: qcFxSpinOut var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--spin .chillor-cut-fx-in {
  animation: qcFxSpinIn var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--glitch .chillor-cut-fx-out {
  animation: qcFxGlitchOut var(--duration, 700ms) steps(4) forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--glitch .chillor-cut-fx-in {
  animation: qcFxFadeIn var(--duration, 700ms) ease forwards;
}

/* ChillCut-parity extras */
.chillor-cut-fx-layer--run.chillor-cut-fx--bump .chillor-cut-fx-out {
  animation: qcFxBumpOut var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--bump .chillor-cut-fx-in {
  animation: qcFxBumpIn var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--pixel .chillor-cut-fx-out {
  animation: qcFxPixelOut var(--duration, 700ms) steps(5) forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--pixel .chillor-cut-fx-in {
  animation: qcFxFadeIn var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx--strobe .chillor-cut-fx-veil,
.chillor-cut-fx--neon .chillor-cut-fx-veil { background: #fff; }
.chillor-cut-fx--burn .chillor-cut-fx-veil { background: #ff5a00; }
.chillor-cut-fx-layer--run.chillor-cut-fx--strobe .chillor-cut-fx-veil,
.chillor-cut-fx-layer--run.chillor-cut-fx--neon .chillor-cut-fx-veil,
.chillor-cut-fx-layer--run.chillor-cut-fx--burn .chillor-cut-fx-veil {
  animation: qcFxStrobeVeil var(--duration, 700ms) steps(4) forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--strobe .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--neon .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--burn .chillor-cut-fx-out {
  animation: qcFxFadeOut var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--strobe .chillor-cut-fx-in,
.chillor-cut-fx-layer--run.chillor-cut-fx--neon .chillor-cut-fx-in,
.chillor-cut-fx-layer--run.chillor-cut-fx--burn .chillor-cut-fx-in {
  animation: qcFxFadeIn var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--iris .chillor-cut-fx-in {
  clip-path: circle(0% at 50% 50%);
  animation: qcFxIris var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--heart .chillor-cut-fx-in {
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%);
  animation: qcFxHeart var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--star .chillor-cut-fx-in {
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%);
  animation: qcFxStar var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--diamond .chillor-cut-fx-in {
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
  animation: qcFxDiamond var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--blob .chillor-cut-fx-in {
  clip-path: circle(0% at 50% 45%);
  animation: qcFxBlob var(--duration, 700ms) ease forwards;
}
.chillor-cut-fx-layer--run.chillor-cut-fx--iris .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--heart .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--star .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--diamond .chillor-cut-fx-out,
.chillor-cut-fx-layer--run.chillor-cut-fx--blob .chillor-cut-fx-out {
  animation: qcFxFadeOut var(--duration, 700ms) ease forwards;
}

@keyframes qcFxFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes qcFxFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes qcFxVeil {
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes qcFxSlideOutLeft { to { transform: translateX(-30%); opacity: 0; } }
@keyframes qcFxSlideInRight { from { transform: translateX(40%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qcFxSlideOutRight { to { transform: translateX(30%); opacity: 0; } }
@keyframes qcFxSlideInLeft { from { transform: translateX(-40%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qcFxSlideOutUp { to { transform: translateY(-25%); opacity: 0; } }
@keyframes qcFxSlideInUp { from { transform: translateY(35%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qcFxWhipOut { to { transform: translateX(-55%) skewX(-8deg); opacity: 0; filter: blur(4px); } }
@keyframes qcFxWhipIn { from { transform: translateX(55%) skewX(8deg); opacity: 0; filter: blur(4px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes qcFxWipe { to { clip-path: inset(0 0 0 0); } }
@keyframes qcFxSpinOut { to { transform: scale(.7) rotate(-25deg); opacity: 0; } }
@keyframes qcFxSpinIn { from { transform: scale(1.25) rotate(25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qcFxGlitchOut {
  25% { transform: translate(-4%, 2%); opacity: .6; filter: hue-rotate(90deg); }
  50% { transform: translate(5%, -3%); opacity: .3; }
  100% { opacity: 0; }
}
@keyframes qcFxBumpOut { to { transform: scale(1.12); opacity: 0; } }
@keyframes qcFxBumpIn { from { transform: scale(.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qcFxPixelOut {
  20% { filter: contrast(2) saturate(0); transform: scale(1.02); }
  50% { opacity: .35; filter: contrast(4) blur(1px); }
  100% { opacity: 0; }
}
@keyframes qcFxStrobeVeil {
  0%, 100% { opacity: 0; }
  15%, 35%, 55% { opacity: 1; }
  25%, 45%, 70% { opacity: 0; }
}
@keyframes qcFxIris { to { clip-path: circle(80% at 50% 50%); } }
@keyframes qcFxHeart {
  to {
    clip-path: polygon(
      50% 88%, 12% 52%, 12% 32%, 28% 18%, 50% 32%, 72% 18%, 88% 32%, 88% 52%
    );
  }
}
@keyframes qcFxStar {
  to {
    clip-path: polygon(
      50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
      50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%
    );
  }
}
@keyframes qcFxDiamond { to { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); } }
@keyframes qcFxBlob { to { clip-path: circle(78% at 50% 45%); } }

/* �� Studio UI polish (rail / dock / sheets) �� */
#studio .studio-top {
  padding: calc(env(safe-area-inset-top) + 10px) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.28) 70%, transparent);
}
#studio .studio-modes {
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
#studio .studio-mode {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .01em;
}
#studio .studio-mode.is-on {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
#studio-close {
  width: 42px;
  height: 42px;
  background: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
#studio-post {
  min-width: 98px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9a78, #ff5a3a 58%, #e03a22);
  box-shadow: 0 6px 18px rgba(255, 80, 40, .35);
  letter-spacing: .01em;
}

#studio .studio-rail {
  right: max(10px, env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-42%);
  gap: 6px;
  padding: 8px 6px;
  border-radius: 22px;
  background: rgba(6, 14, 18, .55);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .4);
}
#studio.has-panel .studio-rail {
  top: 38%;
  transform: translateY(-50%);
}
#studio .studio-rail .studio-tray-btn {
  width: 54px;
  min-width: 54px;
  min-height: 54px;
  padding: 7px 4px 6px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
#studio .studio-rail .studio-tray-btn:active {
  transform: scale(.94);
}
#studio .studio-rail .studio-tray-ico {
  font-size: 18px;
  line-height: 1;
  opacity: .95;
}
#studio .studio-rail .studio-tray-lbl {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(232, 251, 255, .72);
}
#studio .studio-rail .studio-tray-btn.is-on {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(46, 230, 255, .15);
}
#studio .studio-rail .studio-tray-btn.is-on .studio-tray-lbl {
  color: #b8f7ff;
}

#studio .studio-media-zoom {
  left: max(10px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
}
#studio .studio-wide-fit {
  left: max(10px, env(safe-area-inset-left));
  right: auto;
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 42px);
  transform: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(4, 10, 14, .62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
#studio.has-panel .studio-media-zoom {
  bottom: auto;
  top: 10px;
}
#studio.has-panel .studio-wide-fit {
  bottom: auto;
  top: 48px;
  left: max(10px, env(safe-area-inset-left));
  transform: none;
}
#studio .studio-wide-fit button {
  min-height: 30px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 750;
}
#studio .studio-wide-fit button.is-on {
  background: rgba(46, 230, 255, .22);
  color: #e8fbff;
}

#studio .studio-dock {
  gap: 10px;
  padding: 10px max(14px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 12px) max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent 0%, rgba(4, 10, 12, .35) 18%, rgba(4, 10, 12, .88) 100%);
}
#studio.has-panel:not(.is-texting) .studio-dock {
  max-height: min(48dvh, 400px);
  gap: 12px;
  padding-top: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  background: rgba(4, 12, 16, .55);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .32);
}
#studio.is-music-sheet.has-panel:not(.is-texting) .studio-dock {
  height: var(--studio-sheet-h, 70dvh);
  max-height: min(88dvh, 92vh) !important;
  min-height: 36dvh;
  overflow: hidden;
  padding-top: 0;
}
#studio.has-panel:not(.is-texting) .studio-dock::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
}
#studio.is-music-sheet.has-panel:not(.is-texting) .studio-dock::before {
  display: none;
}
#studio .studio-sheet-head {
  min-height: 40px;
  padding: 0 2px 2px;
}
#studio .studio-sheet-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
}
#studio #studio-sheet-done {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: #2ee6ff;
  color: #041014;
  box-shadow: 0 4px 14px rgba(46, 230, 255, .3);
}
#studio .studio-coach {
  padding: 0 4px 2px;
  color: rgba(232, 251, 255, .7);
  font-size: 12px;
  font-weight: 650;
  text-shadow: none;
}

#studio .studio-panel {
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
/* Flytande text — glas-look som right-rail (inte opak svart) */
#studio.is-texting #studio-text-panel,
#studio #studio-text-panel.studio-text-float:not([hidden]) {
  position: fixed !important;
  bottom: auto !important;
  width: auto !important;
  max-width: min(420px, calc(100vw - 20px)) !important;
  max-height: min(52vh, 420px) !important;
  z-index: 45 !important;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  background: rgba(4, 12, 16, .55) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.25) !important;
  backdrop-filter: blur(18px) saturate(1.25) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .32) !important;
  padding: 10px 12px 12px !important;
  animation: qcPopIn .2s cubic-bezier(.2,.8,.2,1);
}
#studio #studio-text-panel.is-framing:not([hidden]),
#studio.is-texting #studio-text-panel.is-framing,
#studio #studio-text-panel.is-linking:not([hidden]),
#studio.is-texting #studio-text-panel.is-linking,
#studio #studio-text-panel.is-placing:not([hidden]),
#studio.is-texting #studio-text-panel.is-placing {
  max-height: min(62vh, 500px) !important;
}
#studio.is-texting #studio-text-panel:not(.is-moved),
#studio #studio-text-panel.studio-text-float:not([hidden]):not(.is-moved) {
  left: max(10px, env(safe-area-inset-left)) !important;
  right: max(10px, env(safe-area-inset-right)) !important;
  top: calc(env(safe-area-inset-top) + 56px) !important;
  margin: 0 auto !important;
}
#studio #studio-text-panel.is-moved {
  right: auto !important;
  margin: 0 !important;
}
#studio #studio-text-panel.is-dragging {
  opacity: 0.96;
  user-select: none;
}
#studio #studio-text-panel .qc-pop-head,
.studio-text-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  min-height: 40px;
  border-bottom: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#studio #studio-text-panel .qc-pop-head strong,
.studio-text-float-head strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
}
#studio #studio-text-panel .qc-pop-done,
.studio-text-float-done {
  appearance: none;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(46, 230, 255, .92);
  color: #041014;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: none;
}
#studio #studio-text-panel .qc-text-compose {
  margin-top: 0;
  align-items: flex-start;
}
#studio #studio-text-panel .qc-font-strip,
#studio #studio-text-panel .qc-color-row {
  flex-shrink: 0;
}
#studio #studio-caption.qc-caption,
#studio.is-texting #studio-caption {
  flex: 1;
  min-width: 0;
  height: 44px !important;
  border-radius: 12px !important;
  border: 0 !important;
  background: rgba(255, 255, 255, .1) !important;
  color: #fff !important;
  padding: 0 12px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
#studio #studio-caption.studio-caption-frame,
#studio #studio-caption.qc-caption-frame {
  height: auto !important;
  min-height: 52px;
  max-height: 96px;
  padding: 8px 12px !important;
  resize: vertical;
  white-space: pre-wrap;
  line-height: 1.35;
  box-sizing: border-box;
}
#studio #studio-text-add.qc-chip,
#studio #studio-text-add {
  min-width: 48px;
  min-height: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
#studio #studio-text-panel .studio-text-hint {
  display: none;
}
#studio #studio-text-panel .studio-text-count {
  display: none;
}
#studio #studio-text-panel.is-linking .qc-font-strip,
#studio #studio-text-panel.is-linking .qc-color-row {
  display: none;
}

#studio .studio-filters {
  gap: 8px;
  padding: 4px 2px 6px;
}
#studio .studio-filters button.studio-filter-btn.is-on {
  border-color: rgba(46, 230, 255, .65);
  background: rgba(46, 230, 255, .18);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85);
}

#studio .studio-audience {
  gap: 12px;
  max-height: min(48vh, 380px);
  padding: 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#studio .studio-stickers {
  max-height: min(38vh, 300px);
  gap: 8px;
  padding: 6px 2px;
}
#studio .studio-sticker-info {
  color: rgba(232, 251, 255, .58);
  font-size: 11px;
}

#studio .studio-music-list,
#studio .studio-music-item {
  border-radius: 14px;
}
#studio .studio-music-item {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 16, 20, .7);
}
#studio .studio-music-item.is-on {
  border-color: rgba(46, 230, 255, .55);
  background: rgba(46, 230, 255, .12);
}

@media (max-width: 420px) {
  #studio .studio-rail {
    gap: 4px;
    padding: 6px 5px;
    right: max(8px, env(safe-area-inset-right));
  }
  #studio .studio-rail .studio-tray-btn {
    width: 50px;
    min-width: 50px;
    min-height: 50px;
    border-radius: 14px;
  }
  #studio .studio-rail .studio-tray-lbl { font-size: 8px; }
  #studio.has-panel:not(.is-texting) .studio-dock { max-height: min(50dvh, 420px); }
}
/* ===== Feed-first mobile redesign ===== */
#map-close {
  bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 18px);
}

#app.is-explore,
#app.is-map {
  background: #2a2a2a;
}

#app.is-explore #board,
#app.is-messages #board,
#app.is-profile #board {
  visibility: hidden;
  pointer-events: none;
}

#app.is-explore .top .brand-lockup,
#app.is-map .top .brand-lockup {
  opacity: .92;
}

#app.is-messages,
#app.is-profile {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(0, 229, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #071418 0%, #0a1c22 45%, #061014 100%);
}

.app-pane {
  position: absolute;
  z-index: 3;
  top: calc(env(safe-area-inset-top) + 56px);
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + var(--board-h));
  display: flex;
  flex-direction: column;
  padding: 0 max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

.app-pane[hidden] {
  display: none !important;
}

.pane-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.pane-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

.profile-root {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ch-nav {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 0;
  min-height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 229, 255, .14);
  background: linear-gradient(180deg, rgba(7, 20, 24, .88), rgba(5, 13, 18, .96));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
}

.ch-nav .tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 4px 2px;
  color: rgba(232, 251, 255, .55);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.ch-nav .tab.is-on {
  color: var(--cyan);
  text-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 42%, transparent);
}

.ch-nav .tab-ico {
  font-size: 18px;
  line-height: 1;
}

.ch-nav .tab-lbl {
  line-height: 1;
}

.ch-nav .tab-create .fota-word {
  font-size: 9px;
}

.ch-nav .tab-create .fota-chilli {
  font-size: 22px;
  transform: rotate(-10deg);
}

.ch-nav .tab-ico-me {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
}

.ch-nav .tab-follow-badge {
  position: absolute;
  top: 2px;
  right: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

#tab-profile {
  position: relative;
}

.ch-post-avatar img,
.tab-ico-me img,
.me img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.home-posts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.ch-post {
  overflow: hidden;
  border: 1px solid rgba(232, 251, 255, .08);
  border-radius: var(--radius-card);
  background: rgba(8, 22, 28, .72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  text-align: left;
  color: inherit;
  width: 100%;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.ch-post:focus,
.ch-post:focus-visible,
.ch-post:active {
  outline: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}

.ch-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 8px;
}

.ch-post-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  background:
    linear-gradient(#0d2830, #0d2830) padding-box,
    linear-gradient(135deg, var(--cyan), var(--magenta)) border-box;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
}

.ch-post-meta {
  min-width: 0;
  flex: 1;
}

.ch-post-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-post-eyebrow {
  display: block;
  margin-top: 2px;
  color: rgba(232, 251, 255, .55);
  font-size: 11px;
  font-weight: 600;
}

.ch-post-dying {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(46, 230, 255, .28);
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ch-post-dying:active {
  transform: scale(.96);
  background: rgba(0, 0, 0, .5);
}
.ch-post-dying-clock {
  font-family: Orbitron, "Rubik Mono One", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #7ef9ff;
  text-shadow: 0 0 10px rgba(46, 230, 255, .55);
  min-width: 3.2em;
  text-align: right;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ch-post-dying.is-gone .ch-post-dying-clock {
  color: #ff6b8a;
  text-shadow: 0 0 10px rgba(255, 80, 120, .5);
}
.ch-post-dead {
  flex: none;
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(46, 230, 255, .45));
  animation: ch-dead-pulse 1.6s ease-in-out infinite;
}
@keyframes ch-dead-pulse {
  0%, 100% { transform: scale(1); opacity: .92; }
  50% { transform: scale(1.06); opacity: 1; }
}

.brand-theme-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.brand-theme-pick--3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.brand-theme-pick--4 {
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 420px) {
  .brand-theme-pick--4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}
.brand-theme-card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(8, 18, 24, .55);
  color: #e8fbff;
  cursor: pointer;
  touch-action: manipulation;
}
.brand-theme-card img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 50%;
  background: #000;
}
.brand-theme-card span {
  font-size: 13px;
  font-weight: 800;
}
.brand-theme-card.is-on {
  border-color: color-mix(in srgb, var(--cyan) 75%, transparent);
  background: color-mix(in srgb, var(--cyan) 12%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--cyan) 28%, transparent),
    0 0 22px color-mix(in srgb, var(--cyan) 28%, transparent),
    0 0 36px color-mix(in srgb, var(--magenta) 16%, transparent);
}

.ch-post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: min(62vh, 520px);
  background: #0a151a;
  overflow: hidden;
}

.ch-post-media img,
.ch-post-media .ch-post-poster,
.ch-post-media .ch-post-slide,
.ch-post-media .ch-post-preview-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.ch-post-slide,
.ch-post-preview-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  background: #0a151a;
  pointer-events: none;
}

.ch-post-slide[hidden] {
  display: none !important;
}

.ch-post-preview-video[hidden] {
  display: none !important;
}

.ch-post-preview-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.ch-post-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 13, 18, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.ch-post-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 4px;
  color: rgba(232, 251, 255, .78);
  font-size: 13px;
  font-weight: 700;
}

.ch-post-actions span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ch-post-caption {
  margin: 0;
  padding: 0 12px 14px;
  color: rgba(232, 251, 255, .82);
  font-size: 13px;
  line-height: 1.4;
}

.ch-post-empty {
  margin: 8px 0;
  padding: 18px 14px;
  border-radius: var(--radius-card);
  border: 1px dashed rgba(0, 229, 255, .28);
  background: rgba(0, 229, 255, .06);
  color: rgba(232, 251, 255, .7);
  font-size: 14px;
  text-align: center;
}

.ch-stories .story.is-new img,
.stories .story.is-new img {
  border: 2.5px solid transparent;
  background:
    linear-gradient(#0d2830, #0d2830) padding-box,
    linear-gradient(135deg, var(--cyan), var(--magenta), var(--mango)) border-box;
  box-shadow: 0 0 14px rgba(0, 229, 255, .28);
}

.live {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 10px max(14px, env(safe-area-inset-right)) 4px max(14px, env(safe-area-inset-left));
  color: rgba(232, 251, 255, .55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.live strong {
  color: var(--cyan);
  font-weight: 800;
}

#next.next {
  margin: 0 max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left));
  color: rgba(232, 251, 255, .7);
  font-size: 13px;
}

/* Create menu + studio share tokens */
.create-menu {
  border-color: rgba(0, 229, 255, .28) !important;
  background: rgba(7, 20, 24, .94) !important;
}

#studio .studio-top,
#cut-editor .cut-top,
#cut-nav {
  border-color: rgba(0, 229, 255, .18);
}

#studio .studio-mode.is-on,
#studio .studio-tray-btn[aria-pressed="true"] {
  border-color: rgba(0, 229, 255, .55);
  color: var(--cyan);
}

.pane-messages .home-chats .wa-convo,
.pane-messages .home-chats .convo-row {
  border-radius: 16px;
}

@media (prefers-reduced-motion: reduce) {
  #tabbar #fota,
  #fota.tab-create { animation: none; }
}

.profile-extra {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.profile-crew {
  margin-top: 8px;
  padding: 12px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(232, 251, 255, .08);
  background: rgba(8, 22, 28, .55);
}

.profile-crew-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 4px;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.profile-crew-row .ch-post-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.profile-follow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0 0 8px;
  padding: 4px 0;
}

.profile-follow-row .ch-post-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.profile-follow-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.person-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.person-sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-sheet-avatar {
  width: 56px !important;
  height: 56px !important;
  font-size: 20px !important;
}

.person-sheet-meta {
  min-width: 0;
  flex: 1;
}

.person-sheet-meta strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
}

.person-sheet-meta p {
  margin: 4px 0 0;
  color: rgba(232, 251, 255, .62);
  font-size: 13px;
}

.person-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.person-sheet-btn {
  flex: 1;
  min-width: 120px;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .45);
  background: rgba(46, 230, 255, .14);
  color: var(--cyan);
  font-weight: 800;
}

.person-sheet-btn.is-on {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .06);
  color: rgba(232, 251, 255, .8);
}

.person-sheet-btn.is-back {
  border-color: rgba(255, 176, 32, .55);
  background: rgba(255, 176, 32, .16);
  color: #ffb020;
}

#snap-follow.is-back {
  border-color: rgba(255, 176, 32, .55);
  background: rgba(255, 176, 32, .16);
  color: #ffb020;
}

.person-sheet-btn.is-mango {
  border-color: transparent;
  background: var(--chilli);
  color: #fff;
}

.person-sheet-btn:disabled {
  opacity: .55;
}

.person-sheet-safety {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 2px;
}

.person-sheet-safety-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 8px;
}

.person-sheet-chip {
  margin: 0;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(46, 230, 255, .22);
  background:
    linear-gradient(165deg, rgba(18, 48, 56, .95), rgba(7, 20, 24, .88));
  color: rgba(232, 251, 255, .88);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.person-sheet-chip:active {
  transform: scale(.985);
}

.person-sheet-chip.is-mango {
  border-color: rgba(255, 176, 32, .42);
  background:
    linear-gradient(165deg, rgba(56, 40, 12, .95), rgba(24, 16, 6, .9));
  color: #ffc85a;
}

.person-sheet-chip.is-danger {
  border-color: rgba(255, 90, 90, .4);
  background:
    linear-gradient(165deg, rgba(56, 18, 22, .95), rgba(28, 8, 10, .9));
  color: #ff9a9a;
}

.person-sheet-chip.is-report {
  border-color: rgba(232, 251, 255, .16);
  color: rgba(232, 251, 255, .72);
}

.person-sheet-chip:disabled {
  opacity: .5;
}

.person-sheet-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(232, 251, 255, .42);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.person-sheet-link:disabled {
  opacity: .5;
}

.person-sheet-list-title {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(232, 251, 255, .55);
}

.person-sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.person-sheet-thumb {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: #0d2830;
}

.person-sheet-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.person-sheet-thumb span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

#snap-who.is-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(46, 230, 255, .35);
  text-underline-offset: 3px;
}

.profile-follow-btn {
  flex: none;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .45);
  background: rgba(46, 230, 255, .14);
  color: var(--cyan);
  font-weight: 800;
  font-size: 12px;
}

.profile-follow-btn.is-on {
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .06);
  color: rgba(232, 251, 255, .78);
}

.profile-follow-btn:disabled {
  opacity: .55;
}

.ch-btn-follow {
  margin-top: 6px;
  border: 1px solid rgba(0, 229, 255, .35) !important;
  border-radius: 12px !important;
  background: rgba(0, 229, 255, .12) !important;
  color: var(--cyan) !important;
}

#cut-editor,
#studio {
  --cyan: #00e5ff;
}

#cut-nav .cut-nav-btn.is-on,
#cut-editor .qc-tool.is-on {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, .5);
}

/* Post caption (hashtags) — separate from overlay text */
.studio-post-caption-bar,
.cut-post-caption-bar,
.qc-post-caption-wrap {
  position: relative;
  z-index: 7;
  padding: 0 max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  pointer-events: none;
}
.studio-top .studio-post-caption-bar {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 4px;
  padding: 0;
  z-index: 1;
}
.studio-top .studio-post-caption-bar .post-hashtag-chips {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
}
.cut-post-caption-bar {
  flex: none;
  padding-top: 4px;
  padding-bottom: 6px;
  background: linear-gradient(180deg, rgba(5, 13, 17, .72), transparent);
}
.studio-post-caption-bar > *,
.cut-post-caption-bar > *,
.qc-post-caption-wrap > * {
  pointer-events: auto;
}
#studio-post-caption,
#cut-post-caption,
.qc-post-caption {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(4, 12, 16, .78);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}
.studio-top #studio-post-caption {
  height: 38px;
  border-radius: 999px;
  background: rgba(6, 14, 18, .55);
  border-color: rgba(255, 255, 255, .14);
  font-size: 13px;
}
#studio-post-caption::placeholder,
#cut-post-caption::placeholder,
.qc-post-caption::placeholder {
  color: rgba(232, 251, 255, .45);
  font-weight: 550;
}
.qc-post-caption-wrap {
  padding: 0 12px 8px;
}
.post-hashtag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.post-hashtag-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, .28);
  background: rgba(0, 229, 255, .12);
  color: #7af0ff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .02em;
}
.profile-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 10px;
}
/* Unread: Chatt tab badge + sticky inbox banner */
.ch-nav .tab {
  position: relative;
}
.ch-nav .tab-badge {
  position: absolute;
  top: 0;
  right: calc(50% - 26px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--chilli);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(7, 20, 24, .95);
}
.ch-nav .tab-badge[hidden] {
  display: none !important;
}
.ch-nav .tab.has-mail .tab-lbl,
.ch-nav .tab.is-alert .tab-lbl {
  color: var(--chilli);
}
/* Ingen oändlig röd puls på ikonen — badge räcker. Kort ping bara vid nytt. */
.ch-nav .tab.is-alert.just-ping .tab-ico {
  animation: pm-alert-pulse .7s ease-in-out 2;
}
.pill.mango.has-mail {
  border-color: rgba(255, 90, 60, .55);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 90, 60, .25);
}

.home-unread {
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  margin: 8px 12px 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 90, 60, .42);
  border-radius: 16px;
  background: rgba(255, 90, 60, .12);
  color: var(--ink);
  text-align: left;
  font: inherit;
}
.home-unread[hidden] {
  display: none !important;
}
.home-unread-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chilli);
  box-shadow: 0 0 0 4px rgba(255, 90, 60, .22);
  animation: pm-alert-pulse 1.2s ease-in-out infinite;
}
.home-unread-copy {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}
.home-unread-go {
  flex: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.inbox-banner {
  position: fixed;
  z-index: 40;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  top: calc(env(safe-area-inset-top) + 58px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 229, 255, .35);
  border-radius: 16px;
  background: rgba(7, 20, 24, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  text-align: left;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.inbox-banner.is-in {
  transform: translateY(0);
  opacity: 1;
}
.inbox-banner[hidden] {
  display: none !important;
}
.inbox-banner-kicker {
  flex: none;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.inbox-banner-who {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.inbox-banner-go {
  flex: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

/* Persistent unread strip — stays until inbox opened / unread clears */
.inbox-nudge {
  position: fixed;
  z-index: 35;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(var(--board-h) + env(safe-area-inset-bottom) + 10px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 90, 60, .45);
  border-radius: 16px;
  background: rgba(7, 20, 24, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.inbox-nudge.is-in {
  animation: inbox-nudge-in .22s ease-out;
}
.inbox-nudge[hidden] {
  display: none !important;
}
.inbox-nudge-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--chilli);
  box-shadow: 0 0 0 4px rgba(255, 90, 60, .22);
  animation: pm-alert-pulse 1.2s ease-in-out infinite;
}
.inbox-nudge-copy {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 800;
}
.inbox-nudge-go {
  flex: none;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}
@keyframes inbox-nudge-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.ch-nav .tab.has-mail .tab-badge {
  display: inline-block;
}
.ch-nav .tab.is-alert.just-ping .tab-badge {
  animation: pm-alert-pulse .7s ease-in-out 2;
}

/* Musik: Aitra | Sök 30 s (Deezer/iTunes) */
.studio-music-tabs,
.qc-music-tabs,
.cut-music-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
}
.studio-music-tab,
.qc-music-tab,
.cut-music-tab {
  flex: 1;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: rgba(232, 251, 255, .78);
  font-size: 12px;
  font-weight: 750;
}
.studio-music-tab.is-on,
.qc-music-tab.is-on,
.cut-music-tab.is-on {
  border-color: rgba(46, 230, 255, .65);
  background: rgba(46, 230, 255, .16);
  color: #fff;
}
.studio-music-search-wrap,
.qc-music-search-form,
.cut-music-search-form {
  margin: 0 0 8px;
}
.studio-music-search-form,
.qc-music-search-form,
.cut-music-search-form {
  display: flex;
  gap: 6px;
  align-items: center;
}
.studio-music-search-form input,
.qc-music-search-form input,
.cut-music-search-form input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(8, 18, 24, .72);
  color: #e8fbff;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.studio-music-search-form button,
.qc-music-search-form button,
.cut-music-search-form button {
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(46, 230, 255, .45);
  background: rgba(46, 230, 255, .14);
  color: #9ff0ff;
  font-size: 13px;
  font-weight: 800;
}
/* qc-music-item layout: see grid rules above */

/* Chilli-växt / levnad — CSS-3D planta (djup + tillväxt + tilt) */
/* Levnad fyller sheet i app-formfaktor (telefon). */
#sheet.is-growth {
  background: #0c1210;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
}
#sheet.is-growth .sheet-head {
  padding: 0 14px;
  color: #f2f5f0;
}
#sheet.is-growth #sheet-close {
  border-color: rgba(255, 255, 255, .18);
  color: #f2f5f0;
  background: rgba(0, 0, 0, .28);
}
#sheet.is-growth #sheet-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chilli-growth {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 0 0 18px;
  text-align: center;
}
.chilli-growth.is-clean-3d {
  position: relative;
  flex: 1;
  min-height: 0;
  gap: 0;
  padding: 0;
}
.chilli-growth-visual {
  width: 100%;
  max-width: none;
  margin: 0;
  align-self: stretch;
}
.chilli-growth-visual.is-plant.is-3d {
  height: min(62vh, 560px);
  perspective: 980px;
  perspective-origin: 50% 40%;
}
.chilli-growth-visual.is-plant.is-3d.is-clean {
  /* Fyller hela sheet-body inkl. yta under footern. */
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  perspective: 1100px;
  perspective-origin: 50% 38%;
}
.chilli-growth-stage {
  --cg-scale: 1;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  touch-action: none;
  cursor: grab;
  background: #0c1210;
}
.cg3-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.cg3-bg-base,
.cg3-bg-soft,
.cg3-bg-floor {
  position: absolute;
  inset: 0;
  background-position: center 28%;
  background-size: cover;
  background-repeat: no-repeat;
}
/* Skalas till stage (app-bredd × formfaktor), plantzon uppåt. */
.cg3-bg-base {
  filter: saturate(.94) brightness(.8) contrast(1.02);
  opacity: .95;
}
.cg3-bg-soft {
  filter: blur(16px) saturate(.88) brightness(.64);
  opacity: 1;
  -webkit-mask-image: radial-gradient(
    ellipse 70% 68% at 50% 42%,
    #000 0%,
    #000 34%,
    rgba(0, 0, 0, .62) 56%,
    transparent 82%
  );
  mask-image: radial-gradient(
    ellipse 70% 68% at 50% 42%,
    #000 0%,
    #000 34%,
    rgba(0, 0, 0, .62) 56%,
    transparent 82%
  );
}
/* Fortsättning i botten — starkare blur under plantan/footern. */
.cg3-bg-floor {
  top: auto;
  height: 48%;
  background-position: center bottom;
  filter: blur(22px) saturate(.8) brightness(.55);
  opacity: 1;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, .45) 28%,
    #000 70%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, .45) 28%,
    #000 70%
  );
}
.cg3-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 58% at 50% 40%, rgba(6, 12, 10, .32), rgba(6, 12, 10, .08) 58%, transparent 78%),
    linear-gradient(180deg, rgba(8, 12, 10, .14) 0%, rgba(8, 12, 10, .28) 55%, rgba(8, 12, 10, .52) 100%);
  pointer-events: none;
}
.chilli-growth-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-12deg) scale(var(--cg-scale, 1));
  transform-origin: 50% 78%;
  will-change: transform;
}
.cg3-ground {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 260px;
  height: 56px;
  margin-left: -130px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .42), transparent 72%);
  transform: rotateX(78deg) translateZ(-20px);
  filter: blur(1px);
}
.cg3-pot {
  position: absolute;
  left: 50%;
  bottom: 32px;
  width: 148px;
  height: 96px;
  margin-left: -74px;
  transform-style: preserve-3d;
  transform: translateZ(0);
  animation: cg3-pot-in .55s cubic-bezier(.2, 1.1, .3, 1) both;
}
.cg3-pot-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #d4783a 0%, #9a3f16 55%, #6e2c0e 100%);
  clip-path: polygon(8% 0, 92% 0, 78% 100%, 22% 100%);
  border-radius: 0 0 12px 12px;
  box-shadow:
    12px 10px 22px rgba(0, 0, 0, .4),
    inset -8px 0 14px rgba(0, 0, 0, .2),
    inset 8px 0 10px rgba(255, 200, 140, .18);
  transform: translateZ(2px);
}
.cg3-pot-soil {
  position: absolute;
  left: 10px;
  right: 10px;
  top: -2px;
  height: 28px;
  transform-style: preserve-3d;
  transform: translateZ(11px);
  pointer-events: none;
}
.cg3-pot-soil-mound {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 26px;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(ellipse 70% 55% at 42% 38%, #8b5a34 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 62% 48%, #5a3820 0%, transparent 60%),
    radial-gradient(ellipse at 50% 55%, #6e4528 0%, #3d2414 58%, #24150c 100%);
  box-shadow:
    inset 0 3px 5px rgba(255, 210, 150, .12),
    inset 0 -6px 10px rgba(0, 0, 0, .45),
    0 4px 10px rgba(0, 0, 0, .35);
  transform: rotateX(58deg) translateZ(2px);
}
.cg3-pot-soil-clump {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a4e2e, #3a2212 70%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .35);
  transform: translateZ(14px);
}
.cg3-pot-soil-clump.is-a {
  left: 22%;
  top: 2px;
  width: 14px;
  height: 10px;
}
.cg3-pot-soil-clump.is-b {
  left: 48%;
  top: -2px;
  width: 18px;
  height: 12px;
  background: radial-gradient(circle at 40% 35%, #6a4028, #2e1a0e 72%);
}
.cg3-pot-soil-clump.is-c {
  right: 20%;
  top: 4px;
  width: 12px;
  height: 9px;
}
/* Stamfot i jordhögen ovanpå krukkanten. */
.cg3-plant {
  position: absolute;
  left: 50%;
  bottom: 118px;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 100%;
  animation: cg3-sway 5.5s ease-in-out 1.1s infinite;
}
.cg3-stem {
  position: absolute;
  left: -9px;
  bottom: -6px;
  width: 18px;
  height: var(--cg-stem-h, 210px);
  border-radius: 10px;
  background: linear-gradient(90deg, #245c30, #4db85c 45%, #2f7a3a);
  box-shadow:
    inset 2px 0 4px rgba(255, 255, 255, .25),
    inset -3px 0 6px rgba(0, 0, 0, .35),
    0 0 14px rgba(40, 140, 60, .22);
  transform-origin: 50% 100%;
  transform: translateZ(4px) scaleY(0);
  animation: cg3-stem-grow .75s cubic-bezier(.2, 1.05, .3, 1) .08s forwards;
}
.cg3-stem::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 28px;
  height: 14px;
  margin-left: -14px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #5a3820 0%, #2e1a0e 55%, transparent 72%);
  transform: translateZ(1px) rotateX(70deg);
  box-shadow: 0 0 8px rgba(40, 24, 12, .45);
  pointer-events: none;
}
.cg3-leaf {
  position: absolute;
  bottom: 108px;
  width: 58px;
  height: 32px;
  background: radial-gradient(circle at 30% 40%, #6fd87a, #2f8a40 70%);
  border-radius: 60% 10% 60% 10%;
  opacity: 0;
  transform-origin: left center;
  animation: cg3-leaf-in .5s ease .35s forwards;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
}
.cg3-leaf.is-left {
  left: -4px;
  transform: translateZ(10px) rotateZ(-28deg) rotateY(18deg) scale(0.2);
}
.cg3-leaf.is-right {
  left: 4px;
  border-radius: 10% 60% 10% 60%;
  transform-origin: right center;
  transform: translateZ(6px) rotateZ(32deg) rotateY(-16deg) scale(0.2);
  animation-delay: .42s;
}
.cg3-twig {
  --cg-thick: 7px;
  --cg-thick-tip: 3px;
  --cg-base-len: 40px;
  --cg-tip-len: 30px;
  --cg-ang: -28deg;
  --cg-bend: -10deg;
  --cg-x: 0px;
  --cg-z: 2px;
  position: absolute;
  left: var(--cg-x, 0px);
  bottom: 0;
  width: 0;
  height: 0;
  margin-bottom: calc(-1 * var(--cg-y, 0px));
  transform-style: preserve-3d;
  transform-origin: 0 0;
  opacity: 0;
  pointer-events: none;
  animation-duration: .55s;
  animation-timing-function: cubic-bezier(.2, 1.05, .3, 1);
  animation-fill-mode: forwards;
  animation-delay: var(--cg-delay, .2s);
}
.cg3-twig.is-right {
  transform: translateZ(var(--cg-z)) rotate(var(--cg-ang)) scaleX(0);
  animation-name: cg3-twig-in-right;
}
.cg3-twig.is-left {
  transform: translateZ(var(--cg-z)) scaleX(-1) rotate(var(--cg-ang)) scale(0, 1);
  animation-name: cg3-twig-in-left;
}
.cg3-twig-joint {
  position: absolute;
  left: -5px;
  top: calc(var(--cg-thick) * -0.55);
  width: calc(var(--cg-thick) * 1.15);
  height: calc(var(--cg-thick) * 1.15);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #6ecf78, #2f7a3a 62%, #1e4e28 100%);
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, .28),
    inset -2px -2px 3px rgba(0, 0, 0, .35),
    0 2px 6px rgba(0, 0, 0, .28);
  transform: translateZ(1px);
  opacity: 0;
  animation: cg3-twig-joint-in .35s ease forwards;
  animation-delay: var(--cg-delay, .2s);
}
.cg3-twig-arm {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cg-base-len);
  height: 0;
  transform-style: preserve-3d;
  transform-origin: 0 0;
}
.cg3-twig-seg {
  position: absolute;
  left: 0;
  top: calc(var(--cg-thick) * -0.5);
  height: var(--cg-thick);
  border-radius: 40% / 50%;
  transform-origin: 0 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 42%),
    linear-gradient(90deg, #245c30 0%, #4db85c 42%, #2f7a3a 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, .28),
    inset 0 -2px 3px rgba(0, 0, 0, .35),
    0 2px 5px rgba(0, 0, 0, .22);
}
.cg3-twig-seg-a {
  width: var(--cg-base-len);
  clip-path: polygon(0 8%, 100% 22%, 100% 78%, 0 92%);
  opacity: 0;
  transform: scaleX(0);
  animation: cg3-twig-seg-in .4s cubic-bezier(.2, 1.05, .3, 1) forwards;
  animation-delay: calc(var(--cg-delay, .2s) + .06s);
}
.cg3-twig-elbow {
  position: absolute;
  left: var(--cg-base-len);
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform-origin: 0 0;
  transform: rotate(var(--cg-bend));
}
.cg3-twig-seg-b {
  width: var(--cg-tip-len);
  height: var(--cg-thick-tip);
  top: calc(var(--cg-thick-tip) * -0.5);
  clip-path: polygon(0 0%, 100% 28%, 100% 72%, 0 100%);
  border-radius: 30% / 50%;
  opacity: 0;
  transform: scaleX(0);
  animation: cg3-twig-seg-in .38s cubic-bezier(.2, 1.05, .3, 1) forwards;
  animation-delay: calc(var(--cg-delay, .2s) + .16s);
}
.cg3-twig-leaf {
  position: absolute;
  left: calc(var(--cg-tip-len) * 0.28);
  top: calc(var(--cg-thick-tip) * -2.2);
  width: 16px;
  height: 10px;
  border-radius: 70% 8% 70% 8%;
  background: radial-gradient(circle at 30% 40%, #7ee08a, #2f8a40 72%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .22);
  transform-origin: 0 80%;
  transform: rotate(-28deg) scale(0.2);
  opacity: 0;
  animation: cg3-twig-leaf-in .4s ease forwards;
  animation-delay: calc(var(--cg-delay, .2s) + .22s);
}
.cg3-twig.is-wilted .cg3-twig-joint,
.cg3-twig.is-wilted .cg3-twig-seg {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 40%),
    linear-gradient(90deg, #5a4a32 0%, #7a6544 45%, #4a3a28 100%);
  filter: saturate(.45) brightness(.9);
}
.cg3-twig.is-wilted .cg3-twig-joint {
  background: radial-gradient(circle at 35% 30%, #8a7350, #5a4a32 70%, #3a2e1e 100%);
  filter: none;
}
.cg3-twig.is-wilted .cg3-twig-leaf {
  background: radial-gradient(circle at 30% 40%, #b8a070, #6a5a38 72%);
  filter: grayscale(.35) brightness(.85);
  transform: rotate(18deg) scale(0.2);
  animation-name: cg3-twig-leaf-in-wilt;
}
.cg3-node {
  position: absolute;
  left: 0;
  bottom: 0;
  transform-style: preserve-3d;
  transform:
    translate3d(var(--cg-x, 0px), var(--cg-y, 0px), var(--cg-z, 0px))
    rotateZ(var(--cg-rot, 0deg))
    scale(0.2);
  opacity: 0;
  animation: cg3-pepper-in .6s cubic-bezier(.15, 1.2, .35, 1) forwards;
  animation-delay: var(--cg-delay, .2s);
}
.cg3-node.is-wilted .cg3-pepper {
  filter: grayscale(.7) brightness(.85) saturate(.4);
}
.cg3-bud {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 10px;
  height: 14px;
  margin-left: -5px;
  border-radius: 55% 55% 60% 60% / 40% 40% 70% 70%;
  background: linear-gradient(160deg, #ff6a45, #b01414 70%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  opacity: 0;
  transform:
    translate3d(var(--cg-x, 0px), var(--cg-y, 0px), var(--cg-z, 0px))
    scale(.2);
  animation: cg3-bud-in .45s ease forwards;
  animation-delay: var(--cg-delay, .3s);
  pointer-events: none;
}
.cg3-bud.is-wilted {
  filter: grayscale(.65) brightness(.85) saturate(.45);
  background: linear-gradient(160deg, #9a7a55, #5a4030 70%);
}
.cg3-more {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translate3d(18px, var(--cg-y, -160px), 30px);
  min-width: 72px;
  padding: 6px 10px 7px;
  border-radius: 12px;
  text-align: left;
  background: rgba(8, 14, 12, .62);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  pointer-events: none;
  opacity: 0;
  animation: cg3-label-in .5s .55s ease forwards;
}
.cg3-more strong,
.cg3-more span {
  display: block;
  font-family: Outfit, 'Nunito Sans', system-ui, sans-serif;
  white-space: nowrap;
}
.cg3-more strong {
  font-size: 13px;
  font-weight: 800;
  color: #f6f8f4;
}
.cg3-more span {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(220, 232, 220, .72);
}
.cg3-pepper {
  position: relative;
  width: 36px;
  height: 52px;
  margin-left: -18px;
  border-radius: 55% 55% 60% 60% / 35% 35% 75% 75%;
  background:
    radial-gradient(circle at 32% 28%, #ff8a6a 0%, transparent 42%),
    linear-gradient(160deg, #ff5a3a 0%, #d01818 55%, #8a0e0c 100%);
  box-shadow:
    6px 10px 16px rgba(0, 0, 0, .35),
    inset -4px -6px 10px rgba(0, 0, 0, .28),
    inset 3px 4px 8px rgba(255, 220, 180, .35);
  transform: translateZ(12px);
}
.cg3-pepper-shine {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 8px;
  height: 16px;
  border-radius: 40%;
  background: rgba(255, 255, 255, .35);
  transform: rotate(-18deg);
}
.cg3-pepper-stem {
  position: absolute;
  left: 14px;
  top: -9px;
  width: 6px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(180deg, #3f9e52, #2a6a36);
  box-shadow: 0 0 6px rgba(60, 160, 80, .35);
}
.cg3-node.is-root .cg3-pepper {
  width: 44px;
  height: 64px;
  margin-left: -22px;
  box-shadow:
    0 0 26px rgba(255, 90, 40, .32),
    8px 12px 18px rgba(0, 0, 0, .4),
    inset -4px -6px 10px rgba(0, 0, 0, .28),
    inset 3px 4px 8px rgba(255, 220, 180, .4);
}
.cg3-label {
  position: absolute;
  top: -2px;
  min-width: 0;
  max-width: 128px;
  padding: 5px 9px 6px;
  border-radius: 12px;
  /* Motrotera chili-tilt + lyft framåt så namnet inte hamnar bakom frukt/stam. */
  transform:
    rotateZ(calc(-1 * var(--cg-rot, 0deg)))
    translateZ(78px);
  pointer-events: none;
  background: rgba(8, 14, 12, .78);
  border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .34);
  opacity: 0;
  animation: cg3-label-in .45s ease forwards;
  animation-delay: calc(var(--cg-delay, .2s) + .18s);
  z-index: 6;
}
.cg3-node.is-right .cg3-label {
  left: 26px;
  text-align: left;
}
.cg3-node.is-left .cg3-label {
  left: auto;
  right: 26px;
  text-align: right;
}
.cg3-node.is-root .cg3-label {
  left: 50%;
  right: auto;
  top: -48px;
  transform:
    rotateZ(calc(-1 * var(--cg-rot, 0deg)))
    translateX(-50%)
    translateZ(86px);
  text-align: center;
}
.cg3-label strong,
.cg3-label span {
  display: block;
  font-family: Outfit, 'Nunito Sans', system-ui, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cg3-label strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #f6f8f4;
}
.cg3-label span {
  margin-top: 1px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(220, 232, 220, .72);
}
.chilli-growth-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  /* Kortare fade — undvik att dunkla namn-etiketter på plantan. */
  padding: 28px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(8, 12, 10, .12) 55%,
    rgba(8, 12, 10, .48) 100%
  );
}
.chilli-growth-tagline {
  margin: 0;
  font-family: Outfit, 'Nunito Sans', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #f2f5f0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}
.chilli-growth-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
}
.chilli-growth-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(12, 18, 16, .48);
  color: rgba(235, 242, 235, .88);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.chilli-growth-loading,
.chilli-growth-error {
  margin: 0 14px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(40, 50, 40, .62);
  max-width: 32ch;
  align-self: center;
}
.chilli-growth-error { color: #b33; }
#sheet .chilli-growth-loading { color: rgba(220, 230, 220, .7); }
#sheet .chilli-growth.is-clean-3d {
  color: #f2f5f0;
}

@keyframes cg3-pot-in {
  from { opacity: 0; transform: translateZ(0) translateY(18px) scale(.86); }
  to { opacity: 1; transform: translateZ(0) translateY(0) scale(1); }
}
@keyframes cg3-stem-grow {
  from { transform: translateZ(4px) scaleY(0); }
  to { transform: translateZ(4px) scaleY(1); }
}
@keyframes cg3-bud-in {
  from {
    opacity: 0;
    transform: translate3d(var(--cg-x, 0px), calc(var(--cg-y, 0px) + 10px), var(--cg-z, 0px)) scale(.2);
  }
  to {
    opacity: .92;
    transform: translate3d(var(--cg-x, 0px), var(--cg-y, 0px), var(--cg-z, 0px)) scale(1);
  }
}
@keyframes cg3-leaf-in {
  to { opacity: 1; transform: translateZ(10px) rotateZ(-28deg) rotateY(18deg) scale(1); }
}
.cg3-leaf.is-right {
  animation-name: cg3-leaf-in-r;
}
@keyframes cg3-leaf-in-r {
  to { opacity: 1; transform: translateZ(6px) rotateZ(32deg) rotateY(-16deg) scale(1); }
}
@keyframes cg3-twig-in-right {
  from {
    opacity: 0;
    transform: translateZ(var(--cg-z)) rotate(var(--cg-ang)) scaleX(0);
  }
  to {
    opacity: 1;
    transform: translateZ(var(--cg-z)) rotate(var(--cg-ang)) scaleX(1);
  }
}
@keyframes cg3-twig-in-left {
  from {
    opacity: 0;
    transform: translateZ(var(--cg-z)) scaleX(-1) rotate(var(--cg-ang)) scale(0, 1);
  }
  to {
    opacity: 1;
    transform: translateZ(var(--cg-z)) scaleX(-1) rotate(var(--cg-ang)) scale(1, 1);
  }
}
@keyframes cg3-twig-joint-in {
  from { opacity: 0; transform: translateZ(1px) scale(.4); }
  to { opacity: 1; transform: translateZ(1px) scale(1); }
}
@keyframes cg3-twig-seg-in {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}
@keyframes cg3-twig-leaf-in {
  from { opacity: 0; transform: rotate(-28deg) scale(.2); }
  to { opacity: 1; transform: rotate(-28deg) scale(1); }
}
@keyframes cg3-twig-leaf-in-wilt {
  from { opacity: 0; transform: rotate(18deg) scale(.2); }
  to { opacity: .85; transform: rotate(18deg) scale(1); }
}
@keyframes cg3-pepper-in {
  0% { opacity: 0; transform: translate3d(var(--cg-x, 0px), calc(var(--cg-y, 0px) + 16px), var(--cg-z, 0px)) rotateZ(var(--cg-rot, 0deg)) scale(.2); }
  70% { opacity: 1; transform: translate3d(var(--cg-x, 0px), calc(var(--cg-y, 0px) - 4px), var(--cg-z, 0px)) rotateZ(var(--cg-rot, 0deg)) scale(1.08); }
  100% { opacity: 1; transform: translate3d(var(--cg-x, 0px), var(--cg-y, 0px), var(--cg-z, 0px)) rotateZ(var(--cg-rot, 0deg)) scale(1); }
}
@keyframes cg3-label-in {
  from {
    opacity: 0;
    transform:
      rotateZ(calc(-1 * var(--cg-rot, 0deg)))
      translateZ(78px)
      translateY(6px);
  }
  to {
    opacity: 1;
    transform:
      rotateZ(calc(-1 * var(--cg-rot, 0deg)))
      translateZ(78px)
      translateY(0);
  }
}
.cg3-node.is-root .cg3-label {
  animation-name: cg3-label-in-root;
}
@keyframes cg3-label-in-root {
  from {
    opacity: 0;
    transform:
      rotateZ(calc(-1 * var(--cg-rot, 0deg)))
      translateX(-50%)
      translateZ(86px)
      translateY(6px);
  }
  to {
    opacity: 1;
    transform:
      rotateZ(calc(-1 * var(--cg-rot, 0deg)))
      translateX(-50%)
      translateZ(86px)
      translateY(0);
  }
}
@keyframes cg3-sway {
  0%, 100% { transform: rotateZ(-1.4deg); }
  50% { transform: rotateZ(1.6deg); }
}
@media (prefers-reduced-motion: reduce) {
  .cg3-plant { animation: none !important; }
  .cg3-bud,
  .cg3-more {
    animation: none !important;
    opacity: 1 !important;
  }
  .cg3-bud {
    transform: translate3d(var(--cg-x, 0px), var(--cg-y, 0px), var(--cg-z, 0px)) scale(1) !important;
  }
  .cg3-twig,
  .cg3-twig.is-right,
  .cg3-twig.is-left,
  .cg3-twig-joint,
  .cg3-twig-seg-a,
  .cg3-twig-seg-b,
  .cg3-twig-leaf {
    animation: none !important;
    opacity: 1 !important;
    transform: none;
  }
  .cg3-twig.is-right {
    transform: translateZ(var(--cg-z)) rotate(var(--cg-ang)) scaleX(1) !important;
  }
  .cg3-twig.is-left {
    transform: translateZ(var(--cg-z)) scaleX(-1) rotate(var(--cg-ang)) !important;
  }
  .cg3-twig-seg-a,
  .cg3-twig-seg-b {
    transform: scaleX(1) !important;
  }
  .cg3-twig-leaf {
    transform: rotate(-28deg) scale(1) !important;
  }
  .cg3-twig.is-wilted .cg3-twig-leaf {
    transform: rotate(18deg) scale(1) !important;
  }
  .cg3-label,
  .cg3-node.is-root .cg3-label {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* —— Overlay kits: tavla / länk / plats + pickers —— */
.gallery-overlay-text.is-place,
.qc-float.text.is-place,
.studio-float.text.is-place {
  white-space: pre-wrap;
  text-align: center;
  line-height: 1.2;
  max-width: 78%;
}

.gallery-overlay-text.is-frame[data-frame-style="dark"],
.qc-float.text.is-frame[data-frame-style="dark"],
.studio-float.text.is-frame[data-frame-style="dark"] {
  background: rgba(12, 16, 22, .78);
  border-color: rgba(255, 255, 255, .18);
  color: #f4f7f2;
}
.gallery-overlay-text.is-frame[data-frame-style="polaroid"],
.qc-float.text.is-frame[data-frame-style="polaroid"],
.studio-float.text.is-frame[data-frame-style="polaroid"] {
  background: #f7f4ee;
  border-radius: 4px;
  border-color: rgba(0, 0, 0, .12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  color: #222;
}
.gallery-overlay-text.is-frame[data-frame-style="film"],
.qc-float.text.is-frame[data-frame-style="film"],
.studio-float.text.is-frame[data-frame-style="film"] {
  background: rgba(20, 18, 16, .88);
  border: 3px solid #c9a227;
  border-radius: 2px;
  color: #f5e6b8;
}
.gallery-overlay-text.is-frame[data-frame-style="neon"],
.qc-float.text.is-frame[data-frame-style="neon"],
.studio-float.text.is-frame[data-frame-style="neon"] {
  background: rgba(8, 4, 20, .72);
  border: 1.5px solid #ff2d95;
  border-radius: 16px;
  box-shadow: 0 0 18px rgba(255, 45, 149, .45);
  color: #fffc00;
}
.gallery-overlay-text.is-frame[data-frame-style="kraft"],
.qc-float.text.is-frame[data-frame-style="kraft"],
.studio-float.text.is-frame[data-frame-style="kraft"] {
  background: #c4a574;
  border: 1px solid #8a6a3e;
  border-radius: 8px;
  color: #2a1c0c;
}
.gallery-overlay-text.is-frame[data-frame-style="ink"],
.qc-float.text.is-frame[data-frame-style="ink"],
.studio-float.text.is-frame[data-frame-style="ink"] {
  background: rgba(250, 250, 248, .92);
  border: 2px solid #111;
  border-radius: 0;
  color: #111;
}
.gallery-overlay-text.is-frame[data-frame-style="pastel"],
.qc-float.text.is-frame[data-frame-style="pastel"],
.studio-float.text.is-frame[data-frame-style="pastel"] {
  background: rgba(255, 214, 232, .72);
  border-radius: 22px;
  color: #5a2a48;
}
.gallery-overlay-text.is-frame[data-frame-style="brutal"],
.qc-float.text.is-frame[data-frame-style="brutal"],
.studio-float.text.is-frame[data-frame-style="brutal"] {
  background: #ffe566;
  border: 3px solid #111;
  border-radius: 0;
  box-shadow: 6px 6px 0 #111;
  color: #111;
}
.gallery-overlay-text.is-frame[data-frame-style="ticket"],
.qc-float.text.is-frame[data-frame-style="ticket"],
.studio-float.text.is-frame[data-frame-style="ticket"] {
  background: #fffaf0;
  border: 2px dashed #c45c26;
  border-radius: 10px;
  color: #8b3a12;
}

.gallery-overlay-text.is-link[data-link-style="outline"],
.qc-float.text.is-link[data-link-style="outline"],
.studio-float.text.is-link[data-link-style="outline"] {
  background: transparent;
  border: 2px solid #fff;
  color: #fff !important;
}
.gallery-overlay-text.is-link[data-link-style="solid"],
.qc-float.text.is-link[data-link-style="solid"],
.studio-float.text.is-link[data-link-style="solid"] {
  background: #00e5ff;
  border: 0;
  color: #041018 !important;
}
.gallery-overlay-text.is-link[data-link-style="ghost"],
.qc-float.text.is-link[data-link-style="ghost"],
.studio-float.text.is-link[data-link-style="ghost"] {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  color: #fff !important;
}
.gallery-overlay-text.is-link[data-link-style="chip"],
.qc-float.text.is-link[data-link-style="chip"],
.studio-float.text.is-link[data-link-style="chip"] {
  background: #111;
  border: 0;
  border-radius: 10px;
  color: #fffc00 !important;
}
.gallery-overlay-text.is-link[data-link-style="underline"],
.qc-float.text.is-link[data-link-style="underline"],
.studio-float.text.is-link[data-link-style="underline"] {
  background: transparent;
  border: 0;
  border-bottom: 2px solid #00e5ff;
  border-radius: 0;
  padding: .15em .05em;
  color: #00e5ff !important;
  box-shadow: none;
}
.gallery-overlay-text.is-link[data-link-style="square"],
.qc-float.text.is-link[data-link-style="square"],
.studio-float.text.is-link[data-link-style="square"] {
  background: #ff5a3c;
  border: 0;
  border-radius: 4px;
  color: #fff !important;
}
.gallery-overlay-text.is-link[data-link-style="glow"],
.qc-float.text.is-link[data-link-style="glow"],
.studio-float.text.is-link[data-link-style="glow"] {
  background: rgba(20, 8, 40, .75);
  border: 1.5px solid #ff2d95;
  color: #fffc00 !important;
  box-shadow: 0 0 16px rgba(255, 45, 149, .4);
}
.gallery-overlay-text.is-link[data-link-style="danger"],
.qc-float.text.is-link[data-link-style="danger"],
.studio-float.text.is-link[data-link-style="danger"] {
  background: #b01020;
  border: 0;
  color: #fff !important;
}
.gallery-overlay-text.is-link[data-link-style="mono"],
.qc-float.text.is-link[data-link-style="mono"],
.studio-float.text.is-link[data-link-style="mono"] {
  background: #f0f0f0;
  border: 1px solid #222;
  border-radius: 2px;
  color: #111 !important;
  font-family: "Special Elite", "Courier New", monospace;
}

#kit-dialog,
.kit-dialog {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}
#kit-dialog.is-open,
.kit-dialog.is-open {
  pointer-events: auto;
}
#kit-dialog[hidden],
.kit-dialog[hidden] {
  display: none !important;
}
.kit-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.kit-dialog-card {
  position: relative;
  width: min(100%, 420px);
  max-height: min(62dvh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 0;
  background: rgba(4, 12, 16, .55);
  color: #f2f5f0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  transform: translateY(18px);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
@media (min-width: 721px) {
  .kit-dialog-card {
    width: min(100%, 400px);
    border-radius: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    margin-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
#kit-dialog.is-open.is-in .kit-dialog-card,
.kit-dialog.is-open.is-in .kit-dialog-card {
  transform: none;
  opacity: 1;
}
.kit-dialog-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}
.kit-dialog-msg {
  margin: 0 0 10px;
  font-size: 12px;
  color: rgba(230, 240, 230, .7);
}
.kit-dialog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.kit-dialog-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(4, 12, 16, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
}
.kit-dialog-item:active {
  transform: scale(.97);
}
.kit-dialog-preview {
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: pre-wrap;
  box-sizing: border-box;
  overflow: hidden;
}
.kit-dialog-preview.is-tavla {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-height: 88px;
}
.kit-dialog-preview.is-link {
  border-radius: 999px;
  min-height: 34px;
  padding: 8px 10px;
}
.kit-dialog-preview.is-place {
  background: transparent;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .65);
  min-height: 42px;
  font-size: 13px;
}
.kit-dialog-item-label {
  font-size: 10px;
  font-weight: 700;
  opacity: .85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}
.kit-dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  position: sticky;
  bottom: 0;
  padding-top: 4px;
  background: linear-gradient(180deg, transparent, rgba(4, 12, 16, .72) 28%);
}
.kit-dialog-actions button {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
}
.kit-dialog-cancel {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
}

@media (max-width: 720px) {
  .qc-frame-chip {
    font-size: 10.5px;
    padding: 9px 2px;
    min-height: 36px;
  }

  .qc-float.text.is-frame,
  .studio-float.text.is-frame {
    width: min(46%, 168px);
    min-width: 96px;
    max-width: 86%;
    max-height: 48%;
    padding: 6% 7%;
    font-size: clamp(13px, 3.6vw, 17px);
  }
  .qc-float.text.is-link,
  .studio-float.text.is-link {
    max-width: 88%;
    padding: 0.45em 0.95em;
    font-size: clamp(13px, 3.8vw, 17px);
  }
  .qc-float.text.is-place,
  .studio-float.text.is-place {
    max-width: 86%;
    font-size: clamp(13px, 3.8vw, 18px);
  }
}
.kit-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 14px;
}
.kit-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  background: var(--sw, #fff);
  cursor: pointer;
  padding: 0;
}
.kit-color-swatch.is-on {
  outline: 2px solid #00e5ff;
  outline-offset: 2px;
}
.kit-color-native-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.kit-color-native-wrap input[type="color"] {
  width: 48px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
}
.kit-color-native-wrap span {
  font-size: 13px;
  opacity: .8;
}
.qc-color-more,
.studio-color-more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
