@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.ff-media-demo {
  min-width: 0;
  height: min(64vh, 600px);
  overflow: hidden;
  padding: 20px;
}

.sd {
  --c-bg-primary: #11111e;
  --c-bg-secondary: #1c1c30;
  --c-bg-tertiary: #252540;
  --c-hover: rgba(255, 255, 255, 0.05);
  --c-accent: #5865f2;
  --c-text: #e8e8f0;
  --c-muted: #8e8ea8;
  --c-border: #2e2e50;

  --w: 640px;
  --h: 480px;
  --s: 1;

  position: relative;
  z-index: 1;
  width: calc(var(--w) * var(--s));
  height: calc(var(--h) * var(--s));
}

.sd-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--w);
  height: var(--h);
  transform: scale(var(--s));
  transform-origin: 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

.sd svg {
  display: block;
  flex-shrink: 0;
}

.sd-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 49px;
  padding: 0 16px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--c-border);
}

.sd-hash {
  color: var(--c-muted);
}

.sd-room {
  font-size: 1rem;
  font-weight: 700;
}

.sd-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--c-muted);
  opacity: 0.5;
}

.sd-topic {
  flex: 1;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--c-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sd-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--c-muted);
}

.sd-header-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--c-border);
}

.sd-timeline {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 8px 0 14px;
}

.sd-date {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-muted);
}

.sd-date::before,
.sd-date::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.sd-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 16px 2px;
  flex-shrink: 0;
}

.sd-row-grouped {
  padding: 1px 16px 1px;
}

.sd-avatar-col {
  display: flex;
  justify-content: center;
  width: 36px;
  padding-top: 2px;
  flex-shrink: 0;
}

.sd-avatar img,
.sd-av img,
.sd-tile-av img,
.sd-space-av img {
  display: block;
  width: 100%;
  height: 100%;
}

.sd-avatar {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: hsl(var(--hue), 60%, 42%);
}

.sd-body {
  min-width: 0;
  padding-right: 12px;
}

.sd-meta {
  margin-bottom: 2px;
}

.sd-name {
  color: var(--c-accent);
}

.sd-text {
  font-size: 0.95rem;
  line-height: 1.55;
}

.sd-sticker-msg {
  display: block;
  width: 152px;
  height: 152px;
  border-radius: 4px;
}

.sd-row.is-new {
  animation: sd-fade-in-up 120ms ease-out both;
}

.sd-row.is-sending {
  opacity: 0.6;
}
@keyframes sd-fade-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sd-composer {
  flex-shrink: 0;
  padding: 0 8px 9px;
}

.sd-input {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 0 14px;
  background: var(--c-bg-tertiary);
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.sd-placeholder {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.97rem;
  color: var(--c-muted);
}

.sd-btn,
.sd-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--c-muted);
  transition: color 100ms, background 100ms;
}

.sd-btn.is-hover {
  color: var(--c-text);
  background: var(--c-hover);
}

.sd-btn.is-active {
  color: var(--c-accent);
}

.sd-send {
  color: #fff;
  background: var(--c-accent);
  opacity: 0.4;
}

.sd-picker {
  position: absolute;
  right: 12px;
  bottom: 61px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 360px;
  height: 360px;
  overflow: hidden;
  background: var(--c-bg-secondary);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  visibility: hidden;
}

.sd.is-picker-open .sd-picker {
  visibility: visible;
}

.sd-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--c-border);
}

.sd-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-muted);
  border-bottom: 2px solid transparent;
}

.sd-tab.is-active {
  color: var(--c-text);
  border-bottom-color: var(--c-accent);
}

.sd-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  color: var(--c-muted);
}

.sd-picker-body {
  flex: 1;
  min-height: 0;
  display: flex;
}

.sd-pack-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px;
  background: var(--c-bg-primary);
  border-right: 1px solid var(--c-border);
}

.sd-pack-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.sd-pack-btn.is-active {
  background: var(--c-hover);
}

.sd-pack-btn img {
  width: 18px;
  height: 18px;
  border-radius: 2px;
}

.sd-picker-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sd-search {
  flex-shrink: 0;
  padding: 8px 8px 0;
}

.sd-search span {
  display: block;
  padding: 6px 28px 6px 10px;
  font-size: 0.85rem;
  color: var(--c-muted);
  background: var(--c-bg-primary);
  border: 1px solid var(--c-border);
  border-radius: 4px;
}

.sd-list {
  flex: 1;
  min-height: 0;
  margin-top: 6px;
  overflow: hidden;
}

.sd-pack {
  margin-bottom: 4px;
}

.sd-pack-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-muted);
  background: var(--c-bg-secondary);
}

.sd-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 0 4px;
}

.sd-cell {
  display: flex;
  justify-content: center;
  padding: 4px 2px;
  border-radius: 4px;
  transition: background 0.15s;
}

.sd-cell.is-hover {
  background: var(--c-hover);
}

.sd-cell img {
  width: 48px;
  height: 48px;
}

.sd-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transform-origin: 6px 5px;
  filter: drop-shadow(0 0 6px rgba(168, 128, 255, 0.8)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  will-change: transform;
}

.sd-click {
  position: absolute;
  z-index: 9;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: rgba(196, 160, 255, 0.45);
  pointer-events: none;
  animation: sd-click 420ms ease-out forwards;
}
@keyframes sd-click {
  from { transform: scale(0.3); opacity: 1; }
  to   { transform: scale(1.6); opacity: 0; }
}

.sd-timeline.is-fading,
.sd.is-fading .sd-picker {
  transition: opacity 300ms;
  opacity: 0;
}

.sd-hangout .sd-canvas > :not(.sd-cursor),
.sd-voice .sd-canvas > :not(.sd-cursor) {
  transition: opacity 300ms;
}

.sd.is-fading-out .sd-canvas > :not(.sd-cursor):not(.sd-rail) {
  opacity: 0;
}
@media (max-width: 860px) {
  .ff-media-demo {
    height: auto;
    padding: 10px;
  }
}

.sd-voice .sd-canvas {
  flex-direction: row;
}

.sd-voice {
  --w: 720px;
}

.sd-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  background: hsl(var(--hue), 60%, 42%);
  overflow: hidden;
}

.sd-av-28 { width: 28px; height: 28px; font-size: 0.75rem; }
.sd-av-20 { width: 20px; height: 20px; font-size: 0.6rem; font-weight: 700; }

.sd-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 4px;
  color: var(--c-muted);
}

.sd-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 64px;
  flex-shrink: 0;
  padding: 8px 0 72px;
  background: var(--c-bg-primary);
  border-right: 1px solid var(--c-border);
}

.sd-rail-btn,
.sd-space {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  color: var(--c-muted);
  background: var(--c-bg-tertiary);
}

.sd-rail-sep {
  width: 32px;
  height: 1px;
  margin: 4px 0;
  flex-shrink: 0;
  background: var(--c-border);
}

.sd-space-av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: hsl(var(--hue), 60%, 42%);
}

.sd-pill {
  position: absolute;
  left: -11px;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--c-accent);
  opacity: 0;
  transform: translateY(-50%);
  transition: height 100ms ease, opacity 100ms ease;
}

.sd-space.is-hover .sd-pill { height: 8px; opacity: 1; }
.sd-space.is-active .sd-pill { height: 32px; opacity: 1; }

.sd-space-dot {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-accent);
  border: 2px solid var(--c-bg-primary);
}

.sd-list-panel {
  display: flex;
  flex-direction: column;
  width: 240px;
  flex-shrink: 0;
  background: var(--c-bg-primary);
  border-right: 1px solid var(--c-border);
}

.sd-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 49px;
  flex-shrink: 0;
  padding: 12px 12px 8px;
  border-bottom: 1px solid var(--c-border);
}

.sd-list-title {
  flex: 1;
  overflow: hidden;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sd-rooms {
  display: none;
  padding: 2px 0;
}

.sd-rooms.is-shown {
  display: block;
}

.sd-cat {
  display: flex;
  align-items: center;
  margin: 2px 4px 0;
  padding: 1px 8px 1px 4px;
  min-height: 24px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-muted);
}

.sd-cat.is-hover {
  color: var(--c-text);
  background: var(--c-hover);
}

.sd-cat-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.sd-caret {
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.sd-cat.is-collapsed .sd-caret {
  transform: rotate(-90deg);
}

.sd-cat.is-collapsed + .sd-cat-rooms {
  display: none;
}

.sd-cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
}

.sd-room {
  display: flex;
  align-items: center;
  height: 40px;
  margin: 0 4px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--c-muted);
}

.sd-room.is-unread,
.sd-room.is-hover,
.sd-room.is-active {
  color: var(--c-text);
}

.sd-room.is-hover {
  background: var(--c-hover);
}

.sd-room.is-active {
  background: rgba(88, 101, 242, 0.2);
}

.sd-room-av {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  flex-shrink: 0;
}

.sd-type {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--c-muted);
  background: var(--c-bg-primary);
  border: 1px solid var(--c-border);
}

.sd-room.is-active .sd-type {
  color: var(--c-text);
}

.sd-room.is-in-call .sd-type {
  color: #3ba55d;
  border-color: #3ba55d;
}

.sd-room-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sd-room-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  color: var(--c-muted);
}

.sd-count {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  color: #fff;
  background: var(--c-accent);
}

.sd-dock {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  width: 288px;
  overflow: hidden;
  background: var(--c-bg-tertiary);
  border: 1px solid var(--c-border);
  border-radius: 8px;
}

.sd-voice .sd-dock {
  width: 224px;
}

.sd-user {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 14px;
}

.sd-user-id {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.sd-user-av {
  position: relative;
  display: flex;
}

.sd-presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 2px var(--c-bg-tertiary);
}

.sd-user-name {
  overflow: hidden;
  font-size: 0.82rem;
  color: var(--c-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sd-main {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.sd-view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.sd-view.is-shown {
  display: flex;
}

.sd-view.is-shown .sd-row {
  animation: sd-fade-in-up 120ms ease-out both;
}

.sd-art {
  display: flex;
  gap: 6px;
  padding: 8px;
  margin-top: 2px;
  border-radius: 4px;
  background: var(--c-bg-tertiary);
}

.sd-art img {
  width: 44px;
  height: 44px;
}

.sd-vp {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 8px 3px 36px;
}

.sd-vp-row {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 2px 6px 2px 4px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--c-muted);
}

.sd-vp-row .sd-av {
  outline: 2px solid transparent;
}

.sd-vp-row.is-speaking {
  color: var(--c-text);
}

.sd-vp-row.is-speaking .sd-av {
  outline-color: #3ba55d;
}

.sd-vp-name {
  flex: 1;
}

.sd-vp-icons {
  display: none;
  align-items: center;
  gap: 5px;
}

.sd.is-in-call .sd-vp-icons {
  display: flex;
}

.sd-vp-muted {
  display: flex;
  color: #ff6b6b;
}

.sd-vp-me {
  display: none;
}

.sd.is-in-call .sd-vp-me {
  display: flex;
}

.sd-live {
  display: none;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  background: #593695;
}

.sd.is-sharing .sd-live {
  display: inline-block;
}

.sd-callbar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-border);
}

.sd.is-connecting .sd-callbar,
.sd.is-in-call .sd-callbar {
  display: flex;
}

.sd-callbar-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.sd-callbar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ff9d00;
}

.sd.is-in-call .sd-callbar-status {
  color: #3ba55d;
  text-transform: uppercase;
}

.sd-callbar-room {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-muted);
}

.sd-hangup {
  color: #b94a48;
}

.sd-call-header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 49px;
  flex-shrink: 0;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
  background: var(--c-bg-secondary);
  border-bottom: 1px solid var(--c-border);
}

.sd-call-header svg {
  color: var(--c-muted);
}

.sd-call-header-name {
  flex: 1;
}

.sd-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 14px 14px 76px;
  background:
    radial-gradient(75% 60% at 50% 120%, rgba(88, 101, 242, 0.42) 0%, rgba(88, 101, 242, 0) 62%),
    radial-gradient(55% 50% at 4% -12%, rgba(136, 94, 231, 0.3) 0%, rgba(136, 94, 231, 0) 70%),
    radial-gradient(50% 45% at 96% -8%, rgba(120, 76, 200, 0.22) 0%, rgba(120, 76, 200, 0) 70%),
    #111113;
}

.sd-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: 'merlin luna' 'wanda wanda';
  gap: 8px;
  height: 100%;
}

.sd.is-sharing .sd-tiles {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 2fr 1fr;
  grid-template-areas: 'screen screen screen' 'merlin luna wanda';
}

.sd-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  border-radius: 14px;
  background: #26262e;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 120ms;
}

.sd-tile[data-p='merlin'] { grid-area: merlin; }
.sd-tile[data-p='luna']   { grid-area: luna; }
.sd-tile[data-p='wanda']  { grid-area: wanda; display: none; }
.sd.is-in-call .sd-tile[data-p='wanda'] { display: flex; }
.sd-tile-screen { grid-area: screen; display: none; overflow: hidden; }
.sd.is-sharing .sd-tile-screen { display: flex; }

.sd-tile.is-speaking {
  box-shadow: inset 0 0 0 3px #23a55a;
}

.sd-tile:not(.sd-tile-screen) {
  background: linear-gradient(135deg, hsl(var(--hue, 240), 38%, 20%), hsl(var(--hue, 240), 34%, 34%));
}

.sd-tile-live {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: #593695;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sd-tile-viewers {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(10, 10, 20, 0.6);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.sd-tile-av {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  background: hsl(var(--hue), 60%, 42%);
  overflow: hidden;
}

.sd.is-sharing .sd-tile:not(.sd-tile-screen) .sd-tile-av {
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
}

.sd-tile-name {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.sd-tile-muted {
  color: #ff6b6b;
}

.sd-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    url('../assets/decor/stars-near.svg'),
    radial-gradient(80% 90% at 50% 100%, rgba(136, 94, 231, 0.55), transparent 70%),
    linear-gradient(180deg, #1a1236, #0d0a1c);
}

.sd-screen-hat {
  width: 74px;
  filter: drop-shadow(0 8px 18px rgba(106, 50, 159, 0.7));
}

.sd-screen-bar {
  position: absolute;
  top: 34px;
  left: 12px;
  width: 90px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #3ba55d 70%, rgba(255, 255, 255, 0.15) 70%);
}

.sd-screen-bar-2 {
  top: 48px;
  width: 64px;
  background: linear-gradient(90deg, #5865f2 45%, rgba(255, 255, 255, 0.15) 45%);
}

.sd-controls {
  position: absolute;
  left: 50%;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
}

.sd-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  color: var(--c-muted);
}

.sd-ctrl.is-hover {
  color: var(--c-text);
  background: var(--c-hover);
}

.sd.is-sharing .sd-ctrl-share {
  color: #3ba55d;
}

.sd-ctrl-hangup {
  color: #b94a48;
}

.sd-split {
  display: inline-flex;
  align-items: stretch;
}

.sd-split > .sd-ctrl,
.sd-split > .sd-icon-btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.sd-ctrl-caret,
.sd-icon-caret {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 4px 4px 0;
  color: var(--c-muted);
}

.sd-ctrl-caret { width: 16px; height: 40px; }
.sd-icon-caret { width: 10px; height: 28px; }

.sd-user { gap: 2px; }

.sd-ctrl-sep {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: var(--c-border);
}

.sd-connecting {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--c-muted);
}

.sd-connecting .sd-spinner { display: none; }

.sd.is-connecting .sd-connecting {
  display: flex;
}

.sd-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sd-spin 0.8s linear infinite;
}
@keyframes sd-spin {
  to { transform: rotate(360deg); }
}

.sd-row {
  position: relative;
}

.sd-row.is-msg-hover {
  border-radius: 12px;
  background: var(--c-hover);
}

.sd-msg-actions {
  position: absolute;
  z-index: 4;
  display: none;
  gap: 3px;
  padding: 3px 5px;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  border-radius: 4px;
}

.sd.is-msg-actions .sd-msg-actions {
  display: flex;
}

.sd-msg-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  color: var(--c-muted);
}

.sd-msg-action.is-hover {
  color: var(--c-text);
  background: var(--c-hover);
}

.sd-react-picker {
  position: absolute;
  right: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 352px;
  height: 300px;
  overflow: hidden;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  visibility: hidden;
}

.sd.is-react-open .sd-react-picker {
  visibility: visible;
}

.sd-react-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 8px;
}

.sd-react-search > span:first-child {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--c-muted);
  background: var(--c-bg-primary);
  border: 1px solid var(--c-border);
  border-radius: 4px;
}

.sd-react-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--c-muted);
}

.sd-react-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sd-react-picker .sd-pack-btn {
  font-size: 0.9rem;
}

.sd-pack-icon {
  color: var(--c-muted);
}

.sd-react-list {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sd-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  margin-bottom: 4px;
  padding: 0 4px;
}

.sd-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 4px;
  font-size: 1.35rem;
  line-height: 1;
}

.sd-emoji img {
  width: 22px;
  height: 22px;
}

.sd-emoji.is-hover {
  background: var(--c-hover);
}

.sd-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.sd-reaction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 0.95rem;
  color: var(--c-text);
  background: rgba(88, 101, 242, 0.2);
  border: 1px solid var(--c-accent);
  border-radius: 12px;
  animation: sd-scale-in 120ms ease-out both;
}

.sd-reaction img {
  width: 1.1rem;
  height: 1.1rem;
}
@keyframes sd-scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.sd-hero {
  --w: 780px;
  --h: 600px;
  margin: 0 auto;
}

.sd-hero .sd-canvas {
  display: block;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  perspective: 1800px;
  perspective-origin: 50% 45%;
}

.hd-glow {
  position: absolute;
  left: 60px;
  right: 0;
  bottom: 20px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(136, 94, 231, 0.45), transparent);
  filter: blur(30px);
}

.hd-float {
  position: absolute;
  transform-style: preserve-3d;
}

.hd-float-desk {
  top: 40px;
  left: 0;
}

.hd-float-phone {
  top: 170px;
  right: 60px;
}

.hd-desk {
  transform: rotateY(-16deg) rotateX(2deg);
  transform-style: preserve-3d;
}

.hd-monitor {
  width: 620px;
  padding: 10px;
  background: linear-gradient(160deg, #1a1530, #0b0b14);
  border: 1px solid rgba(196, 160, 255, 0.22);
  border-radius: 16px;
  box-shadow:
    0 40px 80px -30px rgba(0, 0, 0, 0.85),
    0 0 70px -20px rgba(136, 94, 231, 0.45);
}

.hd-screen {
  position: relative;
  width: 600px;
  height: 378px;
  overflow: hidden;
  border-radius: 8px;
}

.hd-app {
  position: relative;
  display: flex;
  width: 900px;
  height: 567px;
  padding-top: 40px;
  box-sizing: border-box;
  transform: scale(0.6667);
  transform-origin: 0 0;
  background: var(--c-bg-secondary);
}

.hd-titlebar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg-primary);
  z-index: 2;
}

.hd-titlebar::before {
  content: '';
  position: absolute;
  left: 63px;
  top: 100%;
  width: 1px;
  height: 8px;
  background: var(--c-bg-primary);
}

.hd-titlebar::after {
  content: '';
  position: absolute;
  left: 63px;
  right: 0;
  top: calc(100% - 1px);
  height: 9px;
  border-top: 1px solid var(--c-border);
  border-left: 1px solid var(--c-border);
  border-top-left-radius: 8px;
}

.hd-traffic {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 8px;
}

.hd-traffic i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.hd-traffic i:nth-child(2) { background: #febc2e; }
.hd-traffic i:nth-child(3) { background: #28c840; }

.hd-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 340px;
  height: 26px;
  padding: 0 6px 0 10px;
  box-sizing: border-box;
  border-radius: 6px;
  background: var(--c-bg-tertiary);
  color: var(--c-muted);
  font-size: 0.8rem;
}

.hd-search-label { flex: 1; }

.hd-titlebar-end {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
}

.hd-inbox { position: relative; }
.hd-inbox .sd-space-dot { width: 10px; height: 10px; right: 2px; bottom: 2px; }

.sd-keys { display: inline-flex; gap: 3px; }
.sd-keys kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  box-sizing: border-box;
  border: 1px solid var(--c-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--c-bg-secondary);
  font: 600 0.68rem/1 inherit;
  color: var(--c-muted);
}

.hd-neck {
  width: 96px;
  height: 64px;
  margin: -1px auto 0;
  background: linear-gradient(180deg, #1c1c30, #0e0d1a);
  clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
}

.hd-base {
  width: 250px;
  height: 14px;
  margin: 0 auto;
  border-radius: 50% / 100% 100% 40% 40%;
  background: linear-gradient(180deg, #2a2545, #0e0d1a);
  box-shadow: 0 18px 30px -10px rgba(0, 0, 0, 0.8);
}

.hd-phone {
  position: relative;
  width: 216px;
  height: 440px;
  padding: 8px;
  background: linear-gradient(160deg, #221b3d, #0b0b14);
  border: 1px solid rgba(196, 160, 255, 0.3);
  border-radius: 36px;
  transform: translateZ(80px) rotateY(-16deg) rotateX(2deg) scale(0.85);
  transform-origin: 100% 100%;
  box-shadow:
    0 40px 70px -25px rgba(0, 0, 0, 0.9),
    0 0 50px -12px rgba(136, 94, 231, 0.5);
}

.hd-phone-screen {
  width: 200px;
  height: 424px;
  overflow: hidden;
  border-radius: 28px;
}

.hd-island {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 62px;
  height: 18px;
  border-radius: 10px;
  background: #000;
  transform: translateX(-50%);
}

.hd-mobile {
  display: flex;
  flex-direction: column;
  width: 390px;
  position: relative;
  height: 827px;
  padding-top: 44px;
  transform: scale(0.5128);
  transform-origin: 0 0;
  background: var(--c-bg-secondary);
}

.hd-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 4px 36px 0 44px;
  font-size: 0.95rem;
  font-weight: 600;
}

.hd-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hd-signal {
  width: 17px;
  height: 11px;
  background: linear-gradient(to top, currentColor 30%, transparent 30%) 0 100% / 3px 100% no-repeat,
    linear-gradient(to top, currentColor 55%, transparent 55%) 4.6px 100% / 3px 100% no-repeat,
    linear-gradient(to top, currentColor 80%, transparent 80%) 9.2px 100% / 3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 13.8px 100% / 3px 100% no-repeat;
}

.hd-battery {
  width: 24px;
  height: 11px;
  border-radius: 3px;
  background: currentColor;
}

.hd-glass {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}

.hd-glass-round {
  width: 44px;
  flex-shrink: 0;
}

.hd-glass-pair {
  gap: 26px;
  padding: 0 18px;
}

.hd-ios-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 10px 16px 6px;
}

.hd-room-pill {
  gap: 8px;
  min-width: 0;
  padding: 0 16px 0 10px;
  margin-right: auto;
  font-size: 1.05rem;
  font-weight: 600;
}

.hd-room-pill img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.hd-mobile .sd-row {
  gap: 10px;
  padding: 8px 16px 2px;
}

.hd-mobile .sd-avatar-col {
  width: 40px;
}

.hd-mobile .sd-avatar {
  width: 40px;
  height: 40px;
}

.hd-mobile .sd-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 0;
}

.hd-mobile .sd-name {
  font-weight: 600;
}

.hd-time {
  display: none;
}

.hd-mobile .hd-time {
  display: inline;
  font-size: 0.8rem;
  color: var(--c-muted);
}

.hd-mobile .sd-text {
  font-size: 1.05rem;
}

.hd-ios-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 6px 10px 30px;
}

.hd-ios-input {
  flex: 1;
  justify-content: flex-start;
  padding: 0 16px;
  font-size: 1.05rem;
  color: var(--c-muted);
}

.hd-timeline.is-fading {
  transition: opacity 300ms;
  opacity: 0;
}

.sd-reply {
  margin-bottom: 4px;
  padding-left: 8px;
  overflow: hidden;
  font-size: 0.95rem;
  color: var(--c-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  border-left: 3px solid var(--c-accent);
  border-radius: 2px;
}

.sd-reply b {
  font-weight: 600;
  color: var(--c-text);
}

.sd-reaction.is-other {
  background: var(--c-bg-tertiary);
  border-color: var(--c-border);
}

.sd-reaction-count {
  display: inline-block;
}

.sd-reaction-count.is-bumped {
  animation: sd-bump 150ms ease-out;
}
@keyframes sd-bump {
  50% { transform: scale(1.2); }
}

.sd-hangout {
  --w: 840px;
  --h: 560px;
  --c-danger: #f23f43;
  --c-success: #23a55a;
  --c-info: #4ea8ff;
}

.hg-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 76px;
  background:
    radial-gradient(75% 60% at 50% 120%, rgba(88, 101, 242, 0.32) 0%, rgba(88, 101, 242, 0) 62%),
    var(--c-bg-primary);
}

.hg-area {
  position: relative;
  flex: 1;
  min-height: 0;
}

.hg-tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: var(--c-bg-tertiary);
  transition: left 450ms cubic-bezier(0.45, 0, 0.2, 1), top 450ms cubic-bezier(0.45, 0, 0.2, 1),
    width 450ms cubic-bezier(0.45, 0, 0.2, 1), height 450ms cubic-bezier(0.45, 0, 0.2, 1);
}

.hg-tile.is-instant {
  transition: none;
}

.hg-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 150ms;
  pointer-events: none;
}

.hg-tile.is-speaking::after {
  box-shadow: inset 0 0 0 3px var(--c-success);
}

.hg-tile.is-soundboard::after {
  box-shadow: inset 0 0 0 3px var(--c-info);
}

.hg-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.85;
  background: linear-gradient(135deg, hsl(var(--hue), 45%, 22%), hsl(var(--hue), 40%, 38%));
}

.hg-av {
  position: relative;
  display: inline-flex;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 50%;
  background: hsl(var(--hue), 60%, 42%);
}

.hg-tile.is-compact .hg-av {
  width: 36px;
  height: 36px;
}

.hg-av img {
  width: 100%;
  height: 100%;
}

.hg-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  max-width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.hg-tile.is-compact .hg-label {
  left: 5px;
  bottom: 5px;
  padding: 2px 6px;
  font-size: 0.68rem;
}

.hg-muted {
  color: var(--c-danger);
}

.hg-reaction {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  font-size: 2rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.hg-tile.is-compact .hg-reaction {
  top: 4px;
  right: 6px;
  font-size: 1.5rem;
}

.hg-reaction.is-on {
  animation: hg-pop 3s ease-out forwards;
}

.hg-tile-screen {
  background: #000;
}

.hg-screen {
  position: absolute;
  inset: 0;
  display: none;
}

.hg-tile-screen.is-watching .hg-screen {
  display: block;
}

.hg-tile-screen.is-watching .hg-backdrop,
.hg-tile-screen.is-watching .hg-av,
.hg-tile-screen.is-watching .hg-watch-overlay {
  display: none;
}

.hg-watch-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}

.hg-tile.is-compact .hg-watch {
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.62rem;
}

.hg-tile.is-compact .hg-watch svg {
  width: 11px;
  height: 11px;
}

.hg-watch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 150ms, background-color 150ms;
}

.hg-watch.is-hover {
  background: #fff;
  transform: scale(1.04);
}

.hg-live {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 0 7px;
  border-radius: 999px;
  background: #593695;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hg-tile.is-compact .hg-live {
  top: 5px;
  left: 5px;
  font-size: 0.58rem;
  line-height: 15px;
}

.hg-screen-game {
  background:
    url('../assets/decor/stars-near.svg'),
    radial-gradient(80% 90% at 50% 100%, rgba(136, 94, 231, 0.55), transparent 70%),
    linear-gradient(180deg, #1a1236, #0d0a1c);
}

.hg-game-boss {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 26%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 18px rgba(106, 50, 159, 0.7));
  animation: hg-bob 2.4s ease-in-out infinite;
}

.hg-bar {
  position: absolute;
  top: 36px;
  left: 12px;
  width: 26%;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #3ba55d 70%, rgba(255, 255, 255, 0.15) 70%);
}

.hg-bar-2 {
  top: 49px;
  width: 18%;
  background: linear-gradient(90deg, #5865f2 45%, rgba(255, 255, 255, 0.15) 45%);
}

.hg-game-hp {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30%;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #ff6b6b 62%, rgba(255, 255, 255, 0.15) 62%);
}

.hg-screen-art {
  background: radial-gradient(90% 80% at 30% 20%, #3a2a55, #1b1630);
}

.hg-art-piece {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 30%;
  padding: 8px;
  border-radius: 8px;
  background: #f4efe6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%) rotate(-4deg);
}

.hg-palette {
  position: absolute;
  left: 50%;
  bottom: 40px;
  display: flex;
  gap: 5px;
  transform: translateX(-50%);
}

.hg-palette i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.hg-tile.is-compact .hg-palette,
.hg-tile.is-compact .hg-bar,
.hg-tile.is-compact .hg-game-hp {
  display: none;
}

.hg-wt {
  display: none;
  background: #000;
}

.sd.is-wt .hg-wt {
  display: flex;
}

.hg-player {
  position: absolute;
  inset: 0;
  display: none;
  background:
    radial-gradient(70% 70% at 70% 30%, rgba(255, 120, 160, 0.35), transparent 70%),
    linear-gradient(160deg, #2b1840, #120c22);
}

.sd.is-wt-joined .hg-player {
  display: block;
}

.hg-yt-art {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 20px rgba(255, 200, 120, 0.35));
}

.hg-yt-title {
  position: absolute;
  left: 14px;
  bottom: 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hg-yt-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.hg-yt-progress i {
  display: block;
  width: 12%;
  height: 100%;
  background: #ff0033;
}

.sd.is-wt-joined .hg-yt-progress i {
  animation: hg-progress 9s linear forwards;
}

.hg-player-label {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  background: #593695;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}

.hg-controls {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-radius: 8px;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  transform: translateX(-50%);
}

.hg-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  color: var(--c-muted);
}

.hg-ctrl.is-hover {
  color: var(--c-text);
  background: var(--c-hover);
}

.hg-ctrl-danger {
  color: var(--c-danger);
}

.hg-split {
  display: inline-flex;
  align-items: stretch;
}

.hg-split > .hg-ctrl {
  border-radius: 4px 0 0 4px;
}

.hg-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 40px;
  border-radius: 0 4px 4px 0;
  color: var(--c-muted);
}

.hg-divider {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--c-border);
}

.sd .hg-ico-on {
  display: none;
}

.sd.is-board-open .hg-ctrl-board {
  color: var(--c-accent);
}

.sd.is-board-open .hg-ctrl-board .hg-ico-on {
  display: block;
}

.sd.is-board-open .hg-ctrl-board svg.hg-ico-off {
  display: none;
}

.sd.is-wt-joined .hg-ctrl-wt {
  color: var(--c-accent);
}

.sd.is-wt-joined .hg-ctrl-wt .hg-ico-on {
  display: block;
}

.sd.is-wt-joined .hg-ctrl-wt svg.hg-ico-off {
  display: none;
}

.hg-queue {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 208px;
  border-radius: 8px;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
  transition: opacity 300ms, transform 300ms;
}

.sd.is-wt-joined .hg-queue {
  opacity: 1;
  transform: none;
}

.hg-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px 12px;
  color: var(--c-muted);
}

.hg-q-heading {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-text);
}

.hg-q-count {
  margin-left: 4px;
  font-weight: 600;
  color: var(--c-muted);
}

.hg-q-add {
  display: flex;
  gap: 6px;
  padding: 0 10px 10px;
}

.hg-q-input {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--c-bg-tertiary);
  color: var(--c-muted);
  font-size: 0.68rem;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hg-q-btn {
  padding: 0 10px;
  border-radius: 4px;
  background: var(--c-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 26px;
}

.hg-q-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 6px 6px;
  overflow: hidden;
}

.hg-q-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
}

.hg-q-row.is-current {
  background: var(--c-hover);
}

.hg-q-thumb {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 27px;
  border-radius: 4px;
  background: linear-gradient(160deg, #2b1840, #120c22);
}

.hg-q-thumb img {
  height: 70%;
}

.hg-q-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hg-q-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hg-q-row.is-current .hg-q-title {
  color: var(--c-accent);
}

.hg-q-meta {
  font-size: 0.62rem;
  color: var(--c-muted);
}

.hg-board {
  position: absolute;
  left: 50%;
  bottom: 76px;
  z-index: 5;
  width: 352px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 150ms, transform 150ms;
}

.sd.is-board-open .hg-board {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hg-board-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
}

.hg-search-input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--c-bg-primary);
  color: var(--c-muted);
  font-size: 0.85rem;
  line-height: 32px;
}

.hg-board-volume {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--c-muted);
}

.hg-board-body {
  display: flex;
  height: 186px;
  border-top: 1px solid var(--c-border);
}

.hg-board-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 44px;
  padding: 8px 0;
  border-right: 1px solid var(--c-border);
}

.hg-nav-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  font-size: 1rem;
  line-height: 1;
  color: var(--c-muted);
}

.hg-nav-btn.is-active {
  background: var(--c-hover);
}

.hg-nav-pill {
  position: absolute;
  left: -6px;
  width: 3px;
  height: 0;
  border-radius: 0 3px 3px 0;
  background: var(--c-text);
}

.hg-nav-btn.is-active .hg-nav-pill {
  height: 18px;
}

.hg-board-main {
  flex: 1;
  min-width: 0;
  padding: 8px;
}

.hg-pack-label {
  padding: 0 4px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-muted);
}

.hg-board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.hg-sound {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 68px;
  padding: 4px;
  border-radius: 4px;
  color: var(--c-text);
}

.hg-sound.is-hover {
  background: var(--c-hover);
}

.hg-sound-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.hg-sound-name {
  max-width: 100%;
  font-size: 0.75rem;
  line-height: 1.2;
  text-align: center;
}

.hg-board-footer {
  padding: 6px 10px;
  border-top: 1px solid var(--c-border);
  font-size: 0.75rem;
  text-align: center;
  color: var(--c-muted);
}
@keyframes hg-pop {
  0% { transform: scale(0.4); opacity: 0; }
  20% { transform: scale(1.15); opacity: 1; }
  80% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes hg-bob {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, -58%); }
}
@keyframes hg-progress {
  from { width: 12%; }
  to { width: 46%; }
}

.hg-tile.is-compact .hg-player-label,
.hg-tile.is-compact .hg-yt-title {
  display: none;
}

.sd .hg-ico-spot,
.sd.is-spotlight .hg-ctrl-view svg.hg-ico-grid {
  display: none;
}

.sd.is-spotlight .hg-ctrl-view .hg-ico-spot {
  display: block;
}

.hg-tile.is-hidden {
  display: none;
}

.sd.is-more-open .hg-ctrl-more {
  color: var(--c-accent);
}

.hg-more {
  position: absolute;
  bottom: 70px;
  z-index: 6;
  width: 250px;
  padding: 4px;
  border-radius: 8px;
  background: var(--c-bg-secondary);
  border: 1px solid var(--c-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms, transform 120ms;
}

.sd.is-more-open .hg-more {
  opacity: 1;
  transform: translateY(0);
}

.hg-more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--c-text);
  white-space: nowrap;
}

.hg-more-item svg {
  color: var(--c-muted);
}

.hg-more-item > span:first-of-type {
  flex: 1;
}

.hg-more-item.is-hover {
  background: var(--c-hover);
}

.hg-more-divider {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: var(--c-border);
}

.hg-switch {
  position: relative;
  width: 30px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--c-accent);
  transition: background-color 150ms;
}

.hg-switch i {
  position: absolute;
  top: 2px;
  left: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 150ms;
}

.sd.is-video-only .hg-switch {
  background: var(--c-bg-tertiary);
}

.sd.is-video-only .hg-switch i {
  left: 2px;
}

.hg-q-new {
  display: none;
}

.sd.is-q-added .hg-q-new {
  display: flex;
  animation: sd-fade-in-up 300ms ease-out;
}
